feat(wm): install xmonad

This commit is contained in:
Khaïs COLIN 2025-02-09 13:19:01 +01:00
parent 3c6a5f3ee2
commit 786a8cb186
Signed by: logistic-bot
SSH key fingerprint: SHA256:RlpiqKeXpcPFZZ4y9Ou4xi2M8OhRJovIwDlbCaMsuAo
3 changed files with 36 additions and 0 deletions

View file

@ -43,6 +43,9 @@
# You can disable this if you're only using the Wayland session.
services.xserver.enable = true;
# emable xmonad
services.xserver.windowManager.xmonad.enable = true;
# Enable the KDE Plasma Desktop Environment.
services.displayManager.sddm.enable = true;
services.desktopManager.plasma6.enable = true;

View file

@ -85,6 +85,8 @@ in {
# xmonad
# apparently this is needed for the haskell lsp
ghc
i3lock
xmobar
];
file = {
@ -247,4 +249,11 @@ in {
programs.yazi = {
enable = true;
};
xsession.windowManager.xmonad = {
enable = true;
config = ./xmonad.hs;
enableContribAndExtras = true;
};
programs.rofi.enable = true;
}

24
xmonad.hs Normal file
View file

@ -0,0 +1,24 @@
import XMonad
import XMonad.Util.EZConfig
import System.Exit
main :: IO ()
main = xmonad $ myConfig
myConfig = def
`additionalKeysP`
[
-- Screen lock & suspend
("C-M-l" , spawn "swaylock" )
, ("C-M-L" , spawn "swaylock" *> spawn "systemctl suspend")
-- Terminal
, ("S-<Return>", spawn "kitty" )
-- Frequent programs
, ("S-q", spawn "firefox" )
, ("S-a", spawn "emacs" )
, ("S-d", spawn "discord" )
, ("S-g", spawn "dolphin" )
-- Program launcher
, ("S-r", spawn "rofi -show drun -theme Paper" )
-- Exit
, ("S-M-C-q", io (exitWith ExitSuccess) )
]