Skip to content

Instantly share code, notes, and snippets.

@LandonPowell
Created July 3, 2017 12:28
Show Gist options
  • Save LandonPowell/84213af012d9b111841b9e21a6471387 to your computer and use it in GitHub Desktop.
Save LandonPowell/84213af012d9b111841b9e21a6471387 to your computer and use it in GitHub Desktop.
My `~/.xmonad/xmonad.hs` configuration file for xmonad.
import XMonad
import XMonad.Layout.Spacing
import XMonad.Layout.Gaps
import qualified Data.Map as M
import qualified XMonad.StackSet as W
myLayoutHook = gaps [(U,30), (R,30), (D,30), (L,30)] $ spacing 20 $ Tall 1 (3/100) (1/2)
myKeys conf@XConfig {XMonad.modMask = modMask} = M.fromList $ [
((0, 0x1008FF11), spawn "amixer set Master 2-"),
((0, 0x1008FF13), spawn "amixer set Master 2+"),
((0, 0x1008FF12), spawn "pactl set-sink-mute 0 1"),
((modMask, xK_u), spawn "amixer set Master 5-"),
((modMask, xK_i), spawn "amixer set Master 5+"),
((modMask, xK_o), spawn "pactl set-sink-mute 0 1"),
((modMask, xK_p), spawn "pactl set-sink-mute 0 0"),
((modMask, xK_q), spawn "xmonad --recompile; xmonad --restart"),
((modMask, xK_t), spawn $ XMonad.terminal conf),
((modMask, xK_comma), sendMessage (IncMasterN 1)),
((modMask, xK_period), sendMessage (IncMasterN (-1))),
((modMask, xK_h), sendMessage Shrink),
((modMask, xK_l), sendMessage Expand),
((modMask, xK_Return), windows W.swapMaster),
((modMask, xK_space), spawn "rofi -show run")
]
main = xmonad $ defaultConfig {
terminal = "urxvt",
modMask = mod4Mask,
workspaces = ["sole"],
layoutHook = myLayoutHook,
startupHook = spawn "compton -c & xrdb ~/.Xresources & nitrogen --restore",
keys = myKeys,
borderWidth = 0
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment