#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 &
|