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

feat: add new config general.shutdown_commands and general.reload_commands and shutdown/reload Zebar along side the WM #713

Merged
merged 5 commits into from
Sep 16, 2024

Conversation

JonasWischeropp
Copy link
Contributor

This PR addresses #650 and #646
I added two config entries that allow easy execution of commands at shutdown and restart similar to general.startup_commands.

Config entry Execution time
general.shutdown_commands just before shutdown
general.reload_commands after config has reloaded

These are then used in the sample config to shutdown and reload Zebar.

general:
  startup_commands: ['shell-exec %userprofile%/.glzr/zebar/start.bat']
  shutdown_commands: ['shell-exec taskkill /IM zebar.exe /F']
  reload_commands: [
    'shell-exec taskkill /IM zebar.exe /F',
    'shell-exec %userprofile%/.glzr/zebar/start.bat'
  ]

@vlad420
Copy link

vlad420 commented Sep 7, 2024

Good One! This is necessary.

README.md Show resolved Hide resolved
packages/wm/src/user_config.rs Outdated Show resolved Hide resolved
packages/wm/src/wm.rs Outdated Show resolved Hide resolved
packages/wm/src/wm.rs Outdated Show resolved Hide resolved
@lars-berger
Copy link
Member

Really well written, thanks for taking care of this 🙌

Just a couple nitpicks, otherwise good to go

@JonasWischeropp
Copy link
Contributor Author

I have refactored the code.

@lars-berger
Copy link
Member

Sweet looks great 👌

@lars-berger lars-berger merged commit 2a63d1c into glzr-io:main Sep 16, 2024
1 check passed
@lars-berger
Copy link
Member

Hey @JonasWischeropp quick heads up - did some minor fixups in a follow-up pr at #742

didn't manage to get the Zebar config reload command to work (could be a change in Zebar v1 -> v2 that changed the behavior), so i'll remove that for now until a CLI command is added to Zebar for reloading

@lars-berger
Copy link
Member

BTW will get around to reviewing your new PR shortly 👌 Sorry about the wait

Copy link

🎉 This PR is included in version 3.2.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

3 participants