add signal for resetting everything + keybind

This commit is contained in:
speediegq 2022-10-22 18:43:48 +02:00
parent bce4c8de31
commit 430741bee2
5 changed files with 18 additions and 0 deletions

View file

@ -74,4 +74,5 @@
- 74 | Toggle the status area in the bar
- 75 | Toggle the floating indicator area in the bar
- 76 | Toggle the sticky indicator area in the bar
- 77 | Show all bar modules

View file

@ -123,6 +123,7 @@
- Super+t & s | Toggle status area in the bar
- Super+t & l | Toggle layout area in the bar
- Super+t & o | Toggle inactive fade
- Super+t & b | Show all bar modules
- Super+c & w | Get the weather (Using wttr.in)
- Super+c & n | Switch to the next track
- Super+c & p | Switch to the previous track

View file

@ -179,6 +179,7 @@ static Key keys[] = {
{ MODIFIER1, XK_t, XK_y, togglebaremptytags, {0} },
{ MODIFIER1, XK_t, XK_l, togglebarlt, {0} },
{ MODIFIER1, XK_t, XK_o, toggleopacity, {0} },
{ MODIFIER1, XK_t, XK_b, resetbar, {0} },
{ MODIFIER1, XK_t, XK_r, reorganizetags, {0} },

View file

@ -73,6 +73,7 @@ static Signal signals[] = {
{ 74, togglebarstatus, {0} },
{ 75, togglebarfloat, {0} },
{ 76, togglebarsticky, {0} },
{ 77, resetbar, {0} },
#if LAYOUT_TILE
{ 1, setlayout, {.v = &layouts[0]} }, /* Tiling layout */
#endif

View file

@ -607,6 +607,7 @@ static void togglebarlt(const Arg *arg);
static void togglebarstatus(const Arg *arg);
static void togglebarfloat(const Arg *arg);
static void togglebarsticky(const Arg *arg);
static void resetbar(const Arg *arg);
static void toggleopacity(const Arg *arg);
static void togglefullscr(const Arg *arg);
@ -5602,6 +5603,19 @@ togglebarsticky(const Arg *arg)
arrange(selmon);
}
void
resetbar(const Arg *arg)
{
selmon->hidetags = 0;
selmon->hidetitle = 0;
selmon->hidelayout = 0;
selmon->hidestatus = 0;
selmon->hidefloating = 0;
selmon->hidesticky = 0;
arrange(selmon);
}
void
togglefloating(const Arg *arg)
{