some updates from Han
This commit is contained in:
parent
49c57942f3
commit
6d91153212
3 changed files with 58 additions and 35 deletions
|
@ -1,5 +1,8 @@
|
||||||
(Format: Year/Month/Day)
|
(Format: Year/Month/Day)
|
||||||
Changes for 0.9.3:
|
Changes for 0.9.3:
|
||||||
|
*03/06/06:
|
||||||
|
* Fixes and improvements from Han (Simon, thanks Han)
|
||||||
|
fluxbox-generate_menu fbsetbg
|
||||||
*03/06/05:
|
*03/06/05:
|
||||||
* Optimise window placement (much better now) (Simon)
|
* Optimise window placement (much better now) (Simon)
|
||||||
Workspace.cc
|
Workspace.cc
|
||||||
|
|
20
util/fbsetbg
20
util/fbsetbg
|
@ -23,7 +23,7 @@
|
||||||
# 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.6 2003/05/12 19:58:47 fluxgen Exp $
|
# $Id: fbsetbg,v 1.7 2003/06/06 02:18:34 rathnor Exp $
|
||||||
|
|
||||||
#
|
#
|
||||||
# Portability notes:
|
# Portability notes:
|
||||||
|
@ -38,12 +38,13 @@
|
||||||
# compensate for that.
|
# compensate for that.
|
||||||
#
|
#
|
||||||
|
|
||||||
wpsetters='Esetroot wmsetbg display qiv xv xsri xli xsetbg'
|
# The wallpapersetter is selected in this order
|
||||||
|
wpsetters='Esetroot wmsetbg display qiv xv xsri xli xsetbg' # broken icewmbg'
|
||||||
lastwallpaper=${HOME}/.fluxbox/lastwallpaper
|
lastwallpaper=${HOME}/.fluxbox/lastwallpaper
|
||||||
|
|
||||||
|
|
||||||
WHOAMI=`whoami`
|
WHOAMI=`whoami`
|
||||||
[ "$WHOAMI" = "root" ] && PATH=/bin:/usr/bin/:/usr/local/bin:/usr/X11R6/bin
|
[ "$WHOAMI" = root ] && PATH=/bin:/usr/bin/:/usr/local/bin:/usr/X11R6/bin
|
||||||
|
|
||||||
|
|
||||||
# Functions
|
# Functions
|
||||||
|
@ -131,7 +132,6 @@ debugfbsetbg (){
|
||||||
}
|
}
|
||||||
|
|
||||||
# Find the default wallpapersetter
|
# Find the default wallpapersetter
|
||||||
# The precise order is up for debate.
|
|
||||||
for wpsetter in $wpsetters; do
|
for wpsetter in $wpsetters; do
|
||||||
if find_it $wpsetter; then
|
if find_it $wpsetter; then
|
||||||
WPSETTER=$wpsetter
|
WPSETTER=$wpsetter
|
||||||
|
@ -151,7 +151,7 @@ case $WPSETTER in
|
||||||
aspect=$full
|
aspect=$full
|
||||||
debugstory="This is a RedHat specific app. I can't find docs about it."
|
debugstory="This is a RedHat specific app. I can't find docs about it."
|
||||||
;;
|
;;
|
||||||
display)
|
display)
|
||||||
full="`xwininfo -root|grep geom` -window root"
|
full="`xwininfo -root|grep geom` -window root"
|
||||||
tile='-window root'
|
tile='-window root'
|
||||||
center='-backdrop -window root'
|
center='-backdrop -window root'
|
||||||
|
@ -200,6 +200,14 @@ case $WPSETTER in
|
||||||
aspect='-maxpect -smooth -root -quit'
|
aspect='-maxpect -smooth -root -quit'
|
||||||
debugstory=$standardrant
|
debugstory=$standardrant
|
||||||
;;
|
;;
|
||||||
|
icewmbg)
|
||||||
|
tile='-s'
|
||||||
|
full=$tile
|
||||||
|
center=$tile
|
||||||
|
aspect=$tile
|
||||||
|
debugstory="icewmbg does support transparency, but only tiling. And I noticed odd
|
||||||
|
errormessages with aterm. Don't use it unless you have to."
|
||||||
|
;;
|
||||||
'')
|
'')
|
||||||
message "I can't find an app to set the wallpaper with. You can install one in
|
message "I can't find an app to set the wallpaper with. You can install one in
|
||||||
many many ways but I will give you some simple advice: install Eterm and
|
many many ways but I will give you some simple advice: install Eterm and
|
||||||
|
@ -232,7 +240,7 @@ case "${COMMAND_LINE_ARGUMENT}" in
|
||||||
option=`head -n1 $lastwallpaper`
|
option=`head -n1 $lastwallpaper`
|
||||||
wallpaper=`tail -n1 $lastwallpaper`
|
wallpaper=`tail -n1 $lastwallpaper`
|
||||||
else
|
else
|
||||||
message 'No previous wallpaper recorded.'
|
message 'No previous wallpaper recorded. You have never used fbsetbg before.'
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
h) display_help ; exit 0 ;;
|
h) display_help ; exit 0 ;;
|
||||||
|
|
|
@ -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.35 2003/05/22 13:10:59 fluxgen Exp $
|
# $Id: fluxbox-generate_menu,v 1.36 2003/06/06 02:18:34 rathnor Exp $
|
||||||
|
|
||||||
#
|
#
|
||||||
# Portability notes:
|
# Portability notes:
|
||||||
|
@ -72,9 +72,9 @@ Options:
|
||||||
|
|
||||||
Only for packagers:
|
Only for packagers:
|
||||||
|
|
||||||
-p Package-datadir; default is /usr/share
|
-p Package-datadir; /usr/local/share
|
||||||
-n Gnome-datadir; default is Package-datadir
|
-n Gnome-datadir
|
||||||
-q KDE-datadir; default is Package-datadir
|
-q KDE-datadir
|
||||||
|
|
||||||
|
|
||||||
Files:
|
Files:
|
||||||
|
@ -526,7 +526,11 @@ if [ ! "${INSTALL}" = "Yes" ];then
|
||||||
# location with your own menu-entries
|
# location with your own menu-entries
|
||||||
# USERMENU=~/.fluxbox/usermenu
|
# USERMENU=~/.fluxbox/usermenu
|
||||||
|
|
||||||
# Boolean variables.
|
# Sepparate the list of background-dirs with semicolumns ':'
|
||||||
|
# BACKGROUND_DIRS="${HOME}/.fluxbox/backgrounds/:/usr/local/share/fluxbox/backgrounds/:/usr/share/wallpapers"
|
||||||
|
|
||||||
|
|
||||||
|
# --- Boolean variables.
|
||||||
# Setting a variable to no won't help. Comment them out if you don't want them.
|
# Setting a variable to no won't help. Comment them out if you don't want them.
|
||||||
# Setting are overruled by the command-line options.
|
# Setting are overruled by the command-line options.
|
||||||
|
|
||||||
|
@ -613,6 +617,10 @@ if [ ! -d "${KPKGDATADIR}" -o -z "${KPKGDATADIR}" ]; then
|
||||||
KPKGDATADIR=${PKGDATADIR}
|
KPKGDATADIR=${PKGDATADIR}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# directory for the backgrounds
|
||||||
|
if [ -z "$BACKGROUND_DIRS" ]; then
|
||||||
|
BACKGROUND_DIRS="${HOME}/.fluxbox/backgrounds/:${PKGDATADIR}/fluxbox/backgrounds/"
|
||||||
|
fi
|
||||||
|
|
||||||
# find the default terminal
|
# find the default terminal
|
||||||
find_it $MY_TERM
|
find_it $MY_TERM
|
||||||
|
@ -635,7 +643,7 @@ find_it $MY_BROWSER
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
[ -n "$MY_BROWSER" ] && echo "Warning: you chose an invalid browser." >&2
|
[ -n "$MY_BROWSER" ] && echo "Warning: you chose an invalid browser." >&2
|
||||||
#The precise order is up for debate.
|
#The precise order is up for debate.
|
||||||
for browser in firebird opera skipstone phoenix mozilla galeon konqueror dillo netscape links w3m lynx; do
|
for browser in MozillaFirebird firebird opera skipstone phoenix mozilla galeon konqueror dillo netscape links w3m lynx; do
|
||||||
if find_it $browser; then
|
if find_it $browser; then
|
||||||
DEFAULT_BROWSER=$browser
|
DEFAULT_BROWSER=$browser
|
||||||
break
|
break
|
||||||
|
@ -768,7 +776,7 @@ append_submenu "${MULTIMEDIAMENU}"
|
||||||
append_menu_end
|
append_menu_end
|
||||||
|
|
||||||
append_submenu "${XUTILSMENU}"
|
append_submenu "${XUTILSMENU}"
|
||||||
normal_find xfontsel xman xload xfigxbiff editres viewres xclock xmag wmagnify
|
normal_find xfontsel xman xload xfigxbiff editres viewres xclock xmag wmagnify gkrellm
|
||||||
append_menu_end
|
append_menu_end
|
||||||
append_menu_end
|
append_menu_end
|
||||||
|
|
||||||
|
@ -854,32 +862,36 @@ append_submenu "${FBSETTINGSMENU}"
|
||||||
picturename=`basename "$1"`
|
picturename=`basename "$1"`
|
||||||
append "[exec] (${picturename%.???}) {fbsetbg -f \"$1\" }"
|
append "[exec] (${picturename%.???}) {fbsetbg -f \"$1\" }"
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ "$BACKGROUNDMENUITEM" = "yes" ]; then
|
if [ "$BACKGROUNDMENUITEM" = "yes" ]; then
|
||||||
[ -d ${HOME}/.fluxbox/backgrounds/ ] && \
|
IFS=: # set delimetor for find
|
||||||
BACKGROUNDS="${HOME}/.fluxbox/backgrounds/*"
|
NUMBER_OF_BACKGROUNDS=`find $BACKGROUND_DIRS -follow -type f 2>/dev/null|wc -l`
|
||||||
[ -d ${PKGDATADIR}/fluxbox/backgrounds/ ] && \
|
if [ "$NUMBER_OF_BACKGROUNDS" -gt 0 ]; then
|
||||||
BACKGROUNDS="${BACKGROUNDS} ${PKGDATADIR}/fluxbox/backgrounds/*"
|
append_menu "[submenu] (${BACKGROUNDMENU}) {${BACKGROUNDMENUTITLE}}"
|
||||||
append_menu "[submenu] (${BACKGROUNDMENU}) {${BACKGROUNDMENUTITLE}}"
|
if [ "$NUMBER_OF_BACKGROUNDS" -gt 30 ]; then
|
||||||
if [ `ls -1 ${BACKGROUNDS} 2>/dev/null |wc -l` -gt 30 ]; then
|
menucounter=1 ; counter=1
|
||||||
menucounter=1 ; counter=1
|
append_menu "[submenu] (${BACKGROUNDMENU} $menucounter) {${BACKGROUNDMENUTITLE}}"
|
||||||
append_menu "[submenu] (${BACKGROUNDMENU} $menucounter) {${BACKGROUNDMENUTITLE}}"
|
find $BACKGROUND_DIRS -follow -type f|sort|while read i; do
|
||||||
for i in ${BACKGROUNDS} ; do
|
counter=`expr $counter + 1`
|
||||||
counter=`expr $counter + 1`
|
if [ $counter -eq 30 ]; then
|
||||||
if [ $counter -eq 30 ]; then
|
counter=1
|
||||||
counter=1
|
menucounter=`expr $menucounter + 1`
|
||||||
menucounter=`expr $menucounter + 1`
|
append_menu_end
|
||||||
append_menu_end
|
append_menu "[submenu] (${BACKGROUNDMENU} $menucounter) {${BACKGROUNDMENUTITLE}}"
|
||||||
append_menu "[submenu] (${BACKGROUNDMENU} $menucounter) {${BACKGROUNDMENUTITLE}}"
|
fi
|
||||||
fi
|
addbackground "$i"
|
||||||
addbackground $i
|
done
|
||||||
done
|
append_menu_end
|
||||||
|
else
|
||||||
|
find $BACKGROUND_DIRS -follow -type f|sort|while read i; do
|
||||||
|
addbackground "$i"
|
||||||
|
done
|
||||||
|
fi
|
||||||
append_menu_end
|
append_menu_end
|
||||||
else
|
else
|
||||||
for i in ${BACKGROUNDS} ; do
|
echo "Warning: You wanted a background-menu but I couldn't find any backgrounds in:
|
||||||
addbackground $i
|
$BACKGROUND_DIRS"
|
||||||
done
|
|
||||||
fi
|
fi
|
||||||
append_menu_end
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
append "[workspaces] (${WORKSPACEMENU})"
|
append "[workspaces] (${WORKSPACEMENU})"
|
||||||
|
|
Loading…
Reference in a new issue