Skip to content

Instantly share code, notes, and snippets.

@sveitser
Created April 13, 2018 11:38
Show Gist options
  • Save sveitser/cc14937613c9a31d6e95170223a99a15 to your computer and use it in GitHub Desktop.
Save sveitser/cc14937613c9a31d6e95170223a99a15 to your computer and use it in GitHub Desktop.
-- Imports.
import XMonad
import XMonad.Hooks.DynamicLog
import XMonad.Actions.SpawnOn
-- import XMonad.Config.Desktop
import XMonad.Hooks.EwmhDesktops
-- import XMonad.Hooks.SetWMName
import XMonad.Layout.NoBorders
-- import qualified XMonad.StackSet as W
-- import XMonad.Layout.ThreeColumns
mylayout = tiled ||| Mirror tiled ||| noBorders Full
where
-- default tiling algorithm partitions the screen into two panes
tiled = Tall nmaster delta ratio
-- tiled = ThreeCol nmaster delta ratio
-- The default number of windows in the master pane
nmaster = 1
-- Default proportion of screen occupied by master pane
ratio = 1/2
-- Percent of screen to increment by when resizing panes
delta = 3/100
-- The main function.
main = xmonad =<< statusBar myBar myPP toggleStrutsKey myConfig
-- Command to launch the bar.
myBar = "xmobar"
-- Custom PP, configure it as you like. It determines what is being written to the bar.
myPP = xmobarPP { ppCurrent = xmobarColor "#429942" "" . wrap "<" ">" }
-- Key binding to toggle the gap for the bar.
toggleStrutsKey XConfig {XMonad.modMask = modMask} = (modMask, xK_b)
-- Main configuration, override the defaults to your liking.
myConfig = defaultConfig
{ modMask = mod4Mask
, workspaces = ["web", "code1", "code2", "code3", "misc1", "misc2"]
, focusedBorderColor = "#CB4B16"
, normalBorderColor = "#9E9E9E"
, borderWidth = 2
, terminal = "urxvtc"
, startupHook = do
spawnOn "web" "chromium --force-device-scale-factor=1"
spawnOn "code2" "urxvtc"
, logHook = dynamicLog
, layoutHook = mylayout
, handleEventHook = fullscreenEventHook
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment