summaryrefslogtreecommitdiff
path: root/modules/xmonad.hs
blob: 6de28c75d72dfc7e0972268399cdadd19ad87c4d (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
import XMonad
import XMonad.Util.EZConfig (additionalKeys)
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" }
  `additionalKeys`
  [ ( (mod1Mask, xK_q), restart "xmonad" True ) ]

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

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