Table of Contents

<--   Back

How I Keep My Browser Organized and Clean


Use custom user data directory for chromium based browser or profile for firefox, simple script to launch it, and don’t forget to close unused tab.

User Data Directory


The user data directory contains profile data such as history, bookmarks, and cookies, as well as other per-installation local state1.


What information is stored in my profile? Bookmarks, Downloads, Browsing History, Passwords, Cookies, Extensions, et cetera2.

Custom User Data Directory

Using custom user data directory allow me to focus and separate my workflow like for personal where all email and social media related, work where I use for work related, and development where I do webdev stuff.

To use custom user data directly, first you need to create new directory, and start browser with user data directory to new directory path.

chromium-browser --user-data-dir=./dir
firefox --new-instance --profile ./dir

To differentiate each browser I use different themes or colors.

Chrome Color Scheme



Shell Script

You can create custom shortcut, but I use simple shell script with fzf to launch browser with custom argument.

RESULT=$(fzf --delimiter " " --with-nth 1 -- "$@" < <(
  echo "Firefox:Development firefox --new-instance --start-debugger-server 6222 --profile \"$HOME/secret/path/ff/development/\""
  echo "Chrome:Development google-chrome-stable --remote-debugging-port=9222 --user-data-dir=\"$HOME/secret/path/c/development/\""
  echo "Chrome:Personal google-chrome-stable --user-data-dir=\"$HOME/secret/path/c/personal/\""
  echo "Chrome:Work google-chrome-stable --user-data-dir=\"$HOME/secret/path/c/work/\""
if [ "$RESULT" != "" ]; then
  COMMAND=$(echo $RESULT | sed 's/[^ ]* //')
  eval $COMMAND &>/dev/null &





Open GitHub Discussions