Skip to content

Commit c5ef1aa

Browse files
author
Arda Atci
committed
1.2.2, pulsemixer->pavucontrol, new rules
1 parent 6034e34 commit c5ef1aa

File tree

5 files changed

+24
-14
lines changed

5 files changed

+24
-14
lines changed

config.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ static char *colors[][3] = {
4747
[SchemeCritical] = { red, black, "#000000" } ,
4848
};
4949

50-
const char *key_pdf[] = {TERMINAL, "-n", "key_pdf", "-g", "120x34", "-e", "mandwmtui", "dwm", NULL};
50+
const char *key_tui[] = {TERMINAL, "-n", "key_tui", "-g", "120x34", "-e", "mandwmtui", "dwm", NULL};
5151

5252
const Config config[] = {
53-
{key_pdf, ""},
53+
{key_tui, ""},
5454
};
5555

5656
typedef struct {

config.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# dwm version
2-
VERSION = 1.2.1
2+
VERSION = 1.2.2
33

44
# Customize below to fit your system
55

dwm.1

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,10 @@ Spawn lf (file manager)
9191
Spawn applications menu
9292
.TP
9393
.B Win + b
94-
Toggle - hide statusbar
94+
Toggle - hide statusbar (current tag)
95+
.TP
96+
.B Win + Shift + b
97+
Toggle - hide statusbar (all tags)
9598
.TP
9699
.B Win + d
97100
Jump to bookmarked directory
@@ -106,7 +109,7 @@ Spawn password manager (pass)
106109
Stress monitor (s-tui)
107110
.TP
108111
.B Win + F4
109-
Spawn sound options
112+
Spawn sound options (pavucontrol)
110113
.TP
111114
.B Win + F5
112115
Open display select (set resolution, refresh rate)

dwm.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ struct Client {
129129
int issteam;
130130
unsigned int icw, ich; Picture icon;
131131
unsigned int tags;
132-
int isfixed, iscentered, isfloating, isurgent, neverfocus, oldstate, isfullscreen, isterminal, noswallow, issticky;
132+
int isfixed, iscentered, isfloating, isurgent, neverfocus, oldstate, isfullscreen, isterminal, noswallow, managedsize, issticky;
133133
pid_t pid;
134134
Client *next;
135135
Client *snext;
@@ -197,6 +197,7 @@ typedef struct {
197197
int isterminal;
198198
int iscentered;
199199
int noswallow;
200+
int managedsize;
200201
int monitor;
201202
} Rule;
202203

@@ -424,12 +425,18 @@ applyrules(Client *c)
424425
c->isterminal = r->isterminal;
425426
c->isfloating = r->isfloating;
426427
c->noswallow = r->noswallow;
428+
c->managedsize = r->managedsize;
427429
c->tags |= r->tags;
428430
if ((r->tags & SPTAGMASK) && r->isfloating) {
429431
c->x = c->mon->wx + (c->mon->ww / 2 - WIDTH(c) / 2);
430432
c->y = c->mon->wy + (c->mon->wh / 2 - HEIGHT(c) / 2);
431433
}
432434

435+
if (c->managedsize) {
436+
c->w = c->mon->ww / 2;
437+
c->h = c->mon->wh / 2;
438+
}
439+
433440
for (m = mons; m && m->num != r->monitor; m = m->next);
434441
if (m)
435442
c->mon = m;

keys.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ static const Rule rules[] = {
3333
* WM_CLASS(STRING) = instance, class
3434
* WM_NAME(STRING) = title
3535
*/
36-
/* class instance title tags mask isfloating isterminal iscentered, noswallow monitor */
37-
{ TERMCLASS, NULL, NULL, 0, 0, 1, 0, 0, -1 },
38-
{ NULL, NULL, "Event Tester", 0, 0, 0, 0, 1, -1 },
39-
{ NULL, "spterm", NULL, SPTAG(0), 1, 1, 0, 0, -1 },
40-
{ NULL, "key_pdf", NULL, 0, 1, 1, 1, 0, -1 },
41-
{ NULL, NULL, "pulsemixer", 0, 1, 1, 1, 1, -1 },
42-
{ NULL, NULL, "nmtui", 0, 1, 1, 1, 1, -1 },
36+
/* class instance title tagsmask isfloating isterminal iscentered noswallow managedsize monitor */
37+
{ TERMCLASS, NULL, NULL, 0, 0, 1, 0, 0, 0, -1 },
38+
{ NULL, NULL, "Event Tester", 0, 0, 0, 0, 1, 0, -1 },
39+
{ NULL, "spterm", NULL, SPTAG(0), 1, 1, 0, 0, 0, -1 },
40+
{ NULL, "key_tui", NULL, 0, 1, 1, 1, 0, 0, -1 },
41+
{ NULL, "pavucontrol", NULL, 0, 1, 0, 1, 1, 1, -1 },
42+
{ NULL, NULL, "nmtui", 0, 1, 1, 1, 1, 0, -1 },
4343
};
4444

4545
static Key keys[] = {
@@ -49,7 +49,7 @@ static Key keys[] = {
4949
/*{ MODKEY, XK_F1, spawn, SHCMD("") },
5050
{ MODKEY, XK_F2, spawn, SHCMD("")},
5151
{ MODKEY, XK_F3, spawn, SHCMD(TERMINAL "") },*/
52-
{ MODKEY, XK_F4, spawn, SHCMD(TERMINAL " -e pulsemixer; kill -44 $(pidof dwmblocks)") },
52+
{ MODKEY, XK_F4, spawn, SHCMD("pavucontrol; kill -44 $(pidof dwmblocks)") },
5353
{ MODKEY, XK_F5, spawn, SHCMD("pOS-displayselect") },
5454
/*{ MODKEY, XK_F6, spawn, SHCMD("") },
5555
{ MODKEY, XK_F7, spawn, SHCMD("") },*/

0 commit comments

Comments
 (0)