Skip to content

Commit e328312

Browse files
committed
make display smaller
1 parent 364619a commit e328312

File tree

2 files changed

+10
-12
lines changed

2 files changed

+10
-12
lines changed

potemkeys/KeyEventUtils.py

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ def is_modifier_key(k: Key):
1818
return True
1919

2020

21-
22-
2321
class KeyEvent:
2422
def __init__(self) -> None:
2523
raise Exception("lol todo :p")
@@ -29,7 +27,8 @@ def prompt_choose_keymap(state) -> None:
2927
"""Returns true if a user picks a keymap successfully."""
3028
print("Keymap is not chosen yet! Asking them to choose...")
3129

32-
state.add_message("[{:^10s}] Choose a keymap:".format(str(state.get_key())))
30+
state.add_message(
31+
"[{:^10s}] Choose a keymap:".format(str(state.get_key())))
3332
all_keymap_names = list(state.get_all_keymaps().keys())
3433

3534
i = 0
@@ -51,11 +50,6 @@ def prompt_choose_keymap(state) -> None:
5150

5251
mi = 4
5352

54-
state.add_message("Current keymap: {}".format(
55-
chosen_keymap_name
56-
), mi)
57-
mi += 1
58-
5953
state.add_message("Valid keys: {}".format(
6054
','.join(state.current_keymap_mapped_keys())
6155
), mi)
@@ -71,6 +65,11 @@ def prompt_choose_keymap(state) -> None:
7165
), mi)
7266
mi += 1
7367

68+
state.add_message("Current keymap: {}".format(
69+
chosen_keymap_name
70+
), mi)
71+
mi += 1
72+
7473
# clear the key log, they've chosen
7574
state.clear_key_log()
7675

@@ -211,13 +210,12 @@ def process_key_combos(state: GlobalState):
211210
pass
212211

213212

214-
215213
def should_quit(key, state):
216214
try:
217-
if key == Key.__getitem__(state.quit_key): # TODO is this a security risk? __getitem__ with user input?
215+
# TODO is this a security risk? __getitem__ with user input?
216+
if key == Key.__getitem__(state.quit_key):
218217
return True
219218
except KeyError: # Means no key called state.quit_key exists...
220219
print("WARN: quit_key '{}' is invalid".format(state.quit_key))
221220

222221
return False
223-

potemkeys/potemkeysoptions.jsonc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
]
2020
],
2121
"font_type": "Consolas",
22-
"font_size": 32,
22+
"font_size": 24,
2323
"font_margin": 4,
2424
"window_always_on_top": true,
2525
"icon_path": "pelleds.jpg",

0 commit comments

Comments
 (0)