######################################################################
# FVWM - styles
######################################################################

# see colors.conf for Styles that apply ColorSets
# see titlebar.conf for TitleStyle and ButtonStyle

######################################################################
# general

Style * HandleWidth 6
Style * BorderWidth 4
Style * ResizeOpaque
Style * SloppyFocus
Style * MinOverlapPlacement
Style * GrabFocusOff

# ignore requests to hide window trim and functions
Style * HintOverride
Style * DecorateTransient
Style * !MwmFunctions
Style * !MwmDecor
Style * !OLDecor

# but honor requests for "pushed in" effects for title bar buttons
Style * MwmButtons

######################################################################
# fonts

# finalists:
#   Inconsolata
#   Liberation Mono
#   Hack
#   DejaVu Sans Mono
#   Fira Code
#   Terminus
#   Helvetica

# use a precise monospace font by default
Style * Font "xft:Inconsolata:size=14"
Style * IconFont "xft:Inconsolata:size=12"

# use a nice smooth proportional for most menus
MenuStyle * font "xft:Helvetica:size=12"

# use a precise monospace font for window lists
MenuStyle WindowList font "xft:Inconsolata:size=12"

######################################################################
# icons

# I am happy with the defaults
# but not making them explict causes xterm icons to lag one behind
# see titlebar.conf for TitleFormat
Style * IconTitleFormat %i

# default icons
Style * MiniIcon mini.x.xpm
Style * Icon unknown1.xpm

# generally, just hide iconified windows; we use FvwmIconMan instead
# override for a few specific programs (cool xterm active icons)
Style *		NoIcon
Style *term*	Icon

# if the app doesn't provide an icon, but FVWM does, set hint to use it
Style * EWMHDonateIcon, EWMHDonateMiniIcon

######################################################################
# window / icon placement and movement behavior

# tune placement overlap avoidances, higher numbers = more avoid
# do not care about icons (mini xterms) when placing windows
#                                    normal ontop icon sticky below strut
Style * MinOverlapPlacementPenalties 1      5     0    5      0.50  50

# icon placement

# no icon box = place icon at window upper-left-corner
Style * IconBox none

# minW minH maxW maxH (large icons allegedly will be clipped)
Style * IconSize 32 32 64 64

######################################################################
# window-specific settings

# icons for things that don't specify icons
Style fvwm		MiniIcon mini.fvwm.png
Style FvwmIdent		MiniIcon mini.question.xpm
Style wmclock		MiniIcon mini.clock.xpm
Style *term*		MiniIcon mini.xterm.xpm
Style *xmms*		MiniIcon mini.xmms.png, CirculateSkip, WindowListSkip, Sticky
Style prboom-plus	MiniIcon doomface.xpm
Style dsda-doom		MiniIcon doomface.xpm

# dock apps are made to be like part of the screen, not individual windows
# but I find it looks wrong to me if I use !Borders so keep the frame
Style FvwmButtons	NeverFocus, Sticky, WindowListSkip, !Title, !Handles
Style FvwmPager		NeverFocus, Sticky, WindowListSkip, !Title, !Handles
Style FvwmIconMan	NeverFocus, Sticky, WindowListSkip, !Title, !Handles
Style stalonetray	NeverFocus, Sticky, WindowListSkip, !Title, !Handles
Style wmclock		!Title

# put the dock on the lower LCD
Style FvwmDock		StartsOnScreen DisplayPort-0

# this is always an explicitly-user-commanded modal-ish window
# see ~/.fvwm/run-dialog-xterm.sh for more
Style fvwm-run-dialog	FPGrabFocus, FPReleaseFocus, StartsOnScreen DisplayPort-0

# music player follows me around but stays out of my way
Style *audacious*	CirculateSkip, WindowListSkip, Sticky, MwmDecor

# evince keeps gobbling up the whole screen
Style *evince*		MaxWindowSize 80 100

# programs that request lame positions
Style prboom-plus	!UsePPosition, !UseUSPosition
Style Emacs		!UsePPosition, !UseUSPosition

# DSDA Doom seems to try to move itself after the window is placed.
# So further tell FVWM to just ignore positioning commands from the program.
Style dsda-doom		!UsePPosition, !UseUSPosition, FixedPPosition

# Manually place the window centered in the usable part of the screen,
# and shifted up and off slightly, so the bottom trim frame is visible,
# with the title bar slightly non-visible.
# Not using "PositionPlacement Center" as it honors the dock struts,
# which in this case I don't want.
#Style dsda-doom		PositionPlacement 84p +-3p
# FIXME I cannot get FVWM to honor the -3 pixel vertical shift.
# Changing 84p has an effect, so the directive is being matched.
# Immediate commands like this also work fine:
#	Next ("dsda-doom") Move 84p +-3p
# Changing -3 value works as I expect in Move, so I have that much right.
# Working around the above by hiding the title bar and centering:
Style dsda-doom		!Title, PositionPlacement 84p +5p

# games that put up a full-screen sized window, so remove the decorations
Style hl2_linux		!Title, !Borders, StartsOnScreen DisplayPort-0
Style portal2_linux	!Title, !Borders, StartsOnScreen DisplayPort-0

# force icons on particular windows
# FIXME doesn't seem to work if windows change their title after mapping
Style *Mutt		EWMHMiniIconOverride, MiniIcon mini.mail.xpm
Style *MultiTail	EWMHMiniIconOverride, MiniIcon mini.log.xpm
Style GOOG:*Firefox	EWMHMiniIconOverride, MiniIcon mini.google.png
Style EVRN:*Firefox	EWMHMiniIconOverride, MiniIcon mini.evernote.png

######################################################################
# END OF FILE
######################################################################
