summary refs log tree commit diff
path: root/ui.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-04-03 17:10:52 -0400
committerJune McEnroe <june@causal.agency>2020-04-03 17:10:52 -0400
commit75a6aa9258270169f43f56e063f1bfb57eebe56b (patch)
tree7db2ed9792116bf47541a02829d00da2adccb2ef /ui.c
parentOnly treat /open param as count if single digit (diff)
downloadcatgirl-75a6aa9258270169f43f56e063f1bfb57eebe56b.tar.gz
catgirl-75a6aa9258270169f43f56e063f1bfb57eebe56b.zip
Use gnu-case-range and gnu-conditional-omitted-operand extensions
I'm sad to do this but I just can't stand writing (foo ? foo : bar)
anymore.
Diffstat (limited to '')
-rw-r--r--ui.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/ui.c b/ui.c
index 6d9dddc..2a26ac3 100644
--- a/ui.c
+++ b/ui.c
@@ -891,6 +891,7 @@ static void keyCode(int code) {
 		break; case KeyMetaMinus: window->ignore ^= true; reflow(window);
 		break; case KeyMetaSlash: windowShow(windows.swap);
 
+		break; case KeyMeta0 ... KeyMeta9: uiShowNum(code - KeyMeta0);
 		break; case KeyMetaA: showAuto();
 		break; case KeyMetaB: edit(id, EditPrevWord, 0);
 		break; case KeyMetaD: edit(id, EditDeleteNextWord, 0);
@@ -911,12 +912,6 @@ static void keyCode(int code) {
 		break; case KEY_PPAGE: windowScroll(window, +(PAGE_LINES - 2));
 		break; case KEY_RIGHT: edit(id, EditNext, 0);
 		break; case KEY_UP: windowScroll(window, +1);
-		
-		break; default: {
-			if (code >= KeyMeta0 && code <= KeyMeta9) {
-				uiShowNum(code - KeyMeta0);
-			}
-		}
 	}
 }
 
f5489b76985e4f873fee1ee098c&follow=1'>Fully configure and rebind cwmJune McEnroe This is sort of a mix of trying to emulate macOS somewhat for my muscle memory and just rebinding some of the cwm defaults to use 4- rather than M-. 2021-02-07Add BintiJune McEnroe 2021-02-07Finish configuring xtermJune McEnroe 2021-02-06Enable tapping, reverse scroll, set scaling in wsconsctlJune McEnroe 2021-02-06Set root window to black on purple snowJune McEnroe 2021-02-06Add xmodmap configurationJune McEnroe 2021-02-06Add initial OpenBSD X configurationJune McEnroe cwm still needs a lot more rebinding, and I need to actually look at its other options. xterm definitely still needs some configuration, but I at least managed to get it to use a decent looking font. Very happy that OpenBSD includes Luxi Mono, which is what my usual font, Go Mono, is based on anyway. Still missing is xmodmap and such. 2021-02-06Add xterm output to schemeJune McEnroe