From 3161db573424a554b536aaa492397341b84683ce Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Wed, 23 Dec 2020 01:12:51 -0800 Subject: *: introduce and use direction parameter This adds a direction parameter to vwm_desktop_next{_mru}() and vwm_win_focus_next(), deprecating _prev() variants in favor of a vwm_direction_t parameter. XK_r has been wired up as a modifier for reversing the direction of actions like Mod1+Tab (window next MRU cycle) and Mod1+Space (desktop next MRU cycle). So now if you overshoot, simply hold the "r" key and repeat the operation to go back, much like how Shift is often used for reversing alt+tab in i.e. Windows. --- src/desktop.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/desktop.h') diff --git a/src/desktop.h b/src/desktop.h index cc6df38..c231ca5 100644 --- a/src/desktop.h +++ b/src/desktop.h @@ -1,6 +1,7 @@ #ifndef _DESKTOP_H #define _DESKTOP_H +#include "direction.h" #include "list.h" #include "window.h" @@ -18,8 +19,7 @@ void vwm_desktop_mru(vwm_t *vwm, vwm_desktop_t *desktop); int vwm_desktop_focus(vwm_t *vwm, vwm_desktop_t *desktop); vwm_desktop_t * vwm_desktop_create(vwm_t *vwm, char *name); void vwm_desktop_destroy(vwm_t *vwm, vwm_desktop_t *desktop); -vwm_desktop_t * vwm_desktop_next_mru(vwm_t *vwm, vwm_desktop_t *desktop); -vwm_desktop_t * vwm_desktop_next(vwm_t *vwm, vwm_desktop_t *desktop); -vwm_desktop_t * vwm_desktop_prev(vwm_t *vwm, vwm_desktop_t *desktop); +vwm_desktop_t * vwm_desktop_next_mru(vwm_t *vwm, vwm_desktop_t *desktop, vwm_direction_t direction); +vwm_desktop_t * vwm_desktop_next(vwm_t *vwm, vwm_desktop_t *desktop, vwm_direction_t direction); #endif -- cgit v1.2.3