mkropat / jumpapp

A run-or-raise application switcher for any X11 desktop
MIT License
631 stars 44 forks source link

Pls ass option to minimize if application is focused already on run #27

Closed pymen closed 5 years ago

pymen commented 6 years ago

Pls add option to minimize if application is focused already on run something like --minimize_if_focused

For example to run calculator i click hotkey, calculator started, when i finish calculations i want to minimize it with same hotkey

mkropat commented 6 years ago

I believe this feature is already requested in #11.

e3rd put together a PR for the feature in #12, but no one else has tested it. Do you want to test #12 and see if it works the way you expect it to?

pymen commented 6 years ago

yes, i would like to test it. Should i make a build from master branch?

Rublis commented 6 years ago

I use this type of workflow confusing. I know what I need to run/focus, so I'm using jumpapp to get to that app. From Your perspective, You would like to use jumpapp for reaching "PREVIOUS" app. That "PREVIOUS" app isn't deterministic, because, it changes everytime You use jumpapp. So You need to "reserve your brain RAM to remember which was "PREVIOUS" application. Also I'm using multiple instances from one application, which mean that such flag would require different keybinding or else I would loose ability to use it for switching same application instances.

Also jumpapp originates from concept "run or raise" not "run or raise or minimize"

Anycase, I would like to avoid implementing anything related to this in jumpapp.

BUT if You need such functionality, than I would recommend thing which was mentioned by @e3rd . Assign xdotool getactivewindow windowminimize to "Super+Down", and You will have one universal keybinding for minimizing focused application.

mbelgin commented 5 years ago

+1 for this feature, which is how I assumed jumpapp would work to start with. It's great to have a notes application (e.g. simplenote) show up and disappear using the same keystroke when you need to quickly check the nodes and get back (e.g. while following instructions).

Rublis commented 5 years ago

+1 for this feature, which is how I assumed jumpapp would work to start with. It's great to have a notes application (e.g. simplenote) show up and disappear using the same keystroke when you need to quickly check the nodes and get back (e.g. while following instructions).

Yeah, but how You can handle switching to multiple windows. For example, currently if You have two chrome windows, than by pressing "chrome" keystroke it would switch between them. But with suggested feature implementation that would be imposible, because You would simply toggle between one chrome window minimized/unminimized state.

I would consider implementing this, if You could provide details on every scenario how "run-or-raise" should work. Current implementation which I see, is what I mentioned in previous comment, kinda one separate keystroke for minimizing application.

Rublis commented 5 years ago

And I also disagree with "which is how I assumed jumpapp would work to start with.". As I stated before, run-or-raise states for run or raise, not run or raise or minimize. So from run or raise workflow, You scenario would go like this:

  1. You work in some application (You switched to that application with assigned keystroke)
  2. You jumapp to notes with notes keystroke
  3. You get back to previous application with that application keystroke (first step)
  4. And it continues like that.
BrendanJMurphy commented 5 years ago

Why not just if there is only one window of that type up, minimize it instead of doing nothing (because there's nothing to cycle) @Rublis . I am searching for a guake replacement because they've regressed in several areas and just want a single key (F4) to bring me a terminal then send it away, this terminal should have simple tabbing (so not tilix)).

Sometimes to think I just want my terminal to appear/disappear I don't think this is such a crazy idea or contrary to what you're saying. I don't want any other buttons doing anything else, just a on/off for a persistent terminal.

And again, sure, if there's multiple terminals up, switch between them. But right now jumpapp does nothing if there's only one and it currently has focus. Seems like a wonderful niche to fill

matklad commented 5 years ago

@BrendanJMurphy -m is being added in #41. I use it with kitty for the terminal, 1, 2.