Xmobar Overflowing after updating to git #655

Closed
opened 3 months ago by jrgiacone · 27 comments

Hi Since updating to git my xmobars now seem to overflow.

This could be user error as I may be missing a configuration line in my file to prevent this. I will attach below.

I attached 2 images showing the behavior

Config { overrideRedirect = True
         , font     = "iosevka bold 12"
         , additionalFonts = [ "Mononoki Nerd Font 12"
                             , "Font Awesome 6 Free Solid 10"
                             , "Font Awesome 6 Brands Regular 10"
                             ]
         , bgColor  = "#2e3440"
         , fgColor  = "#eceff4"
         , position = TopH 20
         , commands = [ Run Weather "KLGB"
                          [ "-t", "<fn=2>\xf0c2</fn> <skyCondition> <tempF>°F" -- \xb0 also works \x2109
                          , "-L", "50"
                          , "-H", "85"
                          , "--low"   , "lightblue"
                          , "--normal", "#8fbcbb"
                          , "--high"  , "#bf616a"
                          ] 36000

                      , Run Cpu ["-t", "<fn=2>\xf108</fn> (<total>%)","-H","50","--high","red"] 20
                      , Run Memory ["-t", "<fn=2>\xf233</fn> <used>M (<usedratio>%)"] 20
                      , Run Swap [] 10
                      , Run Com "nvidia-smi" ["--query-gpu=temperature.gpu", "--format=csv,noheader"] "gput" 50
                      , Run Com "nvidia-smi" ["--query-gpu=power.draw", "--format=csv,noheader"] "gpup" 50
                      , Run Com "/home/jrgiacone/.config/xmonad/disk" [] "disk" 60
                      , Run Date "<fn=2>\xf017</fn> %a %m-%d-%Y <fc=#88c0d0>%H:%M</fc>" "date" 10
                      , Run XMonadLog
                      , Run Com "/home/jrgiacone/.config/xmonad/trayer-padding-icon.sh" [] "trayerpad" 10
                      --        , Run Com "/home/jrgiacone/.local/bin/pacupdate.sh" [] "pacupdate" 36000
                      , Run Com "echo" ["<fn=3>\xf17c</fn>"] "penguin" 3600
                      , Run Com "echo" ["<fn=2>\xf769</fn>"] "therm" 3600
                              , Run MultiCoreTemp [ "-t" , "<fn=2>\xf769</fn> <avg>°C",
                                            "-hwmonitor-path", "/sys/module/k10temp/drivers/pci:k10temp/0000:00:18.3/hwmon/hwmon2",
                                            "-L", "60", "-H", "80",
                                            "-l", "#a3be8c", "-n", "#ebcb8b", "-h", "#bf616a",
                                                        "--", "--mintemp", "20", "--maxtemp", "100"] 50
                      , Run DiskU [("tank/home", "<fn=2>\xf0c7</fn>: <free>")] [] 60
                              , Run Network "enp38s0" ["-t", "<fn=2>\xf0ab</fn> <rx> <fn=2>\xf0aa</fn> <tx>", "-S", "True"] 20
                              , Run DynNetwork ["-t", "<fn=2>\xf0ab</fn> <rx> <fn=2>\xf0aa</fn> <tx>", "-S", "True"] 20
                              , Run Com "uname" ["-r"] "" 36000
                              , Run UnsafeXMonadLog
                      ]
         , sepChar  = "%"
         , alignSep = "}{"
         , template = "%UnsafeXMonadLog% }\
             \{<fc=#b3afc2> %penguin% %uname% </fc>\
             -- \|<fc=#b48ead> <fn=2></fn><action=`alacritty -e sudo pacman -Syu`> %pacupdate%</action></fc>\
             \|<fc=#5e81ac><action=`alacritty -e ncdu /`>%disk% </action></fc>\
             \|<fc=#8fbcbb> %therm%<action=`alacritty -e nvtop /`> %gput%°C <fn=2></fn> %gpup% </action></fc>\
             \|<fc=#bf616a> <action=`alacritty -e btop`>%multicoretemp% </action></fc>\
             \|<fc=#ebcb8b> <action=`alacritty -e btop`>%cpu% </action></fc>\
             \|<fc=#d08770> <action=`alacritty -e btop`>%memory% </action></fc>\
             \|<fc=#81a1c1> %KLGB% </fc>\
             \|<fc=#a3be8c> %dynnetwork% </fc>\
             \|<fc=#88c0d0> %date% </fc>\
             \|%trayerpad%"
         }
