Added possibility to extend number of clickable blocks
This commit is contained in:
parent
5ec0e8ab9c
commit
1e61822f8e
46
blocks.h
46
blocks.h
|
@ -1,15 +1,31 @@
|
||||||
#define PATH(name) "/home/ashish/.local/projects/dwmblocks/blocks/"name
|
#define PATH(name) "/home/ashish/.local/projects/dwmblocks/blocks/"name
|
||||||
|
|
||||||
/* If interval of a block is set to 0, the block will only be updated once at startup.
|
/* At max, DELIMITERENDCHAR - 1 number of clickable blocks will be allowed.
|
||||||
* If interval is set to a negative value, the block will never be updated in the main loop.
|
* DELIMITERENDCHAR must be less than 32.
|
||||||
* Set pathc to NULL if clickability is not required for the block.
|
* Raw characters larger than DELIMITERENDCHAR and smaller than ' ' in ASCII
|
||||||
* Set signal to 0 if both clickability and signaling are not required for the block.
|
character set can be used for signaling color change in status.
|
||||||
* Signal must be less than 10 for clickable blocks.
|
* The character corresponding to DELIMITERENDCHAR + 1 ('\x0b' when
|
||||||
* If multiple signals are pending, then the lowest numbered one will be delivered first. */
|
DELIMITERENDCHAR is 10) will switch the active colorscheme to the first one
|
||||||
|
defined in colors array in dwm and so on.
|
||||||
|
* If you change this, don't forget to update its value in dwm.c and color
|
||||||
|
codes in your pathu programs. */
|
||||||
|
|
||||||
/* pathu - path of the program whose output is to be used for status text
|
#define DELIMITERENDCHAR 10
|
||||||
* output of the program should have a null or newline character at the end
|
|
||||||
* pathc - path of the program to be executed on clicks */
|
/* If interval of a block is set to 0, the block will only be updated once at
|
||||||
|
startup.
|
||||||
|
* If interval is set to a negative value, the block will never be updated in
|
||||||
|
the main loop.
|
||||||
|
* Set pathc to NULL if clickability is not required for the block.
|
||||||
|
* Set signal to 0 if both clickability and signaling are not required for the
|
||||||
|
block.
|
||||||
|
* Signal must be less than DELIMITERENDCHAR for clickable blocks.
|
||||||
|
* If multiple signals are pending, then the lowest numbered one will be
|
||||||
|
delivered first. */
|
||||||
|
|
||||||
|
/* pathu - path of the program whose output is used as status text of the block
|
||||||
|
(output of the program should end in a null or newline character)
|
||||||
|
* pathc - path of the program used for handling clicks on the block */
|
||||||
|
|
||||||
/* 1 interval = INTERVALs seconds, INTERVALn nanoseconds */
|
/* 1 interval = INTERVALs seconds, INTERVALn nanoseconds */
|
||||||
#define INTERVALs 1
|
#define INTERVALs 1
|
||||||
|
@ -17,16 +33,10 @@
|
||||||
|
|
||||||
static Block blocks[] = {
|
static Block blocks[] = {
|
||||||
/* pathu pathc interval signal */
|
/* pathu pathc interval signal */
|
||||||
{ PATH("time.sh"), NULL, 30, 10},
|
{ PATH("calendar.sh"), NULL, 30, 1},
|
||||||
|
{ PATH("volume.sh"), PATH("volume_button.sh"), 0, 2},
|
||||||
{ PATH("calendar.sh"), NULL, 30, 3},
|
|
||||||
|
|
||||||
{ PATH("volume.sh"), PATH("volume_button.sh"), 0, 1},
|
|
||||||
|
|
||||||
{ PATH("cpu_temp.sh"), PATH("cpu_temp_button.sh"), 1, 4},
|
{ PATH("cpu_temp.sh"), PATH("cpu_temp_button.sh"), 1, 4},
|
||||||
|
{ PATH("battery.sh"), PATH("battery_button.sh"), 30, 3},
|
||||||
{ PATH("battery.sh"), PATH("battery_button.sh"), 30, 2},
|
|
||||||
|
|
||||||
{ NULL } /* just to mark the end of the array */
|
{ NULL } /* just to mark the end of the array */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
ICON=""
|
|
||||||
echo "${ICON}$(date '+%H:%M')"
|
|
|
@ -295,7 +295,7 @@ update1:
|
||||||
d = delim;
|
d = delim;
|
||||||
while (*d != '\0')
|
while (*d != '\0')
|
||||||
*(s++) = *(d++);
|
*(s++) = *(d++);
|
||||||
*(s++) = '\n'; /* to mark the end of delimiter */
|
*(s++) = DELIMITERENDCHAR;
|
||||||
/* skip over empty blocks */
|
/* skip over empty blocks */
|
||||||
} else {
|
} else {
|
||||||
*block->cmdoutprv = *block->cmdoutcur;
|
*block->cmdoutprv = *block->cmdoutcur;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
diff -ruN dwm-6.2-ori/config.def.h dwm-6.2/config.def.h
|
diff -ruN dwm-6.2-ori/config.def.h dwm-6.2/config.def.h
|
||||||
--- dwm-6.2-ori/config.def.h 2019-02-02 18:25:28.000000000 +0530
|
--- dwm-6.2-ori/config.def.h 2019-02-02 18:25:28.000000000 +0530
|
||||||
+++ dwm-6.2/config.def.h 2020-08-18 03:43:45.933763395 +0530
|
+++ dwm-6.2/config.def.h 2020-12-27 19:52:54.790231420 +0530
|
||||||
@@ -12,10 +12,34 @@
|
@@ -12,10 +12,26 @@
|
||||||
static const char col_gray3[] = "#bbbbbb";
|
static const char col_gray3[] = "#bbbbbb";
|
||||||
static const char col_gray4[] = "#eeeeee";
|
static const char col_gray4[] = "#eeeeee";
|
||||||
static const char col_cyan[] = "#005577";
|
static const char col_cyan[] = "#005577";
|
||||||
|
@ -11,12 +11,10 @@ diff -ruN dwm-6.2-ori/config.def.h dwm-6.2/config.def.h
|
||||||
+static const char col4[] = "#ffffff";
|
+static const char col4[] = "#ffffff";
|
||||||
+static const char col5[] = "#ffffff";
|
+static const char col5[] = "#ffffff";
|
||||||
+static const char col6[] = "#ffffff";
|
+static const char col6[] = "#ffffff";
|
||||||
+static const char col7[] = "#ffffff";
|
+
|
||||||
+static const char col8[] = "#ffffff";
|
+enum { SchemeNorm, SchemeCol1, SchemeCol2, SchemeCol3, SchemeCol4,
|
||||||
+static const char col9[] = "#ffffff";
|
+ SchemeCol5, SchemeCol6, SchemeSel }; /* color schemes */
|
||||||
+static const char col10[] = "#ffffff";
|
+
|
||||||
+static const char col11[] = "#ffffff";
|
|
||||||
+static const char col12[] = "#ffffff";
|
|
||||||
static const char *colors[][3] = {
|
static const char *colors[][3] = {
|
||||||
/* fg bg border */
|
/* fg bg border */
|
||||||
- [SchemeNorm] = { col_gray3, col_gray1, col_gray2 },
|
- [SchemeNorm] = { col_gray3, col_gray1, col_gray2 },
|
||||||
|
@ -28,17 +26,11 @@ diff -ruN dwm-6.2-ori/config.def.h dwm-6.2/config.def.h
|
||||||
+ [SchemeCol4] = { col4, col_gray1, col_gray2 },
|
+ [SchemeCol4] = { col4, col_gray1, col_gray2 },
|
||||||
+ [SchemeCol5] = { col5, col_gray1, col_gray2 },
|
+ [SchemeCol5] = { col5, col_gray1, col_gray2 },
|
||||||
+ [SchemeCol6] = { col6, col_gray1, col_gray2 },
|
+ [SchemeCol6] = { col6, col_gray1, col_gray2 },
|
||||||
+ [SchemeCol7] = { col7, col_gray1, col_gray2 },
|
|
||||||
+ [SchemeCol8] = { col8, col_gray1, col_gray2 },
|
|
||||||
+ [SchemeCol9] = { col8, col_gray1, col_gray2 },
|
|
||||||
+ [SchemeCol10] = { col10, col_gray1, col_gray2 },
|
|
||||||
+ [SchemeCol11] = { col11, col_gray1, col_gray2 },
|
|
||||||
+ [SchemeCol12] = { col12, col_gray1, col_gray2 },
|
|
||||||
+ [SchemeSel] = { col_gray4, col_cyan, col_cyan },
|
+ [SchemeSel] = { col_gray4, col_cyan, col_cyan },
|
||||||
};
|
};
|
||||||
|
|
||||||
/* tagging */
|
/* tagging */
|
||||||
@@ -103,7 +127,9 @@
|
@@ -103,7 +119,9 @@
|
||||||
{ ClkLtSymbol, 0, Button1, setlayout, {0} },
|
{ ClkLtSymbol, 0, Button1, setlayout, {0} },
|
||||||
{ ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} },
|
{ ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} },
|
||||||
{ ClkWinTitle, 0, Button2, zoom, {0} },
|
{ ClkWinTitle, 0, Button2, zoom, {0} },
|
||||||
|
@ -51,7 +43,7 @@ diff -ruN dwm-6.2-ori/config.def.h dwm-6.2/config.def.h
|
||||||
{ ClkClientWin, MODKEY, Button3, resizemouse, {0} },
|
{ ClkClientWin, MODKEY, Button3, resizemouse, {0} },
|
||||||
diff -ruN dwm-6.2-ori/dwm.c dwm-6.2/dwm.c
|
diff -ruN dwm-6.2-ori/dwm.c dwm-6.2/dwm.c
|
||||||
--- dwm-6.2-ori/dwm.c 2019-02-02 18:25:28.000000000 +0530
|
--- dwm-6.2-ori/dwm.c 2019-02-02 18:25:28.000000000 +0530
|
||||||
+++ dwm-6.2/dwm.c 2020-12-05 03:57:52.643158573 +0530
|
+++ dwm-6.2/dwm.c 2020-12-27 19:55:32.771263008 +0530
|
||||||
@@ -40,6 +40,7 @@
|
@@ -40,6 +40,7 @@
|
||||||
#include <X11/extensions/Xinerama.h>
|
#include <X11/extensions/Xinerama.h>
|
||||||
#endif /* XINERAMA */
|
#endif /* XINERAMA */
|
||||||
|
@ -60,7 +52,7 @@ diff -ruN dwm-6.2-ori/dwm.c dwm-6.2/dwm.c
|
||||||
|
|
||||||
#include "drw.h"
|
#include "drw.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
@@ -56,10 +57,16 @@
|
@@ -56,10 +57,14 @@
|
||||||
#define HEIGHT(X) ((X)->h + 2 * (X)->bw)
|
#define HEIGHT(X) ((X)->h + 2 * (X)->bw)
|
||||||
#define TAGMASK ((1 << LENGTH(tags)) - 1)
|
#define TAGMASK ((1 << LENGTH(tags)) - 1)
|
||||||
#define TEXTW(X) (drw_fontset_getwidth(drw, (X)) + lrpad)
|
#define TEXTW(X) (drw_fontset_getwidth(drw, (X)) + lrpad)
|
||||||
|
@ -68,18 +60,16 @@ diff -ruN dwm-6.2-ori/dwm.c dwm-6.2/dwm.c
|
||||||
+
|
+
|
||||||
+#define STATUSLENGTH 256
|
+#define STATUSLENGTH 256
|
||||||
+#define DWMBLOCKSLOCKFILE "/tmp/dwmblocks.pid"
|
+#define DWMBLOCKSLOCKFILE "/tmp/dwmblocks.pid"
|
||||||
|
+#define DELIMITERENDCHAR 10
|
||||||
|
|
||||||
/* enums */
|
/* enums */
|
||||||
-enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */
|
-enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */
|
||||||
-enum { SchemeNorm, SchemeSel }; /* color schemes */
|
-enum { SchemeNorm, SchemeSel }; /* color schemes */
|
||||||
+enum { CurNormal, CurHand, CurResize, CurMove, CurLast }; /* cursor */
|
+enum { CurNormal, CurHand, CurResize, CurMove, CurLast }; /* cursor */
|
||||||
+enum { SchemeNorm, SchemeCol1, SchemeCol2, SchemeCol3, SchemeCol4,
|
|
||||||
+ SchemeCol5, SchemeCol6, SchemeCol7, SchemeCol8, SchemeCol9,
|
|
||||||
+ SchemeCol10, SchemeCol11, SchemeCol12, SchemeSel }; /* color schemes */
|
|
||||||
enum { NetSupported, NetWMName, NetWMState, NetWMCheck,
|
enum { NetSupported, NetWMName, NetWMState, NetWMCheck,
|
||||||
NetWMFullscreen, NetActiveWindow, NetWMWindowType,
|
NetWMFullscreen, NetActiveWindow, NetWMWindowType,
|
||||||
NetWMWindowTypeDialog, NetClientList, NetLast }; /* EWMH atoms */
|
NetWMWindowTypeDialog, NetClientList, NetLast }; /* EWMH atoms */
|
||||||
@@ -205,6 +212,7 @@
|
@@ -205,6 +210,7 @@
|
||||||
static void seturgent(Client *c, int urg);
|
static void seturgent(Client *c, int urg);
|
||||||
static void showhide(Client *c);
|
static void showhide(Client *c);
|
||||||
static void sigchld(int unused);
|
static void sigchld(int unused);
|
||||||
|
@ -87,7 +77,7 @@ diff -ruN dwm-6.2-ori/dwm.c dwm-6.2/dwm.c
|
||||||
static void spawn(const Arg *arg);
|
static void spawn(const Arg *arg);
|
||||||
static void tag(const Arg *arg);
|
static void tag(const Arg *arg);
|
||||||
static void tagmon(const Arg *arg);
|
static void tagmon(const Arg *arg);
|
||||||
@@ -219,6 +227,7 @@
|
@@ -219,6 +225,7 @@
|
||||||
static void updatebarpos(Monitor *m);
|
static void updatebarpos(Monitor *m);
|
||||||
static void updatebars(void);
|
static void updatebars(void);
|
||||||
static void updateclientlist(void);
|
static void updateclientlist(void);
|
||||||
|
@ -95,7 +85,7 @@ diff -ruN dwm-6.2-ori/dwm.c dwm-6.2/dwm.c
|
||||||
static int updategeom(void);
|
static int updategeom(void);
|
||||||
static void updatenumlockmask(void);
|
static void updatenumlockmask(void);
|
||||||
static void updatesizehints(Client *c);
|
static void updatesizehints(Client *c);
|
||||||
@@ -236,12 +245,16 @@
|
@@ -236,12 +243,16 @@
|
||||||
|
|
||||||
/* variables */
|
/* variables */
|
||||||
static const char broken[] = "broken";
|
static const char broken[] = "broken";
|
||||||
|
@ -114,7 +104,7 @@ diff -ruN dwm-6.2-ori/dwm.c dwm-6.2/dwm.c
|
||||||
static unsigned int numlockmask = 0;
|
static unsigned int numlockmask = 0;
|
||||||
static void (*handler[LASTEvent]) (XEvent *) = {
|
static void (*handler[LASTEvent]) (XEvent *) = {
|
||||||
[ButtonPress] = buttonpress,
|
[ButtonPress] = buttonpress,
|
||||||
@@ -416,13 +429,13 @@
|
@@ -416,13 +427,13 @@
|
||||||
void
|
void
|
||||||
buttonpress(XEvent *e)
|
buttonpress(XEvent *e)
|
||||||
{
|
{
|
||||||
|
@ -130,7 +120,7 @@ diff -ruN dwm-6.2-ori/dwm.c dwm-6.2/dwm.c
|
||||||
/* focus monitor if necessary */
|
/* focus monitor if necessary */
|
||||||
if ((m = wintomon(ev->window)) && m != selmon) {
|
if ((m = wintomon(ev->window)) && m != selmon) {
|
||||||
unfocus(selmon->sel, 1);
|
unfocus(selmon->sel, 1);
|
||||||
@@ -430,25 +443,30 @@
|
@@ -430,25 +441,30 @@
|
||||||
focus(NULL);
|
focus(NULL);
|
||||||
}
|
}
|
||||||
if (ev->window == selmon->barwin) {
|
if (ev->window == selmon->barwin) {
|
||||||
|
@ -175,7 +165,7 @@ diff -ruN dwm-6.2-ori/dwm.c dwm-6.2/dwm.c
|
||||||
for (i = 0; i < LENGTH(buttons); i++)
|
for (i = 0; i < LENGTH(buttons); i++)
|
||||||
if (click == buttons[i].click && buttons[i].func && buttons[i].button == ev->button
|
if (click == buttons[i].click && buttons[i].func && buttons[i].button == ev->button
|
||||||
&& CLEANMASK(buttons[i].mask) == CLEANMASK(ev->state))
|
&& CLEANMASK(buttons[i].mask) == CLEANMASK(ev->state))
|
||||||
@@ -695,7 +713,7 @@
|
@@ -695,7 +711,7 @@
|
||||||
void
|
void
|
||||||
drawbar(Monitor *m)
|
drawbar(Monitor *m)
|
||||||
{
|
{
|
||||||
|
@ -184,7 +174,7 @@ diff -ruN dwm-6.2-ori/dwm.c dwm-6.2/dwm.c
|
||||||
int boxs = drw->fonts->h / 9;
|
int boxs = drw->fonts->h / 9;
|
||||||
int boxw = drw->fonts->h / 6 + 2;
|
int boxw = drw->fonts->h / 6 + 2;
|
||||||
unsigned int i, occ = 0, urg = 0;
|
unsigned int i, occ = 0, urg = 0;
|
||||||
@@ -703,9 +721,30 @@
|
@@ -703,9 +719,30 @@
|
||||||
|
|
||||||
/* draw status first so it can be overdrawn by tags later */
|
/* draw status first so it can be overdrawn by tags later */
|
||||||
if (m == selmon) { /* status is only drawn on selected monitor */
|
if (m == selmon) { /* status is only drawn on selected monitor */
|
||||||
|
@ -199,7 +189,7 @@ diff -ruN dwm-6.2-ori/dwm.c dwm-6.2/dwm.c
|
||||||
+ x = m->ww - wstext;
|
+ x = m->ww - wstext;
|
||||||
+ drw_rect(drw, x, 0, lrpad / 2, bh, 1, 1); x += lrpad / 2; /* to keep left padding clean */
|
+ drw_rect(drw, x, 0, lrpad / 2, bh, 1, 1); x += lrpad / 2; /* to keep left padding clean */
|
||||||
+ for (;;) {
|
+ for (;;) {
|
||||||
+ if ((unsigned char)*ts > LENGTH(colors) + 10) {
|
+ if ((unsigned char)*ts > LENGTH(colors) + DELIMITERENDCHAR) {
|
||||||
+ ts++;
|
+ ts++;
|
||||||
+ continue;
|
+ continue;
|
||||||
+ }
|
+ }
|
||||||
|
@ -209,7 +199,7 @@ diff -ruN dwm-6.2-ori/dwm.c dwm-6.2/dwm.c
|
||||||
+ x = drw_text(drw, x, 0, TTEXTW(tp), bh, 0, tp, 0);
|
+ x = drw_text(drw, x, 0, TTEXTW(tp), bh, 0, tp, 0);
|
||||||
+ if (ctmp == '\0')
|
+ if (ctmp == '\0')
|
||||||
+ break;
|
+ break;
|
||||||
+ drw_setscheme(drw, scheme[ctmp - 11]);
|
+ drw_setscheme(drw, scheme[ctmp - DELIMITERENDCHAR - 1]);
|
||||||
+ *ts = ctmp;
|
+ *ts = ctmp;
|
||||||
+ tp = ++ts;
|
+ tp = ++ts;
|
||||||
+ }
|
+ }
|
||||||
|
@ -218,7 +208,7 @@ diff -ruN dwm-6.2-ori/dwm.c dwm-6.2/dwm.c
|
||||||
}
|
}
|
||||||
|
|
||||||
for (c = m->clients; c; c = c->next) {
|
for (c = m->clients; c; c = c->next) {
|
||||||
@@ -724,11 +763,17 @@
|
@@ -724,11 +761,17 @@
|
||||||
urg & 1 << i);
|
urg & 1 << i);
|
||||||
x += w;
|
x += w;
|
||||||
}
|
}
|
||||||
|
@ -238,7 +228,7 @@ diff -ruN dwm-6.2-ori/dwm.c dwm-6.2/dwm.c
|
||||||
if (m->sel) {
|
if (m->sel) {
|
||||||
drw_setscheme(drw, scheme[m == selmon ? SchemeSel : SchemeNorm]);
|
drw_setscheme(drw, scheme[m == selmon ? SchemeSel : SchemeNorm]);
|
||||||
drw_text(drw, x, 0, w, bh, lrpad / 2, m->sel->name, 0);
|
drw_text(drw, x, 0, w, bh, lrpad / 2, m->sel->name, 0);
|
||||||
@@ -1122,14 +1167,24 @@
|
@@ -1122,14 +1165,24 @@
|
||||||
Monitor *m;
|
Monitor *m;
|
||||||
XMotionEvent *ev = &e->xmotion;
|
XMotionEvent *ev = &e->xmotion;
|
||||||
|
|
||||||
|
@ -271,7 +261,7 @@ diff -ruN dwm-6.2-ori/dwm.c dwm-6.2/dwm.c
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -1564,6 +1619,7 @@
|
@@ -1564,6 +1617,7 @@
|
||||||
netatom[NetClientList] = XInternAtom(dpy, "_NET_CLIENT_LIST", False);
|
netatom[NetClientList] = XInternAtom(dpy, "_NET_CLIENT_LIST", False);
|
||||||
/* init cursors */
|
/* init cursors */
|
||||||
cursor[CurNormal] = drw_cur_create(drw, XC_left_ptr);
|
cursor[CurNormal] = drw_cur_create(drw, XC_left_ptr);
|
||||||
|
@ -279,7 +269,7 @@ diff -ruN dwm-6.2-ori/dwm.c dwm-6.2/dwm.c
|
||||||
cursor[CurResize] = drw_cur_create(drw, XC_sizing);
|
cursor[CurResize] = drw_cur_create(drw, XC_sizing);
|
||||||
cursor[CurMove] = drw_cur_create(drw, XC_fleur);
|
cursor[CurMove] = drw_cur_create(drw, XC_fleur);
|
||||||
/* init appearance */
|
/* init appearance */
|
||||||
@@ -1637,6 +1693,28 @@
|
@@ -1637,6 +1691,28 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -308,7 +298,7 @@ diff -ruN dwm-6.2-ori/dwm.c dwm-6.2/dwm.c
|
||||||
spawn(const Arg *arg)
|
spawn(const Arg *arg)
|
||||||
{
|
{
|
||||||
if (arg->v == dmenucmd)
|
if (arg->v == dmenucmd)
|
||||||
@@ -1805,7 +1883,7 @@
|
@@ -1805,7 +1881,7 @@
|
||||||
XSetWindowAttributes wa = {
|
XSetWindowAttributes wa = {
|
||||||
.override_redirect = True,
|
.override_redirect = True,
|
||||||
.background_pixmap = ParentRelative,
|
.background_pixmap = ParentRelative,
|
||||||
|
@ -317,7 +307,7 @@ diff -ruN dwm-6.2-ori/dwm.c dwm-6.2/dwm.c
|
||||||
};
|
};
|
||||||
XClassHint ch = {"dwm", "dwm"};
|
XClassHint ch = {"dwm", "dwm"};
|
||||||
for (m = mons; m; m = m->next) {
|
for (m = mons; m; m = m->next) {
|
||||||
@@ -1847,6 +1925,42 @@
|
@@ -1847,6 +1923,42 @@
|
||||||
(unsigned char *) &(c->win), 1);
|
(unsigned char *) &(c->win), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -329,7 +319,7 @@ diff -ruN dwm-6.2-ori/dwm.c dwm-6.2/dwm.c
|
||||||
+ char ctmp;
|
+ char ctmp;
|
||||||
+
|
+
|
||||||
+ while (*ts != '\0') {
|
+ while (*ts != '\0') {
|
||||||
+ if ((unsigned char)*ts > 10) {
|
+ if ((unsigned char)*ts > DELIMITERENDCHAR) {
|
||||||
+ ts++;
|
+ ts++;
|
||||||
+ continue;
|
+ continue;
|
||||||
+ }
|
+ }
|
||||||
|
@ -338,7 +328,7 @@ diff -ruN dwm-6.2-ori/dwm.c dwm-6.2/dwm.c
|
||||||
+ x += TTEXTW(tp);
|
+ x += TTEXTW(tp);
|
||||||
+ *ts = ctmp;
|
+ *ts = ctmp;
|
||||||
+ if (x >= 0) {
|
+ if (x >= 0) {
|
||||||
+ if (ctmp == 10)
|
+ if (ctmp == DELIMITERENDCHAR)
|
||||||
+ goto cursorondelim;
|
+ goto cursorondelim;
|
||||||
+ if (!statushandcursor) {
|
+ if (!statushandcursor) {
|
||||||
+ statushandcursor = 1;
|
+ statushandcursor = 1;
|
||||||
|
@ -360,7 +350,7 @@ diff -ruN dwm-6.2-ori/dwm.c dwm-6.2/dwm.c
|
||||||
int
|
int
|
||||||
updategeom(void)
|
updategeom(void)
|
||||||
{
|
{
|
||||||
@@ -1987,9 +2101,27 @@
|
@@ -1987,9 +2099,27 @@
|
||||||
void
|
void
|
||||||
updatestatus(void)
|
updatestatus(void)
|
||||||
{
|
{
|
||||||
|
@ -376,7 +366,7 @@ diff -ruN dwm-6.2-ori/dwm.c dwm-6.2/dwm.c
|
||||||
+ for (char *rst = rawstext; *rst != '\0'; rst++)
|
+ for (char *rst = rawstext; *rst != '\0'; rst++)
|
||||||
+ if ((unsigned char)*rst >= ' ')
|
+ if ((unsigned char)*rst >= ' ')
|
||||||
+ *(stp++) = *(stc++) = *(sts++) = *rst;
|
+ *(stp++) = *(stc++) = *(sts++) = *rst;
|
||||||
+ else if ((unsigned char)*rst > 10)
|
+ else if ((unsigned char)*rst > DELIMITERENDCHAR)
|
||||||
+ *(stc++) = *rst;
|
+ *(stc++) = *rst;
|
||||||
+ else
|
+ else
|
||||||
+ *(sts++) = *rst;
|
+ *(sts++) = *rst;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
diff -ruN dwm-6.2-ori/config.def.h dwm-6.2/config.def.h
|
diff -ruN dwm-6.2-ori/config.def.h dwm-6.2/config.def.h
|
||||||
--- dwm-6.2-ori/config.def.h 2020-08-17 23:51:19.053910127 +0530
|
--- dwm-6.2-ori/config.def.h 2020-08-17 23:51:19.053910127 +0530
|
||||||
+++ dwm-6.2/config.def.h 2020-08-18 03:44:20.360800879 +0530
|
+++ dwm-6.2/config.def.h 2020-12-27 20:01:15.106831834 +0530
|
||||||
@@ -16,10 +16,34 @@
|
@@ -16,10 +16,26 @@
|
||||||
static const char col_gray3[] = "#bbbbbb";
|
static const char col_gray3[] = "#bbbbbb";
|
||||||
static const char col_gray4[] = "#eeeeee";
|
static const char col_gray4[] = "#eeeeee";
|
||||||
static const char col_cyan[] = "#005577";
|
static const char col_cyan[] = "#005577";
|
||||||
|
@ -11,12 +11,10 @@ diff -ruN dwm-6.2-ori/config.def.h dwm-6.2/config.def.h
|
||||||
+static const char col4[] = "#ffffff";
|
+static const char col4[] = "#ffffff";
|
||||||
+static const char col5[] = "#ffffff";
|
+static const char col5[] = "#ffffff";
|
||||||
+static const char col6[] = "#ffffff";
|
+static const char col6[] = "#ffffff";
|
||||||
+static const char col7[] = "#ffffff";
|
+
|
||||||
+static const char col8[] = "#ffffff";
|
+enum { SchemeNorm, SchemeCol1, SchemeCol2, SchemeCol3, SchemeCol4,
|
||||||
+static const char col9[] = "#ffffff";
|
+ SchemeCol5, SchemeCol6, SchemeSel }; /* color schemes */
|
||||||
+static const char col10[] = "#ffffff";
|
+
|
||||||
+static const char col11[] = "#ffffff";
|
|
||||||
+static const char col12[] = "#ffffff";
|
|
||||||
static const char *colors[][3] = {
|
static const char *colors[][3] = {
|
||||||
/* fg bg border */
|
/* fg bg border */
|
||||||
- [SchemeNorm] = { col_gray3, col_gray1, col_gray2 },
|
- [SchemeNorm] = { col_gray3, col_gray1, col_gray2 },
|
||||||
|
@ -28,17 +26,11 @@ diff -ruN dwm-6.2-ori/config.def.h dwm-6.2/config.def.h
|
||||||
+ [SchemeCol4] = { col4, col_gray1, col_gray2 },
|
+ [SchemeCol4] = { col4, col_gray1, col_gray2 },
|
||||||
+ [SchemeCol5] = { col5, col_gray1, col_gray2 },
|
+ [SchemeCol5] = { col5, col_gray1, col_gray2 },
|
||||||
+ [SchemeCol6] = { col6, col_gray1, col_gray2 },
|
+ [SchemeCol6] = { col6, col_gray1, col_gray2 },
|
||||||
+ [SchemeCol7] = { col7, col_gray1, col_gray2 },
|
|
||||||
+ [SchemeCol8] = { col8, col_gray1, col_gray2 },
|
|
||||||
+ [SchemeCol9] = { col8, col_gray1, col_gray2 },
|
|
||||||
+ [SchemeCol10] = { col10, col_gray1, col_gray2 },
|
|
||||||
+ [SchemeCol11] = { col11, col_gray1, col_gray2 },
|
|
||||||
+ [SchemeCol12] = { col12, col_gray1, col_gray2 },
|
|
||||||
+ [SchemeSel] = { col_gray4, col_cyan, col_cyan },
|
+ [SchemeSel] = { col_gray4, col_cyan, col_cyan },
|
||||||
};
|
};
|
||||||
|
|
||||||
/* tagging */
|
/* tagging */
|
||||||
@@ -107,7 +131,9 @@
|
@@ -107,7 +123,9 @@
|
||||||
{ ClkLtSymbol, 0, Button1, setlayout, {0} },
|
{ ClkLtSymbol, 0, Button1, setlayout, {0} },
|
||||||
{ ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} },
|
{ ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} },
|
||||||
{ ClkWinTitle, 0, Button2, zoom, {0} },
|
{ ClkWinTitle, 0, Button2, zoom, {0} },
|
||||||
|
@ -51,7 +43,7 @@ diff -ruN dwm-6.2-ori/config.def.h dwm-6.2/config.def.h
|
||||||
{ ClkClientWin, MODKEY, Button3, resizemouse, {0} },
|
{ ClkClientWin, MODKEY, Button3, resizemouse, {0} },
|
||||||
diff -ruN dwm-6.2-ori/dwm.c dwm-6.2/dwm.c
|
diff -ruN dwm-6.2-ori/dwm.c dwm-6.2/dwm.c
|
||||||
--- dwm-6.2-ori/dwm.c 2020-08-17 23:51:19.057243495 +0530
|
--- dwm-6.2-ori/dwm.c 2020-08-17 23:51:19.057243495 +0530
|
||||||
+++ dwm-6.2/dwm.c 2020-12-05 04:02:31.417493808 +0530
|
+++ dwm-6.2/dwm.c 2020-12-27 20:04:13.757998389 +0530
|
||||||
@@ -40,6 +40,7 @@
|
@@ -40,6 +40,7 @@
|
||||||
#include <X11/extensions/Xinerama.h>
|
#include <X11/extensions/Xinerama.h>
|
||||||
#endif /* XINERAMA */
|
#endif /* XINERAMA */
|
||||||
|
@ -60,7 +52,7 @@ diff -ruN dwm-6.2-ori/dwm.c dwm-6.2/dwm.c
|
||||||
|
|
||||||
#include "drw.h"
|
#include "drw.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
@@ -56,6 +57,10 @@
|
@@ -56,6 +57,11 @@
|
||||||
#define HEIGHT(X) ((X)->h + 2 * (X)->bw)
|
#define HEIGHT(X) ((X)->h + 2 * (X)->bw)
|
||||||
#define TAGMASK ((1 << LENGTH(tags)) - 1)
|
#define TAGMASK ((1 << LENGTH(tags)) - 1)
|
||||||
#define TEXTW(X) (drw_fontset_getwidth(drw, (X)) + lrpad)
|
#define TEXTW(X) (drw_fontset_getwidth(drw, (X)) + lrpad)
|
||||||
|
@ -68,23 +60,21 @@ diff -ruN dwm-6.2-ori/dwm.c dwm-6.2/dwm.c
|
||||||
+
|
+
|
||||||
+#define STATUSLENGTH 256
|
+#define STATUSLENGTH 256
|
||||||
+#define DWMBLOCKSLOCKFILE "/tmp/dwmblocks.pid"
|
+#define DWMBLOCKSLOCKFILE "/tmp/dwmblocks.pid"
|
||||||
|
+#define DELIMITERENDCHAR 10
|
||||||
|
|
||||||
#define SYSTEM_TRAY_REQUEST_DOCK 0
|
#define SYSTEM_TRAY_REQUEST_DOCK 0
|
||||||
|
|
||||||
@@ -74,8 +79,10 @@
|
@@ -74,8 +80,7 @@
|
||||||
#define XEMBED_EMBEDDED_VERSION (VERSION_MAJOR << 16) | VERSION_MINOR
|
#define XEMBED_EMBEDDED_VERSION (VERSION_MAJOR << 16) | VERSION_MINOR
|
||||||
|
|
||||||
/* enums */
|
/* enums */
|
||||||
-enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */
|
-enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */
|
||||||
-enum { SchemeNorm, SchemeSel }; /* color schemes */
|
-enum { SchemeNorm, SchemeSel }; /* color schemes */
|
||||||
+enum { CurNormal, CurHand, CurResize, CurMove, CurLast }; /* cursor */
|
+enum { CurNormal, CurHand, CurResize, CurMove, CurLast }; /* cursor */
|
||||||
+enum { SchemeNorm, SchemeCol1, SchemeCol2, SchemeCol3, SchemeCol4,
|
|
||||||
+ SchemeCol5, SchemeCol6, SchemeCol7, SchemeCol8, SchemeCol9,
|
|
||||||
+ SchemeCol10, SchemeCol11, SchemeCol12, SchemeSel }; /* color schemes */
|
|
||||||
enum { NetSupported, NetWMName, NetWMState, NetWMCheck,
|
enum { NetSupported, NetWMName, NetWMState, NetWMCheck,
|
||||||
NetSystemTray, NetSystemTrayOP, NetSystemTrayOrientation, NetSystemTrayOrientationHorz,
|
NetSystemTray, NetSystemTrayOP, NetSystemTrayOrientation, NetSystemTrayOrientationHorz,
|
||||||
NetWMFullscreen, NetActiveWindow, NetWMWindowType,
|
NetWMFullscreen, NetActiveWindow, NetWMWindowType,
|
||||||
@@ -234,6 +241,7 @@
|
@@ -234,6 +239,7 @@
|
||||||
static void seturgent(Client *c, int urg);
|
static void seturgent(Client *c, int urg);
|
||||||
static void showhide(Client *c);
|
static void showhide(Client *c);
|
||||||
static void sigchld(int unused);
|
static void sigchld(int unused);
|
||||||
|
@ -92,7 +82,7 @@ diff -ruN dwm-6.2-ori/dwm.c dwm-6.2/dwm.c
|
||||||
static void spawn(const Arg *arg);
|
static void spawn(const Arg *arg);
|
||||||
static Monitor *systraytomon(Monitor *m);
|
static Monitor *systraytomon(Monitor *m);
|
||||||
static void tag(const Arg *arg);
|
static void tag(const Arg *arg);
|
||||||
@@ -249,6 +257,7 @@
|
@@ -249,6 +255,7 @@
|
||||||
static void updatebarpos(Monitor *m);
|
static void updatebarpos(Monitor *m);
|
||||||
static void updatebars(void);
|
static void updatebars(void);
|
||||||
static void updateclientlist(void);
|
static void updateclientlist(void);
|
||||||
|
@ -100,7 +90,7 @@ diff -ruN dwm-6.2-ori/dwm.c dwm-6.2/dwm.c
|
||||||
static int updategeom(void);
|
static int updategeom(void);
|
||||||
static void updatenumlockmask(void);
|
static void updatenumlockmask(void);
|
||||||
static void updatesizehints(Client *c);
|
static void updatesizehints(Client *c);
|
||||||
@@ -269,14 +278,17 @@
|
@@ -269,14 +276,17 @@
|
||||||
static void zoom(const Arg *arg);
|
static void zoom(const Arg *arg);
|
||||||
|
|
||||||
/* variables */
|
/* variables */
|
||||||
|
@ -123,7 +113,7 @@ diff -ruN dwm-6.2-ori/dwm.c dwm-6.2/dwm.c
|
||||||
static unsigned int numlockmask = 0;
|
static unsigned int numlockmask = 0;
|
||||||
static void (*handler[LASTEvent]) (XEvent *) = {
|
static void (*handler[LASTEvent]) (XEvent *) = {
|
||||||
[ButtonPress] = buttonpress,
|
[ButtonPress] = buttonpress,
|
||||||
@@ -303,6 +315,7 @@
|
@@ -303,6 +313,7 @@
|
||||||
static Drw *drw;
|
static Drw *drw;
|
||||||
static Monitor *mons, *selmon;
|
static Monitor *mons, *selmon;
|
||||||
static Window root, wmcheckwin;
|
static Window root, wmcheckwin;
|
||||||
|
@ -131,7 +121,7 @@ diff -ruN dwm-6.2-ori/dwm.c dwm-6.2/dwm.c
|
||||||
|
|
||||||
/* configuration, allows nested code to access above variables */
|
/* configuration, allows nested code to access above variables */
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
@@ -452,13 +465,13 @@
|
@@ -452,13 +463,13 @@
|
||||||
void
|
void
|
||||||
buttonpress(XEvent *e)
|
buttonpress(XEvent *e)
|
||||||
{
|
{
|
||||||
|
@ -147,7 +137,7 @@ diff -ruN dwm-6.2-ori/dwm.c dwm-6.2/dwm.c
|
||||||
/* focus monitor if necessary */
|
/* focus monitor if necessary */
|
||||||
if ((m = wintomon(ev->window)) && m != selmon) {
|
if ((m = wintomon(ev->window)) && m != selmon) {
|
||||||
unfocus(selmon->sel, 1);
|
unfocus(selmon->sel, 1);
|
||||||
@@ -466,25 +479,34 @@
|
@@ -466,25 +477,34 @@
|
||||||
focus(NULL);
|
focus(NULL);
|
||||||
}
|
}
|
||||||
if (ev->window == selmon->barwin) {
|
if (ev->window == selmon->barwin) {
|
||||||
|
@ -196,7 +186,7 @@ diff -ruN dwm-6.2-ori/dwm.c dwm-6.2/dwm.c
|
||||||
for (i = 0; i < LENGTH(buttons); i++)
|
for (i = 0; i < LENGTH(buttons); i++)
|
||||||
if (click == buttons[i].click && buttons[i].func && buttons[i].button == ev->button
|
if (click == buttons[i].click && buttons[i].func && buttons[i].button == ev->button
|
||||||
&& CLEANMASK(buttons[i].mask) == CLEANMASK(ev->state))
|
&& CLEANMASK(buttons[i].mask) == CLEANMASK(ev->state))
|
||||||
@@ -789,23 +811,44 @@
|
@@ -789,23 +809,44 @@
|
||||||
void
|
void
|
||||||
drawbar(Monitor *m)
|
drawbar(Monitor *m)
|
||||||
{
|
{
|
||||||
|
@ -226,7 +216,7 @@ diff -ruN dwm-6.2-ori/dwm.c dwm-6.2/dwm.c
|
||||||
+ x = wbar - wstext;
|
+ x = wbar - wstext;
|
||||||
+ drw_rect(drw, x, 0, lrpad / 2, bh, 1, 1); x += lrpad / 2; /* to keep left padding clean */
|
+ drw_rect(drw, x, 0, lrpad / 2, bh, 1, 1); x += lrpad / 2; /* to keep left padding clean */
|
||||||
+ for (;;) {
|
+ for (;;) {
|
||||||
+ if ((unsigned char)*ts > LENGTH(colors) + 10) {
|
+ if ((unsigned char)*ts > LENGTH(colors) + DELIMITERENDCHAR) {
|
||||||
+ ts++;
|
+ ts++;
|
||||||
+ continue;
|
+ continue;
|
||||||
+ }
|
+ }
|
||||||
|
@ -236,7 +226,7 @@ diff -ruN dwm-6.2-ori/dwm.c dwm-6.2/dwm.c
|
||||||
+ x = drw_text(drw, x, 0, TTEXTW(tp), bh, 0, tp, 0);
|
+ x = drw_text(drw, x, 0, TTEXTW(tp), bh, 0, tp, 0);
|
||||||
+ if (ctmp == '\0')
|
+ if (ctmp == '\0')
|
||||||
+ break;
|
+ break;
|
||||||
+ drw_setscheme(drw, scheme[ctmp - 11]);
|
+ drw_setscheme(drw, scheme[ctmp - DELIMITERENDCHAR - 1]);
|
||||||
+ *ts = ctmp;
|
+ *ts = ctmp;
|
||||||
+ tp = ++ts;
|
+ tp = ++ts;
|
||||||
+ }
|
+ }
|
||||||
|
@ -248,7 +238,7 @@ diff -ruN dwm-6.2-ori/dwm.c dwm-6.2/dwm.c
|
||||||
for (c = m->clients; c; c = c->next) {
|
for (c = m->clients; c; c = c->next) {
|
||||||
occ |= c->tags;
|
occ |= c->tags;
|
||||||
if (c->isurgent)
|
if (c->isurgent)
|
||||||
@@ -822,11 +865,17 @@
|
@@ -822,11 +863,17 @@
|
||||||
urg & 1 << i);
|
urg & 1 << i);
|
||||||
x += w;
|
x += w;
|
||||||
}
|
}
|
||||||
|
@ -268,7 +258,7 @@ diff -ruN dwm-6.2-ori/dwm.c dwm-6.2/dwm.c
|
||||||
if (m->sel) {
|
if (m->sel) {
|
||||||
drw_setscheme(drw, scheme[m == selmon ? SchemeSel : SchemeNorm]);
|
drw_setscheme(drw, scheme[m == selmon ? SchemeSel : SchemeNorm]);
|
||||||
drw_text(drw, x, 0, w, bh, lrpad / 2, m->sel->name, 0);
|
drw_text(drw, x, 0, w, bh, lrpad / 2, m->sel->name, 0);
|
||||||
@@ -837,7 +886,9 @@
|
@@ -837,7 +884,9 @@
|
||||||
drw_rect(drw, x, 0, w, bh, 1, 1);
|
drw_rect(drw, x, 0, w, bh, 1, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -279,7 +269,7 @@ diff -ruN dwm-6.2-ori/dwm.c dwm-6.2/dwm.c
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -1246,14 +1297,25 @@
|
@@ -1246,14 +1295,25 @@
|
||||||
Monitor *m;
|
Monitor *m;
|
||||||
XMotionEvent *ev = &e->xmotion;
|
XMotionEvent *ev = &e->xmotion;
|
||||||
|
|
||||||
|
@ -313,7 +303,7 @@ diff -ruN dwm-6.2-ori/dwm.c dwm-6.2/dwm.c
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -1750,6 +1812,7 @@
|
@@ -1750,6 +1810,7 @@
|
||||||
xatom[XembedInfo] = XInternAtom(dpy, "_XEMBED_INFO", False);
|
xatom[XembedInfo] = XInternAtom(dpy, "_XEMBED_INFO", False);
|
||||||
/* init cursors */
|
/* init cursors */
|
||||||
cursor[CurNormal] = drw_cur_create(drw, XC_left_ptr);
|
cursor[CurNormal] = drw_cur_create(drw, XC_left_ptr);
|
||||||
|
@ -321,7 +311,7 @@ diff -ruN dwm-6.2-ori/dwm.c dwm-6.2/dwm.c
|
||||||
cursor[CurResize] = drw_cur_create(drw, XC_sizing);
|
cursor[CurResize] = drw_cur_create(drw, XC_sizing);
|
||||||
cursor[CurMove] = drw_cur_create(drw, XC_fleur);
|
cursor[CurMove] = drw_cur_create(drw, XC_fleur);
|
||||||
/* init appearance */
|
/* init appearance */
|
||||||
@@ -1825,6 +1888,28 @@
|
@@ -1825,6 +1886,28 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -350,7 +340,7 @@ diff -ruN dwm-6.2-ori/dwm.c dwm-6.2/dwm.c
|
||||||
spawn(const Arg *arg)
|
spawn(const Arg *arg)
|
||||||
{
|
{
|
||||||
if (arg->v == dmenucmd)
|
if (arg->v == dmenucmd)
|
||||||
@@ -2011,7 +2096,7 @@
|
@@ -2011,7 +2094,7 @@
|
||||||
XSetWindowAttributes wa = {
|
XSetWindowAttributes wa = {
|
||||||
.override_redirect = True,
|
.override_redirect = True,
|
||||||
.background_pixmap = ParentRelative,
|
.background_pixmap = ParentRelative,
|
||||||
|
@ -359,7 +349,7 @@ diff -ruN dwm-6.2-ori/dwm.c dwm-6.2/dwm.c
|
||||||
};
|
};
|
||||||
XClassHint ch = {"dwm", "dwm"};
|
XClassHint ch = {"dwm", "dwm"};
|
||||||
for (m = mons; m; m = m->next) {
|
for (m = mons; m; m = m->next) {
|
||||||
@@ -2058,6 +2143,42 @@
|
@@ -2058,6 +2141,42 @@
|
||||||
(unsigned char *) &(c->win), 1);
|
(unsigned char *) &(c->win), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -371,7 +361,7 @@ diff -ruN dwm-6.2-ori/dwm.c dwm-6.2/dwm.c
|
||||||
+ char ctmp;
|
+ char ctmp;
|
||||||
+
|
+
|
||||||
+ while (*ts != '\0') {
|
+ while (*ts != '\0') {
|
||||||
+ if ((unsigned char)*ts > 10) {
|
+ if ((unsigned char)*ts > DELIMITERENDCHAR) {
|
||||||
+ ts++;
|
+ ts++;
|
||||||
+ continue;
|
+ continue;
|
||||||
+ }
|
+ }
|
||||||
|
@ -380,7 +370,7 @@ diff -ruN dwm-6.2-ori/dwm.c dwm-6.2/dwm.c
|
||||||
+ x += TTEXTW(tp);
|
+ x += TTEXTW(tp);
|
||||||
+ *ts = ctmp;
|
+ *ts = ctmp;
|
||||||
+ if (x >= 0) {
|
+ if (x >= 0) {
|
||||||
+ if (ctmp == 10)
|
+ if (ctmp == DELIMITERENDCHAR)
|
||||||
+ goto cursorondelim;
|
+ goto cursorondelim;
|
||||||
+ if (!statushandcursor) {
|
+ if (!statushandcursor) {
|
||||||
+ statushandcursor = 1;
|
+ statushandcursor = 1;
|
||||||
|
@ -402,7 +392,7 @@ diff -ruN dwm-6.2-ori/dwm.c dwm-6.2/dwm.c
|
||||||
int
|
int
|
||||||
updategeom(void)
|
updategeom(void)
|
||||||
{
|
{
|
||||||
@@ -2198,10 +2319,27 @@
|
@@ -2198,10 +2317,27 @@
|
||||||
void
|
void
|
||||||
updatestatus(void)
|
updatestatus(void)
|
||||||
{
|
{
|
||||||
|
@ -419,7 +409,7 @@ diff -ruN dwm-6.2-ori/dwm.c dwm-6.2/dwm.c
|
||||||
+ for (char *rst = rawstext; *rst != '\0'; rst++)
|
+ for (char *rst = rawstext; *rst != '\0'; rst++)
|
||||||
+ if ((unsigned char)*rst >= ' ')
|
+ if ((unsigned char)*rst >= ' ')
|
||||||
+ *(stp++) = *(stc++) = *(sts++) = *rst;
|
+ *(stp++) = *(stc++) = *(sts++) = *rst;
|
||||||
+ else if ((unsigned char)*rst > 10)
|
+ else if ((unsigned char)*rst > DELIMITERENDCHAR)
|
||||||
+ *(stc++) = *rst;
|
+ *(stc++) = *rst;
|
||||||
+ else
|
+ else
|
||||||
+ *(sts++) = *rst;
|
+ *(sts++) = *rst;
|
||||||
|
|
Loading…
Reference in a new issue