launcher.sh 858 B

12345678910111213141516171819202122232425262728
  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. # ribbon_top ribbon_top_round ribbon_bottom ribbon_bottom_round
  10. # ribbon_left ribbon_left_round ribbon_right ribbon_right_round
  11. # full_bottom full_top full_left full_right
  12. theme="ribbon_top_round"
  13. dir="$HOME/.config/rofi/launchers/ribbon"
  14. styles=($(ls -p --hide="colors.rasi" $dir/styles))
  15. color="${styles[$(( $RANDOM % 8 ))]}"
  16. # comment this line to disable random colors
  17. sed -i -e "s/@import .*/@import \"$color\"/g" $dir/styles/colors.rasi
  18. # comment these lines to disable random style
  19. themes=($(ls -p --hide="launcher.sh" --hide="styles" $dir))
  20. theme="${themes[$(( $RANDOM % 12 ))]}"
  21. rofi -no-lazy-grab -show drun -modi drun -theme $dir/"$theme"