Hi Since updating to git my xmobars now seem to overflow. This could be user error as I may be missing a configuration line in my file to prevent this. I will attach below. I attached 2 images showing the behavior ``` Config { overrideRedirect = True , font = "iosevka bold 12" , additionalFonts = [ "Mononoki Nerd Font 12" , "Font Awesome 6 Free Solid 10" , "Font Awesome 6 Brands Regular 10" ] , bgColor = "#2e3440" , fgColor = "#eceff4" , position = TopH 20 , commands = [ Run Weather "KLGB" [ "-t", "<fn=2>\xf0c2</fn> <skyCondition> <tempF>°F" -- \xb0 also works \x2109 , "-L", "50" , "-H", "85" , "--low" , "lightblue" , "--normal", "#8fbcbb" , "--high" , "#bf616a" ] 36000 , Run Cpu ["-t", "<fn=2>\xf108</fn> (<total>%)","-H","50","--high","red"] 20 , Run Memory ["-t", "<fn=2>\xf233</fn> <used>M (<usedratio>%)"] 20 , Run Swap [] 10 , Run Com "nvidia-smi" ["--query-gpu=temperature.gpu", "--format=csv,noheader"] "gput" 50 , Run Com "nvidia-smi" ["--query-gpu=power.draw", "--format=csv,noheader"] "gpup" 50 , Run Com "/home/jrgiacone/.config/xmonad/disk" [] "disk" 60 , Run Date "<fn=2>\xf017</fn> %a %m-%d-%Y <fc=#88c0d0>%H:%M</fc>" "date" 10 , Run XMonadLog , Run Com "/home/jrgiacone/.config/xmonad/trayer-padding-icon.sh" [] "trayerpad" 10 -- , Run Com "/home/jrgiacone/.local/bin/pacupdate.sh" [] "pacupdate" 36000 , Run Com "echo" ["<fn=3>\xf17c</fn>"] "penguin" 3600 , Run Com "echo" ["<fn=2>\xf769</fn>"] "therm" 3600 , Run MultiCoreTemp [ "-t" , "<fn=2>\xf769</fn> <avg>°C", "-hwmonitor-path", "/sys/module/k10temp/drivers/pci:k10temp/0000:00:18.3/hwmon/hwmon2", "-L", "60", "-H", "80", "-l", "#a3be8c", "-n", "#ebcb8b", "-h", "#bf616a", "--", "--mintemp", "20", "--maxtemp", "100"] 50 , Run DiskU [("tank/home", "<fn=2>\xf0c7</fn>: <free>")] [] 60 , Run Network "enp38s0" ["-t", "<fn=2>\xf0ab</fn> <rx> <fn=2>\xf0aa</fn> <tx>", "-S", "True"] 20 , Run DynNetwork ["-t", "<fn=2>\xf0ab</fn> <rx> <fn=2>\xf0aa</fn> <tx>", "-S", "True"] 20 , Run Com "uname" ["-r"] "" 36000 , Run UnsafeXMonadLog ] , sepChar = "%" , alignSep = "}{" , template = "%UnsafeXMonadLog% }\ \{<fc=#b3afc2> %penguin% %uname% </fc>\ -- \|<fc=#b48ead> <fn=2></fn><action=`alacritty -e sudo pacman -Syu`> %pacupdate%</action></fc>\ \|<fc=#5e81ac><action=`alacritty -e ncdu /`>%disk% </action></fc>\ \|<fc=#8fbcbb> %therm%<action=`alacritty -e nvtop /`> %gput%°C <fn=2></fn> %gpup% </action></fc>\ \|<fc=#bf616a> <action=`alacritty -e btop`>%multicoretemp% </action></fc>\ \|<fc=#ebcb8b> <action=`alacritty -e btop`>%cpu% </action></fc>\ \|<fc=#d08770> <action=`alacritty -e btop`>%memory% </action></fc>\ \|<fc=#81a1c1> %KLGB% </fc>\ \|<fc=#a3be8c> %dynnetwork% </fc>\ \|<fc=#88c0d0> %date% </fc>\ \|%trayerpad%" } ```
jao commented 3 months ago
Owner

