Nothing great, not even usefull for you maybe, but here it is...
GO TO SLEEP
Code: Select all
#!/bin/sh
GTKDIALOG=gtkdialog
export DIALOG='
<window title="Go to sleep" window_position="1">
<vbox>
<frame Shutdown computer in...>
<hbox>
<entry>
<default>...seconds</default>
<variable>ENTRY</variable>
</entry>
</hbox>
</frame>
<text>
<label>30 minutes = 1800 seconds</label>
</text>
<text>
<label>60 minutes = 3600 seconds</label>
</text>
<text>
<label>90 minutes = 5400 seconds</label>
</text>
<hseparator></hseparator>
<hbox>
<button>
<label>Sleep!</label>
<action>sleep "$ENTRY" && wmpoweroff &</action>
<action>exit:EXIT</action>
</button>
<button cancel></button>
</hbox>
</vbox>
</window>
'
$GTKDIALOG --program=DIALOG
AUTOSTART ME
Code: Select all
#!/bin/sh
GTKDIALOG=gtkdialog
funcbtnCreate() {
echo '<button>
<input file stock="gtk-'$2'"></input>
<action>fileselect:ent'$1'</action>
</button>'
}
export MAIN_DIALOG='
<window title="Autostart Me" window_position="1">
<vbox>
<frame Choose app to autostart>
<hbox>
<entry fs-action="file" fs-folder="/usr/bin/"
fs-title="Select the executable you want to autostart">
<variable>ent1</variable>
</entry>
'"$(funcbtnCreate 1 new)"'
</hbox>
</frame>
<hbox>
<button>
<label>Do it!</label>
<action>ln -s "$ent1" /root/Startup/ &</action>
<action>exit:EXIT</action>
</button>
<button cancel></button>
</hbox>
</vbox>
</window>
'
$GTKDIALOG --program=MAIN_DIALOG