-
-
Notifications
You must be signed in to change notification settings - Fork 46
Make hyprlauncher toggle when already running instead of just opening it #42
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
base: main
Are you sure you want to change the base?
Conversation
|
Shouldn't this be under a CLI flag? If the window is opened programmatically rather than by a user interaction, you probably don't want it to ever close the window instead. |
|
Sorry I am probably not following what you mean exactly. I mean I understand the behaviour you mean but can't imagine the situation. Also do you think it should be toggle first or open only first? |
Let's say, that, if I go to workspace 7, I have a script that launches Hyprlauncher when the workspace is created. If I go to workspace 7 while Hyprlauncher is open, it will close Hyprlauncher instead, but I might not have meant to do that.
I think it's common sense to not change existing behavior without a good reason, so, it would be open by default, and toggle under a flag, but Vaxry should have the final say on this. |
Oh I see, that makes perfect sense.
I mean hyprlauncher seems to be in the rapid development stage, I think potenitonally breaking changes are fine at this point. |
|
I guess we will leave the default behaviour to @vaxerski |
|
default should be open and cli flag could do the switch to toggle / close |
|
Should it be decided on the first run or every execution should have the flag? |
|
?? every execution |
From my understanding of this if you make it a command line flag, say -t, you have 2 options for the toggle behaviour. 1 is first run, where you have something like hyprlauncher -d already somewhere, you just change it to hyprlauncher -dt for toggle behaviour. And every hyprlauncher call, toggles it. 2 is every launch, where you have something like bind, keycombination, hyprlauncher. You could change it to hyprlauncher -t. And so every call for hyprlauncher would just be open/close, but with -t it would just toggle. But if you make this a config file setting, like general:toggle_enabled without flags entirely, all you would have to do is edit the config file and change the value from its default value of false to true. This way you won't have to deal with any errors that may arise from (1) of if you add -t after the first run in both cases of its initial state. I would say every execution change (2) is good, but making this a config setting is better because if a user wants the toggle behaviour, they wouldn't be needing or using just a plain hyprlauncher call. |
The thing is, that there are times you want the toggle behavior (ex. when Hyprlauncher is called by a keybinding) and some times you don't, (ex. when it's called by a script). A config option or a first launch only option simply won't do, it needs to be a flag each time Hyprlauncher is invoked. This way, if I, for example, configure |
|
You are right. I also completely forgot about the manual entry providing capabilities, I was set on the desktop launcher mode. So yeah the flag option is best. |
|
Will implement the toggle then |
I noticed I always have to press Esc to close hyprlauncher which is annoying since I have it bound to keybind. So I made it toggle instead of just run open.