forked from colonelpanic/dotfiles
[XMonad] Handle setting visible workspaces for renames
This commit is contained in:
parent
9009e9c79b
commit
7321f83a46
@ -8,7 +8,7 @@ import Data.Maybe
|
||||
import Graphics.X11.ExtraTypes.XF86
|
||||
import System.Directory
|
||||
import System.FilePath.Posix
|
||||
import System.Taffybar.Hooks.PagerHints (pagerHints)
|
||||
import System.Taffybar.Hooks.PagerHints
|
||||
import Text.Printf
|
||||
|
||||
import XMonad hiding ( (|||) )
|
||||
@ -35,13 +35,13 @@ import XMonad.Util.CustomKeys
|
||||
import qualified XMonad.Util.ExtensibleState as XS
|
||||
import XMonad.Util.NamedWindows (getName)
|
||||
|
||||
main = xmonad $ pagerHints def
|
||||
main = xmonad $ def
|
||||
{ modMask = mod4Mask
|
||||
, terminal = "urxvt"
|
||||
, manageHook = manageDocks <+> myManageHook <+> manageHook def
|
||||
, layoutHook = myLayoutHook
|
||||
, logHook = fadeInactiveLogHook 0.9 +++ ewmhWorkspaceNamesLogHook
|
||||
, handleEventHook = docksEventHook <+> fullscreenEventHook +++ ewmhDesktopsEventHook
|
||||
, handleEventHook = docksEventHook <+> fullscreenEventHook +++ ewmhDesktopsEventHook +++ pagerHintsEventHook
|
||||
, startupHook = myStartup +++ ewmhWorkspaceNamesLogHook
|
||||
, keys = customKeys (const []) addKeys
|
||||
} where
|
||||
@ -52,7 +52,7 @@ isHangoutsTitle = isPrefixOf "Google Hangouts"
|
||||
chromeSelector = className =? "google-chrome" <&&> fmap (not . isHangoutsTitle) title
|
||||
spotifySelector = className =? "Spotify"
|
||||
emacsSelector = className =? "Emacs"
|
||||
hangoutsSelector = className =? "google-chrome" <&&> fmap (isHangoutsTitle) title
|
||||
hangoutsSelector = className =? "google-chrome" <&&> fmap isHangoutsTitle title
|
||||
|
||||
-- Startup
|
||||
|
||||
@ -66,8 +66,6 @@ myManageHook = composeAll . concat $
|
||||
, [ hangoutsSelector --> doShift "1"]
|
||||
, [ spotifySelector --> doShift "2"]]
|
||||
|
||||
|
||||
|
||||
-- Layout
|
||||
|
||||
layouts = multiCol [1, 1] 2 0.01 (-0.5) ||| Full ||| Tall 1 (3/100) (1/2) ||| Tall 1 (3/100) (3/4)
|
||||
@ -127,7 +125,9 @@ workspaceNamesHook = ModifiedLayout WorkspaceNamesHook
|
||||
|
||||
ewmhWorkspaceNamesLogHook = do
|
||||
WorkspaceNames namesMap <- XS.get
|
||||
ewmhDesktopsLogHookCustom id (getWorkspaceNameFromTag namesMap)
|
||||
let tagRemapping = getWorkspaceNameFromTag namesMap
|
||||
pagerHintsLogHookCustom tagRemapping
|
||||
ewmhDesktopsLogHookCustom id tagRemapping
|
||||
|
||||
getWorkspaceNameFromTag namesMap tag =
|
||||
case M.lookup tag namesMap of
|
||||
|
Loading…
Reference in New Issue
Block a user