// };
/* In config.h */
+const unsigned int zathura_width = 750;
const unsigned int blender_width = 800;
const unsigned int blender_height = 500;
// const unsigned int calc_width = 400;
{ "Xephyr", NULL, NULL, 0, 0, 0, 1, 1, 0, NULL, 1},
{ "Brave-browser", NULL, NULL, 1<<0, 0, 1, 0, 1, 0, NULL, 1},
{ "Alacritty", NULL, NULL, 1<<0, 0, 1, 0, 0, 0, NULL, 1},
- { "Zathura", NULL, NULL, 1<<0, 0, 1, 0, 1, 0, &layouts[2], 1},
+ { "Zathura", NULL, NULL, 1<<0, 0, 1, 0, 1, 0, NULL, 1},
{ "steam", NULL, NULL, 1<<1, 0, 1, 0, 0, 0, &layouts[2], 0},
{ "steam", NULL, "Friends List", 1<<1, 0, 0, 1, 1, 1, NULL, 0},
{ "steam", NULL, "Steam Settings", 0, 1, 0, 0, 0, 0, NULL, 0},
// };
/* In config.h */
+const unsigned int zathura_width = 750;
const unsigned int blender_width = 800;
const unsigned int blender_height = 500;
// const unsigned int calc_width = 400;
{ "Xephyr", NULL, NULL, 0, 0, 0, 1, 1, 0, NULL, 1},
{ "Brave-browser", NULL, NULL, 1<<0, 0, 1, 0, 1, 0, NULL, 1},
{ "Alacritty", NULL, NULL, 1<<0, 0, 1, 0, 0, 0, NULL, 1},
- { "Zathura", NULL, NULL, 1<<0, 0, 1, 0, 1, 0, &layouts[2], 1},
+ { "Zathura", NULL, NULL, 1<<0, 0, 1, 0, 1, 0, NULL, 1},
{ "steam", NULL, NULL, 1<<1, 0, 1, 0, 0, 0, &layouts[2], 0},
{ "steam", NULL, "Friends List", 1<<1, 0, 0, 1, 1, 1, NULL, 0},
{ "steam", NULL, "Steam Settings", 0, 1, 0, 0, 0, 0, NULL, 0},
mx = bx;
tw = bw;
- if (nt > m->nmaster) {
- mw = m->nmaster ? (bw - 2 * g) * m->mfact : 0;
- tw = (bw - mw - 2 * g) / 2;
- if (nt - m->nmaster > 1)
- mx = bx + tw + g;
- else
- tw = bw - mw - g;
+ // if (nt > m->nmaster) {
+ // mw = m->nmaster ? (bw - 2 * g) * m->mfact : 0;
+ // tw = (bw - mw - 2 * g) / 2;
+ // if (nt - m->nmaster > 1)
+ // mx = bx + tw + g;
+ // else
+ // tw = bw - mw - g;
+ // }
+ // if (nt > m->nmaster) {
+ // /* --- FIXED ZATHURA WIDTH OVERRIDE --- */
+ // Client *master_c = nexttiled(m->clients);
+ // if (master_c && strstr(master_c->class, "Zathura"))
+ // mw = zathura_width;
+ // else
+ // mw = m->nmaster ? (bw - 2 * g) * m->mfact : 0;
+ // /* ----------------------------------- */
+
+ // tw = (bw - mw - 2 * g) / 2;
+ // if (nt - m->nmaster > 1)
+ // mx = bx + tw + g;
+ // else
+ // tw = bw - mw - g;
+ // }
+ /* --- FIND TRUE MASTER WINDOW (SKIPPING SIDE PANELS) --- */
+ Client *master_c = NULL;
+ for (c = nexttiled(m->clients); c; c = nexttiled(c->next)) {
+ if ((c->tags & m->tagset[m->seltags]) && !c->isSidePanel) {
+ master_c = c;
+ break;
+ }
}
+ /* ----------------------------------------------------- */
+ int is_zathura = (master_c && (strstr(master_c->class, "Zathura") ||
+ strstr(master_c->class, "zathura")));
+
+ if (is_zathura) {
+ mw = zathura_width;
+ if (nt > m->nmaster) {
+ tw = (bw - mw - 2 * g) / 2;
+ if (nt - m->nmaster > 1)
+ mx = bx + tw + g;
+ else
+ tw = bw - mw - g;
+ } else {
+ mx = bx + (bw - mw) / 2;
+ }
+ } else if (nt > m->nmaster) {
+ mw = m->nmaster ? (bw - 2 * g) * m->mfact : 0;
+ tw = (bw - mw - 2 * g) / 2;
+ if (nt - m->nmaster > 1)
+ mx = bx + tw + g;
+ else
+ tw = bw - mw - g;
+ }
oty = 0;
ety = 0;
unfocus(selmon->sel, 0);
selmon = m;
focus(NULL);
+ XWarpPointer(dpy, None, root, 0, 0, 0, 0,
+ selmon->wx + selmon->ww / 2,
+ selmon->wy + selmon->wh / 2);
}
// void
int g = gappx;
- if (nt > m->nmaster)
+ // if (nt > m->nmaster)
+ // mw = m->nmaster ? (bw - g) * m->mfact : 0;
+ // else
+ // mw = bw;
+
+ // /* --- FIXED ZATHURA WIDTH OVERRIDE --- */
+ // if (nt > m->nmaster) {
+ // Client *master_c = nexttiled(m->clients);
+ // if (master_c && strstr(master_c->class, "Zathura"))
+ // mw = zathura_width;
+ // else
+ // mw = m->nmaster ? (bw - g) * m->mfact : 0;
+ // } else {
+ // mw = bw;
+ // }
+ // /* ----------------------------------- */
+
+ /* --- FIND TRUE MASTER WINDOW (SKIPPING SIDE PANELS) --- */
+ Client *master_c = NULL;
+ for (c = nexttiled(m->clients); c; c = nexttiled(c->next)) {
+ if ((c->tags & m->tagset[m->seltags]) && !c->isSidePanel) {
+ master_c = c;
+ break;
+ }
+ }
+ /* ----------------------------------------------------- */
+ if (master_c && (strstr(master_c->class, "Zathura") || strstr(master_c->class, "zathura"))) {
+ mw = zathura_width;
+ } else if (nt > m->nmaster) {
mw = m->nmaster ? (bw - g) * m->mfact : 0;
- else
+ } else {
mw = bw;
+ }
+ /* --------------------------------------------------- */
for (i = my = ty = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next)) {
if (!(c->tags & m->tagset[m->seltags]) || c->isSidePanel)