diff options
Diffstat (limited to 'src/Rahm/Desktop/XMobarLog.hs')
| -rw-r--r-- | src/Rahm/Desktop/XMobarLog.hs | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/Rahm/Desktop/XMobarLog.hs b/src/Rahm/Desktop/XMobarLog.hs index 980cbe7..b624301 100644 --- a/src/Rahm/Desktop/XMobarLog.hs +++ b/src/Rahm/Desktop/XMobarLog.hs @@ -31,6 +31,7 @@ import XMonad (X) import qualified XMonad as X (XState (windowset), gets, io) import XMonad.Util.NamedWindows (getName) import XMonad.Util.Run (runProcessWithInput, spawnPipe) +import Rahm.Desktop.TabletMode (tabletModeXMobarString) newtype XMobarLog = XMobarLog Handle @@ -48,10 +49,7 @@ spawnXMobar :: IO XMobarLog spawnXMobar = do putStrLn "get dpi" dpi <- getDPI - let scale = dpi / 120 - - putStrLn $ "DPI: " ++ show dpi - putStrLn $ "scale: " ++ show scale + let scale = dpi / 144 pipe <- spawnPipe $ @@ -83,6 +81,8 @@ xMobarLogHook = do uname <- getUname unameRef + tabletMode <- tabletModeXMobarString + let pendingBufferSize = max 10 $ length uname let (pendingBufferColor, pendingBuffer') = @@ -98,7 +98,7 @@ xMobarLogHook = do let wss = getPopulatedWorkspaces winset - let log = trunc 80 $ + let log = trunc 120 $ execWriter $ do tell $ printf "<fc=%s><fn=3> " pendingBufferColor tell pendingBuffer @@ -131,7 +131,8 @@ xMobarLogHook = do tell $ toAction $ S.tag ws tell "</fc></fn> " - tell "<fc=#888888>| </fc>" + tell tabletMode + tell "<fc=#ff8888><fn=3>" tell title tell "</fn></fc>" @@ -143,7 +144,7 @@ xMobarLogHook = do | isAsciiUpper ch || isAsciiLower ch || isDigit ch = - printf "<action=`xdotool key 'Super_L+g' '%s'` button=1><action=`xdotool key 'Super_L+Shift_L+g' '%s'` button=3>%s</action></action>" [ch] [ch] [ch] + printf "<action=`rdectl goto '%s'` button=1><action=`rdectl shift '.' '%s'` button=3>%s</action></action>" [ch] [ch] [ch] toAction ch = ch toTheaterAction [ch] @@ -156,7 +157,7 @@ xMobarLogHook = do toChangeLayoutAction :: String -> String toChangeLayoutAction = printf - "<action=`xdotool key --delay 50 'Super_L+space' 'Super_L+n'` button=1>\ + "<action=`rdectl next-layout` button=1>\ \<action=`xdotool key --delay 50 'Super_L+space' 'Super_L+p'` button=3>\ \%s</action></action>" |