###
#  FvwmButtons CompactButtons, a nice theme-able example to use with wm-icons.
#  Optimized for the default fvwm-2.2.0 configuration.
#
#  Copy this file to the home directory (add leading dot) and put:
#    Read .fvwm2rc-compact-buttons
#  as the last line of your .fvwm2rc after the line 'Read .fvwm2rc-wm-icons'.
#
#  You can customize this file by editing Action's, specifying diferent
#  colors etc. You can also play with or remove the string "Size 80x80".
#  Action (with no Mouse) can be invoked by pressing Enter on focused buttons.
#  !!! Current FvwmButtons devel-shot has a bug: not always working reloads.
###


# You can comment the following out or in.
AddToMenu "Modules" "Compact Buttons%menu/utility.xpm%" Module FvwmButtons CompactButtons
AddToFunc "SessionInitFunction" "I" Module FvwmButtons CompactButtons
AddToFunc "SessionRestartFunction" "I" Module FvwmButtons CompactButtons
AddToFunc "InitFunction" "I" Module FvwmButtons CompactButtons
AddToFunc "RestartFunction" "I" Module FvwmButtons CompactButtons
Mouse 3 R CM Menu "MenuButtonIconSet" Nop

# Create alias 'button' if it does not exist yet (actually needed only once).
Exec wm-icons-config -q -p -w button || wm-icons-config -q -p -f button 14x14-general

###
#  Change Button Icon Set submenu
###

DestroyMenu "MenuButtonIconSet"
AddToMenu "MenuButtonIconSet" "Change Icon Set" Title
{{ICON_SET_ITERATOR("
+ "%menu/display.xpm%button	@ICON_SET@" @ADJUST@Exec wm-icons-config -q -p -f button @ICON_SET@
")}}
+ "" Nop
+ "%menu/wm-restart.xpm%Restart	to activate"     Restart

# You can comment one of the following in.
AddToMenu "Window-Ops" "&Button Icon Set%menu/desktop.xpm" Popup MenuButtonIconSet item +97 c
#Exec wm-icons-config -q -p -f button ./mini         # synchronize with mini
#Exec wm-icons-config -q -p -f button 16x16-kde      # static icon set


###
#  FvwmButtons CompactButtons
###

Style "CompactButtons" NoTitle, NoHandles, Sticky, WindowListSkip, NeverFocus

*CompactButtonsBack rgb:E4/D2/C0
# Geometry - really likes to pick its own size, but giving a position is OK
*CompactButtonsGeometry -0+0
# Layout: specify rows or columns, not both
*CompactButtonsColumns 2

# Define the buttons to use. Customize this for your taste.

#*CompactButtons(2x2, Padding 0 0, Swallow(UseOld,NoClose) "Desktop" 'FvwmPager 0 0')
*CompactButtons(2x2, Padding 0 0, Size 80 80, Swallow(UseOld,NoClose) "xclock" `Exec xclock -bg rgb:E4/D2/C0 -padding 2 -geometry 86x86-0+0`)
*CompactButtons(2x1, Padding 0 0, Swallow(UseOld,NoClose) "xload" `Exec xload -nolabel -bg rgb:E4/D2/C0 -update 3 -geometry 86x43-0+99`)
*CompactButtons(2x2, Padding 0 0, Container(Padding 0 0, Columns 4))
*CompactButtons(Icon button/xterm.xpm, Action `Exec xterm`, \
	Action(Mouse 1) `Exec xterm -g 80x40 -sb +sk -si -sl 500 -j -ls -fn 7x14 -fb 7x14bold`, \
	Action(Mouse 2) `Exec xterm -g 80x40 -sb +sk -si -sl 500 -j -ls -fn 7x14 -fb 7x14bold -n root -T root -e su -l`, \
	Action(Mouse 3) `Exec Eterm -n dream -e rlogin -l dream $HOST`, \
)
*CompactButtons(Icon button/folders.xpm, Action `Exec xfm -title "File Manager"`, \
	Action(Mouse 1) `Exec xterm-color -g 80x40 -sb +sk -si -sl 500 -j -ls -fn 7x14 -fb 7x14bold -n Midnight-Commander -T Midnight-Commander -e mc -x`, \
	Action(Mouse 2) `Exec gmc`, \
	Action(Mouse 3) `Exec fr`, \
)
*CompactButtons(Icon button/viewer.xpm, Action `Exec xterm -e top`, \
	Action(Mouse 1) `Exec xterm -fn 7x14 -fb 7x14bold +sb -ut -name xxterm -T Top -n Top -e top`, \
)
*CompactButtons(Icon button/calculator.xpm, Action `Exec xcalc`, \
	Action(Mouse 1) `Exec gcalc`, \
	Action(Mouse 2) `Exec kcalc`, \
)
*CompactButtons(Icon button/chat.xpm, Action `Exec xterm -e irc`, \
	Action(Mouse 1) `Exec xterm -g 80x40 -sb +sk -si -sl 500 -j -ls -fn 7x14 -fb 7x14bold -n irc -T irc -e irc`, \
	Action(Mouse 2) `Exec tkirc`, \
	Action(Mouse 3) `Exec licq`, \
)
*CompactButtons(Icon button/game.xpm, Action `Exec xbill`, \
	Action(Mouse 1) `Exec gnomine`, \
	Action(Mouse 2) `Exec xmahjongg`, \
	Action(Mouse 3) `Exec xpat2`, \
)
*CompactButtons(Icon button/cd-player.xpm, Action `Exec workman`, \
	Action(Mouse 1) `Exec gtcd`, \
	Action(Mouse 2) `Exec kscd`, \
	Action(Mouse 3) `Exec kmid`, \
)
*CompactButtons(Icon button/sound.xpm, Action `Exec xmixer`, \
	Action(Mouse 1) `Exec gmix`, \
	Action(Mouse 2) `Exec freeamp`, \
	Action(Mouse 3) `Exec x11amp`, \
)
*CompactButtons(Icon button/editor.xpm, Action `Exec xterm -e jpico`, \
	Action(Mouse 1) `Exec emacs`, \
	Action(Mouse 2) `Exec gvim`, \
	Action(Mouse 3) `Exec xwp`, \
)
*CompactButtons(Icon button/keyboard.xpm, Action `Exec xkeycaps`, \
	Action(Mouse 2) `Exec xrus`, \
)
*CompactButtons(Icon button/xv.xpm, Action `Exec xv`, \
	Action(Mouse 2) `Exec gimp`, \
	Action(Mouse 3) `Exec ee`, \
)
*CompactButtons(Icon button/ghostview.xpm, Action `Exec ghostview`, \
	Action(Mouse 2) `Exec xpdf`, \
)
*CompactButtons(Icon button/netscape.xpm, Action `Exec netscape -geometry 654x742`, \
	Action(Mouse 2) `Exec arena`, \
)
*CompactButtons(Icon button/wm-lock.xpm, Action `Exec xlock -nice 20 -mode random`, \
	Action(Mouse 2) `Exec xlock -nolock -nice 20 -mode random`, \
)
*CompactButtons(Icon button/window-close.xpm, Action Close, \
	Action(Mouse 2) Iconify, \
	Action(Mouse 3) Destroy, \
)
*CompactButtons(Icon button/wm-restart.xpm, Action `Restart`, \
	Action(Mouse 2) Refresh, \
	Action(Mouse 3) Quit, \
)
*CompactButtons(End)
