aboutsummaryrefslogtreecommitdiff
path: root/monsterwm.c
diff options
context:
space:
mode:
authorIvan Kanakarakis <ivan.kanak@gmail.com>2012-03-01 19:41:50 +0200
committerIvan Kanakarakis <ivan.kanak@gmail.com>2012-12-16 02:11:13 +0200
commit2cfded4c873ba0ec4401c9c155505c16931f5f06 (patch)
tree75501e44daea390cd1b70ea2dc72eb4139175d8d /monsterwm.c
parent202edd8b7056cdeca02dbef0c165ce1986f7844e (diff)
rotate desktops with shortcuts
Diffstat (limited to 'monsterwm.c')
-rw-r--r--monsterwm.c8
1 files changed, 8 insertions, 0 deletions
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);
@@ -941,6 +942,13 @@ void removeclient(Client *c, Desktop *d) {
}
/**
+ * 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
*/