launcher.sh 760 B

1234567891011121314151617181920212223242526272829
  1. #!/usr/bin/env bash
  2. ## Author : Aditya Shakya
  3. ## Mail : adi1090x@gmail.com
  4. ## Github : @adi1090x
  5. ## Twitter : @adi1090x
  6. # Available Styles
  7. # >> Created and tested on : rofi 1.6.0-1
  8. #
  9. # style_1 style_2 style_3 style_4 style_5 style_6 style_7
  10. theme="style_2"
  11. dir="$HOME/.config/rofi/launchers/text"
  12. styles=($(ls -p --hide="colors.rasi" $dir/styles))
  13. color="${styles[$(( $RANDOM % 10 ))]}"
  14. # comment this line to disable random colors
  15. sed -i -e "s/@import .*/@import \"$color\"/g" $dir/styles/colors.rasi
  16. # comment these lines to disable random style
  17. themes=($(ls -p --hide="launcher.sh" --hide="styles" $dir))
  18. theme="${themes[$(( $RANDOM % 7 ))]}"
  19. rofi -no-lazy-grab -show drun \
  20. -modi run,drun,window \
  21. -theme $dir/"$theme"