From: <dom...@us...> - 2013-04-24 08:09:04
|
Revision: 286 http://sourceforge.net/p/fvwm-crystal/code/286 Author: dominique_libre Date: 2013-04-24 08:08:57 +0000 (Wed, 24 Apr 2013) Log Message: ----------- functions/Icon-Launcher: cleanup; fix icon style to work with Icon-Thumbnails Modified Paths: -------------- ChangeLog fvwm/components/functions/Icon-Launcher fvwm/components/functions/Icon-Thumbnails Modified: ChangeLog =================================================================== --- ChangeLog 2013-04-23 19:38:00 UTC (rev 285) +++ ChangeLog 2013-04-24 08:08:57 UTC (rev 286) @@ -1,5 +1,8 @@ ChangeLog for FVWM-Crystal +Mercredi 24 Avril 2013 Dominique Michel + functions/Icon-Launcher: cleanup; fix icon style to work with Icon-Thumbnails + Mardi 23 Avril 2913 Dominique Michl recipes/*; functions/EWMH-BaseStruts; functions/NotificationAreaManager": fix EWMH-Toggle Modified: fvwm/components/functions/Icon-Launcher =================================================================== --- fvwm/components/functions/Icon-Launcher 2013-04-23 19:38:00 UTC (rev 285) +++ fvwm/components/functions/Icon-Launcher 2013-04-24 08:08:57 UTC (rev 286) @@ -1,5 +1,5 @@ # Desktop icons for the mounted partition(s) and for $HOME. -# Written by Dominique Michel <dom...@us...>, 2010 +# Written by Dominique Michel <dom...@us...>, 2010-2013 # for Fvwm-Crystal. # # From Fvwm FAQ, 7.13 with huge modifications and added functions. @@ -8,11 +8,18 @@ # to the drives. At that time, the only action associated to the icons # is to launch Thunar into the corresponding mount point. # You can also move the icons, but the moves will not survive a restart. +# The icons are like in the AmigaOS with 2 different pictures. # -# Requirement: mount, sed, Thunar, and Fvwm. -# In order to use it, add "Test (x thunar) Include components/functions/Icon-Launcher" -# into some recipe after "Include Icon-Amiga" or "Include Icon-Thumbnails". +# Requirement: mount, grep, cut, Thunar, and Fvwm. +# In order to use it, add +# +# Test (x thunar) PipeRead 'pidof rox 1>/dev/null || pidof nautilus 1>/dev/null || echo "Include components/functions/Icon-Launcher"' # +# into some recipe after "Include Icon-Amiga" or "Include Icon-Thumbnails". I added almost +# all the icon styles here, so maybe this will work fine without one of those includes. +# +# Note: +# # Todo: - preference setting for the action PipeRead 'echo "Style * IconBox $(($[vp.width]-36))x$(($[vp.height]-92))+18+46, IconFill top left, IconGrid 50 50"' @@ -38,8 +45,7 @@ + I Module FvwmButtons $0 + I Module FvwmAuto 10 -menter "Change-Icon $0 $1" "Restore-Icon $0 $1" + I Style $0 UseStyle * -+ I Style $0 Icon $1, StartIconic, !Handles, VariablePosition, BorderWidth 0, \ - !Borders, ParentalRelativity ++ I Style $0 Icon $1, StartIconic, !Handles, VariablePosition, BorderWidth 0, !Borders, ParentalRelativity, IconTitle, IconTitleColorset $[infostore.cs_menu_active], HilightIconTitleColorset $[infostore.cs_menu_active], IconTitleFormat %n, IconBackgroundColorset $[infostore.cs_icon_inactive], IconBackgroundColorset $[infostore.cs_icon_inactive], IconTitleRelief 0, IconBackgroundRelief 0, IconBackgroundRelief 0, IconFont "xft:$[title_font]:pixelsize=$[title_font_size]", StickyIcon,!StickyStippledIconTitle DestroyFunc Change-Icon AddToFunc Change-Icon @@ -59,13 +65,13 @@ # which drives are mounted into the system DestroyFunc Make-Icons AddToFunc Make-Icons -#+ I PipeRead "cat /etc/mtab|grep ^/dev | cut -d \" \" -f 3 | sort > /tmp/Icon-Drives" ++ I PipeRead "mount | grep ^/dev | cut -d \" \" -f 3 | sort > /tmp/Icon-Drives" # Root -+ I PipeRead 'Root="/"; echo "Launcher Root 48x48/categories/Boing_4.png"; \ - echo "All (Root) Layer 0 0"; \ - echo "Mouse (Root) 1 I $[Mod] Icon-Launch-CurrentDesk /"' +#+ I PipeRead 'Root="/"; echo "Launcher Root 48x48/categories/Boing_4.png"; \ +# echo "All (Root) Layer 0 0"; \ +# echo "Mouse (Root) 1 I $[Mod] Icon-Launch-CurrentDesk /"' # echo "Mouse (Root) 2 I $[Mod] Generate-Icons /"' -+ I Wait Root +#+ I Wait Root # Home + I PipeRead 'LocalUser=`id -un`; echo "Launcher Home 48x48/categories/Home.png"; \ echo "All (Home) Layer 0 0"; \ @@ -73,20 +79,19 @@ + I Wait Home # Make the icons # The drives -## If you want all the mounted partitions, uncomment the first 2 pipereads and comment -## the third one. Uncomment also the last PipeRead, and comment the # Root section. -## This will freeze fvwm at start/restart if not all those partitions are avaible. -#+ I Wait Home -#+ I PipeRead 'i=2; m=$((((2*(($[panel_font_size]+56))))-32)); j=$m; while read line; do \ -# if [[ "${line}" == "/" ]]; \ -# then echo "Launcher ${line} 48x48/categories/Boing_4.png"; \ -# else echo "Launcher ${line} 48x48/categories/Work_4.png"; \ -# fi ; \ -# echo "Mouse (${line}) 1 I $[Mod] Icon-Launch-CurrentDesk ${line}"; \ -# echo "Wait ${line}"; \ -# j=$(($i*$m)); i=$(($i+1)); \ -#done </tmp/Icon-Drives' -#+ I PipeRead "rm /tmp/Icon-Drives" +# If you want all the mounted partitions, comment the #Root section in this function. +# Uncomment also what follow to the end of this function. +# You may want to comment the #Home function if it is on its own partition. ++ I PipeRead 'i=2; m=$((((2*(($[panel_font_size]+56))))-32)); j=$m; while read line; do \ + if [[ "${line}" == "/" ]]; \ + then echo "Launcher ${line} 48x48/categories/Boing_4.png"; \ + else echo "Launcher ${line} 48x48/categories/Work_4.png"; \ + fi ; \ + echo "Mouse (${line}) 1 I $[Mod] Icon-Launch-CurrentDesk ${line}"; \ + echo "Wait ${line}"; \ + j=$(($i*$m)); i=$(($i+1)); \ +done </tmp/Icon-Drives' ++ I PipeRead "rm /tmp/Icon-Drives" # Do something now ! # The partitions must be first Modified: fvwm/components/functions/Icon-Thumbnails =================================================================== --- fvwm/components/functions/Icon-Thumbnails 2013-04-23 19:38:00 UTC (rev 285) +++ fvwm/components/functions/Icon-Thumbnails 2013-04-24 08:08:57 UTC (rev 286) @@ -1,5 +1,5 @@ # Thumbnails -# Must be included after Fullscreen otherwise the icons can be moved +# If included after Fullscreen, the icons cannot be moved SetEnv ThumbWidth 128 SetEnv ThumbHeight 128 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |