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

#Priority: 1
if [ -f $HOME/.wbar ];then
return 0
fi
cat <<-EOT > $HOME/.wbar
i: /usr/share/wbar/wbar.icons/osxbarback.png
t: /usr/share/wbar/wbar.icons/VeraBd/9
c:
EOT
for x in $(find /usr/share/applications/*)
do
name=$(grep "^ *Name=" $x |sed "s,^ *Name=,,g"|head -n 1)
icon=$(grep "^ *Icon=" $x |sed "s,^ *Icon=,,g"|head -n 1)
command=$(grep "^ *Exec=" $x |sed "s,^ *Exec=,,g"|head -n 1)
if [ -z "$(echo $icon|grep /)" ];then
icon="/usr/share/pixmaps/$icon"
fi
if [ -z "$(echo $icon|grep \.)" ];then icon=$(find /usr/share/applications -name $icon.* -maxdepth 0|head -n 1)
fi
if [ ! -f "$icon" ];then
continue
fi
cat <<-EOT >> $HOME/.wbar
i: $icon
c: $command
t: $name
EOT
done
wbar &