mirror of
https://github.com/phillipberndt/autorandr
synced 2025-01-14 19:20:58 +00:00
add basic awk scripts
This commit is contained in:
commit
f65469a59a
18
conf.awk
Normal file
18
conf.awk
Normal file
@ -0,0 +1,18 @@
|
||||
#!/usr/bin/awk
|
||||
|
||||
/^[^ ]+ disconnected / {
|
||||
OUTPUT[$1] = "--off";
|
||||
}
|
||||
|
||||
/^[^ ]+ connected / {
|
||||
split($3, A, "+");
|
||||
OUTPUT[$1] = "--mode "A[1]" --pos "A[2]"x"A[3];
|
||||
}
|
||||
|
||||
END {
|
||||
printf "xrandr ";
|
||||
for (O in OUTPUT) {
|
||||
printf "--output " O " " OUTPUT[O] " ";
|
||||
}
|
||||
printf "\n";
|
||||
}
|
Loading…
Reference in New Issue
Block a user