make most layouts non-optional for maintainence sake
This commit is contained in:
parent
1ef5ee9734
commit
d0cbbe9718
52
layouts.c
52
layouts.c
|
@ -1,11 +1,6 @@
|
||||||
/* This C code handles all layouts.
|
/* This C code handles all built in layouts.
|
||||||
* You may choose to remove layouts here if you don't find them useful.
|
|
||||||
*
|
|
||||||
* Luckily for you though, I've added simple options to disable them from getting compiled into the code at all.
|
|
||||||
* To change options, edit toggle.h.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if LAYOUT_TILE
|
|
||||||
static void
|
static void
|
||||||
tile(Monitor *m)
|
tile(Monitor *m)
|
||||||
{
|
{
|
||||||
|
@ -44,9 +39,7 @@ tile(Monitor *m)
|
||||||
sy += HEIGHT(c) + ih;
|
sy += HEIGHT(c) + ih;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
#if LAYOUT_MONOCLE
|
|
||||||
void
|
void
|
||||||
monocle(Monitor *m)
|
monocle(Monitor *m)
|
||||||
{
|
{
|
||||||
|
@ -71,9 +64,7 @@ monocle(Monitor *m)
|
||||||
if (!c->isfloating && ISVISIBLE(c))
|
if (!c->isfloating && ISVISIBLE(c))
|
||||||
XMoveWindow(dpy, c->win, WIDTH(c) * -2, c->y);
|
XMoveWindow(dpy, c->win, WIDTH(c) * -2, c->y);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
#if LAYOUT_GRID
|
|
||||||
void
|
void
|
||||||
grid(Monitor *m)
|
grid(Monitor *m)
|
||||||
{
|
{
|
||||||
|
@ -103,9 +94,7 @@ grid(Monitor *m)
|
||||||
resize(c, cx, cy, cw + (cc < cwrest ? 1 : 0) - 2*c->bw, ch + (cr < chrest ? 1 : 0) - 2*c->bw, False);
|
resize(c, cx, cy, cw + (cc < cwrest ? 1 : 0) - 2*c->bw, ch + (cr < chrest ? 1 : 0) - 2*c->bw, False);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
#if LAYOUT_FIBO
|
|
||||||
void
|
void
|
||||||
fibonacci(Monitor *m, int s)
|
fibonacci(Monitor *m, int s)
|
||||||
{
|
{
|
||||||
|
@ -192,25 +181,19 @@ fibonacci(Monitor *m, int s)
|
||||||
resize(c, nx, ny, nw - (2*c->bw), nh - (2*c->bw), False);
|
resize(c, nx, ny, nw - (2*c->bw), nh - (2*c->bw), False);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
#if LAYOUT_DWINDLE
|
|
||||||
void
|
void
|
||||||
dwindle(Monitor *m)
|
dwindle(Monitor *m)
|
||||||
{
|
{
|
||||||
fibonacci(m, 1);
|
fibonacci(m, 1);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
#if LAYOUT_SPIRAL
|
|
||||||
void
|
void
|
||||||
spiral(Monitor *m)
|
spiral(Monitor *m)
|
||||||
{
|
{
|
||||||
fibonacci(m, 0);
|
fibonacci(m, 0);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
#if LAYOUT_BSTACK
|
|
||||||
static void
|
static void
|
||||||
bstack(Monitor *m)
|
bstack(Monitor *m)
|
||||||
{
|
{
|
||||||
|
@ -251,9 +234,7 @@ bstack(Monitor *m)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
#if LAYOUT_BSTACKH
|
|
||||||
static void
|
static void
|
||||||
bstackhoriz(Monitor *m)
|
bstackhoriz(Monitor *m)
|
||||||
{
|
{
|
||||||
|
@ -295,9 +276,7 @@ bstackhoriz(Monitor *m)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
#if LAYOUT_HGRID
|
|
||||||
void
|
void
|
||||||
horizgrid(Monitor *m) {
|
horizgrid(Monitor *m) {
|
||||||
Client *c;
|
Client *c;
|
||||||
|
@ -358,9 +337,7 @@ horizgrid(Monitor *m) {
|
||||||
sx += WIDTH(c) + iv;
|
sx += WIDTH(c) + iv;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
#if LAYOUT_DGRID
|
|
||||||
void
|
void
|
||||||
dynamicgrid(Monitor *m)
|
dynamicgrid(Monitor *m)
|
||||||
{
|
{
|
||||||
|
@ -414,9 +391,7 @@ dynamicgrid(Monitor *m)
|
||||||
resize(c, cx, cy, cw - (2*c->bw), ch - (2*c->bw), 0);
|
resize(c, cx, cy, cw - (2*c->bw), ch - (2*c->bw), 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
#if LAYOUT_TATAMI
|
|
||||||
void
|
void
|
||||||
tatami(Monitor *m) {
|
tatami(Monitor *m) {
|
||||||
unsigned int i, n, nx, ny, nw, nh,
|
unsigned int i, n, nx, ny, nw, nh,
|
||||||
|
@ -574,9 +549,7 @@ tatami(Monitor *m) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
#if LAYOUT_CM
|
|
||||||
void
|
void
|
||||||
centeredmaster(Monitor *m)
|
centeredmaster(Monitor *m)
|
||||||
{
|
{
|
||||||
|
@ -661,9 +634,7 @@ centeredmaster(Monitor *m)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
#if LAYOUT_CFM
|
|
||||||
void
|
void
|
||||||
centeredfloatingmaster(Monitor *m)
|
centeredfloatingmaster(Monitor *m)
|
||||||
{
|
{
|
||||||
|
@ -716,9 +687,7 @@ centeredfloatingmaster(Monitor *m)
|
||||||
sx += WIDTH(c) + iv;
|
sx += WIDTH(c) + iv;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
#if LAYOUT_DECK
|
|
||||||
void
|
void
|
||||||
deck(Monitor *m)
|
deck(Monitor *m)
|
||||||
{
|
{
|
||||||
|
@ -759,7 +728,6 @@ deck(Monitor *m)
|
||||||
resize(c, sx, sy, sw - (2*c->bw), sh - (2*c->bw), 0);
|
resize(c, sx, sy, sw - (2*c->bw), sh - (2*c->bw), 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
#if LAYOUT_CUSTOM
|
#if LAYOUT_CUSTOM
|
||||||
enum node_type_t
|
enum node_type_t
|
||||||
|
@ -855,7 +823,8 @@ int is_terminal(char c)
|
||||||
|| c == '\0';
|
|| c == '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
void free_node(node_t *node)
|
void
|
||||||
|
free_node(node_t *node)
|
||||||
{
|
{
|
||||||
for ( node_t *n = node;
|
for ( node_t *n = node;
|
||||||
n != NULL; )
|
n != NULL; )
|
||||||
|
@ -890,7 +859,8 @@ node_t* reverse_node(node_t *node)
|
||||||
return (b ? b : a);
|
return (b ? b : a);
|
||||||
}
|
}
|
||||||
|
|
||||||
void node_length(node_t *node, unsigned *len, float *weight)
|
void
|
||||||
|
node_length(node_t *node, unsigned *len, float *weight)
|
||||||
{
|
{
|
||||||
unsigned n = 0;
|
unsigned n = 0;
|
||||||
float w = 0.0;
|
float w = 0.0;
|
||||||
|
@ -926,7 +896,8 @@ struct client_ref_t* copy_clients(Client *clients)
|
||||||
return head.next;
|
return head.next;
|
||||||
}
|
}
|
||||||
|
|
||||||
void free_clients(struct client_ref_t *clients)
|
void
|
||||||
|
free_clients(struct client_ref_t *clients)
|
||||||
{
|
{
|
||||||
struct client_ref_t *nxt = NULL;
|
struct client_ref_t *nxt = NULL;
|
||||||
while (clients != NULL) {
|
while (clients != NULL) {
|
||||||
|
@ -1093,7 +1064,8 @@ struct frame_t
|
||||||
int x, y, w, h;
|
int x, y, w, h;
|
||||||
};
|
};
|
||||||
|
|
||||||
void s_recur_resize(node_t *node, struct frame_t frame)
|
void
|
||||||
|
s_recur_resize(node_t *node, struct frame_t frame)
|
||||||
{
|
{
|
||||||
if (node == NULL) return;
|
if (node == NULL) return;
|
||||||
|
|
||||||
|
@ -1182,7 +1154,8 @@ void s_recur_resize(node_t *node, struct frame_t frame)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Main layout function. */
|
/* Main layout function. */
|
||||||
void custom(Monitor *m)
|
void
|
||||||
|
custom(Monitor *m)
|
||||||
{
|
{
|
||||||
/* Need to clone the client stack, as we might need to pull items from it. */
|
/* Need to clone the client stack, as we might need to pull items from it. */
|
||||||
struct client_ref_t *clients = copy_clients(m->clients),
|
struct client_ref_t *clients = copy_clients(m->clients),
|
||||||
|
@ -1500,7 +1473,8 @@ node_t* parse_sexp(string_token_t **token)
|
||||||
return head;
|
return head;
|
||||||
}
|
}
|
||||||
|
|
||||||
void set_s_layout(const Arg *arg)
|
void
|
||||||
|
set_s_layout(const Arg *arg)
|
||||||
{
|
{
|
||||||
FILE *pp, *hf;
|
FILE *pp, *hf;
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* speedwm
|
/* speedwm options
|
||||||
*
|
*
|
||||||
* -- What is speedwm --
|
* -- What is speedwm --
|
||||||
*
|
*
|
||||||
|
|
55
signal.h
55
signal.h
|
@ -5,7 +5,21 @@
|
||||||
* Once you're done with your edits, run 'make clean install'. */
|
* Once you're done with your edits, run 'make clean install'. */
|
||||||
static Signal signals[] = {
|
static Signal signals[] = {
|
||||||
/* signum function argument */
|
/* signum function argument */
|
||||||
|
{ 1, setlayout, {.v = &layouts[0]} }, /* Tiling layout */
|
||||||
|
{ 2, setlayout, {.v = &layouts[1]} }, /* Floating layout */
|
||||||
|
{ 3, setlayout, {.v = &layouts[2]} }, /* Monocle layout */
|
||||||
|
{ 4, setlayout, {.v = &layouts[3]} }, /* Grid layout */
|
||||||
|
{ 5, setlayout, {.v = &layouts[4]} }, /* Deck layout */
|
||||||
|
{ 6, setlayout, {.v = &layouts[5]} }, /* Centered Master layout */
|
||||||
|
{ 7, setlayout, {.v = &layouts[6]} }, /* Centered Floating Master layout */
|
||||||
|
{ 8, setlayout, {.v = &layouts[7]} }, /* Fibonacci Spiral layout */
|
||||||
|
{ 9, setlayout, {.v = &layouts[8]} }, /* Fibonacci Dwindle layout */
|
||||||
|
{ 10, setlayout, {.v = &layouts[9]} }, /* Bottom Stack layout */
|
||||||
|
{ 11, setlayout, {.v = &layouts[10]} }, /* Horizontal Bottom Stack layout */
|
||||||
|
{ 12, setlayout, {.v = &layouts[11]} }, /* Horizontal Grid layout */
|
||||||
|
{ 13, setlayout, {.v = &layouts[12]} }, /* Dynamic Grid layout */
|
||||||
#if LAYOUT_CUSTOM
|
#if LAYOUT_CUSTOM
|
||||||
|
{ 14, setlayout, {.v = &layouts[13]} }, /* Custom layout */
|
||||||
{ 15, set_s_layout, {.v = &layouts[13]} },
|
{ 15, set_s_layout, {.v = &layouts[13]} },
|
||||||
#endif
|
#endif
|
||||||
{ 16, cyclelayout, {.i = +1 } },
|
{ 16, cyclelayout, {.i = +1 } },
|
||||||
|
@ -90,45 +104,4 @@ static Signal signals[] = {
|
||||||
{ 91, resetbarpaddingv, {0} },
|
{ 91, resetbarpaddingv, {0} },
|
||||||
{ 92, resetbarpaddingh, {0} },
|
{ 92, resetbarpaddingh, {0} },
|
||||||
{ 93, resetbarpadding, {0} },
|
{ 93, resetbarpadding, {0} },
|
||||||
|
|
||||||
#if LAYOUT_TILE
|
|
||||||
{ 1, setlayout, {.v = &layouts[0]} }, /* Tiling layout */
|
|
||||||
#endif
|
|
||||||
{ 2, setlayout, {.v = &layouts[1]} }, /* Floating layout */
|
|
||||||
#if LAYOUT_MONOCLE
|
|
||||||
{ 3, setlayout, {.v = &layouts[2]} }, /* Monocle layout */
|
|
||||||
#endif
|
|
||||||
#if LAYOUT_GRID
|
|
||||||
{ 4, setlayout, {.v = &layouts[3]} }, /* Grid layout */
|
|
||||||
#endif
|
|
||||||
#if LAYOUT_DECK
|
|
||||||
{ 5, setlayout, {.v = &layouts[4]} }, /* Deck layout */
|
|
||||||
#endif
|
|
||||||
#if LAYOUT_CM
|
|
||||||
{ 6, setlayout, {.v = &layouts[5]} }, /* Centered Master layout */
|
|
||||||
#endif
|
|
||||||
#if LAYOUT_CFM
|
|
||||||
{ 7, setlayout, {.v = &layouts[6]} }, /* Centered Floating Master layout */
|
|
||||||
#endif
|
|
||||||
#if LAYOUT_SPIRAL
|
|
||||||
{ 8, setlayout, {.v = &layouts[7]} }, /* Fibonacci Spiral layout */
|
|
||||||
#endif
|
|
||||||
#if LAYOUT_DWINDLE
|
|
||||||
{ 9, setlayout, {.v = &layouts[8]} }, /* Fibonacci Dwindle layout */
|
|
||||||
#endif
|
|
||||||
#if LAYOUT_BSTACK
|
|
||||||
{ 10, setlayout, {.v = &layouts[9]} }, /* Bottom Stack layout */
|
|
||||||
#endif
|
|
||||||
#if LAYOUT_BSTACKH
|
|
||||||
{ 11, setlayout, {.v = &layouts[10]} }, /* Horizontal Bottom Stack layout */
|
|
||||||
#endif
|
|
||||||
#if LAYOUT_HGRID
|
|
||||||
{ 12, setlayout, {.v = &layouts[11]} }, /* Horizontal Grid layout */
|
|
||||||
#endif
|
|
||||||
#if LAYOUT_DGRID
|
|
||||||
{ 13, setlayout, {.v = &layouts[12]} }, /* Dynamic Grid layout */
|
|
||||||
#endif
|
|
||||||
#if LAYOUT_CUSTOM
|
|
||||||
{ 14, setlayout, {.v = &layouts[13]} }, /* Custom layout */
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
184
speedwm.c
184
speedwm.c
|
@ -177,23 +177,23 @@ typedef struct {
|
||||||
typedef struct Monitor Monitor;
|
typedef struct Monitor Monitor;
|
||||||
typedef struct Client Client;
|
typedef struct Client Client;
|
||||||
struct Client {
|
struct Client {
|
||||||
char name[256];
|
char name[256]; /* window manager name */
|
||||||
float mina, maxa;
|
float mina, maxa;
|
||||||
float cfact;
|
float cfact; /* cfact for the client */
|
||||||
int x, y, w, h;
|
int x, y, w, h; /* x/y position, width and height */
|
||||||
int sfx, sfy, sfw, sfh; /* stored float geometry, used on mode revert */
|
int sfx, sfy, sfw, sfh; /* stored float geometry, used on mode revert */
|
||||||
int oldx, oldy, oldw, oldh;
|
int oldx, oldy, oldw, oldh;
|
||||||
int basew, baseh, incw, inch, maxw, maxh, minw, minh;
|
int basew, baseh, incw, inch, maxw, maxh, minw, minh;
|
||||||
int hintsvalid; /* https://git.suckless.org/dwm/commit/8806b6e2379372900e3d9e0bf6604bc7f727350b.html */
|
int hintsvalid; /* https://git.suckless.org/dwm/commit/8806b6e2379372900e3d9e0bf6604bc7f727350b.html */
|
||||||
int bw, oldbw;
|
int bw, oldbw;
|
||||||
unsigned int tags;
|
unsigned int tags; /* tags */
|
||||||
int isfixed, ispermanent, isfloating, isurgent, neverfocus, oldstate, isfullscreen, ignoretransient, issticky, isterminal, noswallow, needresize;
|
int isfixed, ispermanent, isfloating, isurgent, neverfocus, oldstate, isfullscreen, ignoretransient, issticky, isterminal, noswallow, needresize; /* window rules */
|
||||||
pid_t pid;
|
pid_t pid;
|
||||||
char scratchkey;
|
char scratchkey; /* scratchpad key */
|
||||||
#if USEWINICON
|
#if USEWINICON
|
||||||
unsigned int icw, ich; Picture icon;
|
unsigned int icw, ich; Picture icon; /* icon height/width */
|
||||||
#endif
|
#endif
|
||||||
int issteam;
|
int issteam; /* steam specific fix */
|
||||||
int beingmoved;
|
int beingmoved;
|
||||||
Client *next;
|
Client *next;
|
||||||
Client *snext;
|
Client *snext;
|
||||||
|
@ -226,13 +226,13 @@ typedef struct {
|
||||||
|
|
||||||
typedef struct Pertag Pertag;
|
typedef struct Pertag Pertag;
|
||||||
struct Monitor {
|
struct Monitor {
|
||||||
char ltsymbol[16];
|
char ltsymbol[16]; /* current layout symbol */
|
||||||
#if USEIPC
|
#if USEIPC
|
||||||
char lastltsymbol[16];
|
char lastltsymbol[16]; /* previous layout symbol */
|
||||||
#endif
|
#endif
|
||||||
float mfact;
|
float mfact; /* mfact value */
|
||||||
float cfact;
|
float cfact; /* cfact value */
|
||||||
int mastercount;
|
int mastercount; /* number of clients in the master stack */
|
||||||
int num;
|
int num;
|
||||||
int by, bh; /* bar geometry */
|
int by, bh; /* bar geometry */
|
||||||
int tx, tw; /* bar tray geometry */
|
int tx, tw; /* bar tray geometry */
|
||||||
|
@ -248,8 +248,8 @@ struct Monitor {
|
||||||
int switchern; /* move that many clients forward */
|
int switchern; /* move that many clients forward */
|
||||||
int nclients; /* number of active clients in tag */
|
int nclients; /* number of active clients in tag */
|
||||||
int isswitching; /* 1,0 */
|
int isswitching; /* 1,0 */
|
||||||
int maxwidth;
|
int maxwidth; /* max width of window */
|
||||||
int maxheight;
|
int maxheight; /* max height of window */
|
||||||
#endif
|
#endif
|
||||||
unsigned int seltags;
|
unsigned int seltags;
|
||||||
unsigned int sellt;
|
unsigned int sellt;
|
||||||
|
@ -283,7 +283,9 @@ struct Monitor {
|
||||||
|
|
||||||
int hidsel;
|
int hidsel;
|
||||||
int isreset;
|
int isreset;
|
||||||
int allowwarp;
|
#if USEMOUSE
|
||||||
|
int allowwarp; /* allow warping or not. this allows us to only allow warping under certain conditions and disable it whenever we want */
|
||||||
|
#endif
|
||||||
Client *clients;
|
Client *clients;
|
||||||
Client *sel;
|
Client *sel;
|
||||||
#if USEIPC
|
#if USEIPC
|
||||||
|
@ -354,20 +356,8 @@ typedef struct {
|
||||||
|
|
||||||
/* function declarations */
|
/* function declarations */
|
||||||
static void applyrules(Client *c);
|
static void applyrules(Client *c);
|
||||||
#if LAYOUT_CM
|
|
||||||
static void centeredmaster(Monitor *m);
|
|
||||||
#endif
|
|
||||||
#if LAYOUT_CFM
|
|
||||||
static void centeredfloatingmaster(Monitor *m);
|
|
||||||
#endif
|
|
||||||
#if LAYOUT_TW
|
|
||||||
static void tilewide(Monitor *m);
|
|
||||||
#endif
|
|
||||||
static void getgaps(Monitor *m, int *oh, int *ov, int *ih, int *iv, unsigned int *nc);
|
static void getgaps(Monitor *m, int *oh, int *ov, int *ih, int *iv, unsigned int *nc);
|
||||||
static void getfacts(Monitor *m, int msize, int ssize, float *mf, float *sf, int *mr, int *sr);
|
static void getfacts(Monitor *m, int msize, int ssize, float *mf, float *sf, int *mr, int *sr);
|
||||||
#if LAYOUT_STAIRS
|
|
||||||
static void stairs(Monitor *m);
|
|
||||||
#endif
|
|
||||||
static int applysizehints(Client *c, int *x, int *y, int *w, int *h, int interact);
|
static int applysizehints(Client *c, int *x, int *y, int *w, int *h, int interact);
|
||||||
static void inplacerotate(const Arg *arg);
|
static void inplacerotate(const Arg *arg);
|
||||||
static void togglesticky(const Arg *arg);
|
static void togglesticky(const Arg *arg);
|
||||||
|
@ -401,9 +391,6 @@ static void autostart_exec(void);
|
||||||
static void moveresize(const Arg *arg);
|
static void moveresize(const Arg *arg);
|
||||||
static void moveresizeedge(const Arg *arg);
|
static void moveresizeedge(const Arg *arg);
|
||||||
static Monitor *createmon(void);
|
static Monitor *createmon(void);
|
||||||
#if LAYOUT_DECK
|
|
||||||
static void deck(Monitor *m);
|
|
||||||
#endif
|
|
||||||
static void cyclelayout(const Arg *arg);
|
static void cyclelayout(const Arg *arg);
|
||||||
static void destroynotify(XEvent *e);
|
static void destroynotify(XEvent *e);
|
||||||
static void detach(Client *c);
|
static void detach(Client *c);
|
||||||
|
@ -571,40 +558,23 @@ static void unmanagetray(Window w);
|
||||||
static void tagmon(const Arg *arg);
|
static void tagmon(const Arg *arg);
|
||||||
|
|
||||||
/* layouts */
|
/* layouts */
|
||||||
#if LAYOUT_TILE
|
|
||||||
static void tile(Monitor *m);
|
static void tile(Monitor *m);
|
||||||
#endif
|
|
||||||
#if LAYOUT_DECK
|
|
||||||
static void deck(Monitor *m);
|
|
||||||
#endif
|
|
||||||
#if LAYOUT_MONOCLE
|
|
||||||
static void monocle(Monitor *m);
|
static void monocle(Monitor *m);
|
||||||
#endif
|
|
||||||
#if LAYOUT_GRID
|
|
||||||
static void grid(Monitor *m);
|
static void grid(Monitor *m);
|
||||||
#endif
|
static void deck(Monitor *m);
|
||||||
#if LAYOUT_SPIRAL
|
|
||||||
static void spiral(Monitor *m);
|
static void spiral(Monitor *m);
|
||||||
#endif
|
static void dwindle(Monitor *m);
|
||||||
#if LAYOUT_BSTACK
|
|
||||||
static void bstack(Monitor *m);
|
static void bstack(Monitor *m);
|
||||||
#endif
|
|
||||||
#if LAYOUT_BSTACKH
|
|
||||||
static void bstackhoriz(Monitor *m);
|
static void bstackhoriz(Monitor *m);
|
||||||
#endif
|
|
||||||
#if LAYOUT_HGRID
|
|
||||||
static void horizgrid(Monitor *m);
|
static void horizgrid(Monitor *m);
|
||||||
#endif
|
|
||||||
#if LAYOUT_DGRID
|
|
||||||
static void dynamicgrid(Monitor *m);
|
static void dynamicgrid(Monitor *m);
|
||||||
#endif
|
static void centeredmaster(Monitor *m);
|
||||||
|
static void centeredfloatingmaster(Monitor *m);
|
||||||
|
static void stairs(Monitor *m);
|
||||||
#if LAYOUT_CUSTOM
|
#if LAYOUT_CUSTOM
|
||||||
static void custom(Monitor *m);
|
static void custom(Monitor *m);
|
||||||
static void set_s_layout(const Arg *arg);
|
static void set_s_layout(const Arg *arg);
|
||||||
#endif
|
#endif
|
||||||
#if LAYOUT_DWINDLE
|
|
||||||
static void dwindle(Monitor *m);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* bar items */
|
/* bar items */
|
||||||
static void togglebar(const Arg *arg);
|
static void togglebar(const Arg *arg);
|
||||||
|
@ -638,15 +608,28 @@ static void togglebarpaddingv(const Arg *arg);
|
||||||
static void togglebarpaddingh(const Arg *arg);
|
static void togglebarpaddingh(const Arg *arg);
|
||||||
static void togglebarpadding(const Arg *arg);
|
static void togglebarpadding(const Arg *arg);
|
||||||
|
|
||||||
|
/* icon */
|
||||||
#if USEWINICON
|
#if USEWINICON
|
||||||
|
static void updateicon(Client *c);
|
||||||
static void freeicon(Client *c);
|
static void freeicon(Client *c);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* tag previews */
|
||||||
|
#if USETAGPREVIEW
|
||||||
|
static void updatepreview(void);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* mouse */
|
||||||
#if USEMOUSE
|
#if USEMOUSE
|
||||||
static void togglewin(const Arg *arg);
|
static void togglewin(const Arg *arg);
|
||||||
|
static void resizemouse(const Arg *arg);
|
||||||
|
static void warp(const Client *c);
|
||||||
#endif
|
#endif
|
||||||
static void unfocus(Client *c, int setfocus);
|
static void unfocus(Client *c, int setfocus);
|
||||||
static void unmanage(Client *c, int destroyed);
|
static void unmanage(Client *c, int destroyed);
|
||||||
static void unmapnotify(XEvent *e);
|
static void unmapnotify(XEvent *e);
|
||||||
|
|
||||||
|
/* update functions */
|
||||||
static void updatecurrentdesktop(void);
|
static void updatecurrentdesktop(void);
|
||||||
static void updatebarpos(Monitor *m);
|
static void updatebarpos(Monitor *m);
|
||||||
static void updatebars(void);
|
static void updatebars(void);
|
||||||
|
@ -654,47 +637,49 @@ static void updateclientlist(void);
|
||||||
static int updategeom(void);
|
static int updategeom(void);
|
||||||
static void updatemotifhints(Client *c);
|
static void updatemotifhints(Client *c);
|
||||||
static void updatenumlockmask(void);
|
static void updatenumlockmask(void);
|
||||||
#if USEMOUSE
|
|
||||||
static void resizemouse(const Arg *arg);
|
|
||||||
#endif
|
|
||||||
static void updatesizehints(Client *c);
|
static void updatesizehints(Client *c);
|
||||||
static void updatestatus(void);
|
static void updatestatus(void);
|
||||||
static void updaterules(Client *c);
|
static void updaterules(Client *c);
|
||||||
static void updatetitle(Client *c);
|
static void updatetitle(Client *c);
|
||||||
#if USETAGPREVIEW
|
|
||||||
static void updatepreview(void);
|
|
||||||
#endif
|
|
||||||
#if USEWINICON
|
|
||||||
static void updateicon(Client *c);
|
|
||||||
#endif
|
|
||||||
static void updatewindowtype(Client *c);
|
static void updatewindowtype(Client *c);
|
||||||
static void updatewmhints(Client *c);
|
static void updatewmhints(Client *c);
|
||||||
|
|
||||||
static void toggleview(const Arg *arg);
|
static void toggleview(const Arg *arg);
|
||||||
static void tag(const Arg *arg);
|
static void tag(const Arg *arg);
|
||||||
|
|
||||||
|
/* view functions */
|
||||||
static void view(const Arg *arg);
|
static void view(const Arg *arg);
|
||||||
static void viewtoleft(const Arg *arg);
|
static void viewtoleft(const Arg *arg);
|
||||||
static void viewtoright(const Arg *arg);
|
static void viewtoright(const Arg *arg);
|
||||||
static void viewtoleft_vacant(const Arg *arg);
|
static void viewtoleft_vacant(const Arg *arg);
|
||||||
static void viewtoright_vacant(const Arg *arg);
|
static void viewtoright_vacant(const Arg *arg);
|
||||||
static void warp(const Client *c);
|
|
||||||
static Client *wintoclient(Window w);
|
static Client *wintoclient(Window w);
|
||||||
static Monitor *wintomon(Window w);
|
static Monitor *wintomon(Window w);
|
||||||
static int wmclasscontains(Window win, const char *class, const char *name);
|
static int wmclasscontains(Window win, const char *class, const char *name);
|
||||||
|
|
||||||
|
/* X11 error */
|
||||||
static int xerror(Display *dpy, XErrorEvent *ee);
|
static int xerror(Display *dpy, XErrorEvent *ee);
|
||||||
static int xerrordummy(Display *dpy, XErrorEvent *ee);
|
static int xerrordummy(Display *dpy, XErrorEvent *ee);
|
||||||
static int xerrorstart(Display *dpy, XErrorEvent *ee);
|
static int xerrorstart(Display *dpy, XErrorEvent *ee);
|
||||||
|
|
||||||
static void xinitvisual();
|
static void xinitvisual();
|
||||||
static void zoom(const Arg *arg);
|
static void zoom(const Arg *arg);
|
||||||
|
|
||||||
|
/* switcher funcs */
|
||||||
#if USESWITCHER
|
#if USESWITCHER
|
||||||
void drawswitcher(int nwins, int first, Monitor *m);
|
void drawswitcher(int nwins, int first, Monitor *m);
|
||||||
void switcherstart(const Arg *arg);
|
void switcherstart(const Arg *arg);
|
||||||
static void switcherend();
|
static void switcherend();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Xresources funcs */
|
||||||
#if USEXRESOURCES
|
#if USEXRESOURCES
|
||||||
static void load_xresources(void);
|
static void load_xresources(void);
|
||||||
static void reloadcolors(const Arg *arg);
|
static void reloadcolors(const Arg *arg);
|
||||||
static void resource_load(XrmDatabase db, char *name, enum resource_type rtype, void *dst);
|
static void resource_load(XrmDatabase db, char *name, enum resource_type rtype, void *dst);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static pid_t getparentprocess(pid_t p);
|
static pid_t getparentprocess(pid_t p);
|
||||||
static int isdescprocess(pid_t p, pid_t c);
|
static int isdescprocess(pid_t p, pid_t c);
|
||||||
static Client *swallowingclient(Window w);
|
static Client *swallowingclient(Window w);
|
||||||
|
@ -798,9 +783,8 @@ static xcb_connection_t *xcon;
|
||||||
/* Shell command */
|
/* Shell command */
|
||||||
#define RCMD(cmd) {.v = (const char*[]){ shell, "-c", cmd, NULL } },
|
#define RCMD(cmd) {.v = (const char*[]){ shell, "-c", cmd, NULL } },
|
||||||
#define cmd( cmd ) {.v = (const char*[]){ shell, "-c", cmd, NULL } },
|
#define cmd( cmd ) {.v = (const char*[]){ shell, "-c", cmd, NULL } },
|
||||||
#define SESSION_FILE "/tmp/speedwm-session"
|
|
||||||
|
|
||||||
static const char *statuscmd[] = { "/bin/sh", "-c", NULL, NULL };
|
static const char *statuscmd[] = { "/bin/sh", "-c", NULL, NULL }; /* for running click scripts */
|
||||||
|
|
||||||
/* Media controls */
|
/* Media controls */
|
||||||
#if USEMEDIA
|
#if USEMEDIA
|
||||||
|
@ -1344,6 +1328,7 @@ checkotherwm(void)
|
||||||
XSync(dpy, False);
|
XSync(dpy, False);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* clean up the wm */
|
||||||
void
|
void
|
||||||
cleanup(void)
|
cleanup(void)
|
||||||
{
|
{
|
||||||
|
@ -1395,6 +1380,7 @@ cleanup(void)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* clean up on the selected monitor only */
|
||||||
void
|
void
|
||||||
cleanupmon(Monitor *mon)
|
cleanupmon(Monitor *mon)
|
||||||
{
|
{
|
||||||
|
@ -1555,6 +1541,7 @@ configurenotify(XEvent *e)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* draw rounded corners for current client */
|
||||||
#if USEROUNDCORNERS
|
#if USEROUNDCORNERS
|
||||||
void
|
void
|
||||||
drawroundedcorners(Client *c)
|
drawroundedcorners(Client *c)
|
||||||
|
@ -1658,6 +1645,7 @@ configurerequest(XEvent *e)
|
||||||
XSync(dpy, False);
|
XSync(dpy, False);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* copy status chars so we can hack on the text */
|
||||||
void
|
void
|
||||||
copyvalidchars(char *text, char *rawtext)
|
copyvalidchars(char *text, char *rawtext)
|
||||||
{
|
{
|
||||||
|
@ -1671,6 +1659,7 @@ copyvalidchars(char *text, char *rawtext)
|
||||||
text[j] = '\0';
|
text[j] = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* init monitor */
|
||||||
Monitor *
|
Monitor *
|
||||||
createmon(void)
|
createmon(void)
|
||||||
{
|
{
|
||||||
|
@ -1773,6 +1762,7 @@ destroynotify(XEvent *e)
|
||||||
unmanagetray(ev->window);
|
unmanagetray(ev->window);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* run ltmenu */
|
||||||
#if USEMOUSE
|
#if USEMOUSE
|
||||||
void
|
void
|
||||||
layoutmenu(const Arg *arg) {
|
layoutmenu(const Arg *arg) {
|
||||||
|
@ -1855,6 +1845,7 @@ dirtomon(int dir)
|
||||||
return m;
|
return m;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* drag cfact with mouse */
|
||||||
#if USEMOUSE
|
#if USEMOUSE
|
||||||
void
|
void
|
||||||
dragcfact(const Arg *arg)
|
dragcfact(const Arg *arg)
|
||||||
|
@ -1952,6 +1943,9 @@ readAndSetColor(int clrIdx, char* txt) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* get length of printed status
|
||||||
|
*
|
||||||
|
* w/o this, status2d chars are included in click pos */
|
||||||
int
|
int
|
||||||
statuslength(char* stext)
|
statuslength(char* stext)
|
||||||
{
|
{
|
||||||
|
@ -1992,6 +1986,7 @@ statuslength(char* stext)
|
||||||
return w;
|
return w;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* draw statusbar text */
|
||||||
int
|
int
|
||||||
drawstatusbar(Monitor *m, int bh, char* stext) {
|
drawstatusbar(Monitor *m, int bh, char* stext) {
|
||||||
int ret, i, j, w, x, len;
|
int ret, i, j, w, x, len;
|
||||||
|
@ -2113,6 +2108,7 @@ drawstatusbar(Monitor *m, int bh, char* stext) {
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* drag mfact with mouse */
|
||||||
#if USEMOUSE
|
#if USEMOUSE
|
||||||
void
|
void
|
||||||
dragmfact(const Arg *arg)
|
dragmfact(const Arg *arg)
|
||||||
|
@ -2142,41 +2138,22 @@ dragmfact(const Arg *arg)
|
||||||
|
|
||||||
if (!n)
|
if (!n)
|
||||||
return;
|
return;
|
||||||
#if LAYOUT_CM
|
|
||||||
else if (m->lt[m->sellt]->arrange == ¢eredmaster && (fixed || n - m->mastercount > 1))
|
else if (m->lt[m->sellt]->arrange == ¢eredmaster && (fixed || n - m->mastercount > 1))
|
||||||
center = 1;
|
center = 1;
|
||||||
#endif
|
|
||||||
#if LAYOUT_CFM
|
|
||||||
else if (m->lt[m->sellt]->arrange == ¢eredfloatingmaster)
|
else if (m->lt[m->sellt]->arrange == ¢eredfloatingmaster)
|
||||||
center = 1;
|
center = 1;
|
||||||
#endif
|
|
||||||
#if LAYOUT_BSTACK
|
|
||||||
else if (m->lt[m->sellt]->arrange == &bstack)
|
else if (m->lt[m->sellt]->arrange == &bstack)
|
||||||
horizontal = 1;
|
horizontal = 1;
|
||||||
#endif
|
|
||||||
#if LAYOUT_BSTACKH
|
|
||||||
else if (m->lt[m->sellt]->arrange == &bstackhoriz)
|
else if (m->lt[m->sellt]->arrange == &bstackhoriz)
|
||||||
horizontal = 1;
|
horizontal = 1;
|
||||||
#endif
|
|
||||||
|
|
||||||
/* do not allow mfact to be modified under certain conditions */
|
/* do not allow mfact to be modified under certain conditions */
|
||||||
if (!m->lt[m->sellt]->arrange /* floating layout */
|
if (!m->lt[m->sellt]->arrange /* floating layout */
|
||||||
|| (!fixed && m->mastercount && n <= m->mastercount) /* no master */
|
|| (!fixed && m->mastercount && n <= m->mastercount) /* no master */
|
||||||
#if LAYOUT_MONOCLE
|
|| m->lt[m->sellt]->arrange == &monocle /* monocle lt */
|
||||||
|| m->lt[m->sellt]->arrange == &monocle
|
|| m->lt[m->sellt]->arrange == &grid /* grid lt */
|
||||||
#endif
|
|| m->lt[m->sellt]->arrange == &horizgrid /* horizgrid lt */
|
||||||
#if LAYOUT_GRID
|
|| m->lt[m->sellt]->arrange == &dynamicgrid /* dgrid lt */
|
||||||
|| m->lt[m->sellt]->arrange == &grid
|
|
||||||
#endif
|
|
||||||
#if LAYOUT_HGRID
|
|
||||||
|| m->lt[m->sellt]->arrange == &horizgrid
|
|
||||||
#endif
|
|
||||||
#if LAYOUT_DGRID
|
|
||||||
|| m->lt[m->sellt]->arrange == &dynamicgrid
|
|
||||||
#endif
|
|
||||||
#if LAYOUT_NGRID
|
|
||||||
|| m->lt[m->sellt]->arrange == &nrowgrid
|
|
||||||
#endif
|
|
||||||
)
|
)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -2392,7 +2369,6 @@ resizebarwin(m);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if LAYOUT_MONOCLE
|
|
||||||
/* override layout icon with number of layouts */
|
/* override layout icon with number of layouts */
|
||||||
if (monoclecount) {
|
if (monoclecount) {
|
||||||
if (m->lt[m->sellt]->arrange == monocle) {
|
if (m->lt[m->sellt]->arrange == monocle) {
|
||||||
|
@ -2404,7 +2380,6 @@ resizebarwin(m);
|
||||||
snprintf(m->ltsymbol, sizeof m->ltsymbol, monocleformat, s, a);
|
snprintf(m->ltsymbol, sizeof m->ltsymbol, monocleformat, s, a);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
/* draw the layout bar on the right if layoutposition is not 0 */
|
/* draw the layout bar on the right if layoutposition is not 0 */
|
||||||
if (!layoutposition && !selmon->hidelayout) {
|
if (!layoutposition && !selmon->hidelayout) {
|
||||||
|
@ -2630,10 +2605,8 @@ focus(Client *c)
|
||||||
XDeleteProperty(dpy, root, netatom[NetActiveWindow]);
|
XDeleteProperty(dpy, root, netatom[NetActiveWindow]);
|
||||||
}
|
}
|
||||||
selmon->sel = c;
|
selmon->sel = c;
|
||||||
#if LAYOUT_MONOCLE
|
|
||||||
if (selmon->lt[selmon->sellt]->arrange == monocle)
|
if (selmon->lt[selmon->sellt]->arrange == monocle)
|
||||||
arrangemon(selmon);
|
arrangemon(selmon);
|
||||||
#endif
|
|
||||||
drawbar();
|
drawbar();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2680,7 +2653,9 @@ focusmon(const Arg *arg)
|
||||||
{
|
{
|
||||||
Monitor *m;
|
Monitor *m;
|
||||||
|
|
||||||
|
#if USEMOUSE
|
||||||
selmon->allowwarp = 1; /* allow warp */
|
selmon->allowwarp = 1; /* allow warp */
|
||||||
|
#endif
|
||||||
|
|
||||||
if (!mons->next)
|
if (!mons->next)
|
||||||
return;
|
return;
|
||||||
|
@ -2690,10 +2665,12 @@ focusmon(const Arg *arg)
|
||||||
selmon = m;
|
selmon = m;
|
||||||
focus(NULL);
|
focus(NULL);
|
||||||
|
|
||||||
|
#if USEMOUSE
|
||||||
if (warpcursor)
|
if (warpcursor)
|
||||||
warp(selmon->sel);
|
warp(selmon->sel);
|
||||||
|
|
||||||
selmon->allowwarp = 0;
|
selmon->allowwarp = 0;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -2741,13 +2718,17 @@ focusstack(int inc, int hid)
|
||||||
c = i;
|
c = i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if USEMOUSE
|
||||||
selmon->allowwarp = 1;
|
selmon->allowwarp = 1;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (c) {
|
if (c) {
|
||||||
focus(c);
|
focus(c);
|
||||||
restack(selmon);
|
restack(selmon);
|
||||||
|
|
||||||
|
#if USEMOUSE
|
||||||
selmon->allowwarp = 0;
|
selmon->allowwarp = 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (HIDDEN(c)) {
|
if (HIDDEN(c)) {
|
||||||
showwin(c);
|
showwin(c);
|
||||||
|
@ -3656,12 +3637,15 @@ manage(Window w, XWindowAttributes *wa)
|
||||||
if (term)
|
if (term)
|
||||||
swallow(term, c);
|
swallow(term, c);
|
||||||
arrange(c->mon);
|
arrange(c->mon);
|
||||||
if (focusspawn && !warpcursor) {
|
#if USEMOUSE
|
||||||
focus(c); /* Auto focus next spawned window */
|
if (focusspawn && !warpcursor)
|
||||||
} else {
|
focus(c); /* auto focus next spawned window */
|
||||||
focus(NULL); /* No need if warpcursor is enabled because warpcursor is going to warp and focus the window anyway */
|
#else
|
||||||
}
|
if (focusspawn)
|
||||||
|
focus(c); /* auto focus next spawned window */
|
||||||
|
#endif
|
||||||
|
else
|
||||||
|
focus(NULL); /* no need if warpcursor is enabled because warpcursor is going to warp and focus the window anyway */
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -4819,10 +4803,12 @@ restack(Monitor *m)
|
||||||
XSync(dpy, False);
|
XSync(dpy, False);
|
||||||
while (XCheckMaskEvent(dpy, EnterWindowMask, &ev));
|
while (XCheckMaskEvent(dpy, EnterWindowMask, &ev));
|
||||||
|
|
||||||
|
#if USEMOUSE
|
||||||
if (warpcursor) {
|
if (warpcursor) {
|
||||||
if (m == selmon && selmon->allowwarp && (m->tagset[m->seltags] & m->sel->tags) && selmon->lt[selmon->sellt] != &layouts[2])
|
if (m == selmon && selmon->allowwarp && (m->tagset[m->seltags] & m->sel->tags) && selmon->lt[selmon->sellt] != &layouts[2])
|
||||||
warp(m->sel);
|
warp(m->sel);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -6506,6 +6492,7 @@ view(const Arg *arg)
|
||||||
updatecurrentdesktop();
|
updatecurrentdesktop();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if USEMOUSE
|
||||||
void
|
void
|
||||||
warp(const Client *c)
|
warp(const Client *c)
|
||||||
{
|
{
|
||||||
|
@ -6527,6 +6514,7 @@ warp(const Client *c)
|
||||||
|
|
||||||
XWarpPointer(dpy, None, c->win, 0, 0, 0, 0, c->w / 2, c->h / 2);
|
XWarpPointer(dpy, None, c->win, 0, 0, 0, 0, c->w / 2, c->h / 2);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
pid_t
|
pid_t
|
||||||
winpid(Window w)
|
winpid(Window w)
|
||||||
|
|
53
text.h
53
text.h
|
@ -26,46 +26,21 @@ static char *usedtags[] = { text_tag1_used, /* Tag 1 text
|
||||||
|
|
||||||
/* Text for layouts */
|
/* Text for layouts */
|
||||||
static Layout layouts[] = {
|
static Layout layouts[] = {
|
||||||
#if LAYOUT_TILE
|
{ text_layout1, tile, }, /* tile layout */
|
||||||
{ text_layout1, tile, },
|
{ text_layout2, NULL, }, /* floating layout */
|
||||||
#endif
|
{ text_layout3, monocle, }, /* monocle layout */
|
||||||
/* floating layout (if no layout is available */
|
{ text_layout4, grid }, /* grid layout */
|
||||||
{ text_layout2, NULL, },
|
{ text_layout5, deck }, /* deck layout */
|
||||||
#if LAYOUT_MONOCLE
|
{ text_layout6, centeredmaster }, /* centered master layout */
|
||||||
{ text_layout3, monocle, },
|
{ text_layout7, centeredfloatingmaster }, /* centered floating layout */
|
||||||
#endif
|
{ text_layout8, spiral }, /* spiral layout */
|
||||||
#if LAYOUT_GRID
|
{ text_layout9, dwindle }, /* dwindle layout */
|
||||||
{ text_layout4, grid },
|
{ text_layout10, bstack }, /* bottom stack layout */
|
||||||
#endif
|
{ text_layout11, bstackhoriz }, /* horiz bottom stack layout */
|
||||||
#if LAYOUT_DECK
|
{ text_layout12, horizgrid }, /* horiz grid layout */
|
||||||
{ text_layout5, deck },
|
{ text_layout13, dynamicgrid }, /* dynamic grid layout */
|
||||||
#endif
|
|
||||||
#if LAYOUT_CM
|
|
||||||
{ text_layout6, centeredmaster },
|
|
||||||
#endif
|
|
||||||
#if LAYOUT_CFM
|
|
||||||
{ text_layout7, centeredfloatingmaster },
|
|
||||||
#endif
|
|
||||||
#if LAYOUT_SPIRAL
|
|
||||||
{ text_layout8, spiral },
|
|
||||||
#endif
|
|
||||||
#if LAYOUT_DWINDLE
|
|
||||||
{ text_layout9, dwindle },
|
|
||||||
#endif
|
|
||||||
#if LAYOUT_BSTACK
|
|
||||||
{ text_layout10, bstack },
|
|
||||||
#endif
|
|
||||||
#if LAYOUT_BSTACKH
|
|
||||||
{ text_layout11, bstackhoriz },
|
|
||||||
#endif
|
|
||||||
#if LAYOUT_HGRID
|
|
||||||
{ text_layout12, horizgrid },
|
|
||||||
#endif
|
|
||||||
#if LAYOUT_DGRID
|
|
||||||
{ text_layout13, dynamicgrid },
|
|
||||||
#endif
|
|
||||||
#if LAYOUT_CUSTOM
|
#if LAYOUT_CUSTOM
|
||||||
{ text_layout14, custom },
|
{ text_layout14, custom }, /* custom layout */
|
||||||
#endif
|
#endif
|
||||||
{ NULL, NULL },
|
{ NULL, NULL },
|
||||||
};
|
};
|
||||||
|
|
14
toggle.h
14
toggle.h
|
@ -40,18 +40,4 @@ Not compatible with BSDs so for those, set this to 0. */
|
||||||
/* Layouts
|
/* Layouts
|
||||||
* If you don't use a layout, you can remove it to keep the speedwm binary small.
|
* If you don't use a layout, you can remove it to keep the speedwm binary small.
|
||||||
*/
|
*/
|
||||||
#define LAYOUT_TILE 1 /* Whether or not to include the tiling layout */
|
|
||||||
#define LAYOUT_MONOCLE 1 /* Whether or not to include the monocle layout */
|
|
||||||
#define LAYOUT_GRID 1 /* Whether or not to include the grid layout */
|
|
||||||
#define LAYOUT_FIBO 1 /* Whether or not to include the fibonacci layout */
|
|
||||||
#define LAYOUT_DWINDLE 1 /* Whether or not to include the dwindle layout */
|
|
||||||
#define LAYOUT_DECK 1 /* Whether or not to include the deck layout */
|
|
||||||
#define LAYOUT_SPIRAL 1 /* Whether or not to include the spiral layout */
|
|
||||||
#define LAYOUT_BSTACK 1 /* Whether or not to include the bottom stack layout */
|
|
||||||
#define LAYOUT_BSTACKH 1 /* Whether or not to include the horizontal bottom stack layout */
|
|
||||||
#define LAYOUT_HGRID 1 /* Whether or not to include the horizontal grid layout */
|
|
||||||
#define LAYOUT_DGRID 1 /* Whether or not to include the dynamic grid layout */
|
|
||||||
#define LAYOUT_CM 1 /* Whether or not to include the centered master layout */
|
|
||||||
#define LAYOUT_CFM 1 /* Whether or not to include the centered floating master layout */
|
|
||||||
#define LAYOUT_COL 1 /* Whether or not to include the column layout */
|
|
||||||
#define LAYOUT_CUSTOM 1 /* Whether or not to include the custom layout */
|
#define LAYOUT_CUSTOM 1 /* Whether or not to include the custom layout */
|
||||||
|
|
|
@ -136,15 +136,11 @@ ResourcePref resources[] = {
|
||||||
{ "systray.position", INTEGER, &systrayposition },
|
{ "systray.position", INTEGER, &systrayposition },
|
||||||
{ "systray.padding", INTEGER, &systrayspacing },
|
{ "systray.padding", INTEGER, &systrayspacing },
|
||||||
#endif
|
#endif
|
||||||
#if LAYOUT_MONOCLE
|
|
||||||
{ "layout.monocle.format", STRING, &monocleformat },
|
{ "layout.monocle.format", STRING, &monocleformat },
|
||||||
{ "layout.monocle.clientcount", INTEGER, &monocleclientcount },
|
{ "layout.monocle.clientcount", INTEGER, &monocleclientcount },
|
||||||
{ "layout.monocle.count", INTEGER, &monoclecount },
|
{ "layout.monocle.count", INTEGER, &monoclecount },
|
||||||
#endif
|
|
||||||
#if LAYOUT_DECK
|
|
||||||
{ "layout.deck.format", STRING, &deckformat },
|
{ "layout.deck.format", STRING, &deckformat },
|
||||||
{ "layout.deck.count", INTEGER, &deckcount },
|
{ "layout.deck.count", INTEGER, &deckcount },
|
||||||
#endif
|
|
||||||
#if USEWINICON
|
#if USEWINICON
|
||||||
{ "icon.size", INTEGER, &iconsize },
|
{ "icon.size", INTEGER, &iconsize },
|
||||||
{ "icon.spacing", INTEGER, &iconspacing },
|
{ "icon.spacing", INTEGER, &iconspacing },
|
||||||
|
@ -167,9 +163,6 @@ ResourcePref resources[] = {
|
||||||
#if USEROUNDCORNERS
|
#if USEROUNDCORNERS
|
||||||
{ "border.roundedcorners", INTEGER, &roundedcorners },
|
{ "border.roundedcorners", INTEGER, &roundedcorners },
|
||||||
{ "border.cornerradius", INTEGER, &cornerradius },
|
{ "border.cornerradius", INTEGER, &cornerradius },
|
||||||
#endif
|
|
||||||
#if LAYOUT_DGRID
|
|
||||||
{ "layout.dgrid.forcevsplit", INTEGER, &forcevsplit },
|
|
||||||
#endif
|
#endif
|
||||||
/* Traditional color system support (for example useful for Pywal) */
|
/* Traditional color system support (for example useful for Pywal) */
|
||||||
{ "color0", STRING, &col_background },
|
{ "color0", STRING, &col_background },
|
||||||
|
|
Loading…
Reference in a new issue