wok-next annotate jwm/stuff/jwmbgconf @ rev 11788
evince: added desktop file, description; clicking help goes to www
author | Samuel Trassare <samuel_trassare@yahoo.com> |
---|---|
date | Fri Feb 24 12:04:54 2012 -0800 (2012-02-24) |
parents | |
children |
rev | line source |
---|---|
pankso@657 | 1 #!/bin/sh |
pankso@657 | 2 # |
pankso@657 | 3 # Gtkdialog box to change JWM backgroud. |
pankso@657 | 4 # - SliTaz GNU/Linux 2008. |
pankso@657 | 5 # |
pankso@657 | 6 VERSION=20080305 |
pankso@657 | 7 |
pankso@657 | 8 # Get current image zype and path. |
pankso@657 | 9 LINE=`cat ~/.jwmrc | grep -w '^ <Background type='` |
pankso@657 | 10 TYPE=${LINE#*=\"} |
pankso@657 | 11 TYPE=${TYPE%%\"\>*} |
pankso@657 | 12 BG_PATH=${LINE#*\"$TYPE\">} |
pankso@657 | 13 export BG_PATH=${BG_PATH%</Background>} |
pankso@657 | 14 |
pankso@657 | 15 # We need an actions to be executed by another window dialog |
pankso@657 | 16 # to get values from the main dialog variables. |
pankso@657 | 17 export ACTION=' |
pankso@657 | 18 <vbox> |
pankso@657 | 19 <text use-markup="true" width-chars="28"> |
pankso@657 | 20 <label> |
pankso@657 | 21 " |
pankso@657 | 22 <b>Changing JWM background</b> |
pankso@657 | 23 " |
pankso@657 | 24 </label> |
pankso@657 | 25 </text> |
pankso@657 | 26 <progressbar> |
pankso@657 | 27 <label>Please wait...</label> |
pankso@657 | 28 <action>sed -i s#$BG_PATH#$NEW_PATH# $HOME/.jwmrc</action> |
pankso@657 | 29 <input>echo 50; jwm -restart; echo 100</input> |
pankso@657 | 30 <action type="closewindow">ACTION</action> |
pankso@657 | 31 </progressbar> |
pankso@657 | 32 </vbox> |
pankso@657 | 33 ' |
pankso@657 | 34 |
pankso@657 | 35 # Image type, path and reload button. We use \" to be Ash compatible. |
pankso@657 | 36 # |
pankso@657 | 37 export BG_DIALOG=" |
pankso@657 | 38 <window title=\"JWM Background\"> |
pankso@657 | 39 <vbox> |
pankso@657 | 40 |
pankso@657 | 41 <text use-markup=\"true\" width-chars=\"50\"> |
pankso@657 | 42 <label> |
pankso@657 | 43 \" |
pankso@657 | 44 <b>Wallpaper - JWM Background image</b> |
pankso@657 | 45 \" |
pankso@657 | 46 </label> |
pankso@657 | 47 </text> |
pankso@657 | 48 |
pankso@657 | 49 <hbox> |
pankso@657 | 50 <entry> |
pankso@657 | 51 <default>$BG_PATH</default> |
pankso@657 | 52 <variable>NEW_PATH</variable> |
pankso@657 | 53 </entry> |
pankso@657 | 54 <button> |
pankso@657 | 55 <input file icon=\"image\"></input> |
pankso@657 | 56 <action type=\"fileselect\">NEW_PATH</action> |
pankso@657 | 57 </button> |
pankso@657 | 58 </hbox> |
pankso@657 | 59 |
pankso@657 | 60 <hbox> |
pankso@657 | 61 <button> |
pankso@657 | 62 <label>Change Wallpaper</label> |
pankso@657 | 63 <input file icon=\"reload\"></input> |
pankso@657 | 64 <action type=\"launch\">ACTION</action> |
pankso@657 | 65 </button> |
pankso@657 | 66 <button> |
pankso@657 | 67 <input file icon=\"exit\"></input> |
pankso@657 | 68 <action type=\"exit\">Exit</action> |
pankso@657 | 69 </button> |
pankso@657 | 70 </hbox> |
pankso@657 | 71 |
pankso@657 | 72 </vbox> |
pankso@657 | 73 </window> |
pankso@657 | 74 " |
pankso@657 | 75 |
pankso@657 | 76 # Execute main dialog. |
pankso@657 | 77 gtkdialog --program=BG_DIALOG |
pankso@657 | 78 |
pankso@657 | 79 exit 0 |