diff options
Diffstat (limited to 'conf/xmonad')
-rw-r--r-- | conf/xmonad/xmonad.hs | 41 |
1 files changed, 33 insertions, 8 deletions
diff --git a/conf/xmonad/xmonad.hs b/conf/xmonad/xmonad.hs index 4102223..e131bc1 100644 --- a/conf/xmonad/xmonad.hs +++ b/conf/xmonad/xmonad.hs @@ -6,10 +6,15 @@ import XMonad.StackSet import XMonad.Layout.NoBorders import XMonad.Layout.Tabbed import XMonad.Layout.Reflect + import XMonad.Util.Themes +import XMonad.Util.NamedScratchpad import XMonad.Actions.SpawnOn import XMonad.Actions.CycleWS +import XMonad.Actions.WindowBringer + +import System.Exit customTabTheme = (theme xmonadTheme) { fontName = "xft:Iosevka Medium-12" @@ -31,7 +36,16 @@ availableLayouts = smartBorders $ tabs ||| tilesLM ||| tilesRM ||| tilesTM ||| t ratio = 1/2 delta = 3/100 -main = xmonad $ ewmh defaultConfig +windowBringerDmenuConfig = def { menuCommand = "rofi" + , menuArgs = [ "-p", "win", "-dmenu", "-i" ] } + +scratchpads = [ NS "terminal" "kitty --class=scratchterm" (className =? "scratchterm") + (customFloating $ RationalRect (1/6) (1/6) (2/3) (2/3)) + , NS "telegram" "telegram-desktop" (title =? "Telegram") + (customFloating $ RationalRect (1/6) (1/6) (2/3) (2/3)) ] + +main = xmonad $ ewmh + $ defaultConfig { modMask = mod4Mask -- super key as modifier , borderWidth = 3 , normalBorderColor = "#161616" @@ -39,12 +53,15 @@ main = xmonad $ ewmh defaultConfig , terminal = "kitty" , handleEventHook = handleEventHook defaultConfig <+> fullscreenEventHook , layoutHook = availableLayouts - } + , manageHook = namedScratchpadManageHook scratchpads } `removeKeysP` - [ "M-S-<Return>" ] + [ "M-S-<Return>", "M-q", "M-S-q", "M-S-c" ] `additionalKeysP` +-- xmonad session control + [ ("C-M1-<Escape>" , io (exitWith ExitSuccess)) + , ("C-M1-<Backspace>" , spawn "xmonad --restart") -- application launchers - [ ("M-p" , spawn "rofi -show combi") + , ("M-p" , spawn "rofi -show combi") , ("M-<Return>" , spawn "kitty") , ("M-<Backspace>" , spawn "vim -g") -- actual window management @@ -53,8 +70,16 @@ main = xmonad $ ewmh defaultConfig , ("M-S-<Left>" , shiftToPrev >> prevWS) , ("M-S-<Right>" , shiftToNext >> nextWS) , ("M-S-m" , windows swapMaster) + , ("M-S-q" , kill) +-- window bringer + , ("M-a" , gotoMenuConfig windowBringerDmenuConfig) + , ("M-S-a" , bringMenuConfig windowBringerDmenuConfig) +-- scratchpads + , ("M-s t" , namedScratchpadAction scratchpads "terminal") + , ("M-s m" , namedScratchpadAction scratchpads "telegram") -- system control - , ("M-s <Up>" , spawn "amixer sset Master 10%+") - , ("M-s <Down>" , spawn "amixer sset Master 10%-") - , ("M-s m" , spawn "amixer sset Master toggle") - ] + , ("M-c <Up>" , spawn "amixer sset Master 10%+") + , ("M-c <Down>" , spawn "amixer sset Master 10%-") + , ("M-c m" , spawn "amixer sset Master toggle") ] + `additionalKeys` + [ ((noModMask, xK_Menu) , namedScratchpadAction scratchpads "terminal") ] |