diff options
author | Ben Sima <ben@bsima.me> | 2024-11-11 11:25:18 -0500 |
---|---|---|
committer | Ben Sima <ben@bsima.me> | 2024-11-11 11:25:18 -0500 |
commit | 0bc09a4c739d570efc6b6a0ee98ca3aec6d93264 (patch) | |
tree | e58d57e7fc0953a5613871aa02b4c080a97ee073 /lib/xmonad.hs | |
parent | 0c236f24f3f5c28f568cb9aaa2394ab0ffd9d61a (diff) |
update xmonad scratchpads
Diffstat (limited to 'lib/xmonad.hs')
-rw-r--r-- | lib/xmonad.hs | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/lib/xmonad.hs b/lib/xmonad.hs index 047dd83..3c8a274 100644 --- a/lib/xmonad.hs +++ b/lib/xmonad.hs @@ -40,7 +40,6 @@ import XMonad.Layout.TwoPane import qualified XMonad.StackSet as W import XMonad.Util.CustomKeys (customKeys) import XMonad.Util.EZConfig (additionalKeys) -import XMonad.Util.Scratchpad import XMonad.Util.NamedScratchpad -- Colors @@ -90,17 +89,23 @@ shouldFloat = do return (fs && not (shouldntFloat name)) -- RationalRect is x y w h -scratchHook = scratchpadManageHook (W.RationalRect 0.125 0.125 0.75 0.75) +scratchHook = namedScratchpadManageHook scratchpads -- myManageHook = manageDocks <+> scratchHook <+> (shouldFloat --> doFullFloat) <+> manageHook def -- todo: use urxvtc with daemon termName = "/home/ben/.nix-profile/bin/urxvt" -transparentTerm = termName <> " -depth 32 -bg rgba:0000/0000/0000/4444" + +centerFloat = customFloating (W.RationalRect 0.125 0.125 0.75 0.75) scratchpads = [ - NS "pavucontrol" "pavucontrol" (className =? "Pavucontrol") - (customFloating $ W.RationalRect (1/4) (1/4) (2/4) (2/4)) + -- run htop in xterm, find it by title + NS "htop" "urxvt -e htop" (title =? "htop") centerFloat, + NS "gotop" "urxvt -e gotop" (title =? "gotop") centerFloat, + + NS "nvtop" "urxvt -e nvtop" (title =? "nvtop") centerFloat, + + NS "pavucontrol" "pavucontrol" (className =? "Pavucontrol") centerFloat ] insKeys :: XConfig l -> [((KeyMask, KeySym), X ())] @@ -110,9 +115,13 @@ insKeys conf@(XConfig {modMask = modMask}) = ((modMask, xK_o), spawn "rofi -sidebar-mode -show run"), ((modMask, xK_n), spawn "rofi -sidebar-mode -show window"), ((modMask, xK_u), spawn "rofi -show calc -modi calc -no-show-match -no-sort"), - ((modMask, xK_s), scratchpadSpawnActionTerminal transparentTerm), + + -- scratchpads + ((modMask .|. shiftMask, xK_h), namedScratchpadAction scratchpads "htop"), + ((modMask .|. shiftMask, xK_g), namedScratchpadAction scratchpads "gotop"), + ((modMask .|. shiftMask, xK_n), namedScratchpadAction scratchpads "nvtop"), ((modMask .|. shiftMask, xK_p), namedScratchpadAction scratchpads "pavucontrol"), - -- ((modMask, xK_h), spawn transparentTerm), + -- refresh display via autorandr ( (modMask, xK_r), spawn $ "autorandr --cycle" |