update
This commit is contained in:
parent
e7b893beba
commit
b58d23091d
4 changed files with 590 additions and 441 deletions
|
@ -1,14 +1,14 @@
|
||||||
# util/Makefile.am for Blackbox 0.61.x - an X11 Window manager
|
# util/Makefile.am for Fluxbox
|
||||||
SUBDIRS = fbrun
|
SUBDIRS = fbrun
|
||||||
INCLUDES=-I../src/FbTk/
|
INCLUDES=-I../src/FbTk/
|
||||||
bin_SCRIPTS = bsetbg fluxbox-generate_menu
|
bin_SCRIPTS = fbsetbg fluxbox-generate_menu
|
||||||
bin_PROGRAMS = bsetroot
|
bin_PROGRAMS = bsetroot
|
||||||
bsetroot_SOURCES = bsetroot.cc bsetroot.hh
|
bsetroot_SOURCES = bsetroot.cc bsetroot.hh
|
||||||
bsetroot_LDADD = ../src/BaseDisplay.o ../src/i18n.o ../src/FbAtoms.o \
|
bsetroot_LDADD = ../src/BaseDisplay.o ../src/i18n.o ../src/FbAtoms.o \
|
||||||
../src/FbTk/libFbTk.a
|
../src/FbTk/libFbTk.a
|
||||||
|
|
||||||
MAINTAINERCLEANFILES = Makefile.in
|
MAINTAINERCLEANFILES = Makefile.in
|
||||||
EXTRA_DIST=bsetbg fluxbox-generate_menu
|
EXTRA_DIST=fbsetbg fluxbox-generate_menu
|
||||||
|
|
||||||
distclean-local:
|
distclean-local:
|
||||||
rm -f *\~
|
rm -f *\~
|
||||||
|
|
957
util/bsetbg
957
util/bsetbg
File diff suppressed because it is too large
Load diff
62
util/fbsetbg
62
util/fbsetbg
|
@ -23,14 +23,14 @@
|
||||||
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||||
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#
|
#
|
||||||
# $Id: fbsetbg,v 1.1 2003/04/27 15:33:26 fluxgen Exp $
|
# $Id: fbsetbg,v 1.2 2003/04/28 14:45:13 fluxgen Exp $
|
||||||
|
|
||||||
#
|
#
|
||||||
# Portability notes:
|
# Portability notes:
|
||||||
# To guarantee this script works on all platforms that support fluxbox
|
# To guarantee this script works on all platforms that support fluxbox
|
||||||
# please keep the following restrictions in mind:
|
# please keep the following restrictions in mind:
|
||||||
#
|
#
|
||||||
# don't use [ -e file ] use [ -r file ]
|
# don't use [ -e file ], use [ -r file ]
|
||||||
# don't use $(), use ``
|
# don't use $(), use ``
|
||||||
# don't use ~, use ${HOME}
|
# don't use ~, use ${HOME}
|
||||||
# don't use id -u, use whoami
|
# don't use id -u, use whoami
|
||||||
|
@ -61,6 +61,9 @@ Options:
|
||||||
-f Set fullscreen wallpaper
|
-f Set fullscreen wallpaper
|
||||||
-c Set centered wallpaper
|
-c Set centered wallpaper
|
||||||
-t Set tiled wallpaper
|
-t Set tiled wallpaper
|
||||||
|
-a Set maximized wallpaper, preserving aspect.
|
||||||
|
( if your bgsetter doesn't support this
|
||||||
|
fbsetbg falls back to -f )
|
||||||
|
|
||||||
-h Display this help
|
-h Display this help
|
||||||
|
|
||||||
|
@ -81,9 +84,9 @@ cat<<EOF
|
||||||
|
|
||||||
To replace all occurances of bsetbg in a file use this command:
|
To replace all occurances of bsetbg in a file use this command:
|
||||||
|
|
||||||
perl -pi -e 's, bsetbg, fbsetbg,'
|
perl -pi -e 's,([^f]|^)bsetbg,fbsetbg,'
|
||||||
|
|
||||||
If you want to choose your own wallpapers and you want fbsetbg to
|
If you want the style to set the wallpaper and you want fbsetbg to
|
||||||
remember the previous wallpaper put this in your ~/.fluxbox/init
|
remember the previous wallpaper put this in your ~/.fluxbox/init
|
||||||
|
|
||||||
session.screen0.rootCommand: fbsetbg -l
|
session.screen0.rootCommand: fbsetbg -l
|
||||||
|
@ -110,6 +113,11 @@ message() {
|
||||||
xmessage -center "$@"
|
xmessage -center "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
remembercommand() {
|
||||||
|
echo $option > $lastwallpaper
|
||||||
|
echo $wallpaper >> $lastwallpaper
|
||||||
|
}
|
||||||
|
|
||||||
debugfbsetbg (){
|
debugfbsetbg (){
|
||||||
|
|
||||||
standardrant (){
|
standardrant (){
|
||||||
|
@ -131,24 +139,27 @@ EOF
|
||||||
|
|
||||||
case $WPSETTER in
|
case $WPSETTER in
|
||||||
xsri)
|
xsri)
|
||||||
echo 'Actually I never heard of this app.'
|
echo "This is a RedHat specific app. I can't find docs about it."
|
||||||
;;
|
;;
|
||||||
display)
|
display)
|
||||||
standardrant
|
standardrant
|
||||||
;;
|
;;
|
||||||
Esetroot)
|
Esetroot)
|
||||||
echo 'Esetroot is a nice app :)'
|
echo 'Esetroot is a nice app :)'
|
||||||
echo "You won't have any problems"
|
echo "You won't have any problems."
|
||||||
;;
|
;;
|
||||||
wmsetbg)
|
wmsetbg)
|
||||||
echo 'wmsetbg is my favourite :)'
|
echo 'wmsetbg is my favourite :)'
|
||||||
echo "You won't have any problems"
|
echo "You won't have any problems."
|
||||||
;;
|
;;
|
||||||
xsetbg)
|
xsetbg)
|
||||||
standardrant
|
standardrant
|
||||||
|
echo 'Is actually xli'
|
||||||
|
echo 'fillscreen option (-f) is broken, defaults to (-a)'
|
||||||
;;
|
;;
|
||||||
xli)
|
xli)
|
||||||
standardrant
|
standardrant
|
||||||
|
echo 'fillscreen option (-f) is broken, defaults to (-a)'
|
||||||
;;
|
;;
|
||||||
qiv)
|
qiv)
|
||||||
standardrant
|
standardrant
|
||||||
|
@ -187,41 +198,49 @@ case $WPSETTER in
|
||||||
full='--center-x --center-y --scale-width=100 --scale-width=100'
|
full='--center-x --center-y --scale-width=100 --scale-width=100'
|
||||||
tile='--tile'
|
tile='--tile'
|
||||||
center='--center-x --center-y'
|
center='--center-x --center-y'
|
||||||
|
aspect=$full
|
||||||
;;
|
;;
|
||||||
display)
|
display)
|
||||||
full='-geometry 800x600 -window root'
|
full='`xwininfo -root|grep geom` -window root'
|
||||||
tile='-window root'
|
tile='-window root'
|
||||||
center='-backdrop -window root'
|
center='-backdrop -window root'
|
||||||
|
aspect=$full
|
||||||
;;
|
;;
|
||||||
Esetroot)
|
Esetroot)
|
||||||
full='-scale'
|
full='-scale'
|
||||||
tile=''
|
tile=''
|
||||||
center='-c'
|
center='-c'
|
||||||
|
aspect='-fit'
|
||||||
;;
|
;;
|
||||||
wmsetbg)
|
wmsetbg)
|
||||||
full='-s -S'
|
full='-s -S'
|
||||||
tile='-t'
|
tile='-t'
|
||||||
center='-b black -e'
|
center='-b black -e'
|
||||||
|
aspect='-b black -a'
|
||||||
;;
|
;;
|
||||||
xsetbg)
|
xsetbg)
|
||||||
full='-fillscreen'
|
tile='-border black'
|
||||||
tile=''
|
center='-center -border black'
|
||||||
center='-center'
|
aspect='-fullscreen -border black'
|
||||||
|
full=$aspect #broken
|
||||||
;;
|
;;
|
||||||
xli)
|
xli)
|
||||||
full='-fillscreen -onroot -quiet'
|
tile='-onroot -quiet -border black'
|
||||||
tile='-onroot -quiet'
|
center='-center -onroot -quiet -border black'
|
||||||
center='-center -onroot quiet'
|
aspect='-fullscreen -onroot -quiet -border black'
|
||||||
|
full=$aspect #broken
|
||||||
;;
|
;;
|
||||||
qiv)
|
qiv)
|
||||||
full='--root_s'
|
full='--root_s'
|
||||||
tile='--root_t'
|
tile='--root_t'
|
||||||
center='--root'
|
center='--root'
|
||||||
|
aspect='-m --root'
|
||||||
;;
|
;;
|
||||||
xv)
|
xv)
|
||||||
full='-max -smooth -root -quit'
|
full='-max -smooth -root -quit'
|
||||||
tile='-root -quit'
|
tile='-root -quit'
|
||||||
center='-rmode 5 -root -quit'
|
center='-rmode 5 -root -quit'
|
||||||
|
aspect='-maxpect -smooth -root -quit'
|
||||||
;;
|
;;
|
||||||
'')
|
'')
|
||||||
message "Can't find and app to set the wallpaper with.
|
message "Can't find and app to set the wallpaper with.
|
||||||
|
@ -230,22 +249,23 @@ Use fbsetbg -d to find out what to do next"
|
||||||
esac
|
esac
|
||||||
|
|
||||||
#Get options.
|
#Get options.
|
||||||
getopts ":f:c:t:Tlh-" COMMAND_LINE_ARGUMENT
|
getopts ":a:f:c:t:Tlh-" COMMAND_LINE_ARGUMENT
|
||||||
case "${COMMAND_LINE_ARGUMENT}" in
|
case "${COMMAND_LINE_ARGUMENT}" in
|
||||||
|
a) option=$aspect
|
||||||
|
wallpaper=$OPTARG
|
||||||
|
remembercommand
|
||||||
|
;;
|
||||||
f) option=$full
|
f) option=$full
|
||||||
wallpaper=$OPTARG
|
wallpaper=$OPTARG
|
||||||
echo $option > $lastwallpaper
|
remembercommand
|
||||||
echo $wallpaper >> $lastwallpaper
|
|
||||||
;;
|
;;
|
||||||
c) option=$center
|
c) option=$center
|
||||||
wallpaper=$OPTARG
|
wallpaper=$OPTARG
|
||||||
echo $option > $lastwallpaper
|
remembercommand
|
||||||
echo $wallpaper >> $lastwallpaper
|
|
||||||
;;
|
;;
|
||||||
t) option=$tile
|
t) option=$tile
|
||||||
wallpaper=$OPTARG
|
wallpaper=$OPTARG
|
||||||
echo $option > $lastwallpaper
|
remembercommand
|
||||||
echo $wallpaper >> $lastwallpaper
|
|
||||||
;;
|
;;
|
||||||
l)
|
l)
|
||||||
if [ -r $lastwallpaper ];then
|
if [ -r $lastwallpaper ];then
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
# DEALINGS IN THE SOFTWARE.
|
# DEALINGS IN THE SOFTWARE.
|
||||||
#
|
#
|
||||||
# $Id: fluxbox-generate_menu,v 1.31 2003/04/23 13:57:26 fluxgen Exp $
|
# $Id: fluxbox-generate_menu,v 1.32 2003/04/28 14:45:11 fluxgen Exp $
|
||||||
|
|
||||||
#
|
#
|
||||||
# Portability notes:
|
# Portability notes:
|
||||||
|
@ -860,13 +860,13 @@ append_submenu "${FBSETTINGSMENU}"
|
||||||
append_menu "[submenu] (${BACKGROUNDMENU} $menucounter) {${BACKGROUNDMENUTITLE}}"
|
append_menu "[submenu] (${BACKGROUNDMENU} $menucounter) {${BACKGROUNDMENUTITLE}}"
|
||||||
fi
|
fi
|
||||||
picturename=`basename "$i"`
|
picturename=`basename "$i"`
|
||||||
append "[exec] (${picturename%.???}) {bsetbg -f \"$i\" }"
|
append "[exec] (${picturename%.???}) {fbsetbg -f \"$i\" }"
|
||||||
done
|
done
|
||||||
append_menu_end
|
append_menu_end
|
||||||
else
|
else
|
||||||
for i in ${HOME}/.fluxbox/backgrounds/* ${PKGDATADIR}/fluxbox/backgrounds/* ; do
|
for i in ${HOME}/.fluxbox/backgrounds/* ${PKGDATADIR}/fluxbox/backgrounds/* ; do
|
||||||
picturename=`basename "$i"`
|
picturename=`basename "$i"`
|
||||||
append "[exec] (${picturename%.???}) {bsetbg -f \"$i\" }"
|
append "[exec] (${picturename%.???}) {fbsetbg -f \"$i\" }"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
append_menu_end
|
append_menu_end
|
||||||
|
|
Loading…
Reference in a new issue