diff --git a/src/client.c b/src/client.c index 9ed33a0..61607d2 100644 --- a/src/client.c +++ b/src/client.c @@ -871,3 +871,48 @@ client_unmap(Client *c) return; } +/** Change client of screen to next screen + * \cmd uicb_t type unused +*/ +void +uicb_client_screen_next(uicb_t cmd) +{ + int os; + + CHECK(sel); + + /* Save old client screen to arrange */ + os = sel->screen; + + /* Set the new client screen */ + sel->screen = (sel->screen + 1 > screen_count() - 1) ? 0 : sel->screen + 1; + + /* Arrange */ + arrange(os, True); + arrange(sel->screen, True); + + return; +} + +/** Change client of screen to prev screen + * \cmd uicb_t type unused +*/ +void +uicb_client_screen_prev(uicb_t cmd) +{ + int os; + + CHECK(sel); + + /* Save old client screen to arrange */ + os = sel->screen; + + /* Set the new client screen */ + sel->screen = (sel->screen - 1 < 0) ? screen_count() - 1 : sel->screen - 1; + + /* Arrange */ + arrange(os, True); + arrange(sel->screen, True); + + return; +} diff --git a/src/config.c b/src/config.c index e1d5cad..6029315 100644 --- a/src/config.c +++ b/src/config.c @@ -44,6 +44,8 @@ conf_init_func_list(void) {"client_kill", uicb_client_kill }, {"client_prev", uicb_client_prev }, {"client_next", uicb_client_next }, + {"client_screen_next", uicb_client_screen_next }, + {"client_screen_prev", uicb_client_screen_prev }, {"toggle_max", uicb_togglemax }, {"layout_next", uicb_layout_next }, {"layout_prev", uicb_layout_prev }, diff --git a/src/wmfs.c b/src/wmfs.c index 05a6e6b..ed302ae 100644 --- a/src/wmfs.c +++ b/src/wmfs.c @@ -112,7 +112,7 @@ quit(void) IFREE(func_list); IFREE(layout_list); - /* Clean conf alloced thing {{{ */ + /* Clean conf alloced thing */ IFREE(menulayout.item); if(conf.menu) @@ -135,7 +135,6 @@ quit(void) IFREE(conf.titlebar.button); IFREE(conf.client.mouse); IFREE(conf.root.mouse); - /* }}} */ XSync(dpy, False); XCloseDisplay(dpy); diff --git a/src/wmfs.h b/src/wmfs.h index ab6a533..c67b5c1 100644 --- a/src/wmfs.h +++ b/src/wmfs.h @@ -55,6 +55,7 @@ #include "config.h" #include "structs.h" +/* Optional dependences */ #ifdef HAVE_XINERAMA #include #endif @@ -166,6 +167,8 @@ void uicb_client_raise(uicb_t); void uicb_client_prev(uicb_t); void uicb_client_next(uicb_t); void uicb_client_kill(uicb_t); +void uicb_client_screen_next(uicb_t cmd); +void uicb_client_screen_prev(uicb_t cmd); /* ewmh.c */ void ewmh_init_hints(void);