From a89dbb8d182349011d079c94e96b618586aeb3ed Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Fri, 21 Oct 2016 21:58:14 -0700 Subject: [PATCH] [XMonad] Add workspace name to window info --- dotfiles/xmonad/xmonad.hs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/dotfiles/xmonad/xmonad.hs b/dotfiles/xmonad/xmonad.hs index c94e8b24..9cc58641 100644 --- a/dotfiles/xmonad/xmonad.hs +++ b/dotfiles/xmonad/xmonad.hs @@ -22,10 +22,16 @@ import qualified XMonad.StackSet as W import XMonad.Util.CustomKeys import XMonad.Util.NamedWindows (getName) +getClass :: Window -> X String +getClass w = do + classHint <- withDisplay $ \d -> io $ getClassHint d w + return $ resClass classHint + myDecorateName ws w = do name <- show <$> getName w - classHint <- withDisplay $ \d -> io $ getClassHint d w - return $ printf "%-2s %-20s%-20s" (W.tag ws) (resClass classHint) name + classTitle <- getClass w + workspaceToName <- getWorkspaceNames + return $ printf "%-20s%-50s %+40s" classTitle name $ "in " ++ workspaceToName (W.tag ws) myWindowBringerConfig = WindowBringerConfig { menuCommand = "rofi" , menuArgs = ["-dmenu", "-i"]