improvement: add q action

This commit is contained in:
Ämin Baumeler 2025-06-15 21:57:03 +02:00
parent bcbd2a9077
commit ee02a7647b
2 changed files with 5 additions and 3 deletions

View File

@ -91,6 +91,7 @@ Here is the list of all available keybindings:
| Key | Action | | Key | Action |
| --- | ------ | | --- | ------ |
| `q` | quit |
| `enter` | open day | | `enter` | open day |
| `j` | down | | `j` | down |
| `k` | up | | `k` | up |

View File

@ -1142,6 +1142,7 @@ while true; do
--preview="$0 --preview-week {}" \ --preview="$0 --preview-week {}" \
--bind="load:pos($DISPLAY_POS)" \ --bind="load:pos($DISPLAY_POS)" \
--expect="ctrl-n,ctrl-g,ctrl-t" \ --expect="ctrl-n,ctrl-g,ctrl-t" \
--bind="q:abort" \
--bind="j:down" \ --bind="j:down" \
--bind="k:up" \ --bind="k:up" \
--bind="l:unbind(load)+reload:$0 --reload-week {2} '+1 week'" \ --bind="l:unbind(load)+reload:$0 --reload-week {2} '+1 week'" \
@ -1154,9 +1155,9 @@ while true; do
--bind="alt-h:unbind(load)+reload:$0 --reload-week {2} '-1 year'" \ --bind="alt-h:unbind(load)+reload:$0 --reload-week {2} '-1 year'" \
--bind="ctrl-r:rebind(load)+reload($0 --reload-week today)+show-preview" \ --bind="ctrl-r:rebind(load)+reload($0 --reload-week today)+show-preview" \
--bind="ctrl-s:execute($SYNC_CMD ; printf 'Press <enter> to continue.'; read -r tmp)" \ --bind="ctrl-s:execute($SYNC_CMD ; printf 'Press <enter> to continue.'; read -r tmp)" \
--bind="/:show-input+unbind(j)+unbind(k)+unbind(l)+unbind(h)+unbind(ctrl-l)+unbind(ctrl-h)+unbind(alt-l)+unbind(alt-h)+unbind(load)+hide-preview+reload:$0 --reload-all" \ --bind="/:show-input+unbind(q)+unbind(j)+unbind(k)+unbind(l)+unbind(h)+unbind(ctrl-l)+unbind(ctrl-h)+unbind(alt-l)+unbind(alt-h)+unbind(load)+hide-preview+reload:$0 --reload-all" \
--bind="backward-eof:hide-input+rebind(j)+rebind(k)+rebind(l)+rebind(h)+rebind(ctrl-l)+rebind(ctrl-h)+rebind(alt-l)+rebind(alt-h)+rebind(load)+show-preview+reload:$0 --reload-week today" \ --bind="backward-eof:hide-input+rebind(q)+rebind(j)+rebind(k)+rebind(l)+rebind(h)+rebind(ctrl-l)+rebind(ctrl-h)+rebind(alt-l)+rebind(alt-h)+rebind(load)+show-preview+reload:$0 --reload-week today" \
--bind="esc:clear-query+hide-input+rebind(j)+rebind(k)+rebind(l)+rebind(h)+rebind(ctrl-l)+rebind(ctrl-h)+rebind(alt-l)+rebind(alt-h)+rebind(load)+show-preview+reload:$0 --reload-week today" --bind="esc:clear-query+hide-input+rebind(q)+rebind(j)+rebind(k)+rebind(l)+rebind(h)+rebind(ctrl-l)+rebind(ctrl-h)+rebind(alt-l)+rebind(alt-h)+rebind(load)+show-preview+reload:$0 --reload-week today"
) )
key=$(echo "$selection" | head -1) key=$(echo "$selection" | head -1)