i think you need, instead of

  , "Font Awesome 6 Free Solid 10"
  , "Font Awesome 6 Brands Regular 10"

something like

  , "Font Awesome, Free Solid 10, 6"
  , "Font Awesome, Brands Regular 10, 6"
i think you need, instead of , "Font Awesome 6 Free Solid 10" , "Font Awesome 6 Brands Regular 10" something like , "Font Awesome, Free Solid 10, 6" , "Font Awesome, Brands Regular 10, 6"
Poster

i think you need, instead of

  , "Font Awesome 6 Free Solid 10"
  , "Font Awesome 6 Brands Regular 10"

something like

  , "Font Awesome, Free Solid 10, 6"
  , "Font Awesome, Brands Regular 10, 6"

Hi even if i completely remove all fonts in the file it still behaves as depicted

> i think you need, instead of > > , "Font Awesome 6 Free Solid 10" > , "Font Awesome 6 Brands Regular 10" > > something like > > , "Font Awesome, Free Solid 10, 6" > , "Font Awesome, Brands Regular 10, 6" Hi even if i completely remove all fonts in the file it still behaves as depicted
jao commented 3 months ago
Owner

well, removing all fonts will make it use a default that might well cause the problem... did you at least keep font?

well, removing all fonts will make it use a default that might well cause the problem... did you at least keep `font`?
jao commented 3 months ago
Owner

@jrgiacone also, to make sure i understand the problem, how would you describe in words this "overflow"? it's a bit hard to tell just by looking at the images... do you think it's a single monitor that it's taking more space than before? or is it all of them?

@jrgiacone also, to make sure i understand the problem, how would you describe in words this "overflow"? it's a bit hard to tell just by looking at the images... do you think it's a single monitor that it's taking more space than before? or is it all of them?
jao referenced this issue from a commit 3 months ago
jao commented 3 months ago
Owner

@jrgiacone i've pushed a patch that recovers the behaviour of drawing the center segment at the center of the bar: does it improve things for you?

@jrgiacone i've pushed a patch that recovers the behaviour of drawing the center segment at the center of the bar: does it improve things for you?
Poster

@jrgiacone i've pushed a patch that recovers the behaviour of drawing the center segment at the center of the bar: does it improve things for you?

Yes this was on one monitor with the other monitor off.

The new patch prevents the right side of the bar from moving off the screen.

However now the center window titles double up with the monitors on the right, please see image below

If you open the picture you will see it doubles up with the first few icons, opening remaining windows and it will continue going.

The behavior before the bug appeared, it would go beheind the bar and not show with the other modules almost as if there was a cuttoff right before the first parts of the template

> @jrgiacone i've pushed a patch that recovers the behaviour of drawing the center segment at the center of the bar: does it improve things for you? Yes this was on one monitor with the other monitor off. The new patch prevents the right side of the bar from moving off the screen. However now the center window titles double up with the monitors on the right, please see image below If you open the picture you will see it doubles up with the first few icons, opening remaining windows and it will continue going. The behavior before the bug appeared, it would go beheind the bar and not show with the other modules almost as if there was a cuttoff right before the first parts of the template
jao commented 3 months ago
Owner

@jrgiacone well, if i change the behaviour and draw the right-hand side last (which is what i think you expect), someone will complain that it's occluding the center :)

but, won't just putting your current center monitors as the last of the left side (leaving the center empty) work as you want? (if you always have lots of things in the middle)

