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 Graphics.X11.ExtraTypes.XF86
|
||||||
import System.Directory
|
import System.Directory
|
||||||
import System.FilePath.Posix
|
import System.FilePath.Posix
|
||||||
import System.Taffybar.Hooks.PagerHints (pagerHints)
|
import System.Taffybar.Hooks.PagerHints
|
||||||
import Text.Printf
|
import Text.Printf
|
||||||
|
|
||||||
import XMonad hiding ( (|||) )
|
import XMonad hiding ( (|||) )
|
||||||
@ -35,13 +35,13 @@ import XMonad.Util.CustomKeys
|
|||||||
import qualified XMonad.Util.ExtensibleState as XS
|
import qualified XMonad.Util.ExtensibleState as XS
|
||||||
import XMonad.Util.NamedWindows (getName)
|
import XMonad.Util.NamedWindows (getName)
|
||||||
|
|
||||||
main = xmonad $ pagerHints def
|
main = 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 = fadeInactiveLogHook 0.9 +++ ewmhWorkspaceNamesLogHook
|
, logHook = fadeInactiveLogHook 0.9 +++ ewmhWorkspaceNamesLogHook
|
||||||
, handleEventHook = docksEventHook <+> fullscreenEventHook +++ ewmhDesktopsEventHook
|
, handleEventHook = docksEventHook <+> fullscreenEventHook +++ ewmhDesktopsEventHook +++ pagerHintsEventHook
|
||||||
, startupHook = myStartup +++ ewmhWorkspaceNamesLogHook
|
, startupHook = myStartup +++ ewmhWorkspaceNamesLogHook
|
||||||
, keys = customKeys (const []) addKeys
|
, keys = customKeys (const []) addKeys
|
||||||
} where
|
} where
|
||||||
@ -52,7 +52,7 @@ isHangoutsTitle = isPrefixOf "Google Hangouts"
|
|||||||
chromeSelector = className =? "google-chrome" <&&> fmap (not . isHangoutsTitle) title
|
chromeSelector = className =? "google-chrome" <&&> fmap (not . isHangoutsTitle) title
|
||||||
spotifySelector = className =? "Spotify"
|
spotifySelector = className =? "Spotify"
|
||||||
emacsSelector = className =? "Emacs"
|
emacsSelector = className =? "Emacs"
|
||||||
hangoutsSelector = className =? "google-chrome" <&&> fmap (isHangoutsTitle) title
|
hangoutsSelector = className =? "google-chrome" <&&> fmap isHangoutsTitle title
|
||||||
|
|
||||||
-- Startup
|
-- Startup
|
||||||
|
|
||||||
@ -66,8 +66,6 @@ myManageHook = composeAll . concat $
|
|||||||
, [ hangoutsSelector --> doShift "1"]
|
, [ hangoutsSelector --> doShift "1"]
|
||||||
, [ spotifySelector --> doShift "2"]]
|
, [ spotifySelector --> doShift "2"]]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-- Layout
|
-- Layout
|
||||||
|
|
||||||
layouts = multiCol [1, 1] 2 0.01 (-0.5) ||| Full ||| Tall 1 (3/100) (1/2) ||| Tall 1 (3/100) (3/4)
|
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
|
ewmhWorkspaceNamesLogHook = do
|
||||||
WorkspaceNames namesMap <- XS.get
|
WorkspaceNames namesMap <- XS.get
|
||||||
ewmhDesktopsLogHookCustom id (getWorkspaceNameFromTag namesMap)
|
let tagRemapping = getWorkspaceNameFromTag namesMap
|
||||||
|
pagerHintsLogHookCustom tagRemapping
|
||||||
|
ewmhDesktopsLogHookCustom id tagRemapping
|
||||||
|
|
||||||
getWorkspaceNameFromTag namesMap tag =
|
getWorkspaceNameFromTag namesMap tag =
|
||||||
case M.lookup tag namesMap of
|
case M.lookup tag namesMap of
|
||||||
|
Loading…
Reference in New Issue
Block a user