diff options
Diffstat (limited to 'util/bsetbg')
-rwxr-xr-x | util/bsetbg | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/util/bsetbg b/util/bsetbg index ccf0fd0..0ef1e0d 100755 --- a/util/bsetbg +++ b/util/bsetbg | |||
@@ -223,6 +223,16 @@ find_app() | |||
223 | esac | 223 | esac |
224 | } | 224 | } |
225 | 225 | ||
226 | search_xsri() | ||
227 | { | ||
228 | ### xsri | ||
229 | full="xsri --scale-width=100 --scale-width=100" | ||
230 | tile="xsri --tile" | ||
231 | center="xsri --center-x --center-y" | ||
232 | default=$center | ||
233 | find_app xsri | ||
234 | } | ||
235 | |||
226 | search_display() | 236 | search_display() |
227 | { | 237 | { |
228 | ### display | 238 | ### display |
@@ -311,7 +321,7 @@ create_config() | |||
311 | case $UID in 0) | 321 | case $UID in 0) |
312 | if [ "$ARGUMENT" != "-r" ]; then | 322 | if [ "$ARGUMENT" != "-r" ]; then |
313 | echo "$NAME: running X as root is a security hazard, and is NOT a good idea!" | 323 | echo "$NAME: running X as root is a security hazard, and is NOT a good idea!" |
314 | echo "$NAME: if you insist upon having a ~/.bsetbgrc for root, run bsetbg with" | 324 | echo "$NAME: if you insist upon having a ~/.fluxbox/bsetbg for root, run bsetbg with" |
315 | echo "$NAME: the '-r' flag to force its creation. you have been warned!" | 325 | echo "$NAME: the '-r' flag to force its creation. you have been warned!" |
316 | exit 1 | 326 | exit 1 |
317 | fi | 327 | fi |
@@ -336,6 +346,10 @@ create_config() | |||
336 | INFO= && error_msg 3 | 346 | INFO= && error_msg 3 |
337 | fi | 347 | fi |
338 | 348 | ||
349 | if [ ! -d ~/.fluxbox ]; then | ||
350 | mkdir ~/.fluxbox | ||
351 | fi | ||
352 | |||
339 | echo "# $CONFIG" >> $CONFIG | 353 | echo "# $CONFIG" >> $CONFIG |
340 | echo "#" >> $CONFIG | 354 | echo "#" >> $CONFIG |
341 | echo "# automagically generated with loving care by $NAME $VERSION on `date`" >> $CONFIG | 355 | echo "# automagically generated with loving care by $NAME $VERSION on `date`" >> $CONFIG |
@@ -600,8 +614,8 @@ debug() | |||
600 | echo | 614 | echo |
601 | } | 615 | } |
602 | 616 | ||
603 | IMAGE_APPS="display Esetroot wmsetbg xv xli qiv" | 617 | IMAGE_APPS="display Esetroot wmsetbg xv xli qiv xsri" |
604 | CONFIG="$HOME/.bsetbgrc" | 618 | CONFIG="$HOME/.fluxbox/bsetbg" |
605 | NAME=bsetbg | 619 | NAME=bsetbg |
606 | VERSION=1.12 | 620 | VERSION=1.12 |
607 | MORE="(C) 2000 by lordzork industries (http://lordzork.com/)" | 621 | MORE="(C) 2000 by lordzork industries (http://lordzork.com/)" |
@@ -611,10 +625,7 @@ TMPFILE2=/tmp/bsetbg.2 | |||
611 | ARGUMENT=$1 | 625 | ARGUMENT=$1 |
612 | 626 | ||
613 | 627 | ||
614 | case `which grep 2>&1` in */*grep) : ;; | 628 | which grep > /dev/null 2> /dev/null || error_msg nogrep |
615 | *) | ||
616 | error_msg nogrep | ||
617 | esac | ||
618 | 629 | ||
619 | case $1 in | 630 | case $1 in |
620 | *-full|-f|f) | 631 | *-full|-f|f) |
@@ -696,4 +707,4 @@ case $1 in | |||
696 | fi | 707 | fi |
697 | help_msg | 708 | help_msg |
698 | fi | 709 | fi |
699 | esac \ No newline at end of file | 710 | esac |