@jrgiacone well, if i change the behaviour and draw the right-hand side last (which is what i think you expect), someone will complain that it's occluding the center :) but, won't just putting your current center monitors as the last of the left side (leaving the center empty) work as you want? (if you always have lots of things in the middle)
jao commented 3 months ago
Owner

i've pushed a little variation on the same, but i guess it's not going to solve the problem you see... i'm actually scratching my head about how those monitors overlap, i don't see how it happens in the code...

i've pushed a little variation on the same, but i guess it's not going to solve the problem you see... i'm actually scratching my head about how those monitors overlap, i don't see how it happens in the code...
Poster

hi i could he creating confusion this issue shown is currently with one monitor.

The same issue is present if multiple.

in previous revisions it was working, it worked when it was previously on github before the font changes

hi i could he creating confusion this issue shown is currently with one monitor. The same issue is present if multiple. in previous revisions it was working, it worked when it was previously on github before the font changes
jao commented 3 months ago
Owner

hi i could he creating confusion this issue shown is currently with one monitor.

The same issue is present if multiple.

you've lost me here :) is this occurring with one or multiple monitors? and is this multiple monitors used together, or the same config in different monitors that sometimes works and sometimes doesn't? and what's different between the monitors, size?

> hi i could he creating confusion this issue shown is currently with one monitor. > > The same issue is present if multiple. > you've lost me here :) is this occurring with one or multiple monitors? and is this multiple monitors used together, or the same config in different monitors that sometimes works and sometimes doesn't? and what's different between the monitors, size?
Poster

Hi Jao I will try my best to demonstrate what I am doing and add my files for you and hopefully that will help!

I will post my xmonad.hs and my 2 .xmobarrc files!

But to answer your question, I have 2 monitors with 2 xmobars (separate configurations) I run a script to disable the second, but the overflow issue is present no matter if one monitor is on or both are on.

One monitor is 1080p and one is 1440p but this should not affect the situation as it was working in previous versions of xmobar. The issue is as the window names section grows, now it either is visable behind the widgets on the right, or it pushes the widgets to the right, I cannot tell if the monitor is growing or the text is just getting pushed off screen.

Hi Jao I will try my best to demonstrate what I am doing and add my files for you and hopefully that will help! I will post my xmonad.hs and my 2 .xmobarrc files! But to answer your question, I have 2 monitors with 2 xmobars (separate configurations) I run a script to disable the second, but the overflow issue is present no matter if one monitor is on or both are on. One monitor is 1080p and one is 1440p but this should not affect the situation as it was working in previous versions of xmobar. The issue is as the window names section grows, now it either is visable behind the widgets on the right, or it pushes the widgets to the right, I cannot tell if the monitor is growing or the text is just getting pushed off screen.
jao commented 3 months ago
Owner

@jrgiacone okay, i think i understand now: what you expect is that the monitors on the right are always fully visible and the ones in the middle are the ones that are cut if they extend too much, right?

@jrgiacone okay, i think i understand now: what you expect is that the monitors on the right are always fully visible and the ones in the middle are the ones that are cut if they extend too much, right?
Poster

Yes that was the old behavior! Was it changed for other reasons?

Yes that was the old behavior! Was it changed for other reasons?
jao commented 3 months ago
Owner

Yes that was the old behavior! Was it changed for other reasons?

because some people had asked for a different order and i was experimenting a bit (that code got rewritten in a very different way lately with the move to cairo). but i see now that keeping the old behaviour by default is preferable, we'll introduce new options as new configuration parameters, like those discussed in #650.

i've just pushed a patch that might fixed the problems you're having: could you please give it a try?

> Yes that was the old behavior! Was it changed for other reasons? because some people had asked for a different order and i was experimenting a bit (that code got rewritten in a very different way lately with the move to cairo). but i see now that keeping the old behaviour by default is preferable, we'll introduce new options as new configuration parameters, like those discussed in #650. i've just pushed a patch that might fixed the problems you're having: could you please give it a try?
Poster

I jao, still seeing the same double text like this!

I jao, still seeing the same double text like this!
jao commented 3 months ago
Owner

I jao, still seeing the same double text like this!

