wok view dwm/stuff/dwmbox @ rev 7263
Up: foomatic-db to 4.0-20101114.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Sun Nov 14 17:12:53 2010 +0000 (2010-11-14) |
parents | |
children |
line source
1 #!/bin/sh
2 #
3 # Tiny GTKdialog box to help stating and usinf dwm.
4 # (c) 2009 SliTaz GNU/Linux project - GNU gpl v3
5 #
7 export CONFIG_DIR="~/.config/dwm"
8 export AUTOSTART_SCRIPT="${CONFIG_DIR}/autostart.sh"
10 box()
11 {
12 export BOX='
13 <window title="dwm" icon-name="video-display">
14 <vbox>
15 <vbox>
16 <text>
17 <label>
18 "
19 Dynamic Window Manager: [Shift+Alt+ENTER] to open a terminal.
20 "
21 </label>
22 </text>
23 </vbox>
24 <hbox>
25 <entry>
26 <variable>RUN</variable>
27 </entry>
28 <button>
29 <label>Run</label>
30 <input file icon="forward"></input>
31 <action>$RUN &</action>
32 </button>
33 </hbox>
34 <hbox>
35 <button>
36 <label>Terminal</label>
37 <input file icon="xterm"></input>
38 <action>xterm &</action>
39 </button>
40 <button>
41 <label>Autostarted apps</label>
42 <input file icon="gtk-edit"></input>
43 <action>xterm -e "nano $AUTOSTART_SCRIPT" &</action>
44 </button>
45 <button>
46 <label>Close box</label>
47 <input file icon="gtk-close"></input>
48 <action type="exit">exit</action>
49 </button>
50 <button>
51 <label>Exit dwm</label>
52 <input file icon="gtk-quit"></input>
53 <action>killall dwm</action>
54 </button>
55 </hbox>
56 </vbox>
57 </window>'
58 gtkdialog --center --program=BOX
59 }
61 case $1 in
62 *_*)
63 # Exec all function called by args (must have an underscore).
64 $1 ;;
65 *)
66 sleep 1
67 box ;;
68 esac
70 exit 0