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