From b0e3b4402bb46f8fad14f6c06106677968d28554 Mon Sep 17 00:00:00 2001 From: Azat Bahawi Date: Sun, 26 Jul 2020 16:57:46 +0300 Subject: Revert xmobar behaviour --- src/XMonad/Custom/Log.hs | 4 ++++ src/XMonad/Custom/Startup.hs | 3 +-- xmobarrc/bot.hs | 15 ++++++++++----- xmobarrc/top.hs | 2 +- 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/src/XMonad/Custom/Log.hs b/src/XMonad/Custom/Log.hs index 34934d9..b10fcdf 100644 --- a/src/XMonad/Custom/Log.hs +++ b/src/XMonad/Custom/Log.hs @@ -61,6 +61,7 @@ logHook = do currentWorkspaceOnTop ewmhDesktopsLogHook t <- getNamedPipe "xmobarTop" + b <- getNamedPipe "xmobarBot" c <- wsContainingCopies let copiesCurrent ws | ws `elem` c = xmobarColor yellow2 "" . xmobarFont 2 . wrap "*" "=" $ ws | otherwise = xmobarColor white2 "" . xmobarFont 2 . wrap "=" "=" $ ws @@ -74,3 +75,6 @@ logHook = do , ppUrgent = copiesUrgent , ppOutput = safePrintToPipe t } + dynamicLogWithPP $ botBarPP + { ppOutput = safePrintToPipe b + } diff --git a/src/XMonad/Custom/Startup.hs b/src/XMonad/Custom/Startup.hs index 85d52ad..aa9340f 100644 --- a/src/XMonad/Custom/Startup.hs +++ b/src/XMonad/Custom/Startup.hs @@ -18,7 +18,6 @@ import XMonad.Hooks.ManageDocks import XMonad.Hooks.SetWMName import XMonad.Util.Cursor import XMonad.Util.SpawnNamedPipe -import XMonad.Util.SpawnOnce atomsToFullscreen :: [String] atomsToFullscreen = @@ -50,7 +49,7 @@ addEWMHFullscreen = do startupHook :: X () startupHook = do spawnNamedPipe "xmobar ~/.xmonad/xmobarrc/top.hs" "xmobarTop" - spawnOnce "xmobar ~/.xmonad/xmobarrc/bot.hs" + spawnNamedPipe "xmobar ~/.xmonad/xmobarrc/bot.hs" "xmobarBot" docksStartupHook addEWMHFullscreen setDefaultCursor xC_left_ptr diff --git a/xmobarrc/bot.hs b/xmobarrc/bot.hs index 13b942e..1235545 100644 --- a/xmobarrc/bot.hs +++ b/xmobarrc/bot.hs @@ -11,7 +11,7 @@ Config { font = "xft:tewi:style=Regular:pixelsize=11,Biwidth:pixelsize=12" , height = 24 } , textOffset = 15 - , textOffsets = [15, 15] + , textOffsets = [ 15, 15 ] , iconOffset = -1 , lowerOnStart = True , hideOnStart = False @@ -23,9 +23,12 @@ Config { font = "xft:tewi:style=Regular:pixelsize=11,Biwidth:pixelsize=12" , borderColor = "#2f2b2a" , borderWidth = 1 , iconRoot = "." - , commands = [ Run Battery [ "-t", " %" + , commands = [ Run StdinReader + , Run Battery [ "-t", " %" , "--" - , "-i", "\57914", "-O", "\57913" , "-o", "\57911" + , "-i", "\57914" + , "-O", "\57913" + , "-o", "\57911" ] 10 , Run Wireless "wlp3s0" [ "-t", "\57775 @ %" ] 10 , Run DynNetwork [ "-t", "\57660 / \57659 kbps" ] 10 @@ -36,7 +39,9 @@ Config { font = "xft:tewi:style=Regular:pixelsize=11,Biwidth:pixelsize=12" , Run Locks , Run MPD [ "-t", " - " , "--" - , "-P", "\57498", "-Z", "\57499", "-S", "\57497" + , "-P", "\57498" + , "-Z", "\57499" + , "-S", "\57497" ] 10 , Run Volume "default" "Master" [ "-t", "<fn=1><status></fn> <volume>%" , "--" @@ -49,7 +54,7 @@ Config { font = "xft:tewi:style=Regular:pixelsize=11,Biwidth:pixelsize=12" , sepChar = "%" , alignSep = "}{" , template = " \ - \%battery% %wlp3s0wi% %dynnetwork%\ + \%battery% %wlp3s0wi% %dynnetwork% %StdinReader%\ \}\ \%kbd% / %fcitx%\ \{\ diff --git a/xmobarrc/top.hs b/xmobarrc/top.hs index 94b40bd..1cdab9c 100644 --- a/xmobarrc/top.hs +++ b/xmobarrc/top.hs @@ -11,7 +11,7 @@ Config { font = "xft:tewi:style=Regular:pixelsize=11,Biwidth:pixelsize=12" , height = 24 } , textOffset = 15 - , textOffsets = [15, 15] + , textOffsets = [ 15, 15 ] , iconOffset = -1 , lowerOnStart = True , hideOnStart = False -- cgit 1.4.1