oops
This commit is contained in:
parent
2600016096
commit
213d8bf9c8
@ -31,6 +31,7 @@ le-audio \
|
||||
sxhkd-help \
|
||||
change-scheme \
|
||||
le-wallpaper \
|
||||
le-wallpaper-open \
|
||||
xfce4-le-wallpaper \
|
||||
qutebrowser \
|
||||
qutesearch \
|
||||
|
27
scripts/le-wallpaper-open
Executable file
27
scripts/le-wallpaper-open
Executable file
@ -0,0 +1,27 @@
|
||||
#!/bin/sh
|
||||
|
||||
xrandr | awk '
|
||||
function addWallpaper(i) {
|
||||
split($3, a, "+");
|
||||
b[bi] = a[2];
|
||||
c[bi] = $1;
|
||||
bi++
|
||||
}
|
||||
|
||||
$2 == "connected" {
|
||||
for(i=1;i<=NF;i++) {
|
||||
if($i ~ /[0-9]+x[0-9]+\+[0-9]+\+[0-9]+/) {
|
||||
addWallpaper(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
END {
|
||||
PROCINFO["sorted_in"] = "@val_num_asc";
|
||||
d = "feh --bg-center";
|
||||
for(i in b) {
|
||||
d=d " $HOME/.local/share/le_wallpaper/" c[i] ".png";
|
||||
}
|
||||
system(d)
|
||||
}
|
||||
'
|
Loading…
x
Reference in New Issue
Block a user