are you sure you're on the latest version? i had problems uploading the patches yesterday, codeberg seemed in the middle of a migration... it shoud be 2a30cb0

> I jao, still seeing the same double text like this! are you sure you're on the latest version? i had problems uploading the patches yesterday, codeberg seemed in the middle of a migration... it shoud be 2a30cb0
Poster

I'm on the most recent pull from master, maybe I am doing something incorrectly.

I'm on the most recent pull from master, maybe I am doing something incorrectly.
jao commented 2 months ago
Owner

@jrgiacone could you try to see if it happens with an xmobar launched from the command line

     xmobar -x 0 -d xmobar.config

and, if it does, tell me what xmboar.config is it? (i am not using xmonad right now and will try to reproduce what you see elsewhere). Thanks!

@jrgiacone could you try to see if it happens with an xmobar launched from the command line xmobar -x 0 -d xmobar.config and, if it does, tell me what xmboar.config is it? (i am not using xmonad right now and will try to reproduce what you see elsewhere). Thanks!
Poster

Hi Jao, same behavior I am really sorry and I super appreciate your help on this!

I have my dotfiles here and linked it to the xmobarrc: https://github.com/jrgiacone/.dotfiles/blob/main/.xmobarrc

Hi Jao, same behavior I am really sorry and I super appreciate your help on this! I have my dotfiles here and linked it to the xmobarrc: https://github.com/jrgiacone/.dotfiles/blob/main/.xmobarrc
jao commented 2 months ago
Owner

Hi Jao, same behavior I am really sorry and I super appreciate your help on this!

I have my dotfiles here and linked it to the xmobarrc: https://github.com/jrgiacone/.dotfiles/blob/main/.xmobarrc

thanks, and apologies for taking so long to get to this, i haven't had time yet to try with your specific configuration. i've right now fixed a little glitch related to segments alignment and overlap, but i am not sure it'll have any effect in your problem, so try it only if you don't mind wasting a bit time :)

> Hi Jao, same behavior I am really sorry and I super appreciate your help on this! > > I have my dotfiles here and linked it to the xmobarrc: https://github.com/jrgiacone/.dotfiles/blob/main/.xmobarrc thanks, and apologies for taking so long to get to this, i haven't had time yet to try with your specific configuration. i've right now fixed a little glitch related to segments alignment and overlap, but i am not sure it'll have any effect in your problem, so try it only if you don't mind wasting a bit time :)
Poster

Hi Jao, same behavior I am really sorry and I super appreciate your help on this!

I have my dotfiles here and linked it to the xmobarrc: https://github.com/jrgiacone/.dotfiles/blob/main/.xmobarrc

thanks, and apologies for taking so long to get to this, i haven't had time yet to try with your specific configuration. i've right now fixed a little glitch related to segments alignment and overlap, but i am not sure it'll have any effect in your problem, so try it only if you don't mind wasting a bit time :)

Hi just tried it out, the fix reverted it back to the original bad behavior where it pushes the bar off the screen to the right!

> > Hi Jao, same behavior I am really sorry and I super appreciate your help on this! > > > > I have my dotfiles here and linked it to the xmobarrc: https://github.com/jrgiacone/.dotfiles/blob/main/.xmobarrc > > thanks, and apologies for taking so long to get to this, i haven't had time yet to try with your specific configuration. i've right now fixed a little glitch related to segments alignment and overlap, but i am not sure it'll have any effect in your problem, so try it only if you don't mind wasting a bit time :) Hi just tried it out, the fix reverted it back to the original bad behavior where it pushes the bar off the screen to the right!
jao commented 2 months ago
Owner

isn't that because your right bar overlaps with the left side? if the two don't fit, we must cut somewhere...

isn't that because your right bar overlaps with the left side? if the two don't fit, we must cut somewhere...
Poster

isn't that because your right bar overlaps with the left side? if the two don't fit, we must cut somewhere...

This is with just running 1 monitor and 1 bar, the split before when the text was overlapping was ideal, we would just need the text to cut off just before the modules on the right so when it overflows it doesn't display anymore window titles or it overflows behind and invisible without pushing everything to the right and expanding the bar

