mkropat/jumpapp

Suggestion - cycle between list of programs

ceuk opened this issue · 2 comments

ceuk commented

Hi, first of all thanks for such an amazing project. It's so useful.

Just an idea. One of my most common workflows - and I imagine a lot of other peoples - is to switch between two programs. In my case, terminal and web browser.

I'd love to be to list these two programs and be able to always switch to the inactive one. Appreciate this might get messy with multiple windows open for the same program, but as a niche use-case it would allow me to have a single "quick switch" without chewing up two "premuim" key bindings (e.g. shift+space)

Thanks for the feedback. That's a cool idea.

Looking at the code, you could probably update the pid search to look for multiple programs. Maybe extend the -i option to take a comma separated list of program ids.

I probably won't write the functionality myself, but I think it would be very doable for someone to take it on. If the PR comes with adequate test coverage I see no reason why I wouldn't merge it.

Alternative Workaround

Just brainstorming here, but if you didn't want to go through the trouble of updating the jumpapp code and (optionally) getting it merged, you might be able to write a small wrapper script for your personal use. It could check what the program is associated with the active window and then call jumpapp program-2 if (program-1 is active), or jumpapp program-1 otherwise. Something like that at least might work.

ceuk commented

The latter suggestion seems like a great idea. Will definitely give that a go. May go down the PR route if the issue gets a few 👍 reactions. Will keep an eye out. Thanks for the reply