mirror of
https://github.com/mintycube/dwm.git
synced 2024-10-22 14:05:45 +02:00
added layoutmenu patch
This commit is contained in:
parent
acbf2de1c2
commit
44ea8f5cce
18
patch/bar_layoutmenu.c
Normal file
18
patch/bar_layoutmenu.c
Normal file
@ -0,0 +1,18 @@
|
||||
void
|
||||
layoutmenu(const Arg *arg) {
|
||||
FILE *p;
|
||||
char c[3], *s;
|
||||
int i;
|
||||
|
||||
if (!(p = popen(layoutmenu_cmd, "r")))
|
||||
return;
|
||||
s = fgets(c, sizeof(c), p);
|
||||
pclose(p);
|
||||
|
||||
if (!s || *s == '\0' || c == '\0')
|
||||
return;
|
||||
|
||||
i = atoi(c);
|
||||
setlayout(&((Arg) { .v = &layouts[i] }));
|
||||
}
|
||||
|
1
patch/bar_layoutmenu.h
Normal file
1
patch/bar_layoutmenu.h
Normal file
@ -0,0 +1 @@
|
||||
static void layoutmenu(const Arg *arg);
|
8
patch/layoutmenu.sh
Executable file
8
patch/layoutmenu.sh
Executable file
@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
cat <<EOF | xmenu
|
||||
[]= Tiled Layout 0
|
||||
><> Floating Layout 1
|
||||
[M] Monocle Layout 2
|
||||
EOF
|
||||
|
Loading…
Reference in New Issue
Block a user