From 5371515de7f76fa91db995375b3dc8fc6b13d7d8 Mon Sep 17 00:00:00 2001 From: TrudeEH Date: Mon, 3 Jun 2024 12:58:26 +0100 Subject: [PATCH] Fix DWM patch bug --- suckless/dwm/config.def.h | 9 ++++----- suckless/dwm/config.h | 11 ++++++++--- suckless/dwm/dwm.c | 8 ++++---- 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/suckless/dwm/config.def.h b/suckless/dwm/config.def.h index 3edfafe8..a7bd066f 100644 --- a/suckless/dwm/config.def.h +++ b/suckless/dwm/config.def.h @@ -3,7 +3,7 @@ #include "exitdwm.c" /* appearance */ -static const unsigned int borderpx = 2; /* border pixel of windows */ +static const unsigned int borderpx = 1; /* border pixel of windows */ static const unsigned int snap = 32; /* snap pixel */ static const unsigned int systraypinning = 0; /* 0: sloppy systray follows selected monitor, >0: pin systray to monitor X */ static const unsigned int systrayonleft = 0; /* 0: systray in the right corner, >0: systray on left of status text */ @@ -12,8 +12,8 @@ static const int systraypinningfailfirst = 1; /* 1: if pinning fails, display static const int showsystray = 1; /* 0 means no systray */ static const int showbar = 1; /* 0 means no bar */ static const int topbar = 1; /* 0 means bottom bar */ -static const char *fonts[] = { "JetBrainsMono NF:size=20" }; -static const char dmenufont[] = "JetBrainsMono NF:size=20"; +static const char *fonts[] = { "monospace:size=10" }; +static const char dmenufont[] = "monospace:size=10"; static const char col_gray1[] = "#222222"; static const char col_gray2[] = "#444444"; static const char col_gray3[] = "#bbbbbb"; @@ -102,8 +102,7 @@ static const Key keys[] = { TAGKEYS( XK_7, 6) TAGKEYS( XK_8, 7) TAGKEYS( XK_9, 8) - { MODKEY|ShiftMask, XK_q, exitdwm, {0} }, - { MODKEY|ControlMask|ShiftMask, XK_q, quit, {1} }, + { MODKEY|ShiftMask, XK_e, exitdwm, {0} }, }; /* button definitions */ diff --git a/suckless/dwm/config.h b/suckless/dwm/config.h index fb113dc4..fed4fb92 100644 --- a/suckless/dwm/config.h +++ b/suckless/dwm/config.h @@ -1,12 +1,17 @@ /* See LICENSE file for copyright and license details. */ /* appearance */ -static const unsigned int borderpx = 2; /* border pixel of windows */ +static const unsigned int borderpx = 1; /* border pixel of windows */ static const unsigned int snap = 32; /* snap pixel */ +static const unsigned int systraypinning = 0; /* 0: sloppy systray follows selected monitor, >0: pin systray to monitor X */ +static const unsigned int systrayonleft = 0; /* 0: systray in the right corner, >0: systray on left of status text */ +static const unsigned int systrayspacing = 2; /* systray spacing */ +static const int systraypinningfailfirst = 1; /* 1: if pinning fails, display systray on the first monitor, False: display systray on the last monitor*/ +static const int showsystray = 1; /* 0 means no systray */ static const int showbar = 1; /* 0 means no bar */ static const int topbar = 1; /* 0 means bottom bar */ -static const char *fonts[] = { "JetBrainsMono NF:size=20" }; -static const char dmenufont[] = "JetBrainsMono NF:size=20"; +static const char *fonts[] = { "monospace:size=10" }; +static const char dmenufont[] = "monospace:size=10"; static const char col_gray1[] = "#222222"; static const char col_gray2[] = "#444444"; static const char col_gray3[] = "#bbbbbb"; diff --git a/suckless/dwm/dwm.c b/suckless/dwm/dwm.c index 972c6ef2..b68db9d5 100644 --- a/suckless/dwm/dwm.c +++ b/suckless/dwm/dwm.c @@ -107,7 +107,7 @@ struct Client { int basew, baseh, incw, inch, maxw, maxh, minw, minh, hintsvalid; int bw, oldbw; unsigned int tags; - int isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen, needresize, CenterThisWindow; + int isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen, CenterThisWindow, needresize; Client *next; Client *snext; Monitor *mon; @@ -231,12 +231,12 @@ static void setmfact(const Arg *arg); static void setup(void); static void seturgent(Client *c, int urg); static void showhide(Client *c); +static void sighup(int unused); +static void sigterm(int unused); static void spawn(const Arg *arg); static Monitor *systraytomon(Monitor *m); static void tag(const Arg *arg); static void tagmon(const Arg *arg); -static void sighup(int unused); -static void sigterm(int unused); static void tile(Monitor *m); static void togglebar(const Arg *arg); static void togglefloating(const Arg *arg); @@ -295,7 +295,7 @@ static void (*handler[LASTEvent]) (XEvent *) = { [UnmapNotify] = unmapnotify }; static Atom wmatom[WMLast], netatom[NetLast], xatom[XLast]; -+static int restart = 0; +static int restart = 0; static int running = 1; static Cur *cursor[CurLast]; static Clr **scheme;