Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Use different chromium profiles for different activities! Enjoy lightweight chrome, that has to carry only what it needs for task, plus more order as keeping separated different interested and activities (of sets of extensions) for order :).
mkdir -p "$chromium_profiles_dir"
# echo "$ ls -1 $chromium_profiles_dir"
# select profile in "$(ls "$chromium_profiles_dir")" "make_new"; do break; done
# echo $profile
# if [ "$profile" == "make_new" ]; then
# read -p "Profile name (preferably no spaces):" profile
# mkdir -p "${chromium_profiles_dir}/${profile}"
# fi
# profile_dir="${chromium_profiles_dir}/${profile}"
profile_dir="$(zenity --filename=$HOME/.config/chromium_by_topic/ --directory --file-selection)"
if [ $? == 1 ]; then
zenity --warning --text='It seems it was cancelled'
exit 1
if [ ! -d "$profile_dir" ]; then
zenity --warning --text="It seems that selected directory does not exist: $profile_dir"
exit 1
# Limit cache to 50MB via --disk-cache-size=52428800
# Limit cache to 100MB via --disk-cache-size=104857600
if [[ $profile_dir =~ ^.*limited_cache.*$ ]]; then
cachesize=$(( $cachesize * 8 ))
zenity --warning --text="Increased case size to : $cachesize"
if [[ $profile_dir =~ ^.*proxy_flag.*$ ]]; then
set -x
#zenity --warning --text="case size to : ${cachesize}"
LC_ALL=en_US.utf-8 chromium --user-data-dir="${profile_dir}" --disk-cache-size="${cachesize}" "${proxy_flag}"

This comment has been minimized.

Copy link
Owner Author

gwpl commented Mar 15, 2019

E.g. useful if your set of extensions blow up, for unknown reason... to me quiet often it helps to start fresh once a while and come back to old profile when I need something from there. That way chromium is more lightweight! Context: RAM consumption:!msg/tab-suspender/1geSXJwh8CI/EdqLuwixBAAJ . (and on the other hand, for some activities I like some extensions, for some not, with above script I can have set of extensions tailored to usecase)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.