From 0175e021022599c507d361d48364b3a4dcc95503 Mon Sep 17 00:00:00 2001 From: Jose Antonio Ortega Ruiz Date: Thu, 3 Feb 2011 21:39:43 +0100 Subject: More XPROPS for the xmobar exec --- src/Xmobar.hs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src') diff --git a/src/Xmobar.hs b/src/Xmobar.hs index 15abca3..cf912b7 100644 --- a/src/Xmobar.hs +++ b/src/Xmobar.hs @@ -42,6 +42,7 @@ import Control.Exception hiding (handle) import Data.Bits import Data.Maybe(fromMaybe) import Data.Typeable (Typeable) +import System.Posix.Process (getProcessID) import Config import Parsers @@ -181,10 +182,17 @@ setProperties r c d w srs = do a2 <- internAtom d "_NET_WM_WINDOW_TYPE" False c2 <- internAtom d "ATOM" False v <- internAtom d "_NET_WM_WINDOW_TYPE_DOCK" False + p <- internAtom d "_NET_WM_PID" False + + setTextProperty d w "xmobar" wM_CLASS + setTextProperty d w "xmobar" wM_NAME + changeProperty32 d w a1 c1 propModeReplace $ map fi $ getStrutValues r (position c) (getRootWindowHeight srs) changeProperty32 d w a2 c2 propModeReplace [fromIntegral v] + getProcessID >>= changeProperty32 d w p c1 propModeReplace . return . fromIntegral + getRootWindowHeight :: [Rectangle] -> Int getRootWindowHeight srs = foldr1 max (map getMaxScreenYCoord srs) where -- cgit v1.2.3