hyprland-autoname-workspaces icon indicating copy to clipboard operation
hyprland-autoname-workspaces copied to clipboard

[BUG] Names not updating on window open/close

Open ghost opened this issue 1 year ago • 17 comments

Describe the bug Workspace names are not properly updated on window open/close events (triggered by standard Hyprland keybinds). Old icons remain, new icons do not appear. The next event (workspace switch, third window opened, window focus switch, etc) eventually updates the names to their true values.

I am not sure if this bug should be filed against hyprland-workspaces instead. Please let me know and I will close ASAP. Thank you!

Program version? 1.1.5

Program configuration dump? (ideally)

{
  "version": "1.1.5",
  "class": {
    "[Cc]odium(.*)": "󰨞",
    "(?i)Alacritty": "",
    "[Ff]irefox": "󰈹",
    "[Mm]pv": "",
    "DEFAULT": "󰝤",
    "[Nn]autilus": ""
  },
  "class_active": {},
  "initial_class": {},
  "initial_class_active": {},
  "workspaces_name": {
    "8": "eight",
    "10": "ten",
    "1": "one",
    "0": "zero",
    "6": "six",
    "3": "three",
    "2": "two",
    "5": "five",
    "7": "seven",
    "4": "four",
    "9": "nine"
  },
  "title_in_class": {
    "(?i)Alacritty": {
      "(?i)neovim": "neovim"
    }
  },
  "title_in_class_active": {
    "(?i)firefox": {
      "(?i)twitch": "<span color='purple'>{icon}</span>"
    }
  },
  "title_in_initial_class": {},
  "title_in_initial_class_active": {},
  "initial_title_in_class": {},
  "initial_title_in_class_active": {},
  "initial_title_in_initial_class": {},
  "initial_title_in_initial_class_active": {},
  "exclude": {
    "aProgram": "^$",
    "(?i)TestApp": "",
    "(?i)fcitx": ".*",
    "": "^$",
    "[Ss]team": "^$"
  },
  "format": {
    "dedup": false,
    "dedup_inactive_fullscreen": false,
    "delim": " ",
    "workspace": "{clients}",
    "workspace_empty": "󰝣",
    "client": "{icon}",
    "client_fullscreen": "[{icon}]",
    "client_active": "{icon}",
    "client_dup": "{icon}{counter_sup}",
    "client_dup_active": "*{icon}*{delim}{icon}{counter_unfocused_sup}",
    "client_dup_fullscreen": "[{icon}]{delim}{icon}{counter_unfocused_sup}"
  }
}

To Reproduce Steps to reproduce the behavior:

  1. Start hyprland-workspaces
  2. Start hyprland-autoname-workspaces
  3. Create more than one window
  4. Close a window
  5. The second window's icon remains until a new event (i.e. workspace switch) is triggered

Expected behavior Workspace names are updated when a window is opened/closed.

Linux Distro (please complete the following information): Fedora 38

Additional context Video clearly illustrating problem: https://files.catbox.moe/pwgsdf.mkv

ghost avatar Aug 02 '23 23:08 ghost

Hi, thanks for the report, I will dig more asap 🌞 I will try to reproduce the bug.

cyrinux avatar Aug 03 '23 21:08 cyrinux

This sounds like a race condition between two apps. Luckily hyprland has added a dedicated "renameworkspace" event today, so presumably if hyprland-workspaces adds it to the list of events it's interested in (https://github.com/FieldofClay/hyprland-workspaces/blob/a5843cc2c3d2e35ce07015e5185a2f694e33291e/src/main.rs#L150), then it would react when hyprland-autoname-workspaces renames a workspace, and you would see result with no delay.

Try to add it, and see if it solves the issue!

maximbaz avatar Sep 05 '23 16:09 maximbaz

I have the same issue, hyprland/workspaces doesn't catch any window name updates. (I was using wlr/workspaces which stopped working, and now on hyprland/workspaces the names don't update). Rename takes effect only every time i restart waybar.

psimovec avatar Sep 18 '23 11:09 psimovec

@psimovec can you update autoname and hyprland (master/main) ?

cyrinux avatar Sep 18 '23 11:09 cyrinux

