small cleanup, scroll layout indicator

This commit is contained in:
speedie 2022-12-18 20:39:31 +01:00
parent 79701c612d
commit 879f85a8f9
5 changed files with 12 additions and 28 deletions

View file

@ -232,6 +232,7 @@ These binds can be activated using your mouse
- Layout indicator (Left click) - Switch to the next layout
- Layout indicator (Middle click) - Switch to the previous layout
- Layout indicator (Right click) - Open a dmenu list of all layouts (requires speedwm-extras)
- Layout indicator (Scrolling up/down) - Switch to the next/previous layout
- Window title (Right click) - Open speedwm-utils (requires speedwm-extras)
- Focused window (Super+Alt+Left click) - Move the focused window around
- Focused window (Super+Alt+Middle click) - Make the focused window floating

View file

@ -182,6 +182,7 @@ These binds can be activated using your mouse
- Layout indicator (Left click) - Switch to the next layout
- Layout indicator (Middle click) - Switch to the previous layout
- Layout indicator (Right click) - Open a dmenu list of all layouts (requires speedwm-extras)
- Layout indicator (Scrolling up/down) - Switch to the next/previous layout
- Window title (Right click) - Open speedwm-utils (requires speedwm-extras)
- Focused window (Super+Alt+Left click) - Move the focused window around
- Focused window (Super+Alt+Middle click) - Make the focused window floating

View file

@ -20,9 +20,11 @@
/* Actions when the mouse clicks a part of the screen */
static const Button buttons[] = {
/* click event mask button function argument */
{ ClkLtSymbol, 0, Button3, layoutmenu, {0} },
{ ClkLtSymbol, 0, Button3, spawn, cmd( "speedwm-utils layout" ) },
{ ClkLtSymbol, 0, Button1, cyclelayout, {.i = +1 } },
{ ClkLtSymbol, 0, Button2, cyclelayout, {.i = -1 } },
{ ClkLtSymbol, 0, Button4, cyclelayout, {.i = +1 } },
{ ClkLtSymbol, 0, Button5, cyclelayout, {.i = -1 } },
{ ClkWinTitle, 0, Button2, zoom, {0} },
{ ClkClientWin, MODIFIER1, Button1, moveorplace, {.i = 1} },
{ ClkClientWin, MODIFIER1, Button2, togglefloating, {0} },

View file

@ -432,9 +432,6 @@ Mute button - Mutes your audio
Up Volume button - Increases your volume
.IP \[bu] 2
Next/Previous song button - Switch to the next/previous track
.PD 0
.P
.PD
.IP \[bu] 2
Down Volume button - Decreases your volume
.IP \[bu] 2
@ -469,6 +466,9 @@ Layout indicator (Middle click) - Switch to the previous layout
Layout indicator (Right click) - Open a dmenu list of all layouts
(requires speedwm-extras)
.IP \[bu] 2
Layout indicator (Scrolling up/down) - Switch to the next/previous
layout
.IP \[bu] 2
Window title (Right click) - Open speedwm-utils (requires
speedwm-extras)
.IP \[bu] 2

View file

@ -518,9 +518,6 @@ static void keypress(XEvent *e);
static int getsignal(void);
static void killclient(const Arg *arg);
static void killunsel(const Arg *arg);
#if USEMOUSE
static void layoutmenu(const Arg *arg);
#endif
static void manage(Window w, XWindowAttributes *wa);
static void mappingnotify(XEvent *e);
static void maprequest(XEvent *e);
@ -1884,23 +1881,6 @@ destroynotify(XEvent *e)
}
}
/* run ltmenu */
#if USEMOUSE
void
layoutmenu(const Arg *arg) {
FILE *p;
char c[3];
int i;
if (!(p = popen(layoutcmd, "r")))
return;
pclose(p);
i = atoi(c);
setlayout(&((Arg) {.v = &layouts[i]}));
}
#endif
void
detach(Client *c)
{