autolinux


Logs | Files | README | LICENSE | GitLab


1
commit 36dec471d82560d3fae3ba16d86adfafa6254bf1
2
Author: Connor Etherington <[email protected]>
3
Date:   Sun Mar 19 18:47:22 2023 +0200
4
5
    Auto-Commit Update 19.03.2023 - 18:47:22
6
---
7
 AutoLinux                 | Bin 0 -> 109536 bytes
8
 AutoLinux.c               |  50 +++++++++++++--------
9
 AutoLinux.o               | Bin 0 -> 107296 bytes
10
 Makefile                  |   8 ++--
11
 config.h                  | 110 ++++++++++++++++++++++++++--------------------
12
 drw.o                     | Bin 0 -> 10320 bytes
13
 dwm-attachbottom-6.3.diff |  54 +++++++++++++++++++++++
14
 patch/bar_time.c          |  44 +++++++++++++++++++
15
 patch/bar_time.h          |   3 ++
16
 patch/include.c           |   3 +-
17
 patch/include.h           |   3 +-
18
 util.o                    | Bin 0 -> 2224 bytes
19
 12 files changed, 203 insertions(+), 72 deletions(-)
20
21
diff --git a/AutoLinux b/AutoLinux
22
new file mode 100755
23
index 0000000..a9a76d1
24
Binary files /dev/null and b/AutoLinux differ
25
diff --git a/AutoLinux.c b/AutoLinux.c
26
index da95f4a..8b9f814 100644
27
--- a/AutoLinux.c
28
+++ b/AutoLinux.c
29
@@ -69,6 +69,7 @@
30
 #define SPTAGMASK		(((1 << LENGTH(scratchpads))-1) << LENGTH(tags))
31
 #define TEXTW(X)                (drw_fontset_getwidth(drw, (X)) + lrpad)
32
 #define TRUNC(X,A,B)            (MAX((A), MIN((X), (B))))
33
+#define currentTime() { .v = (const char*[]){ "/bin/sh", "-c", "date '+%H:%M:%S'", NULL } }
34
 
35
 /* enums */
36
 enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */
37
@@ -135,8 +136,9 @@ typedef struct {
38
 	int alignment; // see bar alignment enum
39
 	int (*widthfunc)(Bar *bar, BarWidthArg *a);
40
 	int (*drawfunc)(Bar *bar, BarDrawArg *a);
41
+	int (*timefunc)(Bar *bar, BarDrawArg *a);
42
 	int (*clickfunc)(Bar *bar, Arg *arg, BarClickArg *a);
43
-	char *name; // for debugging
44
+	char *name; // for debugging             //
45
 	int x, w; // position, width for internal use
46
 } BarRule;
47
 
48
@@ -231,6 +233,7 @@ static int applysizehints(Client *c, int *x, int *y, int *w, int *h, int interac
49
 static void arrange(Monitor *m);
50
 static void arrangemon(Monitor *m);
51
 static void attach(Client *c);
52
+static void attachbottom(Client *c);
53
 static void attachstack(Client *c);
54
 static void buttonpress(XEvent *e);
55
 static void checkotherwm(void);
56
@@ -301,8 +304,8 @@ static void seturgent(Client *c, int urg);
57
 static void showhide(Client *c);
58
 static void sigchld(int unused);
59
 #ifndef __OpenBSD__
60
-static int getAutoLinuxblockspid();
61
-static void sigAutoLinuxblocks(const Arg *arg);
62
+static int getdwmblockspid();
63
+static void sigdwmblocks(const Arg *arg);
64
 #endif
65
 static void sighup(int unused);
66
 static void sigterm(int unused);
67
@@ -355,8 +358,8 @@ static pid_t winpid(Window w);
68
 static const char broken[] = "broken";
69
 static char stext[256];
70
 static char rawstext[256];
71
-static int AutoLinuxblockssig;
72
-pid_t AutoLinuxblockspid = 0;
73
+static int dwmblockssig;
74
+pid_t dwmblockspid = 0;
75
 static int screen;
76
 static int sw, sh;           /* X display screen geometry width, height */
77
 static int bh;               /* bar geometry */
78
@@ -545,6 +548,15 @@ attach(Client *c)
79
 	c->mon->clients = c;
80
 }
81
 
82
+void
83
+attachbottom(Client *c)
84
+{
85
+	Client **tc;
86
+	c->next = NULL;
87
+	for (tc = &c->mon->clients; *tc; tc = &(*tc)->next);
88
+	*tc = c;
89
+}
90
+
91
 void
92
 attachstack(Client *c)
