t* dwm + patches URI git clone git://git.codevoid.de/dwm-sdk DIR Log DIR Files DIR Refs DIR README DIR LICENSE --- DIR commit 6f200a8616df592e9ba9ab86cbf4cc8e222c2da2 DIR parent 40fe6342fd394b18d6baf724cec5ad2daa6902f2 URI Author: Stefan Hagen <sh+git[at]codevoid[dot]de> Date: Sun, 28 Apr 2019 10:33:19 +0200 Fullscreen Bordercolor, cleanup Diffstat: M Makefile | 2 +- M config.h | 13 +++++-------- M dwm.c | 2 ++ M maximize.c | 15 +++++---------- M scripts/browser | 2 +- D transient.c | 42 ------------------------------- 6 files changed, 14 insertions(+), 62 deletions(-) --- DIR diff --git a/Makefile b/Makefile t@@ -31,7 +31,7 @@ clean: dist: clean mkdir -p dwm-${VERSION} cp -R LICENSE Makefile README config.def.h config.mk\ - dwm.1 drw.h util.h ${SRC} dwm.png transient.c dwm-${VERSION} + dwm.1 drw.h util.h ${SRC} dwm.png dwm-${VERSION} tar -cf dwm-${VERSION}.tar dwm-${VERSION} gzip dwm-${VERSION}.tar rm -rf dwm-${VERSION} DIR diff --git a/config.h b/config.h t@@ -1,17 +1,15 @@ /* See LICENSE file for copyright and license details. */ /* appearance */ -static const char *fonts[] = { "-xos4-terminus-medium-r-normal--16-160-72-72-c-80-iso8859-15" }; +static const char *fonts[] = { "LuxiMono-10" }; static const char normbgcolor[] = "#181818"; // top bar bg static const char normfgcolor[] = "#999999"; // top bar fg static const char selbgcolor[] = "#181818"; // top bar selection bg static const char selfgcolor[] = "#EEEEEE"; // top bar selection fg static const char normbordercolor[] = "#333333"; // window border bg static const char selbordercolor[] = "#FF0000"; // window border fg -static const char floatnormbordercolor[] = "#181818"; // floating window border bg -static const char floatselbordercolor[] = "#FF0000"; // floating window border fg static const unsigned int borderpx = 1; // border pixel of windows -static const unsigned int gappx = 8; // gap pixel between windows +static const unsigned int gappx = 10; // gap pixel between windows static const unsigned int snap = 8; // snap pixel static const unsigned int systraypinning = 0; // 0: systray follows mouse, >0: pin systray to monitor X static const unsigned int systrayspacing = 2; // systray spacing t@@ -29,7 +27,7 @@ static const char *colors[][3] = { }; /* dmenu options */ -#define DMENUOPTS "-fn", "Terminus:size=12" , "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", selfgcolor +#define DMENUOPTS "-fn", "LuxiMono-10" , "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", selfgcolor /* tagging */ static const char *tags[] = { "[1]", "[2]", "[3]", "[4]", "[5]", "[6]", "[7]", "[8]", "[9]" }; t@@ -78,11 +76,11 @@ static char dmenumon[2] = "0"; static const char *dmenucmd[] = { "dmenu_run", DMENUOPTS, NULL }; #ifdef __linux__ -static const char *scratchpadcmd[] = { "st","-t", scratchpadname, "-g", "120x34", "-e", "mksh", NULL }; +static const char *scratchpadcmd[] = { "st","-t", scratchpadname, "-g", "80x20", "-e", "mksh", NULL }; static const char *termcmd[] = { "st", "-e", "mksh", NULL }; #else static const char *termcmd[] = { "st", NULL }; -static const char *scratchpadcmd[] = { "st", "-t", scratchpadname, "-g", "120x34", NULL }; +static const char *scratchpadcmd[] = { "st", "-t", scratchpadname, "-g", "96x18", NULL }; #endif static const char *notescmd[] = { "st", "-e", "vim", "Seafile/NotesSync/notes.otl", NULL }; static const char *browsercmd[] = { ".dwm/browser", DMENUOPTS, NULL }; t@@ -94,7 +92,6 @@ static const char *youtube[] = { ".dwm/youtube", NULL }; static const char *updateStatus[] = { "pkill", "-SIGUSR1", "dwmstatus", NULL }; static const char *unMute[] = { "mixerctl", "outputs.spkr_mute=off", NULL }; - #include "maximize.c" static Key keys[] = { /* modifier key function argument */ DIR diff --git a/dwm.c b/dwm.c t@@ -981,6 +981,8 @@ focusstack(const Arg *arg) Client *c = NULL, *i; if (!selmon->sel) + return; + if(selmon->sel->ismax) return; if (arg->i > 0) { for (c = selmon->sel->next; c && !ISVISIBLE(c); c = c->next); DIR diff --git a/maximize.c b/maximize.c t@@ -25,6 +25,11 @@ maximize(int x, int y, int w, int h) { togglefloating(NULL); selmon->sel->ismax = False; } + if(selmon->sel->ismax) { + XSetWindowBorder(dpy, selmon->sel->win, scheme[SchemeNorm][ColBg].pixel); + } else { + XSetWindowBorder(dpy, selmon->sel->win, scheme[SchemeSel][ColBorder].pixel); + } drawbar(selmon); while(XCheckMaskEvent(dpy, EnterWindowMask, &ev)); } t@@ -50,13 +55,3 @@ void togglemaximize(const Arg *arg) { maximize(selmon->wx, selmon->wy, selmon->ww - 2 * borderpx, selmon->wh - 2 * borderpx); } - -void -toggleverticalmax(const Arg *arg) { - maximize(selmon->sel->x, selmon->wy, selmon->sel->w, selmon->wh - 2 * borderpx); -} - -void -togglehorizontalmax(const Arg *arg) { - maximize(selmon->wx, selmon->sel->y, selmon->ww - 2 * borderpx, selmon->sel->h); -} DIR diff --git a/scripts/browser b/scripts/browser t@@ -18,7 +18,7 @@ browse() { PRG="$(printf "Luakit\nChrome\n" | dmenu -p "Program" $DMENUOPTS )" case $PRG in Luakit) BROWSER="luakit -Un";; - Chromium) BROWSER="chrome --new-window";; + Chrome) BROWSER="chrome --new-window";; Vimb) BROWSER="vimb";; Surf) BROWSER="surf";; Firefox) BROWSER="firefox --new-window";; DIR diff --git a/transient.c b/transient.c t@@ -1,42 +0,0 @@ -/* cc transient.c -o transient -lX11 */ - -#include <stdlib.h> -#include <unistd.h> -#include <X11/Xlib.h> -#include <X11/Xutil.h> - -int main(void) { - Display *d; - Window r, f, t = None; - XSizeHints h; - XEvent e; - - d = XOpenDisplay(NULL); - if (!d) - exit(1); - r = DefaultRootWindow(d); - - f = XCreateSimpleWindow(d, r, 100, 100, 400, 400, 0, 0, 0); - h.min_width = h.max_width = h.min_height = h.max_height = 400; - h.flags = PMinSize | PMaxSize; - XSetWMNormalHints(d, f, &h); - XStoreName(d, f, "floating"); - XMapWindow(d, f); - - XSelectInput(d, f, ExposureMask); - while (1) { - XNextEvent(d, &e); - - if (t == None) { - sleep(5); - t = XCreateSimpleWindow(d, r, 50, 50, 100, 100, 0, 0, 0); - XSetTransientForHint(d, t, f); - XStoreName(d, t, "transient"); - XMapWindow(d, t); - XSelectInput(d, t, ExposureMask); - } - } - - XCloseDisplay(d); - exit(0); -}