Skip to content

Commit

Permalink
1.2.2, pulsemixer->pavucontrol, new rules
Browse files Browse the repository at this point in the history
  • Loading branch information
FT-Labs committed Aug 7, 2022
1 parent 6034e34 commit c5ef1aa
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 14 deletions.
4 changes: 2 additions & 2 deletions config.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ static char *colors[][3] = {
[SchemeCritical] = { red, black, "#000000" } ,
};

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

const Config config[] = {
{key_pdf, ""},
{key_tui, ""},
};

typedef struct {
Expand Down
2 changes: 1 addition & 1 deletion config.mk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# dwm version
VERSION = 1.2.1
VERSION = 1.2.2

# Customize below to fit your system

Expand Down
7 changes: 5 additions & 2 deletions dwm.1
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,10 @@ Spawn lf (file manager)
Spawn applications menu
.TP
.B Win + b
Toggle - hide statusbar
Toggle - hide statusbar (current tag)
.TP
.B Win + Shift + b
Toggle - hide statusbar (all tags)
.TP
.B Win + d
Jump to bookmarked directory
Expand All @@ -106,7 +109,7 @@ Spawn password manager (pass)
Stress monitor (s-tui)
.TP
.B Win + F4
Spawn sound options
Spawn sound options (pavucontrol)
.TP
.B Win + F5
Open display select (set resolution, refresh rate)
Expand Down
9 changes: 8 additions & 1 deletion dwm.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ struct Client {
int issteam;
unsigned int icw, ich; Picture icon;
unsigned int tags;
int isfixed, iscentered, isfloating, isurgent, neverfocus, oldstate, isfullscreen, isterminal, noswallow, issticky;
int isfixed, iscentered, isfloating, isurgent, neverfocus, oldstate, isfullscreen, isterminal, noswallow, managedsize, issticky;
pid_t pid;
Client *next;
Client *snext;
Expand Down Expand Up @@ -197,6 +197,7 @@ typedef struct {
int isterminal;
int iscentered;
int noswallow;
int managedsize;
int monitor;
} Rule;

Expand Down Expand Up @@ -424,12 +425,18 @@ applyrules(Client *c)
c->isterminal = r->isterminal;
c->isfloating = r->isfloating;
c->noswallow = r->noswallow;
c->managedsize = r->managedsize;
c->tags |= r->tags;
if ((r->tags & SPTAGMASK) && r->isfloating) {
c->x = c->mon->wx + (c->mon->ww / 2 - WIDTH(c) / 2);
c->y = c->mon->wy + (c->mon->wh / 2 - HEIGHT(c) / 2);
}

if (c->managedsize) {
c->w = c->mon->ww / 2;
c->h = c->mon->wh / 2;
}

for (m = mons; m && m->num != r->monitor; m = m->next);
if (m)
c->mon = m;
Expand Down
16 changes: 8 additions & 8 deletions keys.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ static const Rule rules[] = {
* WM_CLASS(STRING) = instance, class
* WM_NAME(STRING) = title
*/
/* class instance title tags mask isfloating isterminal iscentered, noswallow monitor */
{ TERMCLASS, NULL, NULL, 0, 0, 1, 0, 0, -1 },
{ NULL, NULL, "Event Tester", 0, 0, 0, 0, 1, -1 },
{ NULL, "spterm", NULL, SPTAG(0), 1, 1, 0, 0, -1 },
{ NULL, "key_pdf", NULL, 0, 1, 1, 1, 0, -1 },
{ NULL, NULL, "pulsemixer", 0, 1, 1, 1, 1, -1 },
{ NULL, NULL, "nmtui", 0, 1, 1, 1, 1, -1 },
/* class instance title tagsmask isfloating isterminal iscentered noswallow managedsize monitor */
{ TERMCLASS, NULL, NULL, 0, 0, 1, 0, 0, 0, -1 },
{ NULL, NULL, "Event Tester", 0, 0, 0, 0, 1, 0, -1 },
{ NULL, "spterm", NULL, SPTAG(0), 1, 1, 0, 0, 0, -1 },
{ NULL, "key_tui", NULL, 0, 1, 1, 1, 0, 0, -1 },
{ NULL, "pavucontrol", NULL, 0, 1, 0, 1, 1, 1, -1 },
{ NULL, NULL, "nmtui", 0, 1, 1, 1, 1, 0, -1 },
};

static Key keys[] = {
Expand All @@ -49,7 +49,7 @@ static Key keys[] = {
/*{ MODKEY, XK_F1, spawn, SHCMD("") },
{ MODKEY, XK_F2, spawn, SHCMD("")},
{ MODKEY, XK_F3, spawn, SHCMD(TERMINAL "") },*/
{ MODKEY, XK_F4, spawn, SHCMD(TERMINAL " -e pulsemixer; kill -44 $(pidof dwmblocks)") },
{ MODKEY, XK_F4, spawn, SHCMD("pavucontrol; kill -44 $(pidof dwmblocks)") },
{ MODKEY, XK_F5, spawn, SHCMD("pOS-displayselect") },
/*{ MODKEY, XK_F6, spawn, SHCMD("") },
{ MODKEY, XK_F7, spawn, SHCMD("") },*/
Expand Down

0 comments on commit c5ef1aa

Please sign in to comment.