-
Notifications
You must be signed in to change notification settings - Fork 219
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
vim-like modal keybindings workflow #152
Comments
If you stay in a mode only for a short time, then a simple notification using AppleScript is probably enough? If you want to know your current mode anytime, a simple(?) method would be to write your current mode to a file [1] each time you enter/exit one. Then, you can assign a key for calling a notification with that file's content, i.e. the current mode. [1] This can be avoided if skhd supports setting/getting a variable. |
Would not that be a very obtrusive approach to any workflow?
I am looking for something like this (ideally): ref |
I thought you only want to know the name of current mode you are in. That's why I suggested notification. Many do the same thing with Karabiner-Elements too!* But, if you want to show next possible commands, then this indeed will be very difficult and ugly using alerts. * You don't need to write to a file, however, as KE has conditionals. Edit: About Hammerspoon: How slow was it? If it's really slow, do open an issue in Hammerspoon repo. |
I use spacebar https://github.com/cmacrae/spacebar, and have these lines in my skhdrc, which change the background color of spacebar when I change modes:
There isn't any lag. |
@dsanson I was staying away from spacebar - it has some bugs. But, I liked your idea and started using it and implemented the same workflow. However, I still need to display cheat-sheet when I enter a particular mode - would be very handy. Preferably, I would want it to set an overlay over the whole screen and display available commands starting with that mode/chords. That would be a perfect setup :) |
Not quite what you want, but this is a decent gui fuzzy finder for OSX: https://github.com/chipsenkbeil/choose Not too hard to feed it a list of all your shortcuts with descriptions. That gives you a kind of cheatsheet, and it can be easily invoked from skhd. (While you are at it, might as well write a script that parses your selected command, and uses |
@dsanson - ty. This is perfect - and exactly the last piece ( |
I'll add that I just made a GUI like what was mentioned here since I wanted it too: https://github.com/glingy/skhdgui. It displays a window in the upper right corner when you are in a mode which lists possible shortcuts from that mode. |
You can also take a look at sketchybar. specifically this post: FelixKratz/SketchyBar#12 |
Hello,
I wanted to share my
skhd
keybindings that I use with (SIP disabled)yabai
to manage windows, launch apps, etc.I am using
skhd
as a central place for triggering shortcuts.https://github.com/nikhgupta/dotfiles/blob/osx/user/.config/skhd/skhdrc#L74-L128
^^ can be useful for VIM users. I can trigger my vim bindings using
SPACE
as leader and OSX bindings usingCAPS LOCK
as leader key.However, I have one simple issue - when space does not have any windows, I can not display borders to know which modal state I am in.
hammerspoon
but it had an issue that resulted in slowyabai
commands.skhd
, and terminal commands alone.If anyone has any ideas for displaying modal state or better yet, display cheat sheet for possible keybindings, please advise.
The text was updated successfully, but these errors were encountered: