Skip to content

Instantly share code, notes, and snippets.

@ThomasAdam
Created February 17, 2017 21:03
Show Gist options
  • Save ThomasAdam/8c2d4858425c75a378ff1c2b5a61b71c to your computer and use it in GitHub Desktop.
Save ThomasAdam/8c2d4858425c75a378ff1c2b5a61b71c to your computer and use it in GitHub Desktop.
ModuleTimeout 1
EdgeResistance 500 1
EdgeThickness 2
IgnoreModifiers L25
SetAnimation 10 -.01 0 .01 .03 .08 .18 .3 .45 .6 .75 .85 .90 .94 .97 .99 1.0
XineramaPrimaryScreen 0
Xinerama On
# Where FVWM will look for its icons and anything else we might wish
# for.
ImagePath +:/usr/share/pixmaps/fvwm/
ImagePath +:/usr/share/icons/wm-icons/:/usr/share/icons/wm-icons/16x16-general
ImagePath $[HOME]/.fvwm/icons/:+:$[FVWM_USERDIR]/pixmaps:$[FVWM_USERDIR]
IconFont 9x13
# Relative to the font size of a window, just how high should the title
# bar be? (in pixels)
TitleStyle Height 5
# Mimick general appearences and functionality of windows. Fvwm puts
# the geometry window in the top-left, for instance. This setting also
# determines the look and feel of windowing hints and menus. I used toAAA
# use "MWM" -- and I quite often change between the two, depending on my
# mood. I quite like the 3Dness of FVWM, that MWM doesn't inherently
# have.
Emulate Mwm
# DesktopName is what used to be the "Label" option in the FvwmPager
# module. It allows you to define (and hence set) the name of any Desks
# you might have. The more names you declare here, the more desks that
# are created -- but see 'DesktopSize'
DesktopName 0 0
DesktopName 1 1
DesktopName 2 2
DesktopName 3 3
DesktopName 4 4
DesktopName 5 5
DesktopName 6 6
DesktopName 7 7
DesktopName 8 8
DesktopName 9 9
# As with the 'Emulate' command, this ensures I always see the geometry
# window when resizing/moving windows around the screen.
HideGeometryWindow never
# EWMHBaseStruts left right top bottom
EWMHBaseStruts 0 0 16 16
# This defines the time between a button press and a button release (in
# ms). At least this value gives me enough time to be slow about a
# decision.
ClickTime 310
DesktopSize 1x1
# The root cursor (the one in the root window) defaults to a cross. I
# don't like this -- I prefer an arrow pointing to the left.
CursorStyle root top_left_arrow
# When moving large applications, ensure they don't flicker too much.
OpaqueMoveSize -1
# How many pixels before a move window is indicated?
MoveThreshold 3
# Tells Fvwm to ignore the XEvent 'configureNotify' to stop windows
# flickering.
BugOpts FlickeringMoveWorkAround True
BugOpts RaiseOverUnmanaged True
# }}}1
# Colorsets {{{1
# Set the main colorset
####Colorset 0 fg black, bg rgb:60/a0/c0
# Was snow3
CleanupColorsets
#Colorset 0 fg black, bg grey, NoShape
Colorset 1 fg black, bg #DBAEF7, NoShape
Colorset 2 fg white, bg rgb:00/50/00, Plain, NoShape
Colorset 3 fg white, bg gold, NoShape
Colorset 4 fg rgb:f0/f0/f4, bg average, NoShape
Colorset 5 fg black, bg #00AE5A, NoShape
Colorset 6 fg black, bg #43B200, NoShape
Colorset 7 fg rgb:f0/f0/f4, bg average, NoShape
Colorset 8 fg rgb:f0/f0/f4, bg rgb:0b/2e/46, Plain, NoShape
Colorset 9 fg rgb:f0/f0/f4, bg average, Plain, NoShape
Colorset 10 bg #bfa300, NoShape
Colorset 11 bg #C80000, fg white, Plain, NoShape
Colorset 12 fg white, bg rgb:00/00/36, Plain, NoShape
Colorset 13 fg white, bg #A2A2A2
Colorset 14 fg white, bg blue
Colorset 15 fg white, bg #2F7E00
Colorset 20 fg white, bg '#e50000'
Colorset 21 fg white, bg yellow
Colorset 22 fg white, bg green
Colorset 23 fg white, bg '#4c4cff'
Colorset 24 fg white, bg magenta
# Other colorsets are defined in ~/.fvwm/colorsets, and are used for the
# dynamic menu.
ColorMapFocus FollowsMouse
# }}}1
# Internal Variables {{{1
# Variables for FVWM's use. These are variables placed in the
# environment by FVWM. Hence they can the be accessed by any command or
# Module spawned by FVWM.
#
# See also: http://edulinux.homeunix.org/fvwm/fvwmchanfaq.html#16
SetEnv RCount 0
SetEnv RXVT "urxvt"
SetEnv RXVTR "urxvt -fg $[fg.cs12] -bg $[bg.cs12] -fn -misc-fixed-medium-r-normal--13-120-75-75-C-80-ISO10646-1"
# }}}1
# Style definitions {{{1
# General Window Styles {{{2
# Default styles common to all windows created.
# IconBox, Iconfill, and IconGrid are all related to one another, and
# define where and how the icons are to be placed on the screen.
#
# See: http://edulinux.homeunix.org/fvwm/fvwmchanfaq.html#21
#
# ... for more information.
Style * InitialMapCommand PipeRead `echo "AssignTag $[infostore.screen-$[w.screen]-ActiveTag]"`
Style * IconBox 28x78+11+17@c, IconFill t l
Style * EdgeMoveResistance 5 0
Style * BorderWidth 4, HandleWidth 4
Style * IndexedWindowName
Style * MWMBorder, FirmBorder, Handles, !Title
Style * SloppyFocus
Style * Colorset 13
Style * HilightBorderColorsetRegions 20 21 22 23
Style * HilightHandlesColorsetRegions 24 24 24 24
#Style * HilightColorset 6
Style * SnapAttraction 9 SameType, SnapGrid 2 2
Style * MWMButtons
Style * MWMDecor, MWMFunctions
Style * HintOverride
Style * PositionPlacement UnderMouse
Style * NoPPosition
Style * WindowShadeSteps 0, WindowShadeScrolls
Style * DecorateTransient, ResizeOpaque
Style * Font 6x10
Style * !Icon
Style * IconTitleRelief
Style * UseDecor fDecor
Style ** IconOverride, IconTitleFormat %i
# }}}2
# Application specific styles. {{{2
# Styles related to specific applications.
# See: http://edulinux.homeunix.org/~n6tadam/fvwm/tips/misc/styles.txt
Style rxvt IndexedWindowName, Icon wterm.xpm
Style FvwmButtons !Title, !Handles, CirculateSkip, NeverFocus, Sticky, \
WindowListSkip
Style Buttons-Slider NoTitle, NoHandles, !Borders
Style xconsole IconTitleFormat %i
Style Google-chrome-stable SkipMapping
Style chromium InitialMapCommand AssignTag 1
Style FB-BB-* !Handles, !Borders, Sticky, CirculateSkip
Style stalonetray Unmanaged
Style Stalonetray Unmanaged
#}}}2
# }}}1
# Decors {{{1
# AddToDecor allows for things like vector buttons to be defined. This is
# deprecated and plans for it to be re-written are long overdue. :)
AddToDecor fDecor
+ BorderStyle -- Flat
+ TitleStyle -- Raised
+ ButtonStyle All -- Raised
+ AddButtonStyle 1 Vector 5 25x40@1 25x60@1 75x60@0 75x40@0 25x40@1
+ AddButtonStyle 2 Vector 4 50x25@1 75x75@0 25x75@0 50x25@1
+ AddButtonStyle 4 Vector 4 50x75@1 25x25@1 75x25@1 50x75@0
+ ButtonStyle 1 - Clear MWMDecorMenu
+ ButtonStyle 2 - Clear MWMDecorMax
+ ButtonStyle 4 - Clear MWMDecorMin
# }}}1
# Bindings {{{1
# Root menu mouse bindings.
Mouse 1 R A Menu FvwmMenuRoot
Mouse 2 R A WindowList NoIcons, ShowScreen
Mouse 3 RFT A Menu FvwmMenuWindowOps
Mouse 1 SFT A FuncFvwmMoveOrRaiseOrShade
Mouse 1 SF A FuncFvwmResizeOrRaiseOrShade Maximize
Mouse 1 I A FuncIconifyDeIconify
Mouse 1 W 4 TransparencyMove
Mouse 3 I A Menu FvwmMenuWindowOps
Mouse 3 FS A Menu FvwmMenuWindowOps
Mouse 0 1 A FuncWindowOpsOrClose
Mouse 0 4 A FuncIconifyDeIconify
Mouse 0 2 A FuncFvwmMaximizeFullScreen
Mouse 1 2 S Next (CirculateHit, tb) Current Maximize 100 -20p
Mouse 0 4 S FuncDeIconifyAll
Mouse 1 2 S Maximize growonlayers $[w.layer] -1 grow grow
DestroyFunc ResizeSE
AddToFunc ResizeSE I Resize Direction SE warptoborder
Mouse 3 A 4 ResizeSE
# }}}2
# Keyboard Shortcuts {{{2
# Now some keyboard shortcuts.
Key bracketright A 4 SwitchTagsRelative +
Key bracketleft A 4 SwitchTagsRelative -
# Window key-bindings
Key i A 4 Iconify
Key Left A 4 Direction West (CurrentDesk, AcceptsFocus, Visible) Focus
Key Right A 4 Direction East (CurrentDesk, AcceptsFocus, Visible) Focus
Key Up A 4 Direction North (CurrentDesk, AcceptsFocus, Visible) Focus
Key Down A 4 Direction South (CurrentDesk, AcceptsFocus, Visible) Focus
Key Return A 4 Exec exec $[RXVT]
Key Return A C Maximize grow grow
Key A W S4 Close
Key Down W M Lower
Key Up W M Raise
Key m W 4 Maximize
Key L A CM Exec exec i3lock -c '#2000FF'
Key S A 4 Stick
Key F12 A 4 Module FvwmConsole
Key Up WTSF CM PackUp
Key Down WTSF CM PackDown
Key Left WTSF CM PackLeft
Key Right WTSF CM PackRight
Key slash A 4 Exec exec rofi \
-levenshtein-sort \
-show window \
-bg '#66ba66' \
-fg black \
-color-enabled 1 \
-color-normal "white,black" \
-bc 'blue' \
-bw 4 \
-columns 1 \
-lines 5 \
-fixed-num-lines 1 \
-width 40 \
-terminal xterm \
-hide-scrollbar
Key x A C4 Exec exec rofi \
-levenshtein-sort \
-show run \
-bg '#66ba66' \
-fg black \
-hlbg white \
-hlfg black \
-bc 'blue' \
-bw 4 \
-columns 1 \
-lines 5 \
-fixed-num-lines 1 \
-width 40 \
-terminal xterm \
-hide-scrollbar
# }}}1
# Menu Styles {{{1
MenuStyle Win
MenuStyle * Font "xft:Sans:Normal:pixelsize=14:minspace=True:antialias=True"
MenuStyle * Hilight3DThickness 1
MenuStyle * Foreground Black
MenuStyle * Background ForestGreen
MenuStyle * PopupDelayed, PopupDelay 150, PopdownDelayed, PopdownDelay 150
MenuStyle * PopupOffset 0 100, TitleWarp
MenuStyle * TitleUnderlines2, SeparatorsLong, TrianglesRelief
MenuStyle * Animation, AutomaticHotkeysOff, DoubleClickTime
MenuStyle * BorderWidth 1, SidePic, SideColor
MenuStyle * PopupAsSubmenu, HoldSubmenus, SubmenusRight
MenuStyle * ItemFormat "%.4s%.1|%.5i%.5l%.5l%.5r%.5i%2.3>%1|"
MenuStyle * VerticalItemSpacing, VerticalTitleSpacing
BusyCursor DynamicMenu True
#}}}1
# Functions {{{1
# Init Functions {{{2
# StartFunction {{{3
AddToFunc StartFunction
+ I Module FvwmEvent FE-aw
+ I Exec exec parcellite
+ I Module FvwmPerl perlwops
+ I Exec exec rofi -levenshtein-sort -key mod4+slash -rkey control+mod4+x -bg '#66ba66' -fg black -hlbg white -hlfg black -bc 'blue' -bw 4 -columns 1 -lines 5 -fixed-num-lines 1 -width 40 -terminal xterm -font '-adobe-helvetica-medium-r-normal-*-12-*-*-*-p-*-iso8859-15'
+ I Test (Init) Exec exec unclutter -noevents -notclass TeXmacs -notclass Gnome-breakout
+ I Module FvwmCommandS
+ I Module FvwmEvent FE-BB
+ I InfoStoreAdd max-screen 1
+ I SetupTags
+ I PipeRead `for i in $(seq 0 $[infostore.max-screen]); do \
echo "SetupFvwmButtons $i"; done`
+ I Schedule 100 All CountAndTitleButtons
DestroyFunc SetupTags
AddToFunc SetupTags
+ I PipeRead `for i in $(seq 0 $[infostore.max-screen]); do \
min_tag=$((i * 10)); max_tag=$((min_tag + 9)); \
echo "InfoStoreAdd screen-$i-ActiveTag $min_tag"; \
echo "InfoStoreAdd screen-$i-PrevTag $max_tag"; \
for j in $(seq $min_tag $max_tag); do \
echo "InfoStoreAdd tag-$j-screen $i"; \
done; \
done`
+ I CreateTagCounts 0 19
DestroyFunc SetupFvwmButtons
AddToFunc SetupFvwmButtons
+ I DestroyModuleConfig FB-BB-$0:*
+ I KillModule FvwmButtons FB-BB-$0
+ I *FB-BB-$0: Back blue
+ I *FB-BB-$0: Fore white
+ I *FB-BB-$0: Rows 1
+ I *FB-BB-$0: Frame 0
+ I *FB-BB-$0: Geometry 1920x16+0+0@$0
+ I PipeRead `for tagname in \
$(seq $[infostore.screen-$0-ActiveTag] $[infostore.screen-$0-PrevTag]); \
do \
echo "*FB-BB-$0: (28x1, Id Desk${tagname}$0, Center, Title $tagname)"; \
done`
+ I *FB-BB-$0: (600x1, Id WinTitle, Center, Title "...", Back purple)
+ I *FB-BB-$0: (1030x1, Right, Padding 0 0, Frame 0, Swallow (UseOld, NoHints) \
"bar" `Exec exec conky | lemonbar -g 1030x16 -p -b -B'#0000FF' -u2`)
+ I Module FvwmButtons FB-BB-$0
DestroyFunc CreateTagCounts
AddToFunc CreateTagCounts
+ I PipeRead `for i in $(seq $0 $1); do echo "InfoStoreAdd tag-$i 0"; done`
DestroyFunc CountAndTitleButtons
AddToFunc CountAndTitleButtons
+ I CountWindowsOnTag $[infostore.$[w.id]]
+ I PipeRead `[ $[infostore.tag-$[infostore.$[w.id]]] -gt 0 ] && \
echo "SendToModule FB-BB-$[w.screen] ChangeButton Desk$[infostore.$[w.id]]$[w.screen] Title $[infostore.$[w.id]]:*"; \
[ $[infostore.tag-$[infostore.$[w.id]]] -le 0 ] && \
echo "SendToModule FB-BB-$[w.screen] ChangeButton Desk$[infostore.$[w.id]]$[w.screen] Title $[infostore.$[w.id]]"`
DestroyFunc ChangeButtons
AddToFunc ChangeButtons
+ I SendToModule FB-BB-$[pointer.screen] ChangeButton WinTitle Title $[w.name]
+ I SendToModule FB-BB-$[pointer.screen] ChangeButton Desk$[infostore.screen-$[pointer.screen]-PrevTag]$[pointer.screen] Colorset 14
+ I SendToModule FB-BB-$[pointer.screen] ChangeButton Desk$[infostore.screen-$[pointer.screen]-ActiveTag]$[pointer.screen] Colorset 15
DestroyFunc EWMHActivateWindowFunc
AddToFunc EWMHActivateWindowFunc
+ I ThisWindow (Focused) Break
+ I Focus
+ I WarpToWindow 5p 5p
DestroyFunc AssignTag
AddToFunc AssignTag
+ I ThisWindow (State $0) Break
+ I PipeRead `echo "MovetoScreen $[infostore.tag-$0-screen]"`
+ I Schedule 100 PipeRead `[ $[infostore.screen-$[w.screen]-ActiveTag] = $0 ] || \
echo "WindowId $[w.id] Iconify off"`
+ I PipeRead `echo "State $0"; \
echo "InfoStoreAdd $[w.id] $0"; \
echo "InfoStoreAdd CountWindowsOnTag $0"; \
echo "All (State $0) CountAndTitleButtons"`
DestroyFunc CountWindowsOnTag
AddToFunc CountWindowsOnTag
+ I SetEnv TCOUNT 0
+ I All (State $0) PipeRead `echo SetEnv TCOUNT $((TCOUNT + 1))`
+ I InfoStoreAdd tag-$0 $[TCOUNT]
+ I UnsetEnv TCOUNT
DestroyFunc SwitchTagsRelative
AddToFunc SwitchTagsRelative
+ I SetEnv PSCREEN $[pointer.screen]
+ I SetEnv CUR_TAG $[infostore.screen-$[PSCREEN]-ActiveTag]
+ I PipeRead `SCR="$CUR_TAG"; NEXT=$((SCR $0 1)); \
[ $PSCREEN -eq 0 ] && { \
[ $NEXT -lt 0 ] && NEXT=9; \
[ $NEXT -gt 9 ] && NEXT=0; \
}; \
[ $PSCREEN -eq 1 ] && { \
[ $NEXT -lt 10 ] && NEXT=19; \
[ $NEXT -gt 19 ] && NEXT=10; \
}; \
echo "SetEnv NEXT $NEXT"`
+ I SwitchTags $[pointer.screen] $[CUR_TAG] $[NEXT]
+ I UnsetEnv PSCREEN
+ I UnsetEnv CUR_TAG
DestroyFunc SwitchTags
AddToFunc SwitchTags
# Screen == $0
# Current Tag == $1
# Next Tag == $2
+ I All UseStack (State $1, !Sticky, CurrentScreen) Iconify on
+ I All UseStack Reverse (State $2, !Sticky, CurrentScreen) Iconify off
+ I InfoStoreAdd screen-$0-PrevTag $1
+ I InfoStoreAdd screen-$0-ActiveTag $2
+ I ChangeButtons
DestroyFunc TransparencyMove
AddToFunc TransparencyMove
+ M PipeRead `echo Move`
+ M AssignTag $[infostore.screen-$[w.screen]-ActiveTag]
DestroyFunc UrgencyFunc
AddToFunc UrgencyFunc
+ I ThisWindow (Focused) Break
+ I WindowStyle Colorset 11
+ I SendToModule FB-BB-$[w.screen] ChangeButton Desk$[infostore.$[w.id]]$[w.screen] Colorset 11
DestroyFunc UrgencyDoneFunc
AddToFunc UrgencyDoneFunc
+ I DestroyWindowStyle
+ I ChangeButtons
#}}}2
# Exit Functions {{{2
# ExitFunction {{{3
AddToFunc ExitFunction I Nop
#}}}3
#}}}2
# Window-defined functions {{{2
DestroyFunc FuncDeIconifyAll
AddToFunc FuncDeIconifyAll
+ I All (CurrentPage !Iconic AcceptsFocus) Iconify
DestroyFunc FuncFvwmMoveOrRaiseOrShade
AddToFunc FuncFvwmMoveOrRaiseOrShade
+ H Move
+ M Move
+ C Raise
+ D WindowShade $[func.context]
DestroyFunc FuncFvwmResizeOrRaiseOrShade
AddToFunc FuncFvwmResizeOrRaiseOrShade
+ H Resize $0
+ M Resize $0
+ C Raise
+ D WindowShade $[func.context]
DestroyFunc FuncFvwmMoveOrRaiseLower
AddToFunc FuncFvwmMoveOrRaiseLower
+ H Move
+ M Move
+ C RaiseLower
DestroyFunc FuncFvwmMoveOrIconify
AddToFunc FuncFvwmMoveOrIconify
+ M Move
+ D Iconify
DestroyFunc FuncFvwmMaximizeFullScreen
AddToFunc FuncFvwmMaximizeFullScreen
+ I Maximize 100 100
DestroyFunc FuncFvwmWindowOpsOrAction
AddToFunc FuncFvwmWindowOpsOrAction
+ I Menu MenuFvwmWindowOps2 $*
DestroyFunc FuncIconifyDeIconify
AddToFunc FuncIconifyDeIconify
+ C ThisWindow (!Iconic) Iconify
+ D ThisWindow (Iconic) Iconify
+ M Move
DestroyFunc FuncWindowOpsOrClose
AddToFunc FuncWindowOpsOrClose
+ H Menu FvwmMenuWindowOps
+ C Menu FvwmMenuWindowOps
+ D Close
# }}}2
# Functions called from Menus {{{2
# FuncFvwmMenuDirectory {{{3
DestroyFunc FuncFvwmMenuDirectory
AddToFunc FuncFvwmMenuDirectory
+ I PipeRead 'fvwm-menu-directory -d "$0" --exec-file ^launcher --exec-title ^rox --check-subdir --links'
#}}}3
# FuncFvwmMenuColorset {{{3
# FvwmTitleRxvt {{{3
AddToFunc FvwmTitleRxvt
+ I Exec exec $[RXVT] $*
#}}}3
DestroyFunc NearestNeighbour
AddToFunc NearestNeighbour
+ I All (CurrentScreen, AcceptsFocus, !Iconic) WindowStyle Colorset 0
+ I Direction North (AcceptsFocus, CurrentScreen, !Iconic, Visible) WindowStyle Colorset 5
+ I Direction South (AcceptsFocus, CurrentScreen, !Iconic, Visible) WindowStyle Colorset 5
+ I Direction East (AcceptsFocus, CurrentScreen, !Iconic, Visible) WindowStyle Colorset 5
+ I Direction West (AcceptsFocus, CurrentScreen, !Iconic, Visible) WindowStyle Colorset 5
+ I All (CurrentScreen, AcceptsFocus, !Iconic, Sticky) WindowStyle Colorset 10
+ I Silent Test (HasPointer) WindowStyle HilightColorset 6
+ I TestRc (Match) Break
# PackWindow{Up,Down,Left,Right}, GetCoords were used from the following:
#
# http://fvwm.lair.be/viewtopic.php?t=358
# PackWindowUp {{{3
DestroyFunc PackUp
AddToFunc PackUp
+ I NoWindow GetCoords
+ I SendToModule perlwops eval \
my ($NEWY, $WIN) = (0, undef); \
foreach $WIN (@b) { \
$NEWY = $WIN->{y}+$WIN->{height} \
if( $NEWY < $WIN->{y}+$WIN->{height} \
&& $WIN->{y}+$WIN->{height} < $[w.y] \
&& ( \
($WIN->{x} >= $[w.x] && $WIN->{x} <= $[w.x] + $[w.width]) \
|| ($WIN->{x}+$WIN->{width} >= $[w.x] \
&& $WIN->{x}+$WIN->{width} <= $[w.x]+$[w.width]) \
) \
) \
; \
}; \
cmd("WindowId $[w.id] AnimatedMove w0 +${NEWY}p ewmhiwa") if( $NEWY < $[w.y]);
#}}}3
# PackWindowDown {{{3
DestroyFunc PackDown
AddToFunc PackDown
+ I NoWindow GetCoords
+ I SendToModule perlwops eval \
my $DHEIGHT = $[desk.height] / $[desk.pagesy]; \
my ($NEWY, $WIN) = ($DHEIGHT, undef); \
foreach $WIN (@b) { \
$NEWY = $WIN->{y} \
if( $NEWY > $WIN->{y} && $WIN->{y} > $[w.y] + $[w.height] \
&& ( \
($WIN->{x} >= $[w.x] && $WIN->{x} <= $[w.x] + $[w.width]) \
|| ($WIN->{x}+$WIN->{width} >= $[w.x] \
&& $WIN->{x}+$WIN->{width} <= $[w.x]+$[w.width]) \
) \
) \
; \
}; \
cmd( "WindowId $[w.id] AnimatedMove w0 +" .
(${NEWY}-$[w.height]) . "p ewmhiwa") if( $NEWY-$[w.height] > $[w.y]);
#}}}3
# PackWindowLeft {{{3
DestroyFunc PackLeft
AddToFunc PackLeft
+ I NoWindow GetCoords
+ I SendToModule perlwops eval \
my ($NEWX, $WIN) = (0, undef); \
foreach $WIN (@b) { \
$NEWX = $WIN->{x}+$WIN->{width} \
if( $NEWX < $WIN->{x}+$WIN->{width} \
&& $WIN->{x}+$WIN->{width} < $[w.x] \
&& ( \
($WIN->{y} >= $[w.y] && $WIN->{y} <= $[w.y] + $[w.height]) \
|| ($WIN->{y}+$WIN->{height} >= $[w.y] \
&& $WIN->{y}+$WIN->{height} <= $[w.y]+$[w.height]) \
) \
) \
; \
}; \
cmd( "WindowId $[w.id] AnimatedMove +${NEWX}p w0 ewmhiwa") if( $NEWX < $[w.x]);
#}}}3
# PackWindowRight {{{3
DestroyFunc PackRight
AddToFunc PackRight
+ I NoWindow GetCoords
+ I SendToModule perlwops eval \
my $DWIDTH = $[desk.width] / $[desk.pagesx]; \
my ($NEWX, $WIN) = ($DWIDTH, undef); \
foreach $WIN (@b) { \
$NEWX = $WIN->{x} \
if( $NEWX > $WIN->{x} && $WIN->{x} > $[w.x] + $[w.width] \
&& ( \
($WIN->{y} >= $[w.y] && $WIN->{y} <= $[w.y] + $[w.height]) \
|| ($WIN->{y}+$WIN->{height} >= $[w.y] \
&& $WIN->{y}+$WIN->{height} <= $[w.y]+$[w.height]) \
) \
) \
; \
}; \
cmd( "WindowId $[w.id] AnimatedMove +" .
($NEWX-$[w.width]) . "p w0 ewmhiwa") if( $NEWX-$[w.width] > $[w.x] );
#}}}3
# GetCoords {{{3
DestroyFunc GetCoords
AddToFunc GetCoords
+ I SendToModule FvwmPerl eval @b=();
+ I All (CurrentPage, !Iconic, !Shaded, AcceptsFocus)
SendToModule perlwops eval \
push( @b, {x=>$[w.x], y=>$[w.y], width=>$[w.width], height=>$[w.height]});
DestroyFunc WindowListFunc
AddToFunc WindowListFunc
+ I Iconify off
+ I FlipFocus
+ I Raise
+ I WarpToWindow 5p 5p
+ I InfoStoreAdd screen-$[w.screen]-ActiveTag $[infostore.$[w.id]]
+ I PipeRead `PTAG=$(($[infostore.screen-$[w.screen]-ActiveTag] - 1)); \
echo "InfoStoreAdd screen-$[w.screen]-PrevTag $PTAG"`
+ I SwitchTags $[w.screen] $[infostore.screen-$[w.screen]-ActiveTag] \
$[infostore.screen-$[w.screen]-ActiveTag]
#}}}3
#}}}2
#}}}1
# Menus {{{1
# FvwmMenuWindowOps {{{2
DestroyMenu "FvwmMenuWindowOps"
AddToMenu "FvwmMenuWindowOps" "WindowOps" Title
+ "&Move" Pick Move
+ "&Resize" Pick Resize
+ "R&aise" Raise
+ "&Lower" Lower
+ "(De)&Iconify" Iconify
+ "(Un)&Stick" Stick
+ "(Un)Ma&ximize" Function FuncFvwmMaximizeFullScreen
+ "" Nop
+ "&Identify" Module FvwmIdent
+ "" Nop
+ "&Close" Close
+ "&Delete" Delete
+ "D&estroy" Destroy
+ "" Nop
+ "Re&fresh Screen" Refresh
+ "Send &To Page" Module FvwmButtons -transient FvwmPageLayout
#}}}2
# FvwmMenuWindowOps2 {{{2
DestroyMenu "FvwmMenuWindowOps2"
AddToMenu "FvwmMenuWindowOps2"
+ "Clone" Current Exec exec $[w.name]
+ "Move" Pick Move
+ "Resize" Pick Resize
+ "Raise" Raise
+ "Lower" Lower
+ "Iconify" Iconify
+ "(Un)Stick" Stick
+ "" Nop
+ "Identify" Module FvwmIdent
+ "" Nop
+ "Close" Close
+ "Destroy" Destroy
+ "Delete" Delete
+ "" Nop
+ "ScrollBar" Module FvwmScroll 2 2
#}}}2
# FvwmMenuRoot {{{2
DestroyMenu "FvwmMenuRoot"
AddToMenu "FvwmMenuRoot" "Root Menu" Title
+ MissingSubmenuFunction Beep
+ "&Shells" Popup FvwmMenuShellsPopup
+ "&Editors" Popup FvwmMenuEditorsPopup
+ "&Internet" Popup FvwmMenuInternetPopup
+ "&Games" Popup FvwmMenuGamesPopup
+ "&Drawing" Popup FvwmMenuDrawingPopup
+ "S&ystem" Popup FvwmMenuSystemPopup
+ "Musi&c" Popup FvwmMenuMusicPopup
+ "" Nop
+ "&File Management" Popup FvwmMenuFilePopup
+ "&Change Colorsets" Popup FvwmMenuColorset
+ "" Nop
+ "&Window Operations" Popup FvwmMenuWindowOps2
+ "&Modules" Popup FvwmMenuModulesPopup
+ "&Help" Popup FvwmMenuHelpPopup
+ "" Nop
+ "E&xit Fvwm" Popup FvwmExitFvwmPopup
#}}}2
# FvwmMenuMusicPopup {{{2
DestroyMenu "FvwmMenuMusicPopup"
AddToMenu "FvwmMenuMusicPopup" "Music" Title
+ "X&mcd" Exec exec xmcd
+ "&Xmms" Exec exec xmms
+ "&Cplay (screen)" Function FvwmTitleRxvt -T "Cplay" -e "screen -T -RS cplay cplay"
#}}}2
# FvwmMenuShellsPopup {{{2
DestroyMenu "FvwmMenuShellsPopup"
AddToMenu "FvwmMenuShellsPopup" "Shells" Title
+ "&rxvt (normal)" Function FvwmTitleRxvt
+ "&rxvt (console)" Function FvwmTitleRxvt -fg white -bg black +sb -ls
+ "" Nop
+ "&xterm (normal)" Exec exec xterm -ls
+ "x&term (blue)" Exec exec xterm -ls -bg blue -fg white
+ "" Nop
#}}}2
# FvwmMenuSystemPopup {{{2
DestroyMenu "FvwmMenuSystemPopup"
AddToMenu "FvwmMenuSystemPopup" "System Utilities" Title
+ "&xloadtime" Exec exec xloadtime -bg darkgrey -update 1 -cpu -label -geometry 130x91+1033+859
"xlassie.&sh" Exec exec xlassie.sh
+ "x&buffy" Function FvwmStartXBuffy
+ "" Nop
+ "&qps" Exec exec qps
#}}}2
# FvwmMenuDrawingPopup {{{2
DestroyMenu "FvwmMenuDrawingPopup"
AddTomenu "FvwmMenuDrawingPopup"
+ "&Dia" Exec exec dia
+ "&xfig" Exec exec xfig
#}}}2
# FvwmMenuEditorsPopup {{{2
DestroyMenu "FvwmMenuEditorsPopup"
AddToMenu "FvwmMenuEditorsPopup"
+ MissingSubmenuFunction Beep
+ "&X11" Popup FvwmSubEditorsX11
+ "&Console" Popup FvwmSubEditorsConsole
+ "&Office" Popup FvwmSubEditorsOffice
# FvwmMenuSubEditorsConsole {{{3
DestroyMenu "FvwmSubEditorsConsole"
AddToMenu "FvwmSubEditorsConsole" "Editors - Console" Title
+ MissingSubmenuFunction Beep
+ "&vi" Exec exec xterm -bg white -fg black -e vim
+ "&nano" Exec exec xterm -bg white -fg black -e nano
#}}}3
# FvwmSubEditorsX11 {{{3
DestroyMenu "FvwmSubEditorsX11"
AddToMenu "FvwmSubEditorsX11" "Editors - X11" Title
+ MissingSubmenuFunction Beep
+ "&gvim" Exec exec gvim
+ "g&cream" Exec exec gcream
+ "x&less" Exec exec xless
+ "X&emacs" Exec exec xemacs
+ "G&V" Exec exec gv
+ "x&pdf" Exec exec xpdf
+ "" Nop
+ "L&yx" Exec exec lyx
+ "&Texmacs" Exec exec texmacs
#}}}3
# FvwmSubEditorsOffice {{{3
DestroyMenu "FvwmSubEditorsOffice"
AddToMenu "FvwmSubEditorsOffice" "Office" Title
+ MissingSubMenuFunction Beep
+ "&OpenOffice" Popup FvwmMenuOOSubMenu
+ "&AbiWord" Exec exec abiword
#}}}3
# FvwmMenuOOSubMenu {{{3
DestroyMenu "FvwmMenuOOSubMenu"
AddToMenu "FvwmMenuOOSubMenu" "OpenOffice" Title
+ "&OpenOffice" Exec exec openoffice
+ "" Nop
+ "&Writer" Exec exec oowriter
+ "&Spreadsheet" Exec exec oocalc
+ "&Impress" Exec exec ooimpress
+ "&Drawer" Exec exec oodraw
+ "&Formulae" Exec exec oomath
#}}}3
#}}}2
# FvwmMenuGamesPopup {{{2
DestroyMenu "FvwmMenuGamesPopup"
AddToMenu "FvwmMenuGamesPopup" "Games - Console" Title
+ "&moon-buggy" Function FvwmTitleRxvt -e 'moon-buggy'
+ "Games - X11" Title
+ "x&teddy" Exec exec xteddy
+ "xt&artan" Exec exec xtartan
+ "&vectoroids" Exec exec vectoroids
+ "gnome-&brakout" Exec exec gnome-breakout
# }}}2
# FvwmInternetPopup {{{2
DestroyMenu "FvwmMenuInternetPopup"
AddToMenu "FvwmMenuInternetPopup"
+ "&Browsers" Popup FvwmSubInternetBrowsers
+ "&Mail" Popup FvwmSubInternetMail
+ "&IRC" Popup FvwmSubInternetIRC
# FvwmSubInternetBrowsers {{{3
DestroyMenu "FvwmSubInternetBrowsers"
AddToMenu "FvwmSubInternetBrowsers" "Console Browsers" Title
+ "&links" Function FvwmTitleRxvt -e 'links'
+ "l&ynx" Function FvwmTitleRxvt -e 'lynx'
+ "&elinks" Function FvwmTitleRxvt -e 'elinks'
+ "X11 Browsers" Title
+ "&Netscape" Exec exec /usr/local/netscape/netscape
+ "&Mozilla" Exec exec mozilla
+ "&Firefox" Exec exec firefox
+ "&Opera" Exec exec opera
+ "&Dillo" Exec exec dillo
+ "&XLinks" Exec exec links -g
#}}}3
# FvwmSubInternetMail {{{3
DestroyMenu "FvwmSubInternetMail"
AddToMenu "FvwmSubInternetMail" "Console Mail Clients" Title
+ "&mutt" FvwmTitleRxvt -e mutt
+ "&cone" Function FvwmTitleRxvt -e 'cone'
+ "X11 Mail Clients" Title
+ "&Sylpheed-claws" Exec exec sylpheed-claws
+ "Syl&pheed" Exec exec sylpheed
+ "&xmh" Exec exec xmh
#}}}3
# FvwmSubInternetIRC {{{3
DestroyMenu "FvwmSubInternetIRC"
AddToMenu "FvwmSubInternetIRC" "Console IRC" Title
+ "&Irssi" Exec Function FvwmTitleRxvt -e 'irssi'
+ "&epic" Exec Function FvwmTitleRxvt -e 'epic'
+ "&ircII" Exec Function FvwmTitleRxvt -e 'ircii'
+ "X11 IRC" Title
+ "&Xchat" Exec exec xchat
+ "xi&rssi" Exec exec xirssi
#}}}3
#}}}2
# FvwmMenuFilePopup {{{2
DestroyMenu "FvwmMenuFilePopup"
AddToMenu "FvwmMenuFilePopup"
+ MissingSubMenuFunction FuncFvwmMenuDirectory
+ "/" Popup /
+ "/etc" Popup /etc
+ "Home Directory" Popup $[HOME]
#}}}2
# FvwmMenuColorset {{{2
DestroyMenu "FvwmMenuColorset"
AddToMenu "FvwmMenuColorset" DynamicPopupAction FuncFvwmMenuColorset
#}}}2
# FvwmMenuMusicRC {{{2
DestroyMenu "FvwmMenuMusicRC"
AddToMenu "FvwmMenuMusicRC"
+ "Eject" Exec exec cdcd eject
+ "Play" PipeRead 'echo "Function SetButton" ;killall cdpause.sh ; echo "Exec exec cdcd play"'
+ "Pause" PipeRead 'killall cdpause.sh ; echo "Exec exec cdpause.sh" && echo "Exec exec cdcd pause"'
+ "Resume" PipeRead 'echo "Function SetButton" ; killall cdpause.sh ; echo "Exec exec cdcd resume"'
+ "Stop" PipeRead 'echo "Function SetButton" ; killall cdpause.sh ; echo "Exec exec cdcd stop"'
+ "Prev" PipeRead 'echo "Function SetButton" ; killall cdpause.sh ; echo "Exec exec cdcd prev"'
+ "Next" PipeRead 'echo "Function SetButton" ; killall cdpause.sh ; echo "Exec exec cdcd next"'
#}}}2
# FvwmMenuPreMusic {{{2
DestroyMenu "FvwmMenuPreMusic"
AddToMenu "FvwmMenuPreMusic" DynamicPopupAction FuncMusicMenu
#}}}2
# FvwmMenuHelpPopup {{{2
DestroyMenu "FvwmMenuHelpPopup"
AddToMenu "FvwmMenuHelpPopup" "Fvwm Manpages" Title
+ "&Fvwm" FuncViewManPage fvwm
+ "Fvwm&Animate" FuncViewManPage FvwmAnimate
+ "FvwmA&uto" FuncViewManPage FvwmAuto
+ "Fvwm&Backer" FuncViewManPage FvwmBacker
+ "FvwmB&anner" FuncViewManPage FvwmBanner
+ "FvwmB&uttons" FuncViewManPage FvwmButtons
+ "Fvwm&Command" FuncViewManPage FvwmCommand
+ "FvwmC&onsole" FuncViewManPage FvwmConsole
+ "FvwmConsoleC.pl" FuncViewManPage FvwmConsoleC.pl
+ "FvwmCpp" FuncViewManPage FvwmCpp
+ "FvwmDebug" FuncViewManPage FvwmDebug
+ "FvwmDragWell" FuncViewManPage FvwmDragWell
+ "FvwmEvent" FuncViewManPage FvwmEvent
+ "FvwmForm" FuncViewManPage FvwmForm
+ "FvwmGtk" FuncViewManPage FvwmGtk
+ "FvwmGtkDebug" FuncViewManPage FvwmGtkDebug
+ "FvwmIconBox" FuncViewManPage FvwmIconBox
+ "FvwmIconMan" FuncViewManPage FvwmIconMan
+ "FvwmIdent" FuncViewManPage FvwmIdent
+ "FvwmM4" FuncViewManPage FvwmM4
+ "FvwmPager" FuncViewManPage FvwmPager
+ "FvwmPerl" FuncViewManPage FvwmPerl
+ "FvwmProxy" FuncViewManPage FvwmProxy
+ "FvwmRearrange" FuncViewManPage FvwmRearrange
+ "FvwmSave" FuncViewManPage FvwmSave
+ "FvwmSaveDesk" FuncViewManPage FvwmSaveDesk
+ "FvwmScript" FuncViewManPage FvwmScript
+ "FvwmScroll" FuncViewManPage FvwmScroll
+ "FvwmTabs" FuncViewManPahe FvwmTabs
+ "FvwmTaskBar" FuncViewManPage FvwmTaskBar
+ "FvwmTheme" FuncViewManPage FvwmTheme
+ "FvwmWharf" FuncViewManPage FvwmWharf
+ "FvwmWinList" FuncViewManPage FvwmWinList
+ "FvwmWindowMenu" FuncViewManPage FvwmWindowMenu
+ "" Nop
+ "fvwm-config" FuncViewManPage fvwm-config
+ "fvwm-perllib" FuncViewManPage fvwm-perllib
+ "fvwm-root" FuncViewManPage fvwm-root
+ "fvwm-bug" FuncViewManPage fvwm-bug
+ "fvwm-convert-2.2" FuncViewManPage fvwm-convert-2.2
+ "fvwm-convert-2.4" FuncViewManPage fvwm-convert-2.4
+ "" Nop
+ "fvwm-menu-desktop" FuncViewManPage fvwm-menu-desktop
+ "fvwm-menu-directory" FuncViewManPage fvwm-menu-directory
+ "fvwm-menu-headlines" FuncViewManPage fvwm-menu-headlines
+ "fvwm-menu-xlock" FuncViewManPage fvwm-menu-xlock
# }}}2
# FvwmMenuModulesPopup {{{2
DestroyMenu "FvwmMenuModulesPopup"
AddToMenu "FvwmMenuModulesPopup" "Modules" Title
+ Audio Module FvwmAudio
+ Auto Module FvwmAuto 200
+ Buttons Module FvwmButtons
+ Console Module FvwmConsole -terminal xterm -bg black -fg green
+ Event Module FvwmEvent
+ Proxy Module FvwmProxy
+ Ident Module FvwmIdent
+ Banner Module FvwmBanner
+ Pager Module FvwmPager 0 0
#}}}2
# FvwmExitFvwmPopup {{{2
DestroyMenu "FvwmExitFvwmPopup"
AddToMenu FvwmExitFvwmPopup "Exit Fvwm?" Title
+ "&Restart" Restart fvwm -f ~/.fvwm/config4
+ "&Quit" Module FvwmForm FvwmForm-QuitVerify
DestroyModuleConfig FE-FC:*
*FE-FC: focus_change NearestNeighbour
*FE-FC: add_window NearestNeighbour
*FE-FC: destroy_window NearestNeighbour
DestroyModuleConfig FE-BB:*
*FE-BB: add_window CountAndTitleButtons
*FE-BB: focus_change ChangeButtons
*FE-BB: string ChangeButtons
*FE-BB: property_change ChangeButtons
*FE-BB: destroy_window CountAndTitleButtons
*FE-BB: iconify PipeRead `AssignTag AssignTag $[infostore.screen-$[w.screen]-ActiveTag]`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment