Compare commits
No commits in common. "8a560950b579719ca990ddecbadcfac6bd35783d" and "e3011ef8357e66be7ccae7502a12f08607159a2f" have entirely different histories.
8a560950b5
...
e3011ef835
54
aji.c
54
aji.c
@ -1,54 +0,0 @@
|
|||||||
void
|
|
||||||
cyclelayout(const Arg *arg) {
|
|
||||||
Layout *next;
|
|
||||||
for (next = (Layout *)layouts; next != selmon->lt[selmon->sellt]; next++);
|
|
||||||
if ((++next - layouts) >= LENGTH(layouts))
|
|
||||||
next = (Layout *)layouts;
|
|
||||||
setlayout(&(Arg) { .v = next });
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Function to shift the current view to the left/right
|
|
||||||
*
|
|
||||||
* @param: "arg->i" stores the number of tags to shift right (positive value)
|
|
||||||
* or left (negative value)
|
|
||||||
*/
|
|
||||||
|
|
||||||
void
|
|
||||||
shifttag(const Arg *arg) {
|
|
||||||
if(selmon->sel){
|
|
||||||
|
|
||||||
Arg shifted;
|
|
||||||
|
|
||||||
if(arg->i > 0) // left circular shift
|
|
||||||
shifted.ui = (selmon->tagset[selmon->seltags] << arg->i)
|
|
||||||
| (selmon->tagset[selmon->seltags] >> (LENGTH(tags) - arg->i));
|
|
||||||
|
|
||||||
else // right circular shift
|
|
||||||
shifted.ui = selmon->tagset[selmon->seltags] >> (- arg->i)
|
|
||||||
| selmon->tagset[selmon->seltags] << (LENGTH(tags) + arg->i);
|
|
||||||
|
|
||||||
selmon->sel->tags = shifted.ui & TAGMASK;
|
|
||||||
arrange(selmon);
|
|
||||||
view(&shifted);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Function to shift the current view to the left/right
|
|
||||||
*
|
|
||||||
* @param: "arg->i" stores the number of tags to shift right (positive value)
|
|
||||||
* or left (negative value)
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
shiftview(const Arg *arg) {
|
|
||||||
Arg shifted;
|
|
||||||
|
|
||||||
if(arg->i > 0) // left circular shift
|
|
||||||
shifted.ui = (selmon->tagset[selmon->seltags] << arg->i)
|
|
||||||
| (selmon->tagset[selmon->seltags] >> (LENGTH(tags) - arg->i));
|
|
||||||
|
|
||||||
else // right circular shift
|
|
||||||
shifted.ui = selmon->tagset[selmon->seltags] >> (- arg->i)
|
|
||||||
| selmon->tagset[selmon->seltags] << (LENGTH(tags) + arg->i);
|
|
||||||
|
|
||||||
view(&shifted);
|
|
||||||
}
|
|
17
config.h
17
config.h
@ -49,11 +49,11 @@ static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */
|
|||||||
static const int nmaster = 1; /* number of clients in master area */
|
static const int nmaster = 1; /* number of clients in master area */
|
||||||
static const int resizehints = 1; /* 1 means respect size hints in tiled resizals */
|
static const int resizehints = 1; /* 1 means respect size hints in tiled resizals */
|
||||||
static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */
|
static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */
|
||||||
static const Layout layouts[] = {
|
static const Layout layouts[] = {
|
||||||
/* symbol arrange function */
|
/* symbol arrange function */
|
||||||
{ "[]=", tile }, /* first entry is default */
|
{ " Tiles ", tile }, /* first entry is default */
|
||||||
{ "><>", NULL }, /* no layout function means floating behavior */
|
{ " Float ", NULL }, /* no layout function means floating behavior */
|
||||||
{ "[M]", monocle },
|
{ " Monocle", monocle },
|
||||||
};
|
};
|
||||||
|
|
||||||
/* key definitions */
|
/* key definitions */
|
||||||
@ -102,10 +102,15 @@ static const char *nmcedit[] = { "nm-connection-editor" , NULL };
|
|||||||
|
|
||||||
static const char *top[] = { "kitty" , "htop" , NULL };
|
static const char *top[] = { "kitty" , "htop" , NULL };
|
||||||
|
|
||||||
#include "aji.c"
|
#include "shift-tools.c"
|
||||||
|
|
||||||
static const Key keys[] = {
|
static const Key keys[] = {
|
||||||
/* modifier key function argument */
|
/* modifier key function argument */
|
||||||
|
{ MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
|
||||||
|
{ MODKEY, XK_f, setlayout, {.v = &layouts[1]} },
|
||||||
|
{ MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
|
||||||
|
{ MODKEY, XK_space, setlayout, {0} },
|
||||||
|
{ MODKEY|ShiftMask, XK_space, togglefloating, {0} },
|
||||||
{ MODKEY, XK_BackSpace, view, {0} },
|
{ MODKEY, XK_BackSpace, view, {0} },
|
||||||
{ MODKEY, XK_a, view, {.ui = ~0} }, // Select all tags. Cancel it with `MODKEY + [tag key]`.
|
{ MODKEY, XK_a, view, {.ui = ~0} }, // Select all tags. Cancel it with `MODKEY + [tag key]`.
|
||||||
{ MODKEY|Mod1Mask, XK_p, tag, {.ui = ~0} }, // Pin current window to all tags. Cancel it with `MODKEY + Shift + [tag key]`.
|
{ MODKEY|Mod1Mask, XK_p, tag, {.ui = ~0} }, // Pin current window to all tags. Cancel it with `MODKEY + Shift + [tag key]`.
|
||||||
@ -143,8 +148,6 @@ static const Key keys[] = {
|
|||||||
{ MODKEY|ControlMask|ShiftMask, XK_Left, shifttag, {.i = -1} },
|
{ MODKEY|ControlMask|ShiftMask, XK_Left, shifttag, {.i = -1} },
|
||||||
{ MODKEY|ControlMask|ShiftMask, XK_Right, shifttag, {.i = +1} },
|
{ MODKEY|ControlMask|ShiftMask, XK_Right, shifttag, {.i = +1} },
|
||||||
|
|
||||||
{ MODKEY|Mod1Mask, XK_v, cyclelayout, {0} },
|
|
||||||
|
|
||||||
{ MODKEY, XK_w, killclient, {0} },
|
{ MODKEY, XK_w, killclient, {0} },
|
||||||
{ MODKEY|ShiftMask, XK_q, quit, {0} },
|
{ MODKEY|ShiftMask, XK_q, quit, {0} },
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user