Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ################################
- ## My fvwm2rc file ##
- ################################
- ## Fvwm's default functions are defined in /usr/share/fvwm/ConfigFvwmDefaults
- DestroyFunc StartFunction
- SetEnv fvwm_image $[FVWM_USERDIR]/images
- SetEnv fvwm_icon $[FVWM_USERDIR]/images/icons
- SetEnv fvwm_mini_icons $[FVWM_USERDIR]/images/mini
- SetEnv fvwm_wallpapers $[FVWM_USERDIR]/wallpapers
- ImagePath $[fvwm_icon]:$[fvwm_image]:$[fvwm_mini_icons]:$[fvwm_wallpapers]:+
- SetEnv FVWM_SCRIPTS $[FVWM_USERDIR]/scripts
- # Bash has my favourite shell syntax, so use it if it exists.
- Test (f /bin/bash) ExecUseShell /bin/bash
- ## tell fvwm to ignore the Numlock key. http://www.fvwm.org/documentation/faq/#5.5
- IgnoreModifiers L25
- Emulate Fvwm
- # The maximum size window with which to use opaque window movement.
- OpaqueMoveSize unlimited
- ## define the 'usable' screen area for windows. Here a 3 pixel margin is defined on the RHS.
- EwmhBaseStruts 0 3 0 0
- ## Specifies the % of a page to scroll when the cursor hits the edge of a page. Unwanted.
- EdgeScroll 0 0
- ## Completely disables mouse edge scrolling, even when a window is dragged.
- EdgeThickness 0
- ## Defines how hard it is to change the desktop by moving the mouse over the edge of the screen.
- ## If -1 is given as the delay, scrolling is disabled completely.
- EdgeResistance -1
- ## set desktops
- DesktopSize 1x1
- DesktopName 0 Desk 0
- DesktopName 1 Desk 1
- DesktopName 2 Desk 2
- DesktopName 3 Desk 3
- DesktopName 4 Desk 4
- DesktopName 5 Desk 5
- DesktopName 6 Desk 6
- Style * ClickToFocus
- Style * FPSortWindowlistByFocus
- ## SkipMapping plus a Nop EWMHActivateWindowFunc function. New windows that open on another
- ## desktop can never steal focus from the current desktop.
- Style * SkipMapping
- DestroyFunc EWMHActivateWindowFunc
- AddToFunc EWMHActivateWindowFunc
- + I nop
- ## mouse cursor styles
- CursorStyle ROOT left_ptr
- CursorStyle TITLE left_ptr
- CursorStyle DEFAULT left_ptr
- CursorStyle SYS left_ptr
- CursorStyle MENU left_ptr
- Style * NoDecorHint, NoFuncHint, GNOMEIgnoreHints
- ## NoUsePPosition :- instructs fvwm to ignore the program specified position (PPosition hint)
- ## when adding new windows. Works best for most applications (p5565).
- Style * NoUsePPosition
- Style * NoUseIconPosition
- ## When a window is raised/lowered, its main window + all transients get raised/lowered too. Default.
- Style * RaiseTransient, LowerTransient, StackTransientParent
- # With the border options options below, only the bg value seems to define the border color
- Colorset 18 fg #303344, bg #36403D
- Colorset 19 fg #303344, bg #566661
- Style * BorderWidth 4
- Style * HandleWidth 4
- Style * BorderColorset 18, HilightBorderColorset 19
- BorderStyle Active -- Flat NoInset
- BorderStyle InActive -- Flat NoInset
- Colorset 20 fg #303344, bg #D0DDED
- Colorset 21 fg #303344, bg #D0DDED
- Style * !Title
- TitleStyle LeftJustified Height 18
- Style * Colorset 10, HilightColorset 10
- # ^^^^^^^^^^^^^^^^<----------- Sets the fg color for the titlebar.
- # Also sets the fg color for titlebar text & 3D decors.
- TitleStyle Inactive (Colorset 20 -- Flat )
- TitleStyle Active (Colorset 21 -- Flat )
- # ^^^^^^^^^^^<------- Sets the bg color for the titlebar.
- # Also sets the bg color for titlebar text.
- Style Thunar Title, BorderColorset 18, HilightBorderColorset 19, Colorset 10, HilightColorset 10
- Style Thunar Colorset 10, HilightColorset 10
- Style * TileCascadePlacement, WindowShadeSteps 20, ResizeOpaque
- ##--------------------------------------------------------------
- ## Activate the Main Menu
- DestroyFunc MButtonOneF
- AddToFunc MButtonOneF
- + C Menu AppMenu Nop
- + H Popup AppMenu
- + D Menu FvwmMenu Nop
- Mouse 1 R A MButtonOneF
- ## Control-Esc -- key-binding for Main menu TESTED/WORKS
- Key Escape A C Menu MainMenu Root c c
- ## Activate the WindowOpts menu
- ## Mouse button #3 on the window frame or sides -- WindowOpts menu TESTED/WORKS
- Mouse 3 F A Menu MenuFvwmWindowOps Nop
- Mouse 3 S A Menu MenuFvwmWindowOps Nop
- ## Alt-F8 -- key-binding for the WindowOpts menu TESTED/WORKS
- DestroyFunc KeyMenuFvwmWindowOps
- AddToFunc KeyMenuFvwmWindowOps
- + I WarpToWindow 100 0
- + I Menu MenuFvwmWindowOps Nop
- Key F8 W M KeyMenuFvwmWindowOps
- Key F8 F M KeyMenuFvwmWindowOps
- Key F8 S M KeyMenuFvwmWindowOps
- ## Mouse button #3 in the root window -- FvwmOpts menu TESTED/WORKS
- Mouse 3 R A Menu MenuFvwmOpts Nop
- ## Mouse button #3 on an icon - IconifiedOps menu. TESTED/WORKS
- Mouse 3 I A Menu MenuIconifiedOps Nop
- ## SHIFT AND MOVE THE WINDOW
- DestroyFunc FuncMoveWindow
- AddToFunc FuncMoveWindow
- + M Move
- Mouse 1 W M FuncMoveWindow
- # Define Super_L - Tab, to cycle thru the windows.
- DestroyFunc FocusRaiseAndStuff
- AddToFunc FocusRaiseAndStuff
- + I Iconify off
- + I Focus
- + I Raise
- Key Tab A 4 Next (CurrentPage, !Sticky) FocusRaiseAndStuff
- Key Tab A M WindowList (CurrentDesk, !Sticky, AcceptsFocus) Root c c \
- NoCurrentDeskTitle, NoGeometry, CurrentAtEnd, IconifiedAtEnd
- # Needed by the builtin WindowList command, this should mostly match the manpage
- DestroyFunc WindowListFunc
- AddToFunc WindowListFunc
- + I ThisWindow (Iconic) Layer
- + I Iconify off
- + I FlipFocus
- + I Raise
- + I WarpToWindow 5p 5p
- # Close Window. Modified to Alt-F4
- Key F4 A M Close
- # Maximize, Vert&Horiz. Modified - Alt-F10, Alt-Up
- Read $[FVWM_USERDIR]/functions/Maximize-Plus
- Key F10 A M Maximize-Plus
- Key Up A M Maximize-Plus
- # Move Window with Arrows
- Key Right A SM PointerWindow Move w+1 w+0 Warp
- Key Left A SM PointerWindow Move w-1 w+0 Warp
- Key Up A SM PointerWindow Move w+0 w-1 Warp
- Key Down A SM PointerWindow Move w+0 w+1 Warp
- # Resize Window with key combo - Super Ctrl Arrows
- # PointerWindow means the Window under the cursor. R/L/U seem to work okay. But not Down. Why???
- Key Right A C4 PointerWindow Resize br w+1 w+0
- Key Left A C4 PointerWindow Resize br w-1 w+0
- Key Up A C4 PointerWindow Resize br w+0 w-1
- Key Down A C4 PointerWindow Resize br w+0 w+1
- # Change to Desktop/Workspace N
- Key 0 A 4 GotoDesk 0 0
- Key 1 A 4 GotoDesk 0 1
- Key 2 A 4 GotoDesk 0 2
- Key 3 A 4 GotoDesk 0 3
- Key 4 A 4 GotoDesk 0 4
- Key 5 A 4 GotoDesk 0 5
- Key 6 A 4 GotoDesk 0 6
- # Move Current Window to Desktop/Workspace N
- Key 0 A S4 Current MoveToDesk 0 0
- Key 1 A S4 Current MoveToDesk 0 1
- Key 2 A S4 Current MoveToDesk 0 2
- Key 3 A S4 Current MoveToDesk 0 3
- Key 4 A S4 Current MoveToDesk 0 4
- Key 5 A S4 Current MoveToDesk 0 5
- Key 6 A S4 Current MoveToDesk 0 6
- # Move Left/Right to Desktop/Workspace - Using the Super key, Mouse-Wheel, and Alt key.
- Key Left A 4 GotoDesk -1 0 9
- Key Right A 4 GotoDesk 1 0 9
- Mouse 4 R A GotoDesk -1 0 9
- Mouse 5 R A GotoDesk 1 0 9
- Key Left A M GotoDesk -1 0 9
- Key Right A M GotoDesk 1 0 9
- # Use Super-Shift-[0-9] to move the current window to the next/prev desktop
- # Only works if the window is focused after each desktop shift
- DestroyFunc MoveToNextWorkspace
- AddToFunc MoveToNextWorkspace
- + I Current MoveToDesk 1 0 9
- + I GotoDesk 1 0 9
- DestroyFunc MoveToPrevWorkspace
- AddToFunc MoveToPrevWorkspace
- + I Current MoveToDesk -1 0 9
- + I GotoDesk -1 0 9
- Key Right A S4 MoveToNextWorkspace
- Key Left A S4 MoveToPrevWorkspace
- Read $[FVWM_USERDIR]/functions/Maximize-Plus
- ## Repeated use of notify-send will create multiple notifications. But with a perl
- ## function, one popup notification is created, and modified whenever the volume changes.
- Key XF86AudioMute A A Exec exec amixer set Master toggle -q
- Key XF86AudioRaiseVolume A N PerlEval notify_volume "3%+" ;
- Key XF86AudioLowerVolume A N PerlEval notify_volume "3%-" ;
- ## FvwmEvent - To help reforcus the correct window when the desktop is switched.
- ## Uses states 2 and 3.
- Read $[FVWM_USERDIR]/test-event.fvwm
- AddToFunc StartFunction I FvwmEvent Test-event
- ##------------
- Key G A 4 Exec gmrun
- Key S A 4 Exec exec $HOME/bin/toggle_dzen.sh
- Style gmrun PositionPlacement Center
- Style Firefox StartsOnDesk 3
- Style tmux1 StartsOnDesk 4
- Style UrxvtFvwmConsole StartsOnDesk 3
- # Style vlc PositionPlacement center
- ##-----------------------------
- Style FButtonsTray Sticky, !Iconifiable, NeverFocus, WindowListSkip
- Style FButtonsTray BorderWidth 1, HandleWidth 1
- Style FButtonsTray StaysOnTop
- DestroyModuleConfig FButtonsTray: *
- *FButtonsTray: Geometry 90x24+500+0
- #*FButtonsTray: BoxSize smart
- *FButtonsTray: Rows 1
- *FButtonsTray: Columns 90
- *FButtonsTray: Frame 0
- *FButtonsTray: (90x1, Padding 0 0, Swallow (NoOld, Kill, NoHints, NoRespawn) \
- "stalonetray" 'Exec stalonetray --geometry 4x1+500+1 ')
- AddToFunc StartFunction
- + I Module FvwmButtons FButtonsTray
- + I Exec exec xfce4-clipman
- Key C A 4 Exec xfce4-popup-clipman
- #############################################################################
- ## AUTOHIDING FUNCTIONS FOR PANELS
- ## Copied from question 7.17 : /usr/share/doc/fvwm/docs/FAQ.gz
- DestroyFunc autohide
- AddToFunc autohide
- + I ThisWindow ($0) Deschedule $[w.id]
- + I TestRc (!Match) Deschedule -$[w.id]
- + I ThisWindow ($0) KeepRc ThisWindow (shaded) autohide_show $1 $3
- + I TestRc (!Match) All ($0, !shaded) autohide_hide $2 $3
- DestroyFunc autohide_show
- AddToFunc autohide_show
- + I Schedule $0 -$[w.id] WindowShade $1 off
- + I Schedule $0 -$[w.id] Deschedule $[w.id]
- + I Schedule $0 -$[w.id] Deschedule -$[w.id]
- DestroyFunc autohide_hide
- AddToFunc autohide_hide
- + I Schedule $0 $[w.id] WindowShade $1 on
- + I Schedule $0 $[w.id] Deschedule $[w.id]
- + I Schedule $0 $[w.id] Deschedule -$[w.id]
- DestroyFunc enter_handler
- AddToFunc enter_handler
- + I autohide FButtonsTray 250 500
- # ^ ^ ^
- # | | |______ Hide delay
- # | |__________ Show delay
- # |______________________ Unique window name/resource
- AddToFunc StartFunction
- + I Module FvwmAuto 1 -menter enter_handler
- #############################################################################
- ## A helper function to preprocess lines with perl.
- DestroyFunc .
- AddToFunc . I SendToModule FvwmPerl preprocess -c -- $*
- ## Start the FvwmPerl Module with extra perl modules loaded.
- DestroyFunc PerlInit
- AddToFunc PerlInit
- + I KillModule FvwmPerl
- + I Module FvwmPerl --export PerlEval
- + I PerlEval use lib `fvwm-perllib dir` ; \
- use lib "$[FVWM_USERDIR]" ; \
- use MyPerl::Notify qw( notify_volume ) ;
- AddToFunc StartFunction I PerlInit
- ## Bigger font for the Windowlist. WHERE IS MY DEFAULT FONT SETTING ??
- MenuStyle WindowList Font "xft:DejaVu Sans Mono:style=Book:pixelsize=16"
- #########################################
- # THE START-FUNCTION - MAIN DECLARATION #
- #########################################
- Read $[FVWM_USERDIR]/colorsets
- Read $[FVWM_USERDIR]/main_menu
- Read $[FVWM_USERDIR]/fvwm_pager
- Read $[FVWM_USERDIR]/iconify_funcs
- AddToFunc StartFunction
- #
- + I Exec fvwm-root --retain-pixmap $[fvwm_wallpapers]/graham-sydney-01--1024x600--5.png
- + I Module FvwmCommandS
- + I Module FvwmDebug -xc
- + I Module FvwmRearrange
- + I Exec exec rm $[HOME]/.fvwm/icon.tmp.* 2>/dev/null
- + I Exec exec sh -c " $HOME/bin/tmuxer_1.sh tmux1 && urxvt -title tmux1 -e tmux attach -t tmux1 "
- + I Exec exec $HOME/bin/dzen-status
- + I Schedule 10500 12003 Exec exec $HOME/bin/desktop_start_1.sh
- + I Module FvwmConsole -terminal urxvt -geometry 60x18 -name UrxvtFvwmConsole
- + I Module FvwmProxy
- + I Module FvwmAnimate
- + I Exec exec compton -b
- + I Exec exec $HOME/bin/launch-trcli
- + I Exec exec $HOME/bin/tmux-ncmpcpp.sh
- + I GotoDesk 0 6
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement