diff --git a/config.h b/config.h index 4ec0094..45ee9c1 100644 --- a/config.h +++ b/config.h @@ -60,17 +60,14 @@ static const Layout layouts[] = { /* helper for spawning shell commands in the pre dwm-5.0 fashion */ #define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } } #define STCMD(cmd) { .v = (const char*[]){ "/usr/bin/st", "-e", cmd, NULL } } -#define MPVSOCK(cmd) { .v = (const char*[]){ "/bin/zsh", "-c", "zmodload zsh/net/socket && (zsocket ~/.mpvsock && print -u $REPLY '" cmd "'; exec {REPLY}>&-)"} } +#define MPVSOCK(cmd) SHCMD("echo '" cmd "' | socat -u - ~/.mpvsock") /* commands */ static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */ static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, NULL }; static const char *termcmd[] = { "st", NULL }; static const char *lock[] = { "slock", NULL}; -static const char *sfeed[] = { "sfeed-dmenu", NULL }; static const char *passman[] = { "passman-dmenu", NULL }; -static const char *ttvlist[] = { "twitch-list", NULL }; -static const char *browser[] = { "xdg-open", "https://search.snopyta.org", NULL }; static const Key keys[] = { /* modifier key function argument */ @@ -79,7 +76,6 @@ static const Key keys[] = { { MODKEY, XK_space, spawn, {.v = dmenucmd } }, { MODKEY, XK_c, spawn, {.v = termcmd } }, { MODKEY|ShiftMask, XK_l, spawn, {.v = lock } }, - { MODKEY, XK_b, spawn, {.v = browser } }, /* screenshots */ { 0, XK_Print, spawn, SHCMD("import -silent /tmp/scr-$(date +%T).jpg") }, @@ -90,10 +86,8 @@ static const Key keys[] = { { MODKEY, XK_f, spawn, STCMD("nnn") }, /* dmenu scripts */ - { MODKEY, XK_r, spawn, {.v = sfeed } }, { MODKEY, XK_x, spawn, SHCMD("bookmarks-dmenu ~/Bookmarks") }, { MODKEY, XK_y, spawn, {.v = passman } }, - { MODKEY, XK_t, spawn, {.v = ttvlist } }, /* mpv controls */ { 0, XF86XK_AudioPlay, spawn, MPVSOCK("keypress space") },