> isn't that because your right bar overlaps with the left side? if the two don't fit, we must cut somewhere... This is with just running 1 monitor and 1 bar, the split before when the text was overlapping was ideal, we would just need the text to cut off just before the modules on the right so when it overflows it doesn't display anymore window titles or it overflows behind and invisible without pushing everything to the right and expanding the bar
jao commented 1 month ago
Owner

isn't that because your right bar overlaps with the left side? if the two don't fit, we must cut somewhere...

This is with just running 1 monitor and 1 bar, the split before when the text was overlapping was ideal, we would just need the text to cut off just before the modules on the right so when it overflows it doesn't display anymore window titles or it overflows behind and invisible without pushing everything to the right and expanding the bar

yes, that's exactly the behaviour i observe with my configurations: the center is cut off before the right hand side starts, and the right hand side is displayed in full as long as it does not overlap with the left side.

i don't fully understand why it's not working for you; maybe it's because you have many dynamical monitors with commands or the xmonad log that produce varying widths and we're not detecting their width correctly. does it help if you set a maximum width for the xmonad log monitor? (with the -M option) and perhaps also a fixed width for the Com monitors (with the -m option).

> > isn't that because your right bar overlaps with the left side? if the two don't fit, we must cut somewhere... > > This is with just running 1 monitor and 1 bar, the split before when the text was overlapping was ideal, we would just need the text to cut off just before the modules on the right so when it overflows it doesn't display anymore window titles or it overflows behind and invisible without pushing everything to the right and expanding the bar yes, that's exactly the behaviour i observe with my configurations: the center is cut off before the right hand side starts, and the right hand side is displayed in full as long as it does not overlap with the left side. i don't fully understand why it's not working for you; maybe it's because you have many dynamical monitors with commands or the xmonad log that produce varying widths and we're not detecting their width correctly. does it help if you set a maximum width for the xmonad log monitor? (with the -M option) and perhaps also a fixed width for the Com monitors (with the -m option).
Poster

Hi Jao it must be something I am doing wrong. Here is the relevant code from my xmonad.hs configuration file entire file can be found here: https://github.com/jrgiacone/.dotfiles/blob/main/xmonad.hs.

My .xmobarrc is found here - https://github.com/jrgiacone/.dotfiles/blob/main/.xmobarrc

Would you mind taking a look and seeing if you have time to figure out if its a configuration issue on my part?

 -- Xxmobar Definitions/Callouts

  xmobar1 = statusBarProp "xmobar -x 0 ~/.config/xmonad/.xmobarrc" (myXmobarPP)
  xmobar2 = statusBarProp "xmobar -x 1 ~/.config/xmonad/.xmobarrc1" (myXmobarPP)

  -- Dynamic Xmobars

  barSpawner :: ScreenId -> IO StatusBarConfig
  barSpawner 0 = pure (xmobar1) <> trayerSB
  barSpawner 1 = pure xmobar2


  staticStatusBar cmd = pure $ def { sbStartupHook = spawnStatusBar cmd
  								   , sbCleanupHook = killStatusBar cmd
 								    }

  trayerSB :: IO StatusBarConfig
  trayerSB = staticStatusBar
    (unwords
      ["trayer"
      , "--edge top"
      , "--align right"
      , "--widthtype request"
      , "--expand true"
      , "--monitor primary"
      , "--transparent true"
      , "--alpha 0"
      , "--tint 0x282c34"
      , "--height 20"
      , "-l"
      , "--padding 6"
      , "--SetDockType true"
      , "--SetPartialStrut true"
      ]
    )
