diff options
author | rathnor <rathnor> | 2003-06-06 02:18:34 (GMT) |
---|---|---|
committer | rathnor <rathnor> | 2003-06-06 02:18:34 (GMT) |
commit | 6d91153212f2215042d3c91631f2b11329bfc226 (patch) | |
tree | b6fdd28af4d33dc5bf30ef648c382866d6902e40 | |
parent | 49c57942f36e0f01fd80313a4095be9e0b757704 (diff) | |
download | fluxbox-6d91153212f2215042d3c91631f2b11329bfc226.zip fluxbox-6d91153212f2215042d3c91631f2b11329bfc226.tar.bz2 |
some updates from Han
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | util/fbsetbg | 20 | ||||
-rwxr-xr-x | util/fluxbox-generate_menu | 70 |
3 files changed, 58 insertions, 35 deletions
@@ -1,5 +1,8 @@ | |||
1 | (Format: Year/Month/Day) | 1 | (Format: Year/Month/Day) |
2 | Changes for 0.9.3: | 2 | Changes for 0.9.3: |
3 | *03/06/06: | ||
4 | * Fixes and improvements from Han (Simon, thanks Han) | ||
5 | fluxbox-generate_menu fbsetbg | ||
3 | *03/06/05: | 6 | *03/06/05: |
4 | * Optimise window placement (much better now) (Simon) | 7 | * Optimise window placement (much better now) (Simon) |
5 | Workspace.cc | 8 | Workspace.cc |
diff --git a/util/fbsetbg b/util/fbsetbg index 18e170a..045e172 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.6 2003/05/12 19:58:47 fluxgen Exp $ | 26 | # $Id: fbsetbg,v 1.7 2003/06/06 02:18:34 rathnor Exp $ |
27 | 27 | ||
28 | # | 28 | # |
29 | # Portability notes: | 29 | # Portability notes: |
@@ -38,12 +38,13 @@ | |||
38 | # compensate for that. | 38 | # compensate for that. |
39 | # | 39 | # |
40 | 40 | ||
41 | wpsetters='Esetroot wmsetbg display qiv xv xsri xli xsetbg' | 41 | # The wallpapersetter is selected in this order |
42 | wpsetters='Esetroot wmsetbg display qiv xv xsri xli xsetbg' # broken icewmbg' | ||
42 | lastwallpaper=${HOME}/.fluxbox/lastwallpaper | 43 | lastwallpaper=${HOME}/.fluxbox/lastwallpaper |
43 | 44 | ||
44 | 45 | ||
45 | WHOAMI=`whoami` | 46 | WHOAMI=`whoami` |
46 | [ "$WHOAMI" = "root" ] && PATH=/bin:/usr/bin/:/usr/local/bin:/usr/X11R6/bin | 47 | [ "$WHOAMI" = root ] && PATH=/bin:/usr/bin/:/usr/local/bin:/usr/X11R6/bin |
47 | 48 | ||
48 | 49 | ||
49 | # Functions | 50 | # Functions |
@@ -131,7 +132,6 @@ debugfbsetbg (){ | |||
131 | } | 132 | } |
132 | 133 | ||
133 | # Find the default wallpapersetter | 134 | # Find the default wallpapersetter |
134 | # The precise order is up for debate. | ||
135 | for wpsetter in $wpsetters; do | 135 | for wpsetter in $wpsetters; do |
136 | if find_it $wpsetter; then | 136 | if find_it $wpsetter; then |
137 | WPSETTER=$wpsetter | 137 | WPSETTER=$wpsetter |
@@ -151,7 +151,7 @@ case $WPSETTER in | |||
151 | aspect=$full | 151 | aspect=$full |
152 | debugstory="This is a RedHat specific app. I can't find docs about it." | 152 | debugstory="This is a RedHat specific app. I can't find docs about it." |
153 | ;; | 153 | ;; |
154 | display) | 154 | display) |
155 | full="`xwininfo -root|grep geom` -window root" | 155 | full="`xwininfo -root|grep geom` -window root" |
156 | tile='-window root' | 156 | tile='-window root' |
157 | center='-backdrop -window root' | 157 | center='-backdrop -window root' |
@@ -200,6 +200,14 @@ case $WPSETTER in | |||
200 | aspect='-maxpect -smooth -root -quit' | 200 | aspect='-maxpect -smooth -root -quit' |
201 | debugstory=$standardrant | 201 | debugstory=$standardrant |
202 | ;; | 202 | ;; |
203 | icewmbg) | ||
204 | tile='-s' | ||
205 | full=$tile | ||
206 | center=$tile | ||
207 | aspect=$tile | ||
208 | debugstory="icewmbg does support transparency, but only tiling. And I noticed odd | ||
209 | errormessages with aterm. Don't use it unless you have to." | ||
210 | ;; | ||
203 | '') | 211 | '') |
204 | message "I can't find an app to set the wallpaper with. You can install one in | 212 | message "I can't find an app to set the wallpaper with. You can install one in |
205 | many many ways but I will give you some simple advice: install Eterm and | 213 | many many ways but I will give you some simple advice: install Eterm and |
@@ -232,7 +240,7 @@ case "${COMMAND_LINE_ARGUMENT}" in | |||
232 | option=`head -n1 $lastwallpaper` | 240 | option=`head -n1 $lastwallpaper` |
233 | wallpaper=`tail -n1 $lastwallpaper` | 241 | wallpaper=`tail -n1 $lastwallpaper` |
234 | else | 242 | else |
235 | message 'No previous wallpaper recorded.' | 243 | message 'No previous wallpaper recorded. You have never used fbsetbg before.' |
236 | fi | 244 | fi |
237 | ;; | 245 | ;; |
238 | h) display_help ; exit 0 ;; | 246 | h) display_help ; exit 0 ;; |
diff --git a/util/fluxbox-generate_menu b/util/fluxbox-generate_menu index 47f3c76..c9177cf 100755 --- a/util/fluxbox-generate_menu +++ b/util/fluxbox-generate_menu | |||
@@ -22,7 +22,7 @@ | |||
22 | # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 22 | # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
23 | # DEALINGS IN THE SOFTWARE. | 23 | # DEALINGS IN THE SOFTWARE. |
24 | # | 24 | # |
25 | # $Id: fluxbox-generate_menu,v 1.35 2003/05/22 13:10:59 fluxgen Exp $ | 25 | # $Id: fluxbox-generate_menu,v 1.36 2003/06/06 02:18:34 rathnor Exp $ |
26 | 26 | ||
27 | # | 27 | # |
28 | # Portability notes: | 28 | # Portability notes: |
@@ -72,9 +72,9 @@ Options: | |||
72 | 72 | ||
73 | Only for packagers: | 73 | Only for packagers: |
74 | 74 | ||
75 | -p Package-datadir; default is /usr/share | 75 | -p Package-datadir; /usr/local/share |
76 | -n Gnome-datadir; default is Package-datadir | 76 | -n Gnome-datadir |
77 | -q KDE-datadir; default is Package-datadir | 77 | -q KDE-datadir |
78 | 78 | ||
79 | 79 | ||
80 | Files: | 80 | Files: |
@@ -526,7 +526,11 @@ if [ ! "${INSTALL}" = "Yes" ];then | |||
526 | # location with your own menu-entries | 526 | # location with your own menu-entries |
527 | # USERMENU=~/.fluxbox/usermenu | 527 | # USERMENU=~/.fluxbox/usermenu |
528 | 528 | ||
529 | # Boolean variables. | 529 | # Sepparate the list of background-dirs with semicolumns ':' |
530 | # BACKGROUND_DIRS="${HOME}/.fluxbox/backgrounds/:/usr/local/share/fluxbox/backgrounds/:/usr/share/wallpapers" | ||
531 | |||
532 | |||
533 | # --- Boolean variables. | ||
530 | # Setting a variable to no won't help. Comment them out if you don't want them. | 534 | # Setting a variable to no won't help. Comment them out if you don't want them. |
531 | # Setting are overruled by the command-line options. | 535 | # Setting are overruled by the command-line options. |
532 | 536 | ||
@@ -613,6 +617,10 @@ if [ ! -d "${KPKGDATADIR}" -o -z "${KPKGDATADIR}" ]; then | |||
613 | KPKGDATADIR=${PKGDATADIR} | 617 | KPKGDATADIR=${PKGDATADIR} |
614 | fi | 618 | fi |
615 | 619 | ||
620 | # directory for the backgrounds | ||
621 | if [ -z "$BACKGROUND_DIRS" ]; then | ||
622 | BACKGROUND_DIRS="${HOME}/.fluxbox/backgrounds/:${PKGDATADIR}/fluxbox/backgrounds/" | ||
623 | fi | ||
616 | 624 | ||
617 | # find the default terminal | 625 | # find the default terminal |
618 | find_it $MY_TERM | 626 | find_it $MY_TERM |
@@ -635,7 +643,7 @@ find_it $MY_BROWSER | |||
635 | if [ $? -ne 0 ]; then | 643 | if [ $? -ne 0 ]; then |
636 | [ -n "$MY_BROWSER" ] && echo "Warning: you chose an invalid browser." >&2 | 644 | [ -n "$MY_BROWSER" ] && echo "Warning: you chose an invalid browser." >&2 |
637 | #The precise order is up for debate. | 645 | #The precise order is up for debate. |
638 | for browser in firebird opera skipstone phoenix mozilla galeon konqueror dillo netscape links w3m lynx; do | 646 | for browser in MozillaFirebird firebird opera skipstone phoenix mozilla galeon konqueror dillo netscape links w3m lynx; do |
639 | if find_it $browser; then | 647 | if find_it $browser; then |
640 | DEFAULT_BROWSER=$browser | 648 | DEFAULT_BROWSER=$browser |
641 | break | 649 | break |
@@ -768,7 +776,7 @@ append_submenu "${MULTIMEDIAMENU}" | |||
768 | append_menu_end | 776 | append_menu_end |
769 | 777 | ||
770 | append_submenu "${XUTILSMENU}" | 778 | append_submenu "${XUTILSMENU}" |
771 | normal_find xfontsel xman xload xfigxbiff editres viewres xclock xmag wmagnify | 779 | normal_find xfontsel xman xload xfigxbiff editres viewres xclock xmag wmagnify gkrellm |
772 | append_menu_end | 780 | append_menu_end |
773 | append_menu_end | 781 | append_menu_end |
774 | 782 | ||
@@ -854,32 +862,36 @@ append_submenu "${FBSETTINGSMENU}" | |||
854 | picturename=`basename "$1"` | 862 | picturename=`basename "$1"` |
855 | append "[exec] (${picturename%.???}) {fbsetbg -f \"$1\" }" | 863 | append "[exec] (${picturename%.???}) {fbsetbg -f \"$1\" }" |
856 | } | 864 | } |
865 | |||
857 | if [ "$BACKGROUNDMENUITEM" = "yes" ]; then | 866 | if [ "$BACKGROUNDMENUITEM" = "yes" ]; then |
858 | [ -d ${HOME}/.fluxbox/backgrounds/ ] && \ | 867 | IFS=: # set delimetor for find |
859 | BACKGROUNDS="${HOME}/.fluxbox/backgrounds/*" | 868 | NUMBER_OF_BACKGROUNDS=`find $BACKGROUND_DIRS -follow -type f 2>/dev/null|wc -l` |
860 | [ -d ${PKGDATADIR}/fluxbox/backgrounds/ ] && \ | 869 | if [ "$NUMBER_OF_BACKGROUNDS" -gt 0 ]; then |
861 | BACKGROUNDS="${BACKGROUNDS} ${PKGDATADIR}/fluxbox/backgrounds/*" | 870 | append_menu "[submenu] (${BACKGROUNDMENU}) {${BACKGROUNDMENUTITLE}}" |
862 | append_menu "[submenu] (${BACKGROUNDMENU}) {${BACKGROUNDMENUTITLE}}" | 871 | if [ "$NUMBER_OF_BACKGROUNDS" -gt 30 ]; then |
863 | if [ `ls -1 ${BACKGROUNDS} 2>/dev/null |wc -l` -gt 30 ]; then | 872 | menucounter=1 ; counter=1 |
864 | menucounter=1 ; counter=1 | 873 | append_menu "[submenu] (${BACKGROUNDMENU} $menucounter) {${BACKGROUNDMENUTITLE}}" |
865 | append_menu "[submenu] (${BACKGROUNDMENU} $menucounter) {${BACKGROUNDMENUTITLE}}" | 874 | find $BACKGROUND_DIRS -follow -type f|sort|while read i; do |
866 | for i in ${BACKGROUNDS} ; do | 875 | counter=`expr $counter + 1` |
867 | counter=`expr $counter + 1` | 876 | if [ $counter -eq 30 ]; then |
868 | if [ $counter -eq 30 ]; then | 877 | counter=1 |
869 | counter=1 | 878 | menucounter=`expr $menucounter + 1` |
870 | menucounter=`expr $menucounter + 1` | 879 | append_menu_end |
871 | append_menu_end | 880 | append_menu "[submenu] (${BACKGROUNDMENU} $menucounter) {${BACKGROUNDMENUTITLE}}" |
872 | append_menu "[submenu] (${BACKGROUNDMENU} $menucounter) {${BACKGROUNDMENUTITLE}}" | 881 | fi |
873 | fi | 882 | addbackground "$i" |
874 | addbackground $i | 883 | done |
875 | done | 884 | append_menu_end |
885 | else | ||
886 | find $BACKGROUND_DIRS -follow -type f|sort|while read i; do | ||
887 | addbackground "$i" | ||
888 | done | ||
889 | fi | ||
876 | append_menu_end | 890 | append_menu_end |
877 | else | 891 | else |
878 | for i in ${BACKGROUNDS} ; do | 892 | echo "Warning: You wanted a background-menu but I couldn't find any backgrounds in: |
879 | addbackground $i | 893 | $BACKGROUND_DIRS" |
880 | done | ||
881 | fi | 894 | fi |
882 | append_menu_end | ||
883 | fi | 895 | fi |
884 | 896 | ||
885 | append "[workspaces] (${WORKSPACEMENU})" | 897 | append "[workspaces] (${WORKSPACEMENU})" |