Skip to content

Commit

Permalink
[tui] Updated key config
Browse files Browse the repository at this point in the history
- Change: Prepended the symbols of all uppercase keys with "\u21e7" (Shift / Up Arrow character).
- Change: Upgraded vim-style key config to version 0.2.
  • Loading branch information
AnonymouX47 committed Mar 10, 2022
1 parent d40eb94 commit f6c0555
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
13 changes: 9 additions & 4 deletions term_img/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,12 @@ def update_config(config: Dict[str, Any], old_version: str):
# {<version>: [(<location>, <old-value>, <new-value>), ...], ...}
changes = {
"0.1": [],
"0.2": [("['frame duration']", 0.1, None)],
"0.2": [
("['frame duration']", 0.1, None),
("['keys']['image']['Force Render'][1]", "F", "\u21e7F"),
("['keys']['full-image']['Force Render'][1]", "F", "\u21e7F"),
("['keys']['full-grid-image']['Force Render'][1]", "F", "\u21e7F"),
],
}

versions = tuple(changes)
Expand Down Expand Up @@ -371,7 +376,7 @@ def update_context_nav_keys(
"Next": ["right", "", "Move to the next image"],
"Force Render": [
"F",
"F",
"\u21e7F",
"Force an image, with more pixels than the set maximum, to be displayed",
],
"Maximize": ["f", "f", "Maximize the current image"],
Expand All @@ -398,7 +403,7 @@ def update_context_nav_keys(
"Next": ["right", "", "Move to the next image"],
"Force Render": [
"F",
"F",
"\u21e7F",
"Force an image, with more pixels than the set maximum, to be displayed",
],
"Delete": ["d", "d", "Delete current image"],
Expand All @@ -407,7 +412,7 @@ def update_context_nav_keys(
"Back": ["esc", "\u238b", "Back to grid view"],
"Force Render": [
"F",
"F",
"\u21e7F",
"Force an image, with more pixels than the set maximum, to be displayed",
],
},
Expand Down
11 changes: 5 additions & 6 deletions vim-style_config.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
"version": "0.1",
"version": "0.2",
"cell width": 30,
"font ratio": 0.5,
"frame duration": 0.1,
"max pixels": 4194304,
"keys": {
"navigation": {
Expand Down Expand Up @@ -36,7 +35,7 @@
],
"End": [
"G",
"G"
"\u21e7G"
]
},
"global": {
Expand Down Expand Up @@ -78,7 +77,7 @@
"image": {
"Force Render": [
"F",
"F"
"\u21e7F"
],
"Maximize": [
"f",
Expand Down Expand Up @@ -118,7 +117,7 @@
],
"Force Render": [
"F",
"F"
"\u21e7F"
],
"Delete": [
"x",
Expand All @@ -132,7 +131,7 @@
],
"Force Render": [
"F",
"F"
"\u21e7F"
]
},
"confirmation": {
Expand Down

0 comments on commit f6c0555

Please sign in to comment.