-- Xmobar Settings

  myXmobarPP :: X PP
  myXmobarPP = clickablePP . filterOutWsPP [scratchpadWorkspaceTag] $ def
      { ppSep             = nordaurora5 " • "
      , ppTitleSanitize   = xmobarStrip
      , ppCurrent         = wrap " " "" . xmobarBorder "Top" "#88c0d0" 2
      , ppHidden          = nordfrost4 . wrap " " ""
      , ppHiddenNoWindows = nordfrost1 . wrap " " ""
      , ppUrgent          = red . wrap (yellow "!") (yellow "!")
      , ppOrder           = \[ws, l, _, wins] -> [ws, l, wins]
      , ppExtras          = [logTitles formatFocused formatUnfocused]
      , ppVisible         = wrap "[" "]"
      }
    where
      formatFocused   = wrap (lowWhite    "[") (lowWhite    "]") . nordsnow1 . ppWindow
      formatUnfocused = wrap (lowWhite "[") (lowWhite "]") . nordfrost1    . ppWindow
     
      -- | Windows should have *some* title, which should not not exceed a
      -- sane length.
      ppWindow :: String -> String
      ppWindow = xmobarRaw . (\w -> if null w then "untitled" else w) . shorten 30
      blue, lowWhite, magenta, red, white, yellow :: String -> String

  -- Colors
     
      magenta  = xmobarColor "#ff79c6" ""
      blue     = xmobarColor "#bd93f9" ""
      white    = xmobarColor "#f8f8f2" ""
      yellow   = xmobarColor "#f1fa8c" ""
      red      = xmobarColor "#ff5555" ""
      lowWhite = xmobarColor "#bbbbbb" ""
      nordfrost1 = xmobarColor "#8fbcbb" ""
      nordfrost3 = xmobarColor "#81a1c1" ""
      nordfrost4 = xmobarColor "#5e91ac" ""
      nordsnow1 = xmobarColor "#d8dee9" ""
      nordsnow2 = xmobarColor "#e5e9f0" ""
      nordsnow3 = xmobarColor "#eceff4" ""
      nordnight4 = xmobarColor "4c566a" ""
      nordaurora5 = xmobarColor "#b48ead" ""

  -- Config Default Definitions

  myConfig = def
      { modMask     = mod4Mask      -- Rebind Mod to the Super key
      , layoutHook  = myLayout      -- Use custom layouts
      , borderWidth = 2
      , manageHook  = myManageHook  -- Match on certain windows
      , terminal    = myTerminal
      , startupHook = myStartupHook
      , focusedBorderColor = myFocusColor
      , handleEventHook = Hacks.trayerAboveXmobarEventHook -- <> Hacks.windowedFullscreenFixEventHook
                          <> swallowEventHook (className =? "Alacritty")
                                               (return True)
      , normalBorderColor = myNormColor
      }
    `additionalKeysP` myKeys
