aboutsummaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorrathnor <rathnor>2004-03-11 00:08:34 (GMT)
committerrathnor <rathnor>2004-03-11 00:08:34 (GMT)
commite7ebe530bc576d8f3ab7e623b5f767d8e9c327b9 (patch)
tree2c8e28ae891ece93c50bf733f5dc9c6ddefed717 /util
parentbfcc24bac7e002e9f4858e40d6051f5d3ebefdd0 (diff)
downloadfluxbox-e7ebe530bc576d8f3ab7e623b5f767d8e9c327b9.zip
fluxbox-e7ebe530bc576d8f3ab7e623b5f767d8e9c327b9.tar.bz2
fbsetbg updates from han
Diffstat (limited to 'util')
-rw-r--r--util/fbsetbg41
1 files changed, 29 insertions, 12 deletions
diff --git a/util/fbsetbg b/util/fbsetbg
index b92cb3b..2e55ad0 100644
--- a/util/fbsetbg
+++ b/util/fbsetbg
@@ -23,7 +23,7 @@
23# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 23# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
24# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25# 25#
26# $Id: fbsetbg,v 1.29 2004/01/22 05:48:41 fluxgen Exp $ 26# $Id: fbsetbg,v 1.30 2004/03/11 00:08:34 rathnor Exp $
27 27
28# Portability notes: 28# Portability notes:
29# To guarantee this script works on all platforms that support fluxbox 29# To guarantee this script works on all platforms that support fluxbox
@@ -33,7 +33,7 @@
33# - don't use [ -e file ] use [ -r file ] 33# - don't use [ -e file ] use [ -r file ]
34# - don't use $(), use `` 34# - don't use $(), use ``
35# - don't use ~, use ${HOME} 35# - don't use ~, use ${HOME}
36# - don't use id -u, use whoami 36# - don't use id -u or $UID, use whoami
37# - don't use echo -e 37# - don't use echo -e
38# - getopts won't work on all platforms, but the config-file can 38# - getopts won't work on all platforms, but the config-file can
39# compensate for that. 39# compensate for that.
@@ -154,13 +154,20 @@ case `uname` in
154esac 154esac
155 155
156message() { 156message() {
157 # echo if we have terminal output, otherwise 157
158 # pop up a window 158 # This Terminal detection method is inaccurate. Looking for a
159 if [ -t 1 ]; then 159 # replacement.
160 echo "$command: $@" 160
161 else 161 # echo if we have terminal output, otherwise pop up a window
162 xmessage -center "$command: $@" 162 # if [ -t 1 ]; then
163 fi 163 # echo "$command: $@"
164 # else
165 if find_it gxmessage; then
166 gxmessage -center "$command: $@"
167 else
168 xmessage -center "$command: $@"
169 fi
170 # fi
164} 171}
165 172
166remembercommand() { 173remembercommand() {
@@ -181,7 +188,7 @@ remembercommand() {
181debugfbsetbg() { 188debugfbsetbg() {
182 echo 189 echo
183 echo $debugstory 190 echo $debugstory
184 echo 191 echo $sad_esetroot_story
185 exit 0 192 exit 0
186} 193}
187 194
@@ -278,6 +285,9 @@ while [ $# -gt 0 ]; do
278 message "No previous wallpaper recorded for display ${DISPLAY}" 285 message "No previous wallpaper recorded for display ${DISPLAY}"
279 exit 1 286 exit 1
280 fi 287 fi
288 else
289 message "No previous wallpaper recorded for display ${DISPLAY}"
290 exit 1
281 fi 291 fi
282 remember=false 292 remember=false
283 break ;; 293 break ;;
@@ -317,8 +327,15 @@ if [ "$setterfromcommandline" != true ]; then
317 fi 327 fi
318 for wpsetter in $wpsetters; do 328 for wpsetter in $wpsetters; do
319 if find_it $wpsetter; then 329 if find_it $wpsetter; then
320 WPSETTER=$wpsetter 330 if [ ! "$wpsetter" = Esetroot ]; then
321 break 331 WPSETTER=$wpsetter
332 break
333 elif ldd `which Esetroot`|grep libImlib 2>&1 > /dev/null; then
334 WPSETTER=$wpsetter
335 break
336 else
337 sad_esetroot_story="I also found Esetroot, but it doesn't have support for setting wallpapers. You need to install libimlib2 and rebuild Eterm to get it working."
338 fi
322 fi 339 fi
323 done 340 done
324fi 341fi