forked from colonelpanic/dotfiles
[XMonad] Use ewmh from github.com/xmonad/xmonad-contrib/pull/122
This commit is contained in:
parent
7b4a9d7a6b
commit
bffe020619
@ -4,7 +4,7 @@ packages:
|
|||||||
- '.'
|
- '.'
|
||||||
- location:
|
- location:
|
||||||
git: git@github.com:IvanMalison/xmonad-contrib.git
|
git: git@github.com:IvanMalison/xmonad-contrib.git
|
||||||
commit: 1bcb7a31f662cb06dd0e1c51da666694d9ad1836
|
commit: e4fc2341b6c5e4c27f309a371bfc140c70d813b4
|
||||||
- location:
|
- location:
|
||||||
git: git@github.com:IvanMalison/taffybar.git
|
git: git@github.com:IvanMalison/taffybar.git
|
||||||
commit: 39e3a95e9c2eae37ff8b67eaa31bbd18503859b1
|
commit: 39e3a95e9c2eae37ff8b67eaa31bbd18503859b1
|
||||||
|
@ -49,13 +49,17 @@ import XMonad.Util.NamedScratchpad
|
|||||||
(NamedScratchpad(NS), nonFloating, namedScratchpadAction)
|
(NamedScratchpad(NS), nonFloating, namedScratchpadAction)
|
||||||
import XMonad.Util.NamedWindows (getName)
|
import XMonad.Util.NamedWindows (getName)
|
||||||
|
|
||||||
|
myGetWorkspaceNameFromTag getWSName tag =
|
||||||
|
printf "%s: %s " tag (fromMaybe "(Empty)" (getWSName tag))
|
||||||
|
|
||||||
main =
|
main =
|
||||||
xmonad $ def
|
xmonad $ def
|
||||||
{ modMask = mod4Mask
|
{ modMask = mod4Mask
|
||||||
, terminal = "urxvt"
|
, terminal = "urxvt"
|
||||||
, manageHook = manageDocks <+> myManageHook <+> manageHook def
|
, manageHook = manageDocks <+> myManageHook <+> manageHook def
|
||||||
, layoutHook = myLayoutHook
|
, layoutHook = myLayoutHook
|
||||||
, logHook = toggleFadeInactiveLogHook 0.9 +++ ewmhWorkspaceNamesLogHook
|
, logHook = toggleFadeInactiveLogHook 0.9 +++ ewmhWorkspaceNamesLogHook' myGetWorkspaceNameFromTag +++
|
||||||
|
(myGetWorkspaceNameFromTag <$> getWorkspaceNames' >>= pagerHintsLogHookCustom)
|
||||||
, handleEventHook =
|
, handleEventHook =
|
||||||
docksEventHook <+> fullscreenEventHook +++
|
docksEventHook <+> fullscreenEventHook +++
|
||||||
ewmhDesktopsEventHook +++ pagerHintsEventHook +++ followIfNoMagicFocus
|
ewmhDesktopsEventHook +++ pagerHintsEventHook +++ followIfNoMagicFocus
|
||||||
@ -300,17 +304,6 @@ instance LayoutModifier WorkspaceNamesHook Window where
|
|||||||
|
|
||||||
workspaceNamesHook = ModifiedLayout WorkspaceNamesHook
|
workspaceNamesHook = ModifiedLayout WorkspaceNamesHook
|
||||||
|
|
||||||
-- EWMH support for workspace names
|
|
||||||
|
|
||||||
ewmhWorkspaceNamesLogHook = do
|
|
||||||
getWSName <- getWorkspaceNames'
|
|
||||||
let tagRemapping = getWorkspaceNameFromTag getWSName
|
|
||||||
pagerHintsLogHookCustom tagRemapping
|
|
||||||
ewmhDesktopsLogHookCustom id tagRemapping
|
|
||||||
|
|
||||||
getWorkspaceNameFromTag getWSName tag =
|
|
||||||
printf "%s: %s " tag (fromMaybe "(Empty)" (getWSName tag))
|
|
||||||
|
|
||||||
-- Toggleable fade
|
-- Toggleable fade
|
||||||
|
|
||||||
newtype ToggleFade a =
|
newtype ToggleFade a =
|
||||||
@ -335,7 +328,7 @@ toggleFadeInactiveLogHook =
|
|||||||
fadeIf (isUnfocused <&&> fadeEnabledForWindow <&&> fadeEnabledForWorkspace)
|
fadeIf (isUnfocused <&&> fadeEnabledForWindow <&&> fadeEnabledForWorkspace)
|
||||||
|
|
||||||
toggleFadingForActiveWindow = withWindowSet $
|
toggleFadingForActiveWindow = withWindowSet $
|
||||||
maybe (return()) toggleFadingForWindow . W.peek
|
maybe (return ()) toggleFadingForWindow . W.peek
|
||||||
|
|
||||||
toggleFadingForActiveWorkspace =
|
toggleFadingForActiveWorkspace =
|
||||||
withWindowSet $ \ws -> toggleFadingForWindow $ W.currentTag ws
|
withWindowSet $ \ws -> toggleFadingForWindow $ W.currentTag ws
|
||||||
|
Loading…
Reference in New Issue
Block a user