LBCrion/sfwbar

Bug: running programs don't appear in the taskbar if `SetBarSensor "<anything_but_zero>"` and `layout.taskbar.filter = workspace`

Closed this issue · 3 comments

Hello!

Steps the reproduce

  1. Apply the settings shown in the title (config snippet bellow) and reload the bar
  2. Move the cursor to the side of the screen where your bar is to make it appear [you should not see any programs running in the Taskbar]
  3. While your cursor is there, switch to another workspace [the programs running should appear now in the Taskbar]
  4. Move your cursor off the bar [the programs should still appear]
  5. Move to another workspace and then move your cursor to the side of the screen where your bar is [there should be no running apps once again]

TL;DR: with the given settings, running apps only appear if you switch workspaces while having your cursor inside of the bar (i.e. the side of the screen where your bar is). Though, it also happens if after step 4 you open another app, and then move the cursor inside of the bar again.

Minimal Config

I found this bug while setting up auto-hide on the default sfwbar.config (just change the marked lines):

Function("SfwbarInit") {
  SetLayer "top"
  SetBarSize "100%"
  SetMirror "*"
  SetBarSensor "100"    # set this to any number but zero
}

layout {
  css = "* { min-height: 

  taskbar {
    style = "taskbar"
    rows = 1;
    icons = true;
    labels = true;
    sort = false;
    action[3] = Menu "winops"
    action[Drag] = Focus
    filter = workspace    # set this to isolate the taskbar per workspace
  }
}

Aditional Information

  • I'm running the latest git version of sfwbar through the AUR packaged on Arch Linux
  • My Wayland compositor is Sway version 0.3.2-26cdeeb

I see the cause of the issue. The active workspace is determined from the output on which the taskbar is displayed, but since with a sensor active, the taskbar isn't mapped, the active workspace can't be determined. Let me have a think of the best way to map the hidden taskbar to a workspace.

This should be fixed in the latest git version. Can you please check if it works as expected for you?

Yep, it's working as expected in the latest git. Thanks for the quick fix 👍