summaryrefslogtreecommitdiff
path: root/modules/xmonad.hs
blob: 3c5c729c3cd1aba716fad349bf6706f51ba701f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import XMonad
import XMonad.Util.EZConfig (additionalKeys)
import XMonad.Util.SpawnOnce (spawnOnce)
import XMonad.Hooks.ManageDocks
import XMonad.Hooks.StatusBar
import XMonad.Hooks.StatusBar.PP
import Control.Monad (when)
import Text.Printf (printf)
import System.Posix.Process (executeFile)
import System.Info (arch,os)
import System.Environment (getArgs)
import System.FilePath ((</>))

myLayout = avoidStruts (tiled ||| Mirror tiled ||| Full)
  where
    tiled   = Tall nmaster delta ratio
    nmaster = 1      -- Default number of windows in the master pane
    ratio   = 1/2    -- Default proportion of screen occupied by master pane
    delta   = 3/100  -- Percent of screen to increment by when resizing panes

myConfig = defaultConfig
  { modMask = mod1Mask
  , layoutHook = myLayout
  , focusedBorderColor = "#4eb4fa"
  , terminal = "alacritty"
  , startupHook = spawnOnce "wmname LG3D" }
  `additionalKeys`
  [ ( (mod1Mask, xK_q), restart "xmonad" True )
  , ( (mod1Mask, xK_f), sendMessage ToggleStruts ) ]

mySB = statusBarProp "xmobar" (pure xmobarPP { ppTitle = const "" })
-- main = xmonad $ withEasySB mySB defToggleStrutsKey def

main = getDirectories >>= launch (docks $ withSB mySB myConfig)