/tmp is volatile, is deleted after 10 days

This commit is contained in:
Ashish Kumar Yadav 2021-06-21 17:56:36 +05:30
parent 7ce14b2d36
commit 92cd084cfe
5 changed files with 12 additions and 8 deletions

View file

@ -37,13 +37,17 @@ clean:
rm -f dwmblocks sigdwmblocks/sigdwmblocks xgetrootname/xgetrootname rm -f dwmblocks sigdwmblocks/sigdwmblocks xgetrootname/xgetrootname
BINDIR = ${DESTDIR}${PREFIX}/bin BINDIR = ${DESTDIR}${PREFIX}/bin
PIDDIR = /var/local/dwmblocks
install: all install: all
mkdir -p ${BINDIR} mkdir -p ${BINDIR}
cp -f dwmblocks sigdwmblocks/sigdwmblocks xgetrootname/xgetrootname ${BINDIR} cp -f dwmblocks sigdwmblocks/sigdwmblocks xgetrootname/xgetrootname ${BINDIR}
chmod 755 ${BINDIR}/dwmblocks ${BINDIR}/sigdwmblocks ${BINDIR}/xgetrootname chmod 755 ${BINDIR}/dwmblocks ${BINDIR}/sigdwmblocks ${BINDIR}/xgetrootname
mkdir -p ${PIDDIR}
chmod 777 ${PIDDIR}
uninstall: uninstall:
rm -f ${BINDIR}/dwmblocks ${BINDIR}/sigdwmblocks ${BINDIR}/xgetrootname rm -f ${BINDIR}/dwmblocks ${BINDIR}/sigdwmblocks ${BINDIR}/xgetrootname
rm -df ${PIDDIR} || exit 0
.PHONY: all clean install uninstall .PHONY: all clean install uninstall

View file

@ -10,7 +10,7 @@
#include <X11/Xlib.h> #include <X11/Xlib.h>
#define NILL INT_MIN #define NILL INT_MIN
#define LOCKFILE "/tmp/dwmblocks.pid" #define LOCKFILE "/var/local/dwmblocks/dwmblocks.pid"
#define LENGTH(X) (sizeof X / sizeof X[0]) #define LENGTH(X) (sizeof X / sizeof X[0])

View file

@ -1,6 +1,6 @@
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 2021-01-25 16:40:17.983232710 +0530 +++ dwm-6.2/config.def.h 2020-12-27 19:45:35.127385861 +0530
@@ -12,10 +12,26 @@ @@ -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";
@ -43,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 2021-01-25 16:40:58.116619683 +0530 +++ dwm-6.2/dwm.c 2021-06-21 17:50:13.520152649 +0530
@@ -40,6 +40,7 @@ @@ -40,6 +40,7 @@
#include <X11/extensions/Xinerama.h> #include <X11/extensions/Xinerama.h>
#endif /* XINERAMA */ #endif /* XINERAMA */
@ -59,7 +59,7 @@ diff -ruN dwm-6.2-ori/dwm.c dwm-6.2/dwm.c
+#define TTEXTW(X) (drw_fontset_getwidth(drw, (X))) +#define TTEXTW(X) (drw_fontset_getwidth(drw, (X)))
+ +
+#define STATUSLENGTH 256 +#define STATUSLENGTH 256
+#define DWMBLOCKSLOCKFILE "/tmp/dwmblocks.pid" +#define DWMBLOCKSLOCKFILE "/var/local/dwmblocks/dwmblocks.pid"
+#define DELIMITERENDCHAR 10 +#define DELIMITERENDCHAR 10
+#define LSPAD (lrpad / 2) /* padding on left side of status text */ +#define LSPAD (lrpad / 2) /* padding on left side of status text */
+#define RSPAD (lrpad / 2) /* padding on right side of status text */ +#define RSPAD (lrpad / 2) /* padding on right side of status text */

View file

@ -1,6 +1,6 @@
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-12-27 20:01:15.106831834 +0530 +++ dwm-6.2/config.def.h 2020-12-27 20:01:59.763790107 +0530
@@ -16,10 +16,26 @@ @@ -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";
@ -43,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 2021-01-25 16:46:54.472584837 +0530 +++ dwm-6.2/dwm.c 2021-06-21 17:50:54.574264308 +0530
@@ -40,6 +40,7 @@ @@ -40,6 +40,7 @@
#include <X11/extensions/Xinerama.h> #include <X11/extensions/Xinerama.h>
#endif /* XINERAMA */ #endif /* XINERAMA */
@ -59,7 +59,7 @@ diff -ruN dwm-6.2-ori/dwm.c dwm-6.2/dwm.c
+#define TTEXTW(X) (drw_fontset_getwidth(drw, (X))) +#define TTEXTW(X) (drw_fontset_getwidth(drw, (X)))
+ +
+#define STATUSLENGTH 256 +#define STATUSLENGTH 256
+#define DWMBLOCKSLOCKFILE "/tmp/dwmblocks.pid" +#define DWMBLOCKSLOCKFILE "/var/local/dwmblocks/dwmblocks.pid"
+#define DELIMITERENDCHAR 10 +#define DELIMITERENDCHAR 10
+#define LSPAD (lrpad / 2) /* padding on left side of status text */ +#define LSPAD (lrpad / 2) /* padding on left side of status text */
+#define RSPAD (lrpad / 2) /* padding on right side of status text */ +#define RSPAD (lrpad / 2) /* padding on right side of status text */

View file

@ -7,7 +7,7 @@
#include <unistd.h> #include <unistd.h>
#define NILL INT_MIN #define NILL INT_MIN
#define LOCKFILE "/tmp/dwmblocks.pid" #define LOCKFILE "/var/local/dwmblocks/dwmblocks.pid"
int int
parsesignal(char *arg) parsesignal(char *arg)