Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- chromium_profiles_dir="$HOME/.config/chromium_profiles/"
- 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
- fi
- if [ ! -d "$profile_dir" ]; then
- zenity --warning --text="It seems that selected directory does not exist: $profile_dir"
- exit 1
- fi
- # Limit cache to 50MB via --disk-cache-size=52428800
- # Limit cache to 100MB via --disk-cache-size=104857600
- cachesize=104857600
- if [[ $profile_dir =~ ^.*limited_cache.*$ ]]; then
- cachesize=$(( $cachesize * 8 ))
- zenity --warning --text="Increased case size to : $cachesize"
- fi
- if [[ $profile_dir =~ ^.*proxy_flag.*$ ]]; then
- proxy_flag='--proxy-server=socks5://127.0.0.1:5432'
- fi
- 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}"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement