From 61524d71fa58c9b5a52367627d68ae21e752ec11 Mon Sep 17 00:00:00 2001 From: Jonathan Hodgson Date: Wed, 3 Feb 2021 20:23:52 +0000 Subject: [PATCH] Adds brightness keys, fixes noswallow and adds rule --- config.def.h | 9 +++++++-- dwm.c | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/config.def.h b/config.def.h index 4bffe91..5366cca 100644 --- a/config.def.h +++ b/config.def.h @@ -36,7 +36,7 @@ static const Rule rules[] = { //{ "Firefox", NULL, NULL, 1 << 8, 0, 0, 0, 0, -1 }, { "xterm-256color", NULL, NULL, 0, 0, 1, 1, 0, -1 }, { "Thunderbird", NULL, NULL, 1 << 8 , 0, 0, 0, 0, -1 }, - { NULL, NULL, "Event Tester", 0, 0, 0, 1, 0, -1 } + { NULL, NULL, "noswallow", 0, 0, 0, 1, 0, -1 } }; @@ -71,7 +71,7 @@ static const Layout layouts[] = { /* commands */ static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */ -static const char *dmenucmd[] = { "rofi", "-show", "drun", NULL }; +static const char *dmenucmd[] = { "rofi", "-show", "drun", "-modi", "drun", "-theme", "themes/launchpad.rasi", NULL }; //static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL }; static const char *termcmd[] = { "folder-shell", NULL }; @@ -114,6 +114,9 @@ static const char *volumeUp[] = { "volume", "up", NULL }; static const char *volumeDown[] = { "volume", "down", NULL }; static const char *volumeToggle[] = { "volume", "toggle", NULL }; +static const char *brightnessUp[] = { "brightness", "up", NULL }; +static const char *brightnessDown[] = { "brightness", "down", NULL }; + static const char *setBackgroundRandom[] = { "rofi-background", "--earth", NULL }; static const char *backgroundDetails[] = { "background", "--only-notify", NULL }; @@ -181,6 +184,8 @@ static Key keys[] = { { 0, XF86XK_AudioRaiseVolume, spawn, {.v = volumeUp } }, { 0, XF86XK_AudioLowerVolume, spawn, {.v = volumeDown } }, { 0, XF86XK_AudioMute, spawn, {.v = volumeToggle } }, + { 0, XF86XK_MonBrightnessUp, spawn, {.v = brightnessUp } }, + { 0, XF86XK_MonBrightnessDown, spawn, {.v = brightnessDown } }, TAGKEYS( XK_1, 0) TAGKEYS( XK_2, 1) TAGKEYS( XK_3, 2) diff --git a/dwm.c b/dwm.c index 874f38a..673f284 100644 --- a/dwm.c +++ b/dwm.c @@ -318,6 +318,7 @@ applyrules(Client *c) && (!r->instance || strstr(instance, r->instance))) { c->isterminal = r->isterminal; + c->noswallow = r->noswallow; c->isfloating = r->isfloating; c->nofakefullscreen = r->nofakefullscreen; c->tags |= r->tags;