glzr-io / glazewm

GlazeWM is a tiling window manager for Windows inspired by i3wm.
GNU General Public License v3.0
5.45k stars 157 forks source link

[Feature Request] Restart Zebar on config reload in sample config #646

Open AfzGit opened 1 month ago

AfzGit commented 1 month ago

The command is executed but it does not reload the bar

The command for reload passes as indicated in the log:

2024-08-06T12:42:56.905971Z INFO glazewm::common::commands::reload_config: Config reloaded.
2024-08-06T12:42:56.918321Z INFO glazewm: Received WM event: UserConfigChanged { config_path: "C:\\Users\\user\\.glzr/glazewm/config.yaml", config_string: "general:\n    # Commands to run when the WM has started (e.g. to run a script or launch
...

Windows 11 23H2 Installed with Zebar

Edit: I think the problem lies with how GlazeWM interacts with Zebar. Consider exiting and re-running Zebar when reload is executed.

AfzGit commented 1 month ago

If issue #650 is solved, this issue will potentially also be solved.

Just cause the reload command to first shutdown Zebar and then re-run Zebar

AmineDjeghri commented 1 month ago

@AfzGit I have this issue #649 I think they might be related

AfzGit commented 1 month ago

Ok i figured out what was the problem. GlazeWM's Reload will only reload GlazeWM config and not Zebar config. So for any changes in Zebar's config, you need to restart Zebar manually.

A temporary fix:

    # Re-evaluate configuration file.
    - commands: ["wm-reload-config", 'shell-exec taskkill /IM "zebar.exe" /F', "shell-exec %userprofile%/.glzr/zebar/start.bat",]
      bindings: ["alt+shift+r"]

Now, upon reload, Zebar closes and relaunches, making the config of Zebar reload.


Can we add support to also reload Zebar from the same shortcut alt+shift+r?