diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/Rahm/Desktop/XMobarLog.hs | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/Rahm/Desktop/XMobarLog.hs b/src/Rahm/Desktop/XMobarLog.hs index e419739..6cf4364 100644 --- a/src/Rahm/Desktop/XMobarLog.hs +++ b/src/Rahm/Desktop/XMobarLog.hs @@ -57,18 +57,18 @@ xMobarLogHook (XMobarLog xmproc) = do forM_ theaters $ \theater -> case theater of (Just n, _, True) -> do tell "<fn=1><fc=#ffffff>" - tell n + tell $ toTheaterAction n tell " </fc></fn>" (Just n, _, False) -> do tell "<fn=2><fc=#888888>" - tell n + tell $ toTheaterAction n tell " </fc></fn>" _ -> return () if not (null theaters) - then tell "| " + then tell "<fc=#888888>| </fc>" else return () forM_ wss $ \(t, ws) -> do @@ -94,6 +94,12 @@ xMobarLogHook (XMobarLog xmproc) = do printf "<action=`xdotool key 'Hyper_L+g' '%s'` button=1><action=`xdotool key 'Hyper_L+Shift_L+g' '%s'` button=3>%s</action></action>" [ch] [ch] [ch] toAction ch = ch + toTheaterAction [ch] | isAsciiUpper ch || + isAsciiLower ch || + isDigit ch = + printf "<action=`xdotool key 'Hyper_L+Shift_L+g' '%s'` button=1>%s</action>" [ch] [ch] + toTheaterAction ch = ch + toChangeLayoutAction :: String -> String toChangeLayoutAction = printf "<action=`xdotool key Hyper_L+space n` button=1>\ |