dotfiles

config files for my linux setup
git clone git://edryd.org/dotfiles
Log | Files | Refs | README

accent_colors.sh (1161B)


      1 #!/bin/bash
      2 # Sets the selected_bg_color to one of the Solarized accent colors
      3 
      4 # Color prompt
      5 read -p "Please chose an accent color. (yellow, orange, red, magenta, violet, blue, cyan, green or custom) : " color
      6 
      7 if [ $color = yellow ]
      8 	then
      9                hexcolor=b58900
     10 elif [ $color = orange ]
     11 	then
     12                hexcolor=cb4b16
     13 elif [ $color = red ]
     14 	then
     15                hexcolor=dc322ff
     16 elif [ $color = magenta ]
     17 	then
     18                hexcolor=d33682
     19 elif [ $color = violet ]
     20 	then
     21                hexcolor=6c71c4
     22 elif [ $color = blue ]
     23 	then
     24                hexcolor=268bd2
     25 elif [ $color = cyan ]
     26 	then
     27                hexcolor=2aa198
     28 elif [ $color = green ]
     29 	then
     30 		hexcolor=859900
     31 elif [ $color = custom ]
     32 	then
     33                read -p "Please chose an hex code for the color (without the #): " hexcolor
     34 fi
     35 
     36 # Sed operations
     37 
     38 sed -i 's/selected_bg_color #.*;/selected_bg_color #'$hexcolor';/g' gtk-3.0/gtk.css
     39 sed -i 's/selected_bg_color #.*;/selected_bg_color #'$hexcolor';/g' gtk-3.0/gtk-dark.css
     40 sed -i 's/nselected_bg_color:#.*\\ntext/nselected_bg_color:#'$hexcolor'\\ntext/g' gtk-2.0/gtkrc
     41 
     42 # Feedback
     43 
     44 echo "Accent color set to $color (#$hexcolor)"