File: macmenu

package info (click to toggle)
bespin 0.r1552-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 9,848 kB
  • sloc: cpp: 24,647; sh: 523; xml: 459; makefile: 79
file content (9 lines) | stat: -rwxr-xr-x 384 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
#!/bin/bash
if [ "$1" = "on" ]; then cmd="activate";
elif [ "$1" = "off" ]; then cmd="deactivate";
else echo -e "Usage:\n$0 on|off"; exit; fi
kdialog --passivepopup "<qt><h1>MacMenu</h1>Click window to switch top menuabr usage<center><h1>$1</h1></center></qt>" 20 &
d_pid=$!
pid=$(xprop | grep _NET_WM_PID)
qdbus org.kde.XBar-${pid#* = } /XBarClient $cmd
kill $d_pid > /dev/null 2>&1