diff options
| author | coasteen <coasteen@proton.me> | 2026-07-09 10:46:52 +0330 |
|---|---|---|
| committer | coasteen <coasteen@proton.me> | 2026-07-09 10:46:52 +0330 |
| commit | a3008666c6c75ff61b1fc329b4d962a6c367d5f0 (patch) | |
| tree | a203a54b3c61884ea13957cf18284f6c83f8e64d /home-configuration/config/xmonad | |
Diffstat (limited to 'home-configuration/config/xmonad')
| -rw-r--r-- | home-configuration/config/xmonad/xmonad.hs | 45 | ||||
| -rw-r--r-- | home-configuration/config/xmonad/xmonad.hs~ | 46 |
2 files changed, 91 insertions, 0 deletions
diff --git a/home-configuration/config/xmonad/xmonad.hs b/home-configuration/config/xmonad/xmonad.hs new file mode 100644 index 0000000..a5db5a8 --- /dev/null +++ b/home-configuration/config/xmonad/xmonad.hs @@ -0,0 +1,45 @@ +import XMonad +import XMonad.Util.EZConfig (additionalKeysP) +import XMonad.Layout.Spacing +import XMonad.Hooks.DynamicLog +import XMonad.Hooks.StatusBar +import XMonad.Hooks.ManageDocks +import XMonad.Hooks.InsertPosition +import qualified XMonad.StackSet as W + +myLayoutHook = avoidStruts $ spacingWithEdge 3 $ layoutHook def + +myXmobarPP :: PP +myXmobarPP = def + { + ppCurrent = xmobarColor "#0db9d7" "", + ppHidden = xmobarColor "#a9b1d6" "", + ppHiddenNoWindows = xmobarColor "#444b6a" "" + } + +myStatusBar = statusBarPropTo "_XMONAD_LOG" "xmobar -x 1" (pure myXmobarPP) + +myManageHook = insertPosition End Newer + +myKeys = + [ + ("M-<Return>", spawn "alacritty"), + ("M-r", spawn "rofi -show drun"), + ("M-S-r", spawn "xmonad --recompile" >> spawn "xmonad --restart"), + ("M-s", kill), + ("M-S-s", spawn "/home/coast/.local/bin/screenshot"), + ("M-f", withFocused $ \w -> windows $ W.float w (W.RationalRect 0 0 1 1)), + ("M-S-f", withFocused (windows . W.sink)) + ] + +main = xmonad $ withEasySB myStatusBar defToggleStrutsKey $ def + { + modMask = mod4Mask, + terminal = "alacritty", + borderWidth = 2, + normalBorderColor = "#444b6a", + focusedBorderColor = "#ad8ee6", + layoutHook = myLayoutHook, + manageHook = myManageHook + } + `additionalKeysP` myKeys diff --git a/home-configuration/config/xmonad/xmonad.hs~ b/home-configuration/config/xmonad/xmonad.hs~ new file mode 100644 index 0000000..e39d3be --- /dev/null +++ b/home-configuration/config/xmonad/xmonad.hs~ @@ -0,0 +1,46 @@ +import XMonad +import XMonad.Util.EZConfig (additionalKeysP) +import XMonad.Layout.Spacing +import XMonad.Hooks.DynamicLog +import XMonad.Hooks.StatusBar +import XMonad.Hooks.ManageDocks +import XMonad.Hooks.ManageHelpers +import qualified XMonad.StackSet as W + +myLayoutHook = avoidStruts $ spacingWithEdge 3 $ layoutHook def + +myXmobarPP :: PP +myXmobarPP = def + { + ppCurrent = xmobarColor "#0db9d7" "", + ppHidden = xmobarColor "#a9b1d6" "", + ppHiddenNoWindows = xmobarColor "#444b6a" "" + } + +myStatusBar = statusBarPropTo "_XMONAD_LOG" "xmobar -x 1" (pure myXmobarPP) + +myManageHook = composeAll + [ + (return True) --> doF W.shiftMaster + ] + +myKeys = + [ + ("M-<Return>", spawn "alacritty"), + ("M-r", spawn "rofi -show drun"), + ("M-S-r", spawn "xmonad --recompile" >> spawn "xmonad --restart"), + ("M-s", kill), + ("M-S-s", spawn "/home/coast/.local/bin/screenshot") + ] + +main = xmonad $ withEasySB myStatusBar defToggleStrutsKey $ def + { + modMask = mod4Mask, + terminal = "alacritty", + borderWidth = 2, + normalBorderColor = "#444b6a", + focusedBorderColor = "#ad8ee6", + layoutHook = myLayoutHook, + manageHook = myManageHook + } + `additionalKeysP` myKeys |