93
 {
94
@@ -1182,14 +1194,14 @@ getatomprop(Client *c, Atom prop)
95
 
96
 #ifndef __OpenBSD__
97
 int
98
-getAutoLinuxblockspid()
99
+getdwmblockspid()
100
 {
101
 	char buf[16];
102
-	FILE *fp = popen("pidof -s AutoLinuxblocks", "r");
103
+	FILE *fp = popen("pidof -s dwmblocks", "r");
104
 	fgets(buf, sizeof(buf), fp);
105
 	pid_t pid = strtoul(buf, NULL, 10);
106
 	pclose(fp);
107
-	AutoLinuxblockspid = pid;
108
+	dwmblockspid = pid;
109
 	return pid != 0 ? 0 : -1;
110
 }
111
 #endif
112
@@ -1389,7 +1401,7 @@ manage(Window w, XWindowAttributes *wa)
113
 		c->isfloating = c->oldstate = trans != None || c->isfixed;
114
 	if (c->isfloating)
115
 		XRaiseWindow(dpy, c->win);
116
-	attach(c);
117
+	attachbottom(c);
118
 	attachstack(c);
119
 	XChangeProperty(dpy, root, netatom[NetClientList], XA_WINDOW, 32, PropModeAppend,
120
 		(unsigned char *) &(c->win), 1);
121
@@ -1736,7 +1748,7 @@ run(void)
122
 
123
 void
124
 runAutostart(void) {
125
-	system("killall -q AutoLinuxblocks; AutoLinuxblocks &");
126
+	system("killall -q dwmblocks; dwmblocks &");
127
 }
128
 
129
 void
130
@@ -1868,7 +1880,7 @@ sendmon(Client *c, Monitor *m)
131
 	detachstack(c);
132
 	c->mon = m;
133
 	c->tags = m->tagset[m->seltags]; /* assign tags of target monitor */
134
-	attach(c);
135
+	attachbottom(c);
136
 	attachstack(c);
137
 	focus(NULL);
138
 	arrange(NULL);
139
@@ -2144,18 +2156,18 @@ sigterm(int unused)
140
 
141
 #ifndef __OpenBSD__
142
 void
143
-sigAutoLinuxblocks(const Arg *arg)
144
+sigdwmblocks(const Arg *arg)
145
 {
146
 	union sigval sv;
147
-	sv.sival_int = 0 | (AutoLinuxblockssig << 8) | arg->i;
148
-	if (!AutoLinuxblockspid)
149
-		if (getAutoLinuxblockspid() == -1)
150
+	sv.sival_int = 0 | (dwmblockssig << 8) | arg->i;
151
+	if (!dwmblockspid)
152
+		if (getdwmblockspid() == -1)
153
 			return;
154
 
155
-	if (sigqueue(AutoLinuxblockspid, SIGUSR1, sv) == -1) {
156
+	if (sigqueue(dwmblockspid, SIGUSR1, sv) == -1) {
157
 		if (errno == ESRCH) {
158
-			if (!getAutoLinuxblockspid())
159
-				sigqueue(AutoLinuxblockspid, SIGUSR1, sv);
160
+			if (!getdwmblockspid())
161
+				sigqueue(dwmblockspid, SIGUSR1, sv);
162
 		}
163
 	}
164
 }
165
@@ -2490,7 +2502,7 @@ updategeom(void)
166
 					m->clients = c->next;
167
 					detachstack(c);
168
 					c->mon = mons;
169
-					attach(c);
170
+					attachbottom(c);
171
 					attachstack(c);
172
 				}
173
 				if (m == selmon)
174
diff --git a/AutoLinux.o b/AutoLinux.o
175
new file mode 100644
176
index 0000000..7c77353
177
Binary files /dev/null and b/AutoLinux.o differ
178
diff --git a/Makefile b/Makefile
179
index 8a7c29b..7ece6df 100644
180
--- a/Makefile
181
+++ b/Makefile
182
@@ -37,13 +37,13 @@ install: all
183
 	cp -f AutoLinux ${DESTDIR}${PREFIX}/bin
184
 	chmod 755 ${DESTDIR}${PREFIX}/bin/AutoLinux
185
 	mkdir -p ${DESTDIR}${PREFIX}/share/xsessions
186
-	mkdir -p ${DESTDIR}${PREFIX}/share/licenses/auto-AutoLinux
187
-	sudo cp -f LICENSE ${DESTDIR}${PREFIX}/share/licenses/auto-AutoLinux
188
+	mkdir -p ${DESTDIR}${PREFIX}/share/licenses/AutoLinux
189
+	sudo cp -f LICENSE ${DESTDIR}${PREFIX}/share/licenses/AutoLinux
190
 	sudo cp -f AutoLinux.desktop ${DESTDIR}${PREFIX}/share/xsessions
191
-	
192
+
193
 uninstall:
194
 	rm -f ${DESTDIR}${PREFIX}/bin/AutoLinux\
195
 		${DESTDIR}${PREFIX}/share/xsessions/AutoLinux.desktop\
196
-		${DESTDIR}${PREFIX}/share/licenses/auto-AutoLinux/LICENSE
197
+		${DESTDIR}${PREFIX}/share/licenses/AutoLinux/LICENSE
198
 
199
 .PHONY: all options clean dist install uninstall
200
diff --git a/config.h b/config.h
201
index 15b20fc..799af40 100644
202
--- a/config.h
203
+++ b/config.h
204
@@ -8,6 +8,12 @@
205
 #define TERMCLASS "St"
206
 #define TERMINAL2 "alacritty"
207
 #define TERMCLASS2 "Alacritty"
208
+#define MODKEY Mod4Mask
209
+#define ALTKEY Mod1Mask
210
+#define CTRLKEY ControlMask
211
+#define NOMOD 0
212
+
213
+#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
214
 
215
 //--------------------------------------------------------- Appearance ---------------------------------------------------------//
216
 
217
@@ -18,7 +24,7 @@ static unsigned int gappih          = 8;              /* horiz inner gap between
218
 static unsigned int gappiv          = 8;              /* vert inner gap between windows */
219
 static unsigned int gappoh          = 12;             /* horiz outer gap between windows and screen edge */
220
 static unsigned int gappov          = 12;             /* vert outer gap between windows and screen edge */
221
-static int user_bh                  = 35;              /* 0 means that AutoLinux will calculate bar height, >= 1 means AutoLinux will user_bh as bar height */
222
+static int user_bh                  = 30;              /* 0 means that AutoLinux will calculate bar height, >= 1 means AutoLinux will user_bh as bar height */
223
 static int swallowfloating          = 5;              /* 5 means swallow floating windows by default */
224
 static int smartgaps                = 0;              /* 1 means no outer gap when there is only one window */
225
 static int showbar                  = 1;              /* 0 means no bar */
226
@@ -77,7 +83,6 @@ static const char *tags[] =   { " 1 ", " 2 ", " 3 ", " 4 ", "  ", " 6 ", " 7
227
 // static const char *tags[] =  {  " ", " ", " ", " ", " ", " ", " ", " ", " "  };
228
 
229
 
230
-
231
 static const Rule rules[] = {
232
 	/* xprop(1):
233
 	 *	WM_CLASS(STRING) = instance, class
234
@@ -98,9 +103,9 @@ static const BarRule barrules[] = {
235
    	/* monitor  bar    alignment             widthfunc              drawfunc              clickfunc           name */
236
  /* { -1,       0,     BAR_ALIGN_LEFT,       width_tags,            draw_tags,            click_tags,         "tags"     }, */
237
     { -1,       0,     BAR_ALIGN_LEFT,       width_ltsymbol,        draw_ltsymbol,        click_ltsymbol,     "layout"   },
238
+    { -1,       0,     BAR_ALIGN_RIGHT,      width_time,            draw_time,            click_time,         "time"     },
239
   	{ -1,       0,     BAR_ALIGN_CENTER,     width_tags,            draw_tags,            click_tags,         "tags"     },
240
- /* { -1,       0,     BAR_ALIGN_RIGHT,      width_status,          draw_status,          click_status,       "status"   }, */
241
- /* { -1,       0,     BAR_ALIGN_NONE,       width_wintitle,        draw_wintitle,        click_wintitle,     "wintitle" }, */
242
+    { 0,        0,     BAR_ALIGN_NONE,       width_wintitle,        draw_wintitle,        click_wintitle,     "wintitle" },
243
 };
244
 
245
 
246
@@ -114,28 +119,24 @@ static int resizehints = 0;    /* 1 means respect size hints in tiled resizals *
247
 static const Layout layouts[] = {
248
 	/* symbol     arrange function */
249
 	{ "[]=",	monocle },			/* Default: Master on left, slaves on right */
250
-	{ "TTT",	bstack },		/* Master on top, slaves on bottom */
251
+	{ "",	bstack },		/* Master on top, slaves on bottom */
252
 
253
 /*	{ "[@]",	spiral },		 Fibonacci spiral */
254
 /*	{ "[\\]",	dwindle },		 Decreasing in size right and leftward */
255
 
256
-	{ "[D]",	deck },			/* Master on left, slaves in monocle-like mode on right */
257
-	{ "[T]",	tile },		/* All windows on top of eachother */
258
+	{ "",	deck },			/* Master on left, slaves in monocle-like mode on right */
259
+	{ "",	tile },		/* All windows on top of eachother */
260
 
261
-	{ "|M|",	centeredmaster },		/* Master in middle, slaves on sides */
262
-	{ ">M>",	centeredfloatingmaster },	/* Same but master floats */
263
+	{ "",	centeredmaster },		/* Master in middle, slaves on sides */
264
+	{ "",	centeredfloatingmaster },	/* Same but master floats */
265
 
266
-	{ "><>",	NULL },			/* no layout function means floating behavior */
267
-	{ NULL,		NULL },
268
+	{ "",	NULL },			/* no layout function means floating behavior */
269
+	{ "",		NULL },
270
 };
271
 
272
 
273
-
274
 //--------------------------------------------------------- Key Definitions -----------------------------------------------------//
275
 
276
-#define MODKEY Mod4Mask
277
-#define ALTKEY Mod1Mask
278
-#define CTRLKEY ControlMask
279
 
280
 #define TAGKEYS(KEY,         TAG) \
281
 	{ MODKEY,                       KEY,               view,           {.ui = 1 << TAG} }, \
282
@@ -146,9 +147,9 @@ static const Layout layouts[] = {
283
 #define STACKKEYS(MOD,ACTION) \
284
 	{ MOD,	XK_j,	        ACTION##stack,	{.i = INC(+1) } }, \
285
 	{ MOD,	XK_k,	        ACTION##stack,	{.i = INC(-1) } }, \
286
-	{ MOD,  XK_v,         ACTION##stack,  {.i = 0 } }, \
287
 	{ MOD,  XK_BackSpace, ACTION##stack, {.i = PREVSEL } }, \
288
   { MOD,  XK_Escape,    ACTION##stack,  {.i = 0 } }, \
289
+  { MOD,  XK_comma,    ACTION##stack,  {.i = 0 } }, \
290
 	{ MOD,  XK_Up,	    ACTION##stack,	{.i = INC(+1) } }, \
291
 	{ MOD,  XK_Down,	ACTION##stack,	{.i = INC(-1) } }, \
292
 	/* { MOD, XK_grave, ACTION##stack, {.i = PREVSEL } }, \ */
293
@@ -157,13 +158,13 @@ static const Layout layouts[] = {
294
 	/* { MOD, XK_x,     ACTION##stack, {.i = -1 } }, */
295
 
296
 /* helper for spawning shell commands in the pre AutoLinux-5.0 fashion */
297
-#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
298
 
299
 /* commands */
300
 static const char *termcmd[]   = { TERMINAL,  NULL };
301
 static const char *term2cmd[]   = { TERMINAL2,  NULL };
302
 
303
 
304
+
305
 //------------------------------------------  Xresources preferences to load at startup  ----------------------------------------//
306
 
307
 ResourcePref resources[] = {
308
@@ -209,19 +210,33 @@ static Key keys[] = {
309
 	TAGKEYS(			XK_6,		5)
310
 	TAGKEYS(			XK_7,		6)
311
 	TAGKEYS(			XK_8,		7)
312
-	TAGKEYS(			XK_9,		8)
313
-	{ MODKEY,         			XK_0,		view,		{.ui = ~0 } },
314
+	TAGKEYS(  		XK_9,		8)
315
+
316
+  { MODKEY,             XK_F12,     spawn,		SHCMD("cpSecPass 1") },
317
+  { MODKEY,             XK_F11,     spawn,		SHCMD("cpSecPass 2") },
318
+  { MODKEY,             XK_F6,      spawn,		SHCMD("cpSecPass 3") },
319
+  { MODKEY,             XK_F7,      spawn,		SHCMD("cpSecPass 4") },
320
+  { MODKEY,             XK_F9,      spawn,		SHCMD("cpSecPass 5") },
321
+  { MODKEY,             XK_F10,     spawn,		SHCMD("cpSecPass 6") },
322
+  { ALTKEY|ShiftMask,   XK_F10,     spawn,		SHCMD("clipmenu") },
323
+  { MODKEY,             XK_F8,      spawn,		SHCMD("cpSecPass 7") },
324
+  { MODKEY,             XK_minus,	  spawn,		SHCMD("cpSecPass 8") },
325
+  { MODKEY,             XK_equal,	  spawn,		SHCMD("cpSecPass 9") },
326
+  { MODKEY,             XK_F13,     spawn,		SHCMD("cpSecPass 10") },
327
+
328
+  { MODKEY,         			XK_0,		view,		{.ui = ~0 } },
329
 	{ MODKEY|ShiftMask,		XK_0,		tag,		{.ui = ~0 } },
330
-	{ MODKEY,         			XK_minus,	spawn,		SHCMD("pamixer --allow-boost -d 5; kill -44 $(pidof AutoLinuxblocks)") },
331
-	{ MODKEY|ShiftMask,		XK_minus,	spawn,		SHCMD("pamixer --allow-boost -d 15; kill -44 $(pidof AutoLinuxblocks)") },
332
-	{ MODKEY,         			XK_equal,	spawn,		SHCMD("pamixer --allow-boost -i 5; kill -44 $(pidof AutoLinuxblocks)") },
333
-	{ MODKEY|ShiftMask,		XK_equal,	spawn,		SHCMD("pamixer --allow-boost -i 15; kill -44 $(pidof AutoLinuxblocks)") },
334
+	{ MODKEY,         			XK_minus,	spawn,		SHCMD("pamixer --allow-boost -d 5; kill -44 $(pidof dwmblocks)") },
335
+//	{ MODKEY|ShiftMask,		XK_minus,	spawn,		SHCMD("pamixer --allow-boost -d 15; kill -44 $(pidof dwmblocks)") },
336
+ // { MODKEY,         			XK_equal,	spawn,		SHCMD("pamixer --allow-boost -i 5; kill -44 $(pidof dwmblocks)") },
337
+	{ MODKEY|ShiftMask,		XK_equal,	spawn,		SHCMD("pamixer --allow-boost -i 15; kill -44 $(pidof dwmblocks)") },
338
 	{ MODKEY,         			XK_BackSpace,	spawn,		SHCMD("sysact") },
339
 	{ MODKEY|ShiftMask,		XK_BackSpace,	spawn,		SHCMD("sysact") },
340
 
341
 	{ MODKEY,		XK_s,	 togglescratch, {.ui = 0 } },
342
 	{ ALTKEY,		XK_Return,  togglescratch, {.ui = 1 } },
343
 	{ MODKEY|ShiftMask,		XK_a,	 togglescratch, {.ui = 2 } },
344
+	{ MODKEY|ControlMask, XK_period,  spawn, SHCMD(TERMINAL " -e job") },
345
 
346
 /*  { MODKEY|ShiftMask,        XK_a, scratchpad_show, {0} },
347
 	{ MODKEY|ShiftMask,        XK_s, scratchpad_hide, {0} },
348
@@ -234,12 +249,13 @@ static Key keys[] = {
349
 	{ MODKEY,         			XK_w,		spawn,		SHCMD("$BROWSER") },
350
 	{ MODKEY|ShiftMask,	XK_w,		spawn,		SHCMD("$BROWSER2") },
351
   { MODKEY,                	XK_c,		spawn,		SHCMD("clipdl") },
352
-  { MODKEY|ShiftMask,       XK_c,		spawn,		SHCMD(TERMINAL " -e tdap") },
353
+  { MODKEY|ShiftMask,       XK_c,		spawn,		SHCMD(TERMINAL2 " -e tdap") },
354
+  { CTRLKEY|ShiftMask,     XK_c,		spawn,		SHCMD("xdotool type '[email protected]'") },
355
 
356
 /*	{ MODKEYask,		XK_w,		spawn,		SHCMD(TERMINAL " -e sudo nmtui") }, */
357
-	{ MODKEY,         		XK_e,		spawn,		SHCMD(TERMINAL " -e neomutt ; pkill -RTMIN+12 AutoLinuxblocks; rmdir ~/.abook") },
358
+	{ MODKEY,         		XK_e,		spawn,		SHCMD(TERMINAL " -e neomutt ; pkill -RTMIN+12 dwmblocks; rmdir ~/.abook") },
359
 	{ MODKEY|ShiftMask,		XK_e,		spawn,		SHCMD("rofi -modi emoji -show emoji") },
360
-	{ MODKEY,         		XK_r,		spawn,		SHCMD(TERMINAL " -e htop") },
361
+	{ MODKEY,         		XK_r,		spawn,		SHCMD(TERMINAL " -e gifcast -w -o ~/Media/SCREEN-REC/`dt - -t :`.mp4") },
362
 	{ MODKEY|ShiftMask,		XK_r,		spawn,		SHCMD(TERMINAL " -e htop") },
363
 	{ ALTKEY,         		XK_y,	  spawn,     SHCMD("youtube-music") },
364
 	{ MODKEY,         		XK_t,		setlayout,	{.v = &layouts[0]} }, /* tile */
365
@@ -266,7 +282,7 @@ static Key keys[] = {
366
 	{ MODKEY,         			XK_a,		togglegaps,	{0} },
367
 	{ MODKEY|ShiftMask,     XK_a,		defaultgaps,	{0} },
368
 //	{ MODKEY,         			XK_s,		togglesticky,	{0} },
369
-  { MODKEY|ShiftMask,		XK_s,		spawn,     SHCMD("spectacle") },
370
+  { MODKEY|ShiftMask,		XK_s,		spawn,     SHCMD("gnome-screenshot -i") },
371
 	{ MODKEY,         			XK_d,		spawn,          SHCMD("rofi -show run") },
372
 	{ MODKEY|ALTKEY,         			XK_d,		spawn,  SHCMD("rofi -show run") },
373
 	{ MODKEY|ALTKEY,         		  XK_b,		spawn,		SHCMD("passmenu") },
374
@@ -304,7 +320,7 @@ static Key keys[] = {
375
 	{ MODKEY|ShiftMask,     XK_m,		spawn,		SHCMD(TERMINAL " -e mpv `xclip -selection primary -o`") },
376
 	{ MODKEY,         			XK_comma,	spawn,		SHCMD("mpc prev") },
377
 	{ MODKEY|ShiftMask,     XK_comma,	spawn,		SHCMD("mpc seek 0%") },
378
-	{ MODKEY,         			XK_period,	spawn,		SHCMD(TERMINAL " -e qcopy") },
379
+	{ MODKEY,         			XK_period,	spawn,		SHCMD(TERMINAL2 " -e qcopy -w") },
380
 	{ MODKEY|ShiftMask,     XK_period,	spawn,		SHCMD("mpc repeat") },
381
 
382
 	{ MODKEY,         			XK_Left,	focusmon,	{.i = -1 } },
383
@@ -320,15 +336,15 @@ static Key keys[] = {
384
 
385
 	{ MODKEY,         			XK_F2,		spawn,		SHCMD("flameshot gui") },
386
 	{ MODKEY,         			XK_F3,		spawn,		SHCMD("displayselect") },
387
-	{ MODKEY,         			XK_F4,		spawn,		SHCMD(TERMINAL " -e pulsemixer; kill -44 $(pidof AutoLinuxblocks)") },
388
+	{ MODKEY,         			XK_F4,		spawn,		SHCMD(TERMINAL " -e pulsemixer; kill -44 $(pidof dwmblocks)") },
389
   { MODKEY,         		  XK_F5,		spawn,		SHCMD("pavucontrol") },
390
-	{ MODKEY,         			XK_F6,		spawn,		SHCMD("torwrap") },
391
-	{ MODKEY,         			XK_F7,		spawn,		SHCMD("td-toggle") },
392
-	{ MODKEY,         			XK_F8,		spawn,		SHCMD("mw -Y") },
393
-	{ MODKEY,         			XK_F9,		spawn,		SHCMD("/usr/bin/st -e 'vfzf $custDir'") },
394
-	{ MODKEY,         			XK_F10,		spawn,		SHCMD(TERMINAL " -e [ ! -d ${custDir} ] && mkdir ${custDir} >/dev/null 2>&1; ${TERMINAL} -e nvim ${custDir}/`find $HOME/CONCISE/repos -type f|sed 's/^.\//'|fzfp`)") },
395
-  { MODKEY,         			XK_F11,		spawn,		SHCMD("mpv --no-cache --no-osc --no-input-default-bindings --profile=low-latency --input-conf=/dev/null --title=webcam $(ls /dev/video[0,2,4,6,8] | tail -n 1)") },
396
-	{ MODKEY,         			XK_F12,		spawn,		SHCMD(TERMINAL " -e [ ! -d ${HOME}/SCRATCH ] && mkdir ${HOME}/SCRATCH >/dev/null 2>&1; ${TERMINAL} -e /usr/bin/lfp ${HOME}/SCRATCH") },
397
+//	{ MODKEY,         			XK_F6,		spawn,		SHCMD("torwrap") },
398
+//	{ MODKEY,         			XK_F7,		spawn,		SHCMD("td-toggle") },
399
+//	{ MODKEY,         			XK_F8,		spawn,		SHCMD("mw -Y") },
400
+//	{ MODKEY,         			XK_F9,		spawn,		SHCMD("/usr/bin/st -e 'vfzf $custDir'") },
401
+//	{ MODKEY,         			XK_F10,		spawn,		SHCMD(TERMINAL " -e [ ! -d ${custDir} ] && mkdir ${custDir} >/dev/null 2>&1; ${TERMINAL} -e nvim ${custDir}/`find $HOME/CONCISE/repos -type f|sed 's/^.\//'|fzfp`)") },
402
+//  { MODKEY,         			XK_F11,		spawn,		SHCMD("mpv --no-cache --no-osc --no-input-default-bindings --profile=low-latency --input-conf=/dev/null --title=webcam $(ls /dev/video[0,2,4,6,8] | tail -n 1)") },
403
+	//{ MODKEY,         			XK_F12,		spawn,		SHCMD(TERMINAL " -e [ ! -d ${HOME}/SCRATCH ] && mkdir ${HOME}/SCRATCH >/dev/null 2>&1; ${TERMINAL} -e /usr/bin/lfp ${HOME}/SCRATCH") },
404
 	{ MODKEY,         	    XK_slash,	defaultgaps,	{0} },
405
 	{ MODKEY,                	XK_space,	spawn,	    SHCMD(TERMINAL " -e /usr/bin/snip") },
406
 	{ MODKEY|ShiftMask,	XK_space,	zoom,	        {0} },
407
@@ -341,9 +357,9 @@ static Key keys[] = {
408
 	{ MODKEY,         			XK_Delete,	spawn,		SHCMD("dmenurecord kill") },
409
 	{ MODKEY,         			XK_Scroll_Lock,	spawn,		SHCMD("killall screenkey || screenkey &") },
410
 
411
-	{ 0, XF86XK_AudioMute,		spawn,		SHCMD("pamixer -t; kill -44 $(pidof AutoLinuxblocks)") },
412
-	{ 0, XF86XK_AudioRaiseVolume,	spawn,		SHCMD("pamixer --allow-boost -i 3; kill -44 $(pidof AutoLinuxblocks)") },
413
-	{ 0, XF86XK_AudioLowerVolume,	spawn,		SHCMD("pamixer --allow-boost -d 3; kill -44 $(pidof AutoLinuxblocks)") },
414
+	{ 0, XF86XK_AudioMute,		spawn,		SHCMD("pamixer -t; kill -44 $(pidof dwmblocks)") },
415
+	{ 0, XF86XK_AudioRaiseVolume,	spawn,		SHCMD("pamixer --allow-boost -i 3; kill -44 $(pidof dwmblocks)") },
416
+	{ 0, XF86XK_AudioLowerVolume,	spawn,		SHCMD("pamixer --allow-boost -d 3; kill -44 $(pidof dwmblocks)") },
417
 	{ 0, XF86XK_AudioPrev,		spawn,		SHCMD("mpc prev") },
418
 	{ 0, XF86XK_AudioNext,		spawn,		SHCMD("mpc next") },
419
 	{ 0, XF86XK_AudioPause,		spawn,		SHCMD("mpc pause") },
420
@@ -360,7 +376,7 @@ static Key keys[] = {
421
 	{ 0, XF86XK_DOS,		spawn,		SHCMD(TERMINAL) },
422
 	{ 0, XF86XK_ScreenSaver,	spawn,		SHCMD("slock & xset dpms force off; mpc pause; pauseallmpv") },
423
 	{ 0, XF86XK_TaskPane,		spawn,		SHCMD(TERMINAL " -e htop") },
424
-	{ 0, XF86XK_Mail,		spawn,		SHCMD(TERMINAL " -e neomutt ; pkill -RTMIN+12 AutoLinuxblocks") },
425
+	{ 0, XF86XK_Mail,		spawn,		SHCMD(TERMINAL " -e neomutt ; pkill -RTMIN+12 dwmblocks") },
426
 	{ 0, XF86XK_MyComputer,		spawn,		SHCMD(TERMINAL " -e lf /") },
427
 	/* { 0, XF86XK_Battery,		spawn,		SHCMD("") }, */
428
 	{ 0, XF86XK_Launch1,		spawn,		SHCMD("xset dpms force off") },
429
@@ -394,14 +410,14 @@ static Button buttons[] = {
430
 	/* click                event mask      button          function        argument */
431
 #ifndef __OpenBSD__
432
 	{ ClkWinTitle,          0,              Button2,        zoom,           {0} },
433
-	{ ClkStatusText,        0,              Button1,        sigAutoLinuxblocks,   {.i = 1} },
434
-	{ ClkStatusText,        0,              Button2,        sigAutoLinuxblocks,   {.i = 2} },
435
-	{ ClkStatusText,        0,              Button3,        sigAutoLinuxblocks,   {.i = 3} },
436
-	{ ClkStatusText,        0,              Button4,        sigAutoLinuxblocks,   {.i = 4} },
437
-	{ ClkStatusText,        0,              Button5,        sigAutoLinuxblocks,   {.i = 5} },
438
-	{ ClkStatusText,        ShiftMask,      Button1,        sigAutoLinuxblocks,   {.i = 6} },
439
+	{ ClkStatusText,        0,              Button1,        sigdwmblocks,   {.i = 1} },
440
+	{ ClkStatusText,        0,              Button2,        sigdwmblocks,   {.i = 2} },
441
+	{ ClkStatusText,        0,              Button3,        sigdwmblocks,   {.i = 3} },
442
+	{ ClkStatusText,        0,              Button4,        sigdwmblocks,   {.i = 4} },
443
+	{ ClkStatusText,        0,              Button5,        sigdwmblocks,   {.i = 5} },
444
+	{ ClkStatusText,        ShiftMask,      Button1,        sigdwmblocks,   {.i = 6} },
445
 #endif
446
-	{ ClkStatusText,        ShiftMask,      Button3,        spawn,          SHCMD(TERMINAL " -e nvim ~/.local/src/AutoLinuxblocks/config.h") },
447
+	{ ClkStatusText,        ShiftMask,      Button3,        spawn,          SHCMD(TERMINAL " -e nvim ~/.local/src/dwmblocks/config.h") },
448
 	{ ClkClientWin,         MODKEY,                  Button1,        movemouse,      {0} },
449
 	{ ClkClientWin,         MODKEY,                  Button2,        defaultgaps,	{0} },
450
 	{ ClkClientWin,         MODKEY,                  Button3,        resizemouse,    {0} },
451
diff --git a/drw.o b/drw.o
452
new file mode 100644
453
index 0000000..8c310c9
454
Binary files /dev/null and b/drw.o differ
455
diff --git a/dwm-attachbottom-6.3.diff b/dwm-attachbottom-6.3.diff
456
new file mode 100644
457
index 0000000..1f3c230
458
--- /dev/null
459
+++ b/dwm-attachbottom-6.3.diff
460
@@ -0,0 +1,54 @@
461
+diff -up AutoLinux-6.3/AutoLinux.c AutoLinux-6.3-attachbottom/AutoLinux.c
462
+--- AutoLinux-6.3/AutoLinux.c	2022-01-07 12:42:18.000000000 +0100
463
++++ AutoLinux-6.3-attachbottom/AutoLinux.c	2022-08-17 22:14:41.813809073 +0200
464
+@@ -147,6 +147,7 @@ static int applysizehints(Client *c, int
465
+ static void arrange(Monitor *m);
466
+ static void arrangemon(Monitor *m);
467
+ static void attach(Client *c);
468
++static void attachbottom(Client *c);
469
+ static void attachstack(Client *c);
470
+ static void buttonpress(XEvent *e);
471
+ static void checkotherwm(void);
472
+@@ -408,6 +409,15 @@ attach(Client *c)
473
+ }
474
+
475
+ void
476
++attachbottom(Client *c)
477
++{
478
++	Client **tc;
479
++	c->next = NULL;
480
++	for (tc = &c->mon->clients; *tc; tc = &(*tc)->next);
481
++	*tc = c;
482
++}
483
++
484
++void
485
+ attachstack(Client *c)
486
+ {
487
+ 	c->snext = c->mon->stack;
488
+@@ -1066,7 +1076,7 @@ manage(Window w, XWindowAttributes *wa)
489
+ 		c->isfloating = c->oldstate = trans != None || c->isfixed;
490
+ 	if (c->isfloating)
491
+ 		XRaiseWindow(dpy, c->win);
492
+-	attach(c);
493
++	attachbottom(c);
494
+ 	attachstack(c);
495
+ 	XChangeProperty(dpy, root, netatom[NetClientList], XA_WINDOW, 32, PropModeAppend,
496
+ 		(unsigned char *) &(c->win), 1);
497
+@@ -1421,7 +1431,7 @@ sendmon(Client *c, Monitor *m)
498
+ 	detachstack(c);
499
+ 	c->mon = m;
500
+ 	c->tags = m->tagset[m->seltags]; /* assign tags of target monitor */
501
+-	attach(c);
502
++	attachbottom(c);
503
+ 	attachstack(c);
504
+ 	focus(NULL);
505
+ 	arrange(NULL);
506
+@@ -1903,7 +1913,7 @@ updategeom(void)
507
+ 					m->clients = c->next;
508
+ 					detachstack(c);
509
+ 					c->mon = mons;
510
+-					attach(c);
511
++					attachbottom(c);
512
+ 					attachstack(c);
513
+ 				}
514
+ 				if (m == selmon)
515
diff --git a/patch/bar_time.c b/patch/bar_time.c
516
new file mode 100644
517
index 0000000..6e86da4
518
--- /dev/null
519
+++ b/patch/bar_time.c
520
@@ -0,0 +1,44 @@
521
+
522
+#define SH(cmd) (const char*[]){ "/bin/sh", "-c", cmd, NULL }
523
+
524
+// get current time once a second
525
+void get_time(char *time) {
526
+    FILE *fp;
527
+    char buf[100];
528
+    fp = popen("date +%H:%M", "r");
529
+    fgets(buf, 100, fp);
530
+    pclose(fp);
531
+    strcpy(time, buf);
532
+}
533
+
534
+
535
+int
536
+width_time(Bar *bar, BarWidthArg *a)
537
+{
538
+  return TEXTW("00:00:00") + lrpad;
539
+}
540
+
541
+int
542
+draw_time(Bar *bar, BarDrawArg *a)
543
+{
544
+	int boxs = drw->fonts->h / 9;
545
+	int boxw = drw->fonts->h / 6 + 2;
546
+	int x = a->x, w = a->w;
547
+	Monitor *m = bar->mon;
548
+
549
+	drw_setscheme(drw, scheme[m == selmon ? SchemeSel : SchemeNorm]);
550
+
551
+  char time[100];
552
+  get_time(time);
553
+  char *time2 = time;
554
+  time2[5] = '\0';
555
+
556
+  return drw_text(drw, a->x, 0, a->w, bh, lrpad / 2, time2, 0);
557
+}
558
+
559
+int
560
+click_time(Bar *bar, Arg *arg, BarClickArg *a)
561
+{
562
+  return ClkStatusText;
563
+}
564
+
565
diff --git a/patch/bar_time.h b/patch/bar_time.h
566
new file mode 100644
567
index 0000000..8fd9f76
568
--- /dev/null
569
+++ b/patch/bar_time.h
570
@@ -0,0 +1,3 @@
571
+static int width_time(Bar *bar, BarWidthArg *a);
572
+static int draw_time(Bar *bar, BarDrawArg *a);
573
+static int click_time(Bar *bar, Arg *arg, BarClickArg *a);
574
diff --git a/patch/include.c b/patch/include.c
575
index d422f56..b17bd3e 100644
576
--- a/patch/include.c
577
+++ b/patch/include.c
578
@@ -1,5 +1,6 @@
579
 /* Bar functionality */
580
 #include "bar_ltsymbol.c"
581
+#include "bar_time.c"
582
 #include "bar_status.c"
583
 #include "bar_tags.c"
584
-#include "bar_wintitle.c"
585
+#include "bar_wintitle.c"
586
diff --git a/patch/include.h b/patch/include.h
587
index 5f9a3fe..0fed3fd 100644
588
--- a/patch/include.h
589
+++ b/patch/include.h
590
@@ -1,5 +1,6 @@
591
 /* Bar functionality */
592
 #include "bar_ltsymbol.h"
593
+#include "bar_time.h"
594
 #include "bar_status.h"
595
 #include "bar_tags.h"
596
-#include "bar_wintitle.h"
597
+#include "bar_wintitle.h"
598
diff --git a/util.o b/util.o
599
new file mode 100644
600
index 0000000..a36344b
601
Binary files /dev/null and b/util.o differ