diff options
| author | Akshay Nair <phenax5@gmail.com> | 2020-06-17 16:24:49 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2020-06-17 16:30:21 +0530 |
| commit | 31302d4def015c675a1806e3f6b91f00122afe10 (patch) | |
| tree | 41331f27ad5030f54343b62d8074eebe045f35c5 | |
| parent | b178d1915d2578609be57a07ca32b36a26bac93b (diff) | |
| download | shotkey-31302d4def015c675a1806e3f6b91f00122afe10.tar.gz shotkey-31302d4def015c675a1806e3f6b91f00122afe10.zip | |
cleanup
Diffstat (limited to '')
| -rw-r--r-- | config.mk | 2 | ||||
| -rw-r--r-- | hotkeythingy.c | 8 |
2 files changed, 6 insertions, 4 deletions
@@ -1,4 +1,4 @@ -# dwm version +# hotkeythingy version VERSION = 0.1 # Customize below to fit your system diff --git a/hotkeythingy.c b/hotkeythingy.c index f546231..93c21c2 100644 --- a/hotkeythingy.c +++ b/hotkeythingy.c @@ -46,9 +46,10 @@ void unbind_key(Display *dpy, Window win, unsigned int mod, KeySym key) { } int error_handler(Display *disp, XErrorEvent *xe) { - if (xe->error_code == BadAccess) { - printf("hotkeythingy: [BadAccess] Cant grab key binding. Already grabbed\n"); - return 0; + switch(xe->error_code) { + case BadAccess: + printf("hotkeythingy: [BadAccess] Cant grab key binding. Already grabbed\n"); + return 0; } printf("hotkeythingy: Something went wrong\n"); @@ -67,6 +68,7 @@ void spawn(char** command) { char* get_mode_label() { if (current_mode == NormalMode) return ""; + if (LENGTH(mode_properties) <= current_mode) return ""; ModeProperties props = mode_properties[current_mode]; return props.label; } |