Hi Jao it must be something I am doing wrong. Here is the relevant code from my xmonad.hs configuration file entire file can be found here: https://github.com/jrgiacone/.dotfiles/blob/main/xmonad.hs. My .xmobarrc is found here - https://github.com/jrgiacone/.dotfiles/blob/main/.xmobarrc Would you mind taking a look and seeing if you have time to figure out if its a configuration issue on my part? ``` -- Xxmobar Definitions/Callouts xmobar1 = statusBarProp "xmobar -x 0 ~/.config/xmonad/.xmobarrc" (myXmobarPP) xmobar2 = statusBarProp "xmobar -x 1 ~/.config/xmonad/.xmobarrc1" (myXmobarPP) -- Dynamic Xmobars barSpawner :: ScreenId -> IO StatusBarConfig barSpawner 0 = pure (xmobar1) <> trayerSB barSpawner 1 = pure xmobar2 staticStatusBar cmd = pure $ def { sbStartupHook = spawnStatusBar cmd , sbCleanupHook = killStatusBar cmd } trayerSB :: IO StatusBarConfig trayerSB = staticStatusBar (unwords ["trayer" , "--edge top" , "--align right" , "--widthtype request" , "--expand true" , "--monitor primary" , "--transparent true" , "--alpha 0" , "--tint 0x282c34" , "--height 20" , "-l" , "--padding 6" , "--SetDockType true" , "--SetPartialStrut true" ] ) ``` ``` -- Xmobar Settings myXmobarPP :: X PP myXmobarPP = clickablePP . filterOutWsPP [scratchpadWorkspaceTag] $ def { ppSep = nordaurora5 " • " , ppTitleSanitize = xmobarStrip , ppCurrent = wrap " " "" . xmobarBorder "Top" "#88c0d0" 2 , ppHidden = nordfrost4 . wrap " " "" , ppHiddenNoWindows = nordfrost1 . wrap " " "" , ppUrgent = red . wrap (yellow "!") (yellow "!") , ppOrder = \[ws, l, _, wins] -> [ws, l, wins] , ppExtras = [logTitles formatFocused formatUnfocused] , ppVisible = wrap "[" "]" } where formatFocused = wrap (lowWhite "[") (lowWhite "]") . nordsnow1 . ppWindow formatUnfocused = wrap (lowWhite "[") (lowWhite "]") . nordfrost1 . ppWindow -- | Windows should have *some* title, which should not not exceed a -- sane length. ppWindow :: String -> String ppWindow = xmobarRaw . (\w -> if null w then "untitled" else w) . shorten 30 blue, lowWhite, magenta, red, white, yellow :: String -> String -- Colors magenta = xmobarColor "#ff79c6" "" blue = xmobarColor "#bd93f9" "" white = xmobarColor "#f8f8f2" "" yellow = xmobarColor "#f1fa8c" "" red = xmobarColor "#ff5555" "" lowWhite = xmobarColor "#bbbbbb" "" nordfrost1 = xmobarColor "#8fbcbb" "" nordfrost3 = xmobarColor "#81a1c1" "" nordfrost4 = xmobarColor "#5e91ac" "" nordsnow1 = xmobarColor "#d8dee9" "" nordsnow2 = xmobarColor "#e5e9f0" "" nordsnow3 = xmobarColor "#eceff4" "" nordnight4 = xmobarColor "4c566a" "" nordaurora5 = xmobarColor "#b48ead" "" -- Config Default Definitions myConfig = def { modMask = mod4Mask -- Rebind Mod to the Super key , layoutHook = myLayout -- Use custom layouts , borderWidth = 2 , manageHook = myManageHook -- Match on certain windows , terminal = myTerminal , startupHook = myStartupHook , focusedBorderColor = myFocusColor , handleEventHook = Hacks.trayerAboveXmobarEventHook -- <> Hacks.windowedFullscreenFixEventHook <> swallowEventHook (className =? "Alacritty") (return True) , normalBorderColor = myNormColor } `additionalKeysP` myKeys ```
jao commented 1 month ago
Owner

@jrgiacone i think i see why it's not working as you expect. could you try, in your template, instead of:

      %UnsafeXMonadLog% }\
         \{

to put the xmonad log in the central segment:

   } %UnsafeXMonadLog% \
     \{

(you're right now putting it to the left, and that has priority over the right segment; i thought you were using the central one for it).

@jrgiacone i think i see why it's not working as you expect. could you try, in your template, instead of: %UnsafeXMonadLog% }\ \{ to put the xmonad log in the central segment: } %UnsafeXMonadLog% \ \{ (you're right now putting it to the left, and that has priority over the right segment; i thought you were using the central one for it).
Poster

@jrgiacone i think i see why it's not working as you expect. could you try, in your template, instead of:

      %UnsafeXMonadLog% }\
       \{

to put the xmonad log in the central segment:

   } %UnsafeXMonadLog% \
   \{

(you're right now putting it to the left, and that has priority over the right segment; i thought you were using the central one for it).

@jao Thank you so much for being patient with me. That makes so much sense and completely resolves my issue. I really appreciate the help!

> @jrgiacone i think i see why it's not working as you expect. could you try, in your template, instead of: > > %UnsafeXMonadLog% }\ > \{ > > to put the xmonad log in the central segment: > > } %UnsafeXMonadLog% \ > \{ > > (you're right now putting it to the left, and that has priority over the right segment; i thought you were using the central one for it). @jao Thank you so much for being patient with me. That makes so much sense and completely resolves my issue. I really appreciate the help!
jrgiacone closed this issue 1 month ago
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: xmobar/xmobar#655
Loading…
There is no content yet.