From 2cfded4c873ba0ec4401c9c155505c16931f5f06 Mon Sep 17 00:00:00 2001 From: Ivan Kanakarakis Date: Thu, 1 Mar 2012 19:41:50 +0200 Subject: rotate desktops with shortcuts --- monsterwm.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'monsterwm.c') diff --git a/monsterwm.c b/monsterwm.c index 52cbd61..78cb34a 100644 --- a/monsterwm.c +++ b/monsterwm.c @@ -90,6 +90,7 @@ static void mousemotion(const Arg *arg); static void next_win(); static void prev_win(); static void quit(const Arg *arg); +static void rotate(const Arg *arg); static void spawn(const Arg *arg); static void swap_master(); static void switch_mode(const Arg *arg); @@ -940,6 +941,13 @@ void removeclient(Client *c, Desktop *d) { desktopinfo(); } +/** + * jump and focus the next or previous desktop + */ +void rotate(const Arg *arg) { + change_desktop(&(Arg){.i = (DESKTOPS + currdeskidx + arg->i) % DESKTOPS}); +} + /** * main event loop * on receival of an event call the appropriate handler -- cgit v1.3.1