-
Notifications
You must be signed in to change notification settings - Fork 99
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
Slash Commands for keybindings #441
Conversation
@@ -3560,6 +3563,45 @@ func SessionSetCommand(ctx context.Context, pk *scpacket.FeCommandPacketType) (s | |||
return update, nil | |||
} | |||
|
|||
func SleepCommand(ctx context.Context, pk *scpacket.FeCommandPacketType) (scbus.UpdatePacket, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure about this
For my slash command "scripts" it waits until the http call returns before running the next one, there is no update or anything, so for now at least, sleep has to lock the current process. I think this isn't too big a deal because we are already running inside of a goroutine? but either way I didn't end up using this so I can delete it if it seems sketchy
Added a max value of 1000 ms
assets/default-keybindings.json
Outdated
}, | ||
{ | ||
"command": "app:newTab", | ||
"keys": ["Cmd:t"] | ||
}, | ||
{ | ||
"command": "app:focusCmdInput", | ||
"keys": ["Cmd:i"] | ||
"keys": ["Cmd:i"], | ||
"commandStr":"/mainview session,/screen:set focus=cmd,/screen:set focus=input" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
using ,
separator, whitespace or \n
is allowed and ignored
Should I remove the dev tools accelerator? |
First draft, I put in the keybindings that work out of the box with slash commands, and I am working on the others
Theoretically, multiple commands should work out of the box with this system, although I think the \n syntax might look a little wierd, maybe , separator is better
I couldn't get remote:show or client:show to work correctly. Maybe I'm using them incorrectly? It seems like remote:show didn't do anything when typed into the 0.7.0 prod release either