diff --git a/home/programs/xmonad/default.nix b/home/programs/xmonad/default.nix index 5aadf16..779e2ee 100644 --- a/home/programs/xmonad/default.nix +++ b/home/programs/xmonad/default.nix @@ -9,13 +9,6 @@ enableContribAndExtras = true; config = ./src/xmonad.hs; }; - #displayManagaer = { - # sddm = { - # enable = true; - # theme = "sugar-dark"; - # }; - # defaultSession = "none+xmonad"; - #}; }; }; diff --git a/home/programs/xmonad/src/shell.nix b/home/programs/xmonad/src/shell.nix new file mode 100644 index 0000000..87d2766 --- /dev/null +++ b/home/programs/xmonad/src/shell.nix @@ -0,0 +1,12 @@ +with (import { }); +mkShell { + buildInputs = [ + stack + cabal-install + haskell-language-server + (haskellPackages.ghcWithPackages + (hpkgs: with hpkgs; [ xmobar xmonad xmonad-contrib ])) + ]; + shellHook = "zsh"; +} + diff --git a/home/programs/xmonad/src/xmonad.hs b/home/programs/xmonad/src/xmonad.hs index 284d80a..1b9df5a 100644 --- a/home/programs/xmonad/src/xmonad.hs +++ b/home/programs/xmonad/src/xmonad.hs @@ -1,5 +1,34 @@ import XMonad +import XMonad.Util.SpawnOnce (spawnOnce) +import XMonad.Hooks.EwmhDesktops +import XMonad.Util.EZConfig +import XMonad.Hooks.DynamicLog +import XMonad.Hooks.StatusBar +import XMonad.Hooks.StatusBar.PP + + +main = xmonad . ewmhFullscreen . ewmh . xmobarProp $ def + { terminal = "alacritty" + , normalBorderColor = "#050508" + , focusedBorderColor = "#89b4fa" + } + `additionalKeysP` + [ ("M-p", spawn "rofi -show \"drun\"") + , ("M-S-p", spawn "rofi-pass") + , ("M-b", spawn "firefox") + , ("", spawn "xbacklight -inc 10") + , ("", spawn "xbacklight -dec 10") + , ("", spawn "wpctl set-mute 58 toggle") + , ("", spawn "wpctl set-volume 58 0.05+") + , ("", spawn "wpctl set-volume 58 0.05-") + , ("", spawn "wpctl set-mute 52 toggle") + ] + `removeKeysP` + [ "M-q" + ] + +myStartupHook :: X () +myStartupHook = do + mapM_ spawnOnce ["xmobar -x " ++ show sid | sid <- [0..9]] -main = xmonad def - { terminal = "alacritty" }