## mmmmmmmm mm mm mm mm mmm mmm ## ##"""""" "## ##" ## ## ### ### ## ## ## ## "#m ## m#" ######## ## ####### ## ## ## ## ## ## ## ## ## ## #### ###""### ## "" ## ## ## #### ### ### ## ## ## "" """" """ """ "" "" ## ## ~/.fvwm2rc - FVWM's main config file ## Environmental variables # Preferred applications SetEnv fvwm_browser iceweasel SetEnv fvwm_terminal urxvt SetEnv fvwm_editor "urxvt -e vim" SetEnv fvwm_mail "urxvt -e mutt" SetEnv fvwm_chat "urxvt -e irssi" SetEnv fvwm_player "urxvt -e ncmpcpp" SetEnv fvwm_filemanager thunar SetEnv fvwm_image_viewer feh SetEnv fvwm_runner gmrun ## General settings # Ignore CapsLock and NumLock modifiers IgnoreModifiers 2L # Resize and move windows instead of # borders #OpaqueMoveSize unlimited #Style * ResizeOpaque # Indexed window names to make sure # each window name is unique Style * IndexedWindowName # Get rid of applications icons Style * !Icon # Hides the position and resize dialog HideGeometryWindow ## Virtual Desktops # Number of desktops and default DesktopSize 2x1 Desktop 0 Main # Desktop edge thickness and resistance # for switching easily with mouse Style EdgeScroll 100 100 Style EdgeResistance 400 400 Style EdgeThickness 1 ## Desktop backgrounds # Set with fvwm-root #Desk0 *FvwmBacker: Command (Desk 0, Page 0 0) Exec fvwm-root \ $[HOME]/images/wallpaper/swayr.png #Desk1 *FvwmBacker: Command (Desk 0, Page 1 0) Exec fvwm-root \ $[HOME]/images/wallpaper/swayr.png ## Auto started applications # This configuration uses some fvwm modules # they are also started here DestroyFunc StartFunction AddToFunc StartFunction # FvwmCommandS is used to issue fvwm commands + I Module FvwmCommandS # FvwmAnimate handles some simple animation + I Module FvwmAnimate # FvwmButtons is a powerful tool for creating # launchers, buttons, switches and such + I Module FvwmButtons # FvwmBacker is used for desktop backgrounds + I Module FvwmBacker # FvwmPerl is used for parsing perl + I Module FvwmPerl # Applications # Test (Init) Exec exec makes sure a new # instance of an application is not launched # every time you restart fvwm + I Test (Init) Exec exec mpd ## Functions # Toggle 'always on top' using TestRc DestroyFunc WinOnTop AddToFunc WinOnTop + I ThisWindow (Layer 6) Layer + I TestRc (NoMatch) Layer 0 6 # Take screenshot using scrot DestroyFunc FvwmDesktopScreenshot AddToFunc FvwmDesktopScreenshot + I Exec exec scrot '%Y-%m-%d--%s_$wx$h_scrot.png' -e 'mv $f ~/images/ & $[fvwm_image_viewer] ~/images/$f' #And Delayed 10 seconds DestroyFunc FvwmDesktopScreenshotDelayed AddToFunc FvwmDesktopScreenshotDelayed + I Exec exec scrot -d 10 '%Y-%m-%d--%s_$wx$h_scrot.png' -e 'mv $f ~/images/ & $[fvwm_image_viewer] ~/images/$f' # Widescreen formatting DestroyFunc ReadableWidth AddToFunc ReadableWidth + I Maximize 60 + I Move 50-50w 50-50w # Autoshade functions set mimics # kwin autoshade feature DestroyFunc ToggleAutoshaded AddToFunc ToggleAutoshaded + I State 0 DestroyFunc AutoShade AddToFunc AutoShade + I ThisWindow (State 0) WindowShade True DestroyFunc AutoUnshade AddToFunc AutoUnshade + I ThisWindow (State 0) WindowShade False # This module call actually belongs to startup # function, but I left it here for readability Module FvwmAuto 0 -menter "Silent AutoUnshade" "Silent AutoShade" # This is a smart launcher to launch an # an application if it is not running. # Also it raises the application if it's # running and switches between given # applications/windows if you have two or # more of them. DestroyFunc LaunchRaiseSwitch AddToFunc LaunchRaiseSwitch + I None (*$0*) Exec exec $1 + I Next (*$0*) Focus + I Next (*$0*) Iconify False Module FvwmAuto 0 -mfocus "Silent Raise" # A mixture of previous two examples would # let you group windows so that you can # switch between them with a hotkey. # Adding a window to a group by chanding # it's state DestroyFunc AddToGroup AddToFunc AddToGroup + I ThisWindow State $0 # And switching between groups amd inside them: DestroyFunc GroupSwitch AddToFunc GroupSwitch + I Next (State $0) Focus # Quake-like terminal DestroyFunc QLikeTerm AddToFunc QLikeTerm + I None ($1, CurrentDesk) Exec exec $0 -name $1 + I All ($1) ResizeMove $2p $3p $4p $5p + I All ($1) Stick True + I All ($1, CurrentDesk) Iconify DestroyFunc QLikeLaunch AddToFunc QLikeLaunch + I None ($1, CurrentDesk) Exec exec $0 + I All ($1) ResizeMove $1p $2p $3p $4p + I All ($1) Stick True + I All ($1, CurrentDesk) Iconify # FvwmConsole in urxvt DestroyFunc QLikeFvwmConsole AddToFunc QLikeFvwmConsole + I None (FvwmConsole, CurrentDesk) FvwmConsole -terminal urxvt + I All (FvwmConsole) ResizeMove $0p $1p $2p $3p + I All (FvwmConsole) Stick True + I All (FvwmConsole, CurrentDesk) Iconify # Undecorate given window DestroyFunc UnDecorate AddToFunc UnDecorate + I WindowStyle !Title, !Borders, !Handles # And decorate it again DestroyFunc Decorate AddToFunc Decorate + I WindowStyle Title, Borders, Handles # File browser menu using $[fvwm_filemanager] AddToFunc FuncFvwmMenuDirectory + I PipeRead \ "fvwm-menu-directory -d '$0' \ -command-t 'Exec exec $[fvwm_filemanager] "%d"' \ -command-f 'Exec exec $[fvwm_filemanager] "%f"'" # Function for titlebar push focus # and window menu DestroyFunc TitleFunction AddToFunc TitleFunction + C Focus + D Lower + M Move # Undecorate window and maximize it DestroyFunc UndecMax AddToFunc UndecMax + I ThisWindow UnDecorate + I Schedule 100 Maximize 100 100 # Autoshading a window and putting # it to top layer DestroyFunc AutoShadeAndOnTop AddToFunc AutoShadeAndOnTop + I ToggleAutoShade + I WinOnTop ## Focus policy # Similar to that of openbox Style * ClickToFocus ## Input device bindings # Cheatsheat # # Contexts: # # R - Root window # I - Iconified window # F - window decoration corner # S - window decoration side # T - window decoration title # W - active window # 0-9 - titlebar buttons # M - Menu # A - any context # # You can combine contexts: FWST etc. # # Modifiers: # ctrl - C # super - 4 # alt - 1 # shift - S # caps - L # num - 2 # # You can combine modifiers: 1S, 4S, etc. # Key bindings Key F4 W M DeleteWin Key Tab A M WindowList Root NoGeometry Key M A M Module FvwmConsole Key F2 A 1 Exec exec $[fvwm_runner] Key Space A 4 Menu MainMenu Key t W S4 WinOnTop Key a W S4 ToggleAutoShaded Key d W S4 UnDecorate Key d W 4 Decorate Key m W 4 Maximize 100 100 Key r W 4 ReadableWidth Key i W 4 Iconify Key F7 W 1 Move Key F8 W 1 Resize Key D W 4 Decorate #Switch desktops with arrow keys Key Left A C1 Scroll -100 0 Key Right A C1 Scroll +100 +0 Key Up A C1 Scroll +0 -100 Key Down A C1 Scroll +0 +100 #Move titlebar to particular side Key Left W S4 WindowStyle TitleAtLeft Key Right W S4 WindowStyle TitleAtRight Key Up W S4 WindowStyle TitleAtTop Key Down W S4 WindowStyle TitleAtBottom #Grouping windows and switching between #groups and inside them Key 1 W C4 AddToGroup 1 Key 2 W C4 AddToGroup 2 Key 3 W C4 AddToGroup 3 Key 1 A 4 GroupSwitch 1 Key 2 A 4 GroupSwitch 2 Key 3 A 4 GroupSwitch 3 #Screenshots and screencasts made easy: Key Print A N FvwmDesktopScreenshot Key Print A 1 FvwmDesktopScreenshotDelayed #Smart launcher for particular applications Key t A 4 LaunchRaiseSwitch urxvt $[fvwm_terminal] Key f A 4 LaunchRaiseSwitch *File*Manager $[fvwm_filemanager] Key e A 4 LaunchRaiseSwitch *gedit $[fvwm_editor] Key w A 4 LaunchRaiseSwitch *Namoroka $[fvwm_browser] Key p A 4 LaunchRaiseSwitch *Sonata* $[fvwm_player] Key g A 4 LaunchRaiseSwitch *GIMP gimp #Launch particular applications Key t A C4 Exec exec $[fvwm_terminal] Key f A C4 Exec exec $[fvwm_filemanager] Key e A C4 Exec exec $[fvwm_editor] Key w A C4 Exec exec $[fvwm_browser] Key p A C4 Exec exec $[fvwm_player] Key g A C4 Exec exec gimp #Quake-like terminal and quake-like fvwm console Key Grave A C QLikeTerm $[fvwm_terminal] quake-term 1366 768 0 0 Key Q A 4 QLikeFvwmConsole 812 360 275 408 # Mouse bindings Mouse 3 R A Menu MainMenu Mouse 1 R A WindowList Root NoGeometry Mouse 1 T A TitleFunction Mouse 1 A 1 Move Mouse 3 A 1 Resize ## Menus # Main menu AddToMenu MainMenu MainMenu title + DynamicPopupAction Function MakeMainMenu AddToFunc MakeMainMenu + I DestroyMenu recreate MainMenu + I PipeRead 'echo "AddToMenu MainMenu \'$(hostname) - $(date +%H:%M)\' Exec exec $[fvwm_terminal] -g 237x69+73-63 -e tmux attach"' + I AddToMenu MainMenu MissingSubmenuFunction FuncFvwmMenuDirectory + I AddToMenu MainMenu "" Nop + I AddToMenu MainMenu "&Terminal" Exec exec $[fvwm_terminal] + I AddToMenu MainMenu "&Web Browser" Exec exec $[fvwm_browser] + I AddToMenu MainMenu "Text &Editor" Exec exec $[fvwm_editor] + I AddToMenu MainMenu "E&mail Client" Exec exec $[fvwm_mail] + I AddToMenu MainMenu "&Chat Client" Exec exec $[fvwm_chat] + I AddToMenu MainMenu "Music &Player" Exec exec $[fvwm_player] + I AddToMenu MainMenu "&File Browser" Popup $[HOME] + I AddToMenu MainMenu "&Applications" Popup Applications + I AddToMenu MainMenu "&Dotfiles" Popup Dotfiles + I AddToMenu MainMenu "&Handbook?" Exec exec $[fvwm_browser] /usr/share/doc/debian-reference-common/html/index.en.html + I AddToMenu MainMenu "" Nop + I AddToMenu MainMenu "Re&start" Restart + I AddToMenu MainMenu "E&xit" Exec exec fvwm-logout # Applications menu DestroyMenu Applications AddToMenu Applications + "Agave" Exec exec agave + "ftp" Exec exec $[fvwm_terminal] -e ftp + "GIMP" Exec exec gimp + "GParted" Exec exec gksudo gparted + "Inkscape" Exec exec inkscape + "Mixer" Exec exec $[fvwm_terminal] -e alsamixer + "top" Exec exec $[fvwm_terminal] -e top + "VLC" Exec exec vlc # Dotfiles Menu DestroyMenu Dotfiles AddToMenu Dotfiles + ".fvwm2rc" Exec exec $[fvwm_editor] ~/.fvwm2rc + ".gmrunrc" Exec exec $[fvwm_editor] ~/.gmrunrc + ".irssi/config" Exec exec $[fvwm_editor] ~/.irssi/conf + ".mailcap" Exec exec $[fvwm_editor] ~/.mailcap + ".muttrc" Exec exec $[fvwm_editor] ~/.muttrc + ".ncmpcpp/config" Exec exec $[fvwm_editor] ~/.ncmpcpp/config + ".tmux.conf" Exec exec $[fvwm_editor] ~/.tmux.conf + ".toprc" Exec exec $[fvwm_editor] ~/.toprc + ".config/Trolltech.conf" Exec exec $[fvwm_editor] ~/.config/Trolltech.conf + ".vimrc" Exec exec $[fvwm_editor] ~/.vimrc + ".Xdefaults" Exec exec $[fvwm_editor] ~/.Xdefaults + ".xinitrc" Exec exec $[fvwm_editor] ~/.xinitrc + ".zshrc" Exec exec $[fvwm_editor] ~/.zshrc # Window menu DestroyMenu WindowMenu AddToMenu WindowMenu + "On &Top" WinOnTop + "Audo&shade" ToggleAutoShaded + "Undecorate and &Maximize" UndecMax + "Autoshade and &On Top" AutoShadeAndOnTop + "S&tick" Stick + "" Nop + "Force close" Destroy ## Decorations # Fonts Style "*" Font "xft:Neep:Regular:size=8" MenuStyle "*" Font "xft:Neep:Regular:size=8" # Cheatsheet: # # Colorsets: # # 0 = Default colors # 1 = Inactive windows # 2 = Active windows # 3 = Inactive menu entry and menu background # 4 = Active menu entry # 5 = greyed out menu entry (only bg used) # 6 = module foreground and background # 7 = hilight colors # Colorsets # Menu fg - text, bg - background, the rest is for borders Colorset 3 fg #4f4939, bg #1c1709, sh #4f4939, hi #4f4939 # Menu selected item highligt colorset Colorset 7 fg #d8d138, bg white # Window titlebar and border colors Colorset 10 fg #4f4939, bg #4f4939, sh #4f4939, hi #4f4939 # Window titlebar and border highlights Colorset 11 fg #d9d138, bg #1c1709, sh #4f4939, hi #4f4939 # Menu # Enable colorsets MenuStyle * MenuColorset 3 MenuStyle * ActiveColorset 7 # Purge 3D MenuStyle * SeparatorsLong, TrianglesSolid MenuStyle * BorderWidth 2 MenuStyle * ActiveFore, Hilight3DOff # Popup settings MenuStyle * PopupAsSubmenu, HoldSubmenus, SubmenusRight MenuStyle "*" PopupOffset 2 100 # Titlebar # General settings TitleStyle Height 20 TitleStyle LeftJustified Style * TitleAtLeft TitleStyle Colorset 11 -- Flat # Titlebar colorsets Style "*" HilightColorset 11 Style "*" Colorset 10 # Titlebar buttons ButtonStyle All -- UseTitleStyle ButtonStyle All Active -- Flat ButtonStyle All Inactive -- Flat AddButtonStyle 1 Vector 4 \ 50x60@3 55x65@3 55x40@3 60x40@3 AddButtonStyle 2 Vector 5 \ 50x45@3 55x40@3 60x45@3 \ 55x50@4 55x65@3 AddButtonStyle 4 Vector 4 \ 50x50@3 60x60@3 60x50@4 50x60@3 AddButtonStyle 6 Vector 5 \ 50x60@3 55x65@3 60x60@3 \ 55x55@4 55x40@3 # Titlebar Functions Mouse 1 2 N Maximize 100 100 Mouse 1 4 N Delete Mouse 1 6 N Iconify Mouse 1 1 A Menu WindowMenu #De-iconify an iconified window Mouse 1 I N Iconify # Borders Style * BorderWidth 2 Style * HandleWidth 2 BorderStyle Active Colorset 10 -- flat BorderStyle Inactive Colorset 10 -- flat # Application specific styles Style quake-term !Title, !Handles, !Borders, !Icon, WindowListSkip Style FvwmConsole !Title, !Handles, !Borders, !Icon, WindowListSkip Style gmrun !Title Style fvwm-logout !Title