add restartsig patch and add keybinds

This commit is contained in:
lucy 2026-06-09 19:54:00 +02:00
commit 6e389ae007
4 changed files with 11 additions and 19 deletions

View file

@ -1,11 +1,11 @@
/* See LICENSE file for copyright and license details. */
/* appearance */
static unsigned int borderpx = 1; /* border pixel of windows */
static const unsigned int gappx = 10; /* gaps between windows */
static unsigned int borderpx = 2; /* border pixel of windows */
static unsigned int gappx = 10; /* gaps between windows */
static unsigned int snap = 32; /* snap pixel */
static int showbar = 1; /* 0 means no bar */
static int topbar = 1; /* 0 means bottom bar */
static int topbar = 0; /* 0 means bottom bar */
static const char *fonts[] = { "Maple Mono NL:size=10" };
static const char dmenufont[] = "Maple Mono NL:size=10";
static char normbgcolor[] = "#222222";
@ -59,7 +59,6 @@ static const Layout layouts[] = {
static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbordercolor, "-sf", selfgcolor, NULL };
static const char *termcmd[] = { "st", NULL };
static const char *quit_dwm[] = { "pkill", "X", NULL };
static const char *vol_up[] = { "wpctl", "set-volume", "-l", "1.0", "@DEFAULT_AUDIO_SINK@", "5%+", NULL };
static const char *vol_down[] = { "wpctl", "set-volume", "-l", "1.0", "@DEFAULT_AUDIO_SINK@", "5%-", NULL };
static const char *brighter[] = { "brightnessctl", "set", "10%+", NULL };
@ -72,9 +71,9 @@ static const char *vol_mute[] = { "wpctl", "set-mute", "@DEFAULT_AUDIO_SINK@", "
ResourcePref resources[] = {
{ "color0", STRING, &normbgcolor },
{ "color0", STRING, &normbordercolor },
{ "color12", STRING, &normfgcolor },
{ "color12", STRING, &selbgcolor },
{ "color12", STRING, &selbordercolor },
{ "color11", STRING, &normfgcolor },
{ "color11", STRING, &selbgcolor },
{ "color11", STRING, &selbordercolor },
{ "color0", STRING, &selfgcolor },
{ "borderpx", INTEGER, &borderpx },
{ "snap", INTEGER, &snap },
@ -83,6 +82,7 @@ ResourcePref resources[] = {
{ "nmaster", INTEGER, &nmaster },
{ "resizehints", INTEGER, &resizehints },
{ "mfact", FLOAT, &mfact },
{ "gappx", INTEGER, &gappx },
};
#include <X11/XF86keysym.h>
static Key keys[] = {
@ -119,13 +119,14 @@ static Key keys[] = {
TAGKEYS( XK_7, 6)
TAGKEYS( XK_8, 7)
TAGKEYS( XK_9, 8)
{ MODKEY|ShiftMask, XK_r, quit, {0} },
{ MODKEY|ShiftMask, XK_q, quit, {1} },
{ MODKEY|ShiftMask, XK_r, quit, {1} },
{ MODKEY|ShiftMask, XK_q, quit, {0} },
{ 0, XF86XK_MonBrightnessUp, spawn, {.v = brighter } },
{ 0, XF86XK_MonBrightnessDown, spawn, {.v = dimmer } },
{ 0, XF86XK_AudioLowerVolume, spawn, {.v = vol_down } },
{ 0, XF86XK_AudioRaiseVolume, spawn, {.v = vol_up } },
{ 0, XF86XK_AudioMute, spawn, {.v = vol_mute } },
{ MODKEY|ShiftMask, XK_s, spawn, SHCMD("maim -s | xclip -selection clipboard -t image/png"), },
};
/* button definitions */
@ -139,6 +140,7 @@ static Button buttons[] = {
{ ClkClientWin, MODKEY, Button1, movemouse, {0} },
{ ClkClientWin, MODKEY, Button2, togglefloating, {0} },
{ ClkClientWin, MODKEY, Button3, resizemouse, {0} },
{ ClkClientWin, Mod1Mask, Button1, resizemouse, {0} },
{ ClkTagBar, 0, Button1, view, {0} },
{ ClkTagBar, 0, Button3, toggleview, {0} },
{ ClkTagBar, MODKEY, Button1, tag, {0} },

BIN
dwm

Binary file not shown.

10
dwm.c
View file

@ -219,7 +219,6 @@ static void sendmon(Client *c, Monitor *m);
static void setclientstate(Client *c, long state);
static void setfocus(Client *c);
static void setfullscreen(Client *c, int fullscreen);
static void setgaps(const Arg *arg);
static void setlayout(const Arg *arg);
static void setmfact(const Arg *arg);
static void setup(void);
@ -1627,15 +1626,6 @@ setfullscreen(Client *c, int fullscreen)
}
}
void
setgaps(const Arg *arg)
{
if ((arg->i == 0) || (selmon->gappx + arg->i < 0))
selmon->gappx = 0;
else
selmon->gappx += arg->i;
arrange(selmon);
}
void
setlayout(const Arg *arg)

BIN
dwm.o

Binary file not shown.