diff --git a/config.h b/config.h index d20e85a..fd4dba1 100644 --- a/config.h +++ b/config.h @@ -150,6 +150,8 @@ static const Key keys[] = { { MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_Down, movestack, {.i = +1} }, { MODKEY, XKB_KEY_comma, focusmon, {.i = WLR_DIRECTION_LEFT} }, { MODKEY, XKB_KEY_period, focusmon, {.i = WLR_DIRECTION_RIGHT} }, + { MODKEY, XKB_KEY_o, focusmon, {.i = WLR_DIRECTION_RIGHT} }, + { MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_O, tagcyclemon, {.i = WLR_DIRECTION_RIGHT} }, { MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_Q, quit, {0} }, /* Ctrl-Alt-Backspace and Ctrl-Alt-Fx used to be handled by X server */ diff --git a/dwl.c b/dwl.c index 0dd664b..51df7d7 100644 --- a/dwl.c +++ b/dwl.c @@ -335,6 +335,7 @@ static void shiftview(const Arg *arg); static void spawn(const Arg *arg); static void startdrag(struct wl_listener *listener, void *data); static void tag(const Arg *arg); +static void tagcyclemon(const Arg *arg); static void tagmon(const Arg *arg); static void tile(Monitor *m); static void togglefloating(const Arg *arg); @@ -2712,6 +2713,16 @@ tag(const Arg *arg) printstatus(); } +void +tagcyclemon(const Arg *arg) +{ + Client *sel = focustop(selmon); + if (!sel) + return; + setmon(sel, dirtomon(arg->i), 0); + focusmon(arg); +} + void tagmon(const Arg *arg) {