summaryrefslogtreecommitdiffstats
path: root/lass/5pkgs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2018-07-17 20:22:52 +0200
committertv <tv@krebsco.de>2018-07-17 20:22:52 +0200
commit3dedfb8de4dc7e741f4db5310739884fba68b5bd (patch)
tree25e2955462d2998afe04356128f9d464d1b40b52 /lass/5pkgs
parent75aa3b118b6c74b2e87ccf7e3da53aa06fa7d569 (diff)
parent74698c904460db569a3c6c8355c0b25a94c98800 (diff)
Merge remote-tracking branch 'prism/master'
Diffstat (limited to 'lass/5pkgs')
-rw-r--r--lass/5pkgs/custom/xmonad-lass/default.nix26
1 files changed, 23 insertions, 3 deletions
diff --git a/lass/5pkgs/custom/xmonad-lass/default.nix b/lass/5pkgs/custom/xmonad-lass/default.nix
index 7180f2a69..694f3c033 100644
--- a/lass/5pkgs/custom/xmonad-lass/default.nix
+++ b/lass/5pkgs/custom/xmonad-lass/default.nix
@@ -48,7 +48,8 @@ import XMonad.Util.EZConfig (additionalKeysP)
import XMonad.Util.NamedWindows (getName)
import XMonad.Util.Run (safeSpawn)
-import XMonad.Stockholm.Shutdown
+import XMonad.Stockholm.Shutdown (handleShutdownEvent, sendShutdownEvent)
+import XMonad.Stockholm.Pager (defaultWindowColors, pager, MatchMethod(MatchPrefix), PagerConfig(..))
data LibNotifyUrgencyHook = LibNotifyUrgencyHook deriving (Read, Show)
@@ -129,8 +130,8 @@ myKeyMap =
, ("M4-f", floatNext True)
, ("M4-b", sendMessage ToggleStruts)
- , ("M4-v", withWorkspace autoXPConfig (windows . W.greedyView))
- , ("M4-S-v", withWorkspace autoXPConfig (windows . W.shift))
+ , ("M4-v", gets windowset >>= allWorkspaceNames >>= pager pagerConfig (windows . W.view) )
+ , ("M4-S-v", gets windowset >>= allWorkspaceNames >>= pager pagerConfig (windows . W.shift) )
, ("M4-C-v", withWorkspace autoXPConfig (windows . copy))
, ("M4-m", withFocused minimizeWindow)
@@ -183,6 +184,21 @@ infixAutoXPConfig = autoXPConfig
{ searchPredicate = isInfixOf
}
+pagerConfig :: PagerConfig
+pagerConfig = def
+ { pc_font = myFont
+ , pc_cellwidth = 64
+ , pc_matchmethod = MatchPrefix
+ , pc_windowColors = windowColors
+ }
+ where
+ windowColors _ _ _ True _ = ("#ef4242","#ff2323")
+ windowColors wsf m c u wf = do
+ let y = defaultWindowColors wsf m c u wf
+ if m == False && wf == True
+ then ("#402020", snd y)
+ else y
+
gridConfig :: GSConfig WorkspaceId
gridConfig = def
{ gs_cellwidth = 100
@@ -191,6 +207,10 @@ gridConfig = def
, gs_navigate = navNSearch
, gs_font = myFont
}
+
+allWorkspaceNames :: W.StackSet i l a sid sd -> X [i]
+allWorkspaceNames ws =
+ return $ map W.tag (W.hidden ws) ++ [W.tag $ W.workspace $ W.current ws]
'';
};
}