I will try.. But now I am thinking is it really hyprland-autoname-workspaces problem? Because when i check hyprctl clients the windows are updated correctly.. Just waybar or hyprland-workspaces module of waybar are not catching any name updates it and require waybar restart for update..

psimovec avatar Sep 18 '23 11:09 psimovec

Oh I see you were already solving it: https://github.com/hyprland-community/hyprland-autoname-workspaces/issues/98 .. What did you do to make it work again?

It's really weird.. I'm on latest hyprland (hyprland-git, checked that it is on last commit).. hyprland autoname workspaces on master, using cargo run..

I am even checking waybar with debug option and it keeps getting events which look fine like

[2023-09-18 14:13:34.065] [debug] hyprland IPC received renameworkspace>>1,<span letter_spacing='-9000'> </span><span font_size='70%' rise='4pt' color='#D1D1FF'>1 </span><span bgcolor='yellow' bgalpha='5%'><span color ="#7AF" > </span></span>  <span color ="#7AF" > </span><span color='white' letter_spacing='000' font_size='100%' weight='1000' rise='-1pt' font_features='rand'>x2 </span> <span color="orange"> </span> <span letter_spacing='-18000'> </span>

But waybar doesn't actually visually update the workspaces... update unless I restart the waybar..

EDIT: manual install of waybar fixed the issue for me as following comments mention, thanks!

psimovec avatar Sep 18 '23 12:09 psimovec

Could you confirm if your waybar is also built from latest master? The latest release is too old, doesn't contain the necessary fix yet.

maximbaz avatar Sep 18 '23 13:09 maximbaz

It's still not working for me FYI. I'm on Arch and I'm using the latest versions of waybar, hypr and hyprland-autoname-workspaces. I ensured to install the *-git versions of each package via AUR.

Is there any fix for this available yet or is one currently being worked on?

Thx,

EDIT: Ahhh nevermind, I just manually installed waybar from the latest master branch as was mentioned above and now it's working as expected!

jontstaz avatar Sep 19 '23 06:09 jontstaz

Unfortunately for me installing from the latest master does not fix the issue:

$ waybar --version
Waybar v0.9.22-69-g9b8adc1 (branch 'master')

$ hyprland-autoname-workspaces --version
hyprland-autoname-workspaces 1.1.11

Waybar takes the names of the workspaces when it's launched once, but does not update the names "at runtime". I'm unsure if that is a hyprland-autoname-workspaces issue or a waybar issue, because hyprctl workspaces shows that the workspaces are all appropriately named "at runtime".

noggynoggy avatar Sep 21 '23 14:09 noggynoggy

Do you also run hyprland from latest master?

maximbaz avatar Sep 21 '23 14:09 maximbaz

No, I have to use the hyprland-nvidia 0.29.1-1

noggynoggy avatar Sep 21 '23 15:09 noggynoggy

You need to either wait for the next release, or cherry-pick the necessary commit from the master branch: https://github.com/hyprwm/Hyprland/commit/2d100bf57e0c0184d307bd4173b1a8d9fc7130e1

maximbaz avatar Sep 21 '23 15:09 maximbaz

The hyperland-nvidia-git AUR package worked out for me! Thanks for the help

noggynoggy avatar Sep 22 '23 11:09 noggynoggy

Has anyone been able to make it work using NixOS pkgs ?

elythh avatar Oct 13 '23 01:10 elythh

Has anyone been able to make it work using NixOS pkgs ?

Hi, What do you mean? Can you give more detail ?

cyrinux avatar Oct 16 '23 19:10 cyrinux

@elythh I'm using NixOS (nixos-unstable) and was facing this problem as well. I was able to solve it by using the Waybar package from nixpkgs-wayland.

Brisingr05 avatar Oct 17 '23 04:10 Brisingr05

Issue doesn't seem exist on my current system anymore:

$ waybar --version
Waybar v0.9.24

$ hyprland-autoname-workspaces --version
hyprland-autoname-workspaces 1.1.11

$ hyprctl version
Hyprland, built from branch  at commit v0.33.1  ().
Tag: 

flags: (if any)
debug

$ nixos-version
24.05.20231217.91a0070 (Uakari)

Brisingr05 avatar Dec 20 '23 03:12 Brisingr05