CountMurphy / QTalarm

A handy alarm clock Program written in QT.
GNU General Public License v3.0
36 stars 8 forks source link

Hide on calling command, or toggle option #24

Closed Kommynct closed 1 year ago

Kommynct commented 1 year ago

Currently I have qtalarm set to open on click of my waybar clock

I'd like to make clicking it while it's open also make it hide, would a toggle flag be reasonable to implement?

CountMurphy commented 1 year ago

It should be doing that already. What DE are you currently using? I can try making a VM with your desktop environment installed and see if there is some sort of bug.

EDIT: Ah, missed the waybar bit. I'll look into it.

CountMurphy commented 1 year ago

I think I'm understanding the issue, but want to double check. So clicking the application icon (as shown below) works as expected.

waybar.webm

Are you saying you are clicking the built in clock (next to the icon in my video) and have that configured to launch QTalarm? Wouldn't that just spawn a new instance (and per #17 that should show the window for the original process)?

Kommynct commented 1 year ago

Yeah as it currently stands i have waybar set to open qtalarm on click (of the clock not the icon), this shows the instance fine, but when i click the clock again it leaves the window open, if there was a toggle flag that would be better.

CountMurphy commented 1 year ago

Ok, so after giving it some thought, adding the toggle on duplicate process to the options menu seemed like way too much of an edge case to warrant a new option. However, I created a new test branch called waybar that should do the trick. If you compile the application from this branch and launch qtalarm from waybar with the new --toggleOnDup flag, it should do what you want. If you can confirm this method works for you, I'll merge it into master and update the docs.

Kommynct commented 1 year ago

Sorry took me forever to get back to this because.... I forgot... hahaha, just finished compiling and testing that version, it works perfectly and does exactly what I want, I would love it if this was merged into master, but, I kind of question why that isn't just the default behavior when the tray icon is enabled?

CountMurphy commented 1 year ago

Released with commit 6991135ab7f400b0528d32405824cd5e9f70537a