diff options
| author | Douglas Rumbaugh <doug@douglasrumbaugh.com> | 2022-12-05 15:49:59 -0500 |
|---|---|---|
| committer | Douglas Rumbaugh <doug@douglasrumbaugh.com> | 2022-12-05 15:49:59 -0500 |
| commit | cb89a1f15534df95f0ff96695cd363a4f229255b (patch) | |
| tree | 1602bad6bc8c75ac22e08993d94a0dc08e002a7e | |
| parent | 30b76a1f93a79d7c88c510b53143bfbf146efbd6 (diff) | |
| download | dwm-cb89a1f15534df95f0ff96695cd363a4f229255b.tar.gz | |
Tag-0: Focus a window's tags by clicking on it in tag-0
| -rw-r--r-- | config.def.h | 1 | ||||
| -rw-r--r-- | dwm.c | 11 |
2 files changed, 12 insertions, 0 deletions
diff --git a/config.def.h b/config.def.h index 4ff08b8..30c992f 100644 --- a/config.def.h +++ b/config.def.h @@ -420,6 +420,7 @@ static Button buttons[] = { { ClkClientWin, MODKEY, Button2, togglefloating, {0} }, { ClkClientWin, MODKEY, Button3, resizemouse, {0} }, { ClkClientWin, MODKEY|ShiftMask, Button1, view, {0} }, + { ClkClientWin, 0, Button1, t0_view, {0} }, { ClkTagBar, 0, Button1, view, {0} }, { ClkTagBar, 0, Button3, toggleview, {0} }, { ClkTagBar, MODKEY, Button1, tag, {0} }, @@ -267,6 +267,8 @@ static void updatestatus(void); static void updatetitle(Client *c); static void updatewindowtype(Client *c); static void updatewmhints(Client *c); + +static void t0_view(const Arg *arg); static void view(const Arg *arg); static void view_t0(const Arg *arg); static Client *wintoclient(Window w); @@ -2441,6 +2443,15 @@ updatewmhints(Client *c) } } + +void +t0_view(const Arg *arg) +{ + if (selmon->pertag->curtag == 0) { + view(arg); + } +} + void view(const Arg *arg) { |