-
Notifications
You must be signed in to change notification settings - Fork 139
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
Break colon block chain via command #169
Comments
When you launch sxhkd, you can specify a chain break key with the '-a' flag. For example, sxhkd -a space allows you to use the space bar to end a chain instead of escape. |
Thanks, @sawsuh. I've read about this option, but that is not exactly what I mean: I want to do some stuff in the colon mode via keypresses (navigate through windows in this case), and some other thing + end colon mode (e.g. opening a terminal and be in normal mode again) with an only key press. I want to skip pressing ESC in this last case, but only here. I means, just, like sending a vim copy command (y) after having selected a block of text with "v". I know there isn't something like that out of the box for now in sxhkd, but I would like to do that by any indirect, functional way, (e.g. sending ESC automatically before $TERMINAL with a pre xdotool command). I'm interested in any solution like this, because the necessary pre-ESC just pisses me off! |
Maybe you can emulate modes using multiple sxhkd instances. And toggle which one is active by sending the |
Thanks by your attention, @Lythenas! I must say that I've found the perfect solution when reading @baskerville's code: sending sxhkd SIGALRM tells it to abort its chord chain. Just made a pull request (#170) to the base project, so that people can know it by reading sxhkd's manual. So, what I do now on my configs, in case anyone is looking for that:
And I'm done. Thanks to all of you! |
EDIT okay I found another solution:
Original comment:
I thought this could be an answer to this bug: #83 (comment) tried it, and it worked. Then I realized it only worked on one command. Meaning:
this, and only this case, works, but:
Here it doesn't work, it keeps me in the chain. If I press Perhaps @Lythenas solution is the best, although I still don't understand @baskerville answer here:
In my opinion it shouldn't know, it should exit a chain when you tell it to via a command made to exit the chain. |
It's also important to know that the signal is being sent after your "tdrop" command exits. Is it a dropdown terminal? Because if it is, the command is probably not exiting until the dropdown terminal is closed, and therefore (as it never happens) no signal will be sent to sxhkd. Another good solution would be using "&" instead of ";":
So that "tdrop" runs in background and ALRM is sent to the sxhkd. This tip is useful for any command that isn't run instantaneously. |
You're right, I didn't think of that. Now I'm sad cause I felt so clever with my |
Thank you for raising awareness of chords. I've been using sxhkd for a long time now and I didn't know it had this functionality for mimicking i3 modes. Here's a completely WM agnostic way of resizing windows (relies on wmutils)
|
I`m trying to do this: focus at more than one pane with
And it looks like VIM's visual mode in my head, when I walk through my text (be them nodes). The only thing I dislike my setup is having to Escape in order to end the "visual mode" chain. I would like to send a command like
alt+v; alt+k; alt+k; alt+Return
So that it would: enter visual mode (alt+v), include above node in selection (alt+k), do that again (alt+k), and send the command to open a terminal as big as my current focus/selection (alt+Return).
I tried to xdotool the solution
But I read it's not possible to do that. Is there any way I could tell sxhkd to escape the block chain and also open the terminal without me typing Escape? (signalling or sending a proper command would be awesome, but I'm ready for the workarounds!)
I appreciate your attention!
PS.: I'm just obcessed with this software :D
The text was updated successfully, but these errors were encountered: