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
35
36
37
38
39
|
import XMonad
import XMonad.Util.EZConfig (additionalKeys)
import Graphics.X11.ExtraTypes.XF86
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 )
, ( (mod1Mask, xK_s), spawn "maim -s | xclip -selection clipboard -t image/png" )
, ( (0, xF86XK_AudioRaiseVolume), spawn "pamixer --increase 5" )
, ( (0, xF86XK_AudioLowerVolume), spawn "pamixer --decrease 5" )
, ( (0, xF86XK_AudioMute), spawn "pamixer --toggle-mute" ) ]
mySB = statusBarProp "xmobar" (pure xmobarPP { ppTitle = const "" })
-- main = xmonad $ withEasySB mySB defToggleStrutsKey def
main = getDirectories >>= launch (docks $ withSB mySB myConfig)
|