Compare commits

...

2 Commits

2 changed files with 10 additions and 2 deletions

View File

@ -208,7 +208,7 @@ static Key keys[] = {
{ MODKEY, XK_Return, spawn, {.v = termcmd } }, { MODKEY, XK_Return, spawn, {.v = termcmd } },
{ MODKEY|ShiftMask, XK_Return, togglescratch, {.ui = 0 } }, { MODKEY|ShiftMask, XK_Return, togglescratch, {.ui = 0 } },
{ MODKEY, XK_z, spawn, SHCMD("st -e tremc --skip-version-check") }, { MODKEY, XK_z, spawn, SHCMD("st -e tremc --skip-version-check") },
/*{ MODKEY|ShiftMask, XK_z, spawn, SHCMD("st -e tremc") },*/ { MODKEY|ShiftMask, XK_z, tagfocusmon, {.i = -1}},
{ MODKEY, XK_x, spawn, SHCMD("slock & ( sleep 4; xset dpms force off; mpc pause ; pauseallmpv)") }, { MODKEY, XK_x, spawn, SHCMD("slock & ( sleep 4; xset dpms force off; mpc pause ; pauseallmpv)") },
{ MODKEY|ShiftMask, XK_x, spawn, SHCMD("prompt \"Shutdown computer?\" \"sudo -A shutdown -h now\"") }, { MODKEY|ShiftMask, XK_x, spawn, SHCMD("prompt \"Shutdown computer?\" \"sudo -A shutdown -h now\"") },
{ MODKEY, XK_c, togglescratch, {.ui = 1 } }, { MODKEY, XK_c, togglescratch, {.ui = 1 } },
@ -274,7 +274,9 @@ static Key keys[] = {
{ 0, XF86XK_AudioRewind, spawn, SHCMD("mpc seek -10") }, { 0, XF86XK_AudioRewind, spawn, SHCMD("mpc seek -10") },
{ 0, XF86XK_AudioForward, spawn, SHCMD("mpc seek +10") }, { 0, XF86XK_AudioForward, spawn, SHCMD("mpc seek +10") },
{ 0, XF86XK_AudioMedia, spawn, SHCMD("st -e ncmpcpp") }, { 0, XF86XK_AudioMedia, spawn, SHCMD("st -e ncmpcpp") },
{ 0, XF86XK_PowerOff, spawn, SHCMD("[ \"$(printf \"No\\nYes\" | dmenu -i -nb darkred -sb red -sf white -nf gray -p \"Shutdown computer?\")\" = Yes ] && sudo -A shutdown -h now") }, { 0, XF86XK_Display, spawn, SHCMD("displayselect")},
{ 0, XF86XK_PowerOff, spawn, SHCMD("[ \"$(printf \"No\\nYes\" | dmenu -i -n -nb darkred -sb red -sf white -nf gray -p \"Shutdown computer?\")\" = Yes ] && sudo -A shutdown -h now") },
{ 0, XF86XK_Calculator, spawn, SHCMD("st -e bc -l") }, { 0, XF86XK_Calculator, spawn, SHCMD("st -e bc -l") },
{ 0, XF86XK_Sleep, spawn, SHCMD("sudo -A zzz") }, { 0, XF86XK_Sleep, spawn, SHCMD("sudo -A zzz") },
{ 0, XF86XK_WWW, spawn, SHCMD("$BROWSER") }, { 0, XF86XK_WWW, spawn, SHCMD("$BROWSER") },

6
dwm.c
View File

@ -219,6 +219,7 @@ static void spawn(const Arg *arg);
static void spiral(Monitor *mon); static void spiral(Monitor *mon);
static void tag(const Arg *arg); static void tag(const Arg *arg);
static void tagmon(const Arg *arg); static void tagmon(const Arg *arg);
static void tagfocusmon(const Arg *arg);
static void tile(Monitor *); static void tile(Monitor *);
static void togglebar(const Arg *arg); static void togglebar(const Arg *arg);
static void togglefloating(const Arg *arg); static void togglefloating(const Arg *arg);
@ -1791,6 +1792,11 @@ tagmon(const Arg *arg)
} }
} }
void
tagfocusmon(const Arg *arg){
tagmon(arg);
focusmon(arg);
}
void void
tile(Monitor *m) tile(Monitor *m)
{ {