taskwarrior-tui
taskwarrior-tui copied to clipboard
Context switcher: numeric hotkeys
Thanks for implementing the "select on move" feature in context switcher.
I had another idea I want to suggest: the context switcher could display numeric indices as the first column.
For users which switch contexts very often (like me) it would be handy just to type c,4,ENTER
so activate the new context.
But, only a suggestion; it's great anyway :-)
I like the idea of a faster context switcher. I'll have to think about this a little more.
Btw, the number keys are for running shortcuts. So you could bind 4
in the task report view to run task context fourth_context
. See shortcuts documentation over here: https://kdheepak.com/taskwarrior-tui/configuration/advanced/
I tried to implement this and it's really laggy. When you hit j
or k
, the interface lags for half a second while the subprocess runs to switch the context. I think multiple shortcuts to switch preferred contexts is the way to go for now. Maybe once I refactor, I'll be able to look into it again.
No problem. I apreciate your efforts!
I like the idea of a faster context switcher. I'll have to think about this a little more.
Btw, the number keys are for running shortcuts. So you could bind
4
in the task report view to runtask context fourth_context
. See shortcuts documentation over here: https://kdheepak.com/taskwarrior-tui/configuration/advanced/
I have tried this, and I can see the command being executed, but the interface is not "refreshed" or changed.
This goes for both "task context x" and doing the same via a script.
I am using 0.18.4, taskwarrior 2.6.1 on Linux Mint
Can you try hitting r to do a manual refresh? If that works, then I know what the problem is and I’ll fix it. If that didn’t work, then the shortcut is failing for some reason.
Yes, I tried 'r', but it doesn't refresh. When I exit tw-tui, I can anly see messages stating that the context change was succesful. I did make a screenshot showing the context menu after using the shortcut, and that display is not 100% either
.
This screenshot is taken when having switched from "thuis" context to "werk".
Hmm. Does changes using the context menu work?
Using the context menu works as expected.
Thanks for reporting! You are right, it doesn't change with shortcuts. I've fixed it, and this fix should be available in https://github.com/kdheepak/taskwarrior-tui/releases/tag/v0.18.5
Very fast work!. I have installed the new version, and it works as expected now!