diff options
| author | ProsperousPotato <ProsperousPotato@users.noreply.github.com> | 2026-01-07 19:24:25 +0000 |
|---|---|---|
| committer | ProsperousPotato <ProsperousPotato@users.noreply.github.com> | 2026-01-07 19:24:25 +0000 |
| commit | d6250ecd9333627ae2e5ae7783186e5a11b0fa10 (patch) | |
| tree | 5be2b7b72d54acd3b8c42842c320dfc8582eef60 | |
| parent | c51abb377cdec56ad0bd156cd03416166e2c9ee5 (diff) | |
better floating border handling
| -rw-r--r-- | config.h | 5 | ||||
| -rw-r--r-- | dwm.c | 8 |
2 files changed, 7 insertions, 6 deletions
@@ -7,7 +7,7 @@ /* appearance */ static const unsigned int borderpx = 2; /* border pixel of windows */ static const unsigned int snap = 12; /* snap pixel */ -static const int refreshrate = 180; +static const int refreshrate = 60; static const int swallowfloating = 1; /* 1 means swallow floating windows by default */ static const int mousedefault = 1; /* 1 means enable mouse by default */ static const char col_gray1[] = "#000000"; @@ -24,7 +24,7 @@ static const char *colors[][5] = { static const char *const autostart[] = { /* program arguments options null terminator */ "xhidecursor", "", "", NULL, - "xsetroot", "-solid", "black", NULL, + "hsetroot", "-fill", "/usr/share/wallpapers/windows7.jpg", NULL, NULL }; @@ -119,6 +119,7 @@ static const Key keys[] = { { MODKEY, XK_w, spawn, SHCMD(BROWSER) }, { MODKEY|ShiftMask, XK_w, spawn, SHCMD("icecat") }, { MODKEY, XK_a, swapfocus, {0} }, + { MODKEY|ShiftMask, XK_a, spawn, SHCMD("scrcpy") }, #ifdef __linux__ { MODKEY, XK_g, spawn, SHCMD(TERMINAL" -c stfloat -e watch -c -n 2 genlop -c") }, @@ -839,7 +839,7 @@ focus(Client *c) if (c == nexttiled(selmon->clients)) { XSetWindowBorder(dpy, c->win, scheme[SchemeSel][ColMaster].pixel); - } else if(c->isfloating) { + } else if(c->isfloating || !selmon->lt[selmon->sellt]->arrange) { XSetWindowBorder(dpy, c->win, scheme[SchemeSel][ColFloat].pixel); } else { XSetWindowBorder(dpy, c->win, scheme[SchemeSel][ColBorder].pixel); @@ -1116,7 +1116,7 @@ manage(Window w, XWindowAttributes *wa) if (c == nexttiled(selmon->clients)) { XSetWindowBorder(dpy, w, scheme[SchemeNorm][ColMaster].pixel); - } else if(c->isfloating) { + } else if(c->isfloating || !selmon->lt[selmon->sellt]->arrange) { XSetWindowBorder(dpy, w, scheme[SchemeNorm][ColFloat].pixel); } else XSetWindowBorder(dpy, w, scheme[SchemeNorm][ColBorder].pixel); @@ -1133,7 +1133,7 @@ manage(Window w, XWindowAttributes *wa) c->isfloating = c->oldstate = trans != None || c->isfixed; if (c->isfloating) XRaiseWindow(dpy, c->win); - if(c->isfloating) + if(c->isfloating || !selmon->lt[selmon->sellt]->arrange) XSetWindowBorder(dpy, w, scheme[SchemeNorm][ColFloat].pixel); attach(c); attachstack(c); @@ -2027,7 +2027,7 @@ unfocus(Client *c, int setfocus) return; prevclient = c; grabbuttons(c, 0); - if (c->isfloating) + if (c->isfloating || !selmon->lt[selmon->sellt]->arrange) XSetWindowBorder(dpy, c->win, scheme[SchemeNorm][ColFloat].pixel); else XSetWindowBorder(dpy, c->win, scheme[SchemeNorm][ColBorder].pixel); |
