Feature request: special launch mode returning automatically to top mode
Closed this issue · 6 comments
Hi,
I'm thinking on a very efficient way for launching my everyday's apps.
For now i've got a mode "launch" with some keys for launchig app like "f" for firefox. But after launching an app, i need to type a key for returning to top mode.
Is there a way to add an option for specific mode like this:
- enter launch mode with a keybinding (as it is actually)
- type a key for launching the app and return to top mode
This remove just one action but can be very fast :)
Something like && in bash in the config file or an option tosetmodedefinemode.
If you are only launching a single app before returning to top mode... isn't that basically already the behavior with eg.:
bind w exec firefox
You're right.
But that can be handy to have this with other mode. It's possible with river for example and that's great.
Maybe a little hacky but this seems to be working using wtype to send a keystroke (t in this config) to return to top mode then launch the command:
definemode launch
bind A setmode launch
definekey launch f exec wtype t && firefox
definekey launch t setmode top
Hi,
I'm sorry, I'm somewhat confused about what you are asking. Do I
understand correctly that you would like to have the following workflow?
- Press keybinding (e.g.
C-a
) to enterapps
mode - Type
f
to launch firefox
If I understand correctly, you would like to be back intop
mode after
these operations, right? If so, can you see if the following keybindings
work for you, and if not, what you would like to have changed?
definemode apps
definekey top C-a mode apps
definekey apps f exec firefox
Cheers,
project-repo
PS: sorry for the long response time!
That works for me if that's what bda65hp is asking for, which I think it is. Apologies for my hacky wtype
answer above, I missed this in the man page:
mode <mode> Enter mode "<mode>" - Returns to default mode, after a command is executed.
Hi,
I've missed "mode" and used "setmode".
With mode that is exactly what i want.
Sorry for the misunderstanding (and not fully RTFM) ;).
Thanks very much