wok diff dwm/stuff/dwmbox @ rev 7854

ruby: package with shared library, develop required.
author Liu Peng <rocky@slitaz.org>
date Wed Dec 29 08:15:41 2010 +0000 (2010-12-29)
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/dwm/stuff/dwmbox	Wed Dec 29 08:15:41 2010 +0000
     1.3 @@ -0,0 +1,70 @@
     1.4 +#!/bin/sh
     1.5 +#
     1.6 +# Tiny GTKdialog box to help stating and usinf dwm.
     1.7 +# (c) 2009 SliTaz GNU/Linux project - GNU gpl v3
     1.8 +#
     1.9 +
    1.10 +export CONFIG_DIR="~/.config/dwm"
    1.11 +export AUTOSTART_SCRIPT="${CONFIG_DIR}/autostart.sh"
    1.12 +
    1.13 +box()
    1.14 +{
    1.15 +	export BOX='
    1.16 +<window title="dwm" icon-name="video-display">
    1.17 +<vbox>
    1.18 +	<vbox>
    1.19 +		<text>
    1.20 +			<label>
    1.21 +"
    1.22 +Dynamic Window Manager: [Shift+Alt+ENTER] to open a terminal.
    1.23 +"
    1.24 +			</label>
    1.25 +		</text>
    1.26 +	</vbox>
    1.27 +	<hbox>
    1.28 +		<entry>
    1.29 +			<variable>RUN</variable>
    1.30 +		</entry>
    1.31 +		<button>
    1.32 +			<label>Run</label>
    1.33 +			<input file icon="forward"></input>
    1.34 +			<action>$RUN &</action>
    1.35 +		</button>
    1.36 +	</hbox>
    1.37 +	<hbox>
    1.38 +		<button>
    1.39 +			<label>Terminal</label>
    1.40 +			<input file icon="xterm"></input>
    1.41 +			<action>xterm &</action>
    1.42 +		</button>
    1.43 +		<button>
    1.44 +			<label>Autostarted apps</label>
    1.45 +			<input file icon="gtk-edit"></input>
    1.46 +			<action>xterm -e "nano $AUTOSTART_SCRIPT" &</action>
    1.47 +		</button>
    1.48 +		<button>
    1.49 +			<label>Close box</label>
    1.50 +			<input file icon="gtk-close"></input>	
    1.51 +			<action type="exit">exit</action>
    1.52 +		</button>
    1.53 +		<button>
    1.54 +			<label>Exit dwm</label>
    1.55 +			<input file icon="gtk-quit"></input>	
    1.56 +			<action>killall dwm</action>
    1.57 +		</button>
    1.58 +	</hbox>
    1.59 +</vbox>
    1.60 +</window>'
    1.61 +	gtkdialog --center --program=BOX
    1.62 +}
    1.63 +
    1.64 +case $1 in
    1.65 +	*_*)
    1.66 +		# Exec all function called by args (must have an underscore).
    1.67 +		$1 ;;
    1.68 +	*)
    1.69 +		sleep 1
    1.70 +		box ;;
    1.71 +esac
    1.72 +
    1.73 +exit 0