launcher.sh 758 B

123456789101112131415161718192021222324252627
  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. # slate_full slate_center slate_left
  10. # slate_right slate_top slate_bottom
  11. theme="slate_full"
  12. dir="$HOME/.config/rofi/launchers/slate"
  13. styles=($(ls -p --hide="colors.rasi" $dir/styles))
  14. color="${styles[$(( $RANDOM % 20 ))]}"
  15. # comment this line to disable random colors
  16. sed -i -e "s/@import .*/@import \"$color\"/g" $dir/styles/colors.rasi
  17. # comment these lines to disable random style
  18. themes=($(ls -p --hide="launcher.sh" --hide="styles" $dir))
  19. theme="${themes[$(( $RANDOM % 6 ))]}"
  20. rofi -no-lazy-grab -show drun -modi drun -theme $dir/"$theme"