from
keenerd <keenerd@gmail.com>
ws_next
.It Cm M- Ns Aq Cm Left
ws_prev
ws_next
.It Cm M- Ns Aq Cm Left
ws_prev
.It Cm M-S- Ns Aq Cm Right
screen_next
.It Cm M-S- Ns Aq Cm Left
.It Cm M-S- Ns Aq Cm Right
screen_next
.It Cm M-S- Ns Aq Cm Left
Switch to next workspace with a window in it
.It Cm ws_prev
Switch to previous workspace with a window in it
Switch to next workspace with a window in it
.It Cm ws_prev
Switch to previous workspace with a window in it
+.It Cm ws_prior
+Switch to last visited workspace
.It Cm screen_next
Move pointer to next region
.It Cm screen_prev
.It Cm screen_next
Move pointer to next region
.It Cm screen_prev
TAILQ_ENTRY(swm_region) entry;
struct swm_geometry g;
struct workspace *ws; /* current workspace on this region */
TAILQ_ENTRY(swm_region) entry;
struct swm_geometry g;
struct workspace *ws; /* current workspace on this region */
+ struct workspace *ws_prior; /* prior workspace on this region */
struct swm_screen *s; /* screen idx */
Window bar_window;
};
struct swm_screen *s; /* screen idx */
Window bar_window;
};
old_ws->r = NULL;
unmap_old = 1;
} else {
old_ws->r = NULL;
unmap_old = 1;
} else {
+ other_r->ws_prior = new_ws;
other_r->ws = old_ws;
old_ws->r = other_r;
}
other_r->ws = old_ws;
old_ws->r = other_r;
}
+ this_r->ws_prior = old_ws;
this_r->ws = new_ws;
new_ws->r = this_r;
this_r->ws = new_ws;
new_ws->r = this_r;
+priorws(struct swm_region *r, union arg *args)
+{
+ union arg a;
+ struct swm_screen *s = r->s;
+
+ DNPRINTF(SWM_D_WS, "priorws id %d "
+ "in screen[%d]:%dx%d+%d+%d ws %d\n", args->id,
+ r->s->idx, WIDTH(r), HEIGHT(r), X(r), Y(r), r->ws->idx);
+
+ if (r->ws_prior == NULL)
+ return;
+
+ a.id = r->ws_prior->idx;
+ switchws(r, &a);
+}
+
+void
cyclescr(struct swm_region *r, union arg *args)
{
struct swm_region *rr = NULL;
cyclescr(struct swm_region *r, union arg *args)
{
struct swm_region *rr = NULL;
kf_ws_10,
kf_ws_next,
kf_ws_prev,
kf_ws_10,
kf_ws_next,
kf_ws_prev,
kf_screen_next,
kf_screen_prev,
kf_mvws_1,
kf_screen_next,
kf_screen_prev,
kf_mvws_1,
{ "ws_10", switchws, {.id = 9} },
{ "ws_next", cyclews, {.id = SWM_ARG_ID_CYCLEWS_UP} },
{ "ws_prev", cyclews, {.id = SWM_ARG_ID_CYCLEWS_DOWN} },
{ "ws_10", switchws, {.id = 9} },
{ "ws_next", cyclews, {.id = SWM_ARG_ID_CYCLEWS_UP} },
{ "ws_prev", cyclews, {.id = SWM_ARG_ID_CYCLEWS_DOWN} },
+ { "ws_prior", priorws, {0} },
{ "screen_next", cyclescr, {.id = SWM_ARG_ID_CYCLESC_UP} },
{ "screen_prev", cyclescr, {.id = SWM_ARG_ID_CYCLESC_DOWN} },
{ "mvws_1", send_to_ws, {.id = 0} },
{ "screen_next", cyclescr, {.id = SWM_ARG_ID_CYCLESC_UP} },
{ "screen_prev", cyclescr, {.id = SWM_ARG_ID_CYCLESC_DOWN} },
{ "mvws_1", send_to_ws, {.id = 0} },
setkeybinding(MODKEY, XK_0, kf_ws_10, NULL);
setkeybinding(MODKEY, XK_Right, kf_ws_next, NULL);
setkeybinding(MODKEY, XK_Left, kf_ws_prev, NULL);
setkeybinding(MODKEY, XK_0, kf_ws_10, NULL);
setkeybinding(MODKEY, XK_Right, kf_ws_next, NULL);
setkeybinding(MODKEY, XK_Left, kf_ws_prev, NULL);
+ setkeybinding(MODKEY, XK_a, kf_ws_prior, NULL);
setkeybinding(MODKEY|ShiftMask, XK_Right, kf_screen_next, NULL);
setkeybinding(MODKEY|ShiftMask, XK_Left, kf_screen_prev, NULL);
setkeybinding(MODKEY|ShiftMask, XK_1, kf_mvws_1, NULL);
setkeybinding(MODKEY|ShiftMask, XK_Right, kf_screen_next, NULL);
setkeybinding(MODKEY|ShiftMask, XK_Left, kf_screen_prev, NULL);
setkeybinding(MODKEY|ShiftMask, XK_1, kf_mvws_1, NULL);
HEIGHT(r) = h;
r->s = s;
r->ws = ws;
HEIGHT(r) = h;
r->s = s;
r->ws = ws;
ws->r = r;
TAILQ_INSERT_TAIL(&s->rl, r, entry);
}
ws->r = r;
TAILQ_INSERT_TAIL(&s->rl, r, entry);
}