added zoom keybind fixed sound notif

This commit is contained in:
WanderingPenwing 2024-07-31 12:23:30 +02:00
parent 370089549f
commit 16954c26fd
3 changed files with 27 additions and 27 deletions

View file

@ -70,16 +70,16 @@ static const char *screenlock[] = { "betterlockscreen", "-l", NULL };
static const Key keys[] = { static const Key keys[] = {
/* modifier key function argument */ /* modifier key function argument */
{ MODKEY, XK_d, spawn, {.v = dmenucmd } }, { MODKEY, XK_d, spawn, {.v = dmenucmd } },
{ MODKEY, XK_less, spawn, {.v = termcmd } }, { MODKEY, XK_Return, spawn, {.v = termcmd } },
{ MODKEY, XK_i, spawn, {.v = chromium } }, { MODKEY, XK_i, spawn, {.v = chromium } },
{ MODKEY, XK_twosuperior, spawn, {.v = screenlock } }, { MODKEY, XK_twosuperior, spawn, {.v = screenlock } },
{ MODKEY, XK_t, setlayout, {.v = &layouts[0]} }, { MODKEY, XK_space, setlayout, {0} },
{ MODKEY, XK_m, setlayout, {.v = &layouts[1]} },
{ MODKEY, XK_f, togglefullscreen, {0} }, { MODKEY, XK_f, togglefullscreen, {0} },
{ MODKEY, XK_Up, focusstack, {.i = +1 } }, { MODKEY, XK_Up, focusstack, {.i = +1 } },
{ MODKEY, XK_Down, focusstack, {.i = -1 } }, { MODKEY, XK_Down, focusstack, {.i = -1 } },
{ MODKEY, XK_F12, incnmaster, {.i = +1 } }, { MODKEY, XK_F12, incnmaster, {.i = +1 } },
{ MODKEY, XK_F11, incnmaster, {.i = -1 } }, { MODKEY, XK_F11, incnmaster, {.i = -1 } },
{ MODKEY, XK_exclam, zoom, {0} },
{ MODKEY, XK_Left, setmfact, {.f = -0.05} }, { MODKEY, XK_Left, setmfact, {.f = -0.05} },
{ MODKEY, XK_Right, setmfact, {.f = +0.05} }, { MODKEY, XK_Right, setmfact, {.f = +0.05} },
{ MODKEY|ShiftMask, XK_a, killclient, {0} }, { MODKEY|ShiftMask, XK_a, killclient, {0} },
@ -90,9 +90,9 @@ static const Key keys[] = {
{ MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } }, { MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
{ MODKEY|ShiftMask, XK_semicolon, tagmon, {.i = +1 } }, { MODKEY|ShiftMask, XK_semicolon, tagmon, {.i = +1 } },
{ MODKEY|ShiftMask, XK_q, quit, {0} }, { MODKEY|ShiftMask, XK_q, quit, {0} },
{ MODKEY, XK_F1, spawn, SHCMD("pamixer -t && notify-send -u normal \"volume\" \"$(pamixer --get-volume-human)\"") }, { MODKEY, XK_F1, spawn, SHCMD("pamixer -t && notify-send -u normal -a \"volume\" \"$(pamixer --get-volume-human)\"") },
{ MODKEY, XK_F2, spawn, SHCMD("pamixer -d 5 -u && notify-send -u normal \"volume\" \"$(pamixer --get-volume-human)\"") }, { MODKEY, XK_F2, spawn, SHCMD("pamixer -d 5 -u && notify-send -u normal -a \"volume\" \"$(pamixer --get-volume-human)\"") },
{ MODKEY, XK_F3, spawn, SHCMD("pamixer -i 5 -u && notify-send -u normal \"volume\" \"$(pamixer --get-volume-human)\"") }, { MODKEY, XK_F3, spawn, SHCMD("pamixer -i 5 -u && notify-send -u normal -a \"volume\" \"$(pamixer --get-volume-human)\"") },
{ MODKEY, XK_F4, spawn, SHCMD("brightnessctl -d \"amdgpu_bl1\" set 10%- && notify-send -u normal -a \"brightness\" \"$(brightnessctl -d 'amdgpu_bl1' get)\"") }, { MODKEY, XK_F4, spawn, SHCMD("brightnessctl -d \"amdgpu_bl1\" set 10%- && notify-send -u normal -a \"brightness\" \"$(brightnessctl -d 'amdgpu_bl1' get)\"") },
{ MODKEY, XK_F5, spawn, SHCMD("brightnessctl -d \"amdgpu_bl1\" set +10% && notify-send -u normal -a \"brightness\" \"$(brightnessctl -d 'amdgpu_bl1' get)\"") }, { MODKEY, XK_F5, spawn, SHCMD("brightnessctl -d \"amdgpu_bl1\" set +10% && notify-send -u normal -a \"brightness\" \"$(brightnessctl -d 'amdgpu_bl1' get)\"") },
{ MODKEY, XK_F6, spawn, SHCMD("~/nixos/scripts/usb_guest.sh") }, { MODKEY, XK_F6, spawn, SHCMD("~/nixos/scripts/usb_guest.sh") },

42
dwm.c
View file

@ -190,7 +190,7 @@ static void monocle(Monitor *m);
static void motionnotify(XEvent *e); static void motionnotify(XEvent *e);
//static void movemouse(const Arg *arg); //static void movemouse(const Arg *arg);
static Client *nexttiled(Client *c); static Client *nexttiled(Client *c);
//static void pop(Client *c); static void pop(Client *c);
static void propertynotify(XEvent *e); static void propertynotify(XEvent *e);
static void quit(const Arg *arg); static void quit(const Arg *arg);
static Monitor *recttomon(int x, int y, int w, int h); static Monitor *recttomon(int x, int y, int w, int h);
@ -241,7 +241,7 @@ static int xerror(Display *dpy, XErrorEvent *ee);
static int xerrordummy(Display *dpy, XErrorEvent *ee); static int xerrordummy(Display *dpy, XErrorEvent *ee);
static int xerrorstart(Display *dpy, XErrorEvent *ee); static int xerrorstart(Display *dpy, XErrorEvent *ee);
static void xinitvisual(); static void xinitvisual();
//static void zoom(const Arg *arg); static void zoom(const Arg *arg);
/* variables */ /* variables */
static const char broken[] = "broken"; static const char broken[] = "broken";
@ -1228,14 +1228,14 @@ nexttiled(Client *c)
return c; return c;
} }
// void void
// pop(Client *c) pop(Client *c)
// { {
// detach(c); detach(c);
// attach(c); attach(c);
// focus(c); focus(c);
// arrange(c->mon); arrange(c->mon);
// } }
void void
propertynotify(XEvent *e) propertynotify(XEvent *e)
@ -2208,17 +2208,17 @@ xinitvisual()
} }
} }
// void void
// zoom(const Arg *arg) zoom(const Arg *arg)
// { {
// Client *c = selmon->sel; Client *c = selmon->sel;
//
// if (!selmon->lt[selmon->sellt]->arrange || !c || c->isfloating) if (!selmon->lt[selmon->sellt]->arrange || !c || c->isfloating)
// return; return;
// if (c == nexttiled(selmon->clients) && !(c = nexttiled(c->next))) if (c == nexttiled(selmon->clients) && !(c = nexttiled(c->next)))
// return; return;
// pop(c); pop(c);
// } }
int int
main(int argc, char *argv[]) main(int argc, char *argv[])

BIN
dwm.o

Binary file not shown.