Openbox based desktop distribution
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
717 B

  1. #Priority: 1
  2. if [ -f $HOME/.wbar ];then
  3. return 0
  4. fi
  5. cat <<-EOT > $HOME/.wbar
  6. i: /usr/share/wbar/wbar.icons/osxbarback.png
  7. t: /usr/share/wbar/wbar.icons/VeraBd/9
  8. c:
  9. EOT
  10. for x in $(find /usr/share/applications/*)
  11. do
  12. name=$(grep "^ *Name=" $x |sed "s,^ *Name=,,g"|head -n 1)
  13. icon=$(grep "^ *Icon=" $x |sed "s,^ *Icon=,,g"|head -n 1)
  14. command=$(grep "^ *Exec=" $x |sed "s,^ *Exec=,,g"|head -n 1)
  15. if [ -z "$(echo $icon|grep /)" ];then
  16. icon="/usr/share/pixmaps/$icon"
  17. fi
  18. if [ -z "$(echo $icon|grep \.)" ];then icon=$(find /usr/share/applications -name $icon.* -maxdepth 0|head -n 1)
  19. fi
  20. if [ ! -f "$icon" ];then
  21. continue
  22. fi
  23. cat <<-EOT >> $HOME/.wbar
  24. i: $icon
  25. c: $command
  26. t: $name
  27. EOT
  28. done
  29. wbar &