aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkshay Nair <phenax5@gmail.com>2020-06-17 21:51:22 +0530
committerAkshay Nair <phenax5@gmail.com>2020-06-17 21:51:22 +0530
commitf3a7e9e8653503e996aa1ba17be55d65db424c30 (patch)
treeda32d654c8809d902308b68c882cee232dfc4c3e
parent361ae84724367b1e48d8f66bec97f6b0d7a252c0 (diff)
parent98e5ca889bb8ecded7438d9ead882bdbe7a253a7 (diff)
downloadshotkey-f3a7e9e8653503e996aa1ba17be55d65db424c30.tar.gz
shotkey-f3a7e9e8653503e996aa1ba17be55d65db424c30.zip
Merge branch 'master' into personal
-rw-r--r--TODO.md2
-rw-r--r--hotkeythingy.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/TODO.md b/TODO.md
index 1aca6a3..ad58068 100644
--- a/TODO.md
+++ b/TODO.md
@@ -1,5 +1,5 @@
# TODO
- - [ ] Some magic helpers for clean config
+ - [ ] Grab entire keyboard for modes
- [X] Add modes
- [X] Persistent mode
- [X] Get current mode
diff --git a/hotkeythingy.c b/hotkeythingy.c
index 9f02e45..827bc12 100644
--- a/hotkeythingy.c
+++ b/hotkeythingy.c
@@ -97,7 +97,7 @@ void run(Display* dpy, Window win, Command command) {
current_mode = command.mode;
is_mode_persistent = command.persist;
- if (modes[current_mode] && current_mode < LENGTH(modes)) {
+ if (current_mode < LENGTH(modes) && modes[current_mode]) {
for (i = 0; i < LENGTH(modes[current_mode]); i++) {
mode_key = modes[current_mode][i];
bind_key(dpy, win, mode_key.mod, mode_key.key);