2020-04-19 19:26:10 +02:00
|
|
|
import Control.Monad ( join )
|
2021-11-29 15:00:11 +01:00
|
|
|
import Data.Function ( (&) )
|
2020-04-19 19:26:10 +02:00
|
|
|
|
|
|
|
import XMonad
|
|
|
|
import XMonad.Actions.SpawnOn
|
2021-11-29 15:00:11 +01:00
|
|
|
import XMonad.Config.Kde
|
2020-11-09 16:13:52 +01:00
|
|
|
import XMonad.Hooks.EwmhDesktops ( fullscreenEventHook )
|
|
|
|
import XMonad.Hooks.EwmhDesktops ( ewmh )
|
2021-11-29 15:00:11 +01:00
|
|
|
import XMonad.Hooks.ManageDocks
|
|
|
|
import XMonad.Util.EZConfig
|
2020-04-19 19:26:10 +02:00
|
|
|
|
2020-04-21 15:46:43 +02:00
|
|
|
import XMonad.Layout.Spacing
|
|
|
|
import XMonad.Layout.ThreeColumns
|
|
|
|
|
2020-04-19 19:26:10 +02:00
|
|
|
main =
|
|
|
|
xmonad
|
2020-11-09 16:13:52 +01:00
|
|
|
$ ewmh
|
2020-07-03 17:24:18 +02:00
|
|
|
$ docks
|
|
|
|
$ kdeConfig
|
2020-11-09 16:13:52 +01:00
|
|
|
{ modMask = mod4Mask
|
2020-07-03 17:24:18 +02:00
|
|
|
, layoutHook = myLayoutHook
|
2021-11-29 15:00:11 +01:00
|
|
|
, startupHook = startup
|
2020-07-03 17:24:18 +02:00
|
|
|
, manageHook = manageDocks <+> myManagerHook <+> manageHook kdeConfig
|
2020-11-09 16:13:52 +01:00
|
|
|
, handleEventHook = handleEventHook kdeConfig <+> fullscreenEventHook
|
|
|
|
, terminal = myTerminal
|
2020-07-03 17:24:18 +02:00
|
|
|
}
|
|
|
|
`additionalKeysP` keymap
|
2020-04-19 19:26:10 +02:00
|
|
|
where
|
|
|
|
kdeFloats =
|
|
|
|
[ "yakuake"
|
|
|
|
, "Yakuake"
|
|
|
|
, "Kmix"
|
|
|
|
, "kmix"
|
|
|
|
, "plasma"
|
|
|
|
, "Plasma"
|
|
|
|
, "plasma-desktop"
|
|
|
|
, "Plasma-desktop"
|
|
|
|
, "krunner"
|
|
|
|
, "ksplashsimple"
|
|
|
|
, "ksplashqml"
|
|
|
|
, "ksplashx"
|
|
|
|
]
|
|
|
|
|
|
|
|
myManagerHook =
|
|
|
|
composeAll [ className =? name --> doFloat | name <- kdeFloats ]
|
|
|
|
|
2020-07-03 17:24:18 +02:00
|
|
|
myTerminal = "alacritty"
|
|
|
|
myBrowser = "google-chrome-stable"
|
|
|
|
|
|
|
|
-- TODO: find a way to bind all the program-opening-keybindings to a single sub-map
|
|
|
|
keymap =
|
|
|
|
[ ("M-p", spawn "rofi -show run")
|
|
|
|
, ("M-g", spawn myBrowser)
|
|
|
|
, ("M-d", spawn "Discord")
|
|
|
|
, ("M-s", spawn "slack")
|
|
|
|
, ("M-r", spawn "ksysgurad")
|
|
|
|
]
|
2020-04-19 19:26:10 +02:00
|
|
|
|
|
|
|
uniformBorder = join $ join $ join Border
|
|
|
|
border = uniformBorder 4
|
|
|
|
spacingHook = spacingRaw True border True border True
|
|
|
|
|
2020-04-21 15:46:43 +02:00
|
|
|
tall = Tall 1 (3 / 100) (1 / 2)
|
|
|
|
threeCols = ThreeCol 1 (3 / 100) (1 / 2)
|
|
|
|
|
|
|
|
layouts = tall ||| threeCols ||| Full
|
2020-04-19 19:26:10 +02:00
|
|
|
myLayoutHook = desktopLayoutModifiers $ spacingHook layouts
|
|
|
|
|
|
|
|
|
2021-11-29 15:00:11 +01:00
|
|
|
startup :: X ()
|
|
|
|
startup = do
|
2022-01-13 07:46:04 +01:00
|
|
|
spawn "xwallpaper --zoom ./background.jpg"
|