Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Names not updating on window open/close #95

Open
ghost opened this issue Aug 2, 2023 · 17 comments
Open

[BUG] Names not updating on window open/close #95

ghost opened this issue Aug 2, 2023 · 17 comments
Labels
question Further information is requested

Comments

@ghost
Copy link

ghost commented Aug 2, 2023

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 ghost changed the title [BUG] Names not updating on window open/close, only on workspace switch [BUG] Names not updating on window open/close Aug 2, 2023
@cyrinux
Copy link
Collaborator

cyrinux commented Aug 3, 2023

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

@maximbaz
Copy link
Collaborator

maximbaz commented Sep 5, 2023

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!

@cyrinux cyrinux added the question Further information is requested label Sep 9, 2023
@psimovec
Copy link
Contributor

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.

@cyrinux
Copy link
Collaborator

cyrinux commented Sep 18, 2023

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

@psimovec
Copy link
Contributor

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
Copy link
Contributor

psimovec commented Sep 18, 2023

Oh I see you were already solving it: #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!

@maximbaz
Copy link
Collaborator

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.

@jontstaz
Copy link

jontstaz commented Sep 19, 2023

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!

@noggynoggy
Copy link

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".

@maximbaz
Copy link
Collaborator

Do you also run hyprland from latest master?

@noggynoggy
Copy link

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

@maximbaz
Copy link
Collaborator

You need to either wait for the next release, or cherry-pick the necessary commit from the master branch: hyprwm/Hyprland@2d100bf

@noggynoggy
Copy link

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

@elythh
Copy link

elythh commented Oct 13, 2023

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

@cyrinux
Copy link
Collaborator

cyrinux commented Oct 16, 2023

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

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

@Brisingr05
Copy link

@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
Copy link

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

7 participants