themes (844B)
1 #!/bin/bash 2 3 DIR="$HOME/.config/bspwm" 4 XDIR="$HOME/.Xresources.d" 5 6 rofi_command="rofi -theme $DIR/rofi/themes/themes.rasi" 7 8 style (){ 9 cat "$DIR"/themes/$1 > "$XDIR"/colors 10 feh --bg-scale "$DIR"/wallpapers/$1.jpg 11 bspc wm -r 12 } 13 14 # Apps 15 theme_1=" Nord" 16 theme_2=" Gruvbox" 17 theme_3=" Dark" 18 theme_4=" Cyberpunk" 19 theme_5=" Groot" 20 theme_6=" Rick" 21 22 # Variable passed to rofi 23 options="$theme_1\n$theme_2\n$theme_3\n$theme_4\n$theme_5\n$theme_6" 24 25 chosen="$(echo -e "$options" | $rofi_command -p "Available themes" -dmenu -selected-row 0)" 26 case $chosen in 27 $theme_1) 28 style nord 29 ;; 30 $theme_2) 31 style gruvbox 32 ;; 33 $theme_3) 34 style dark 35 ;; 36 $theme_4) 37 style cyberpunk 38 ;; 39 $theme_5) 40 style groot 41 ;; 42 $theme_6) 43 style rick 44 ;; 45 esac 46 47