bin: sway tools
This commit is contained in:
parent
0871ab52c7
commit
b73b3b32cd
|
@ -1,8 +1,13 @@
|
||||||
#!/bin/sh
|
#!/bin/sh -e
|
||||||
# Suspend screen until enter is pressed
|
# Suspend screen until enter is pressed
|
||||||
test "$1" && sleep $1
|
test "$1" && sleep $1
|
||||||
xset dpms force off
|
dpms() {
|
||||||
swaymsg "output * dpms off"
|
if test $XDG_SESSION_TYPE = wayland
|
||||||
read
|
then swaymsg "output * dpms $*"
|
||||||
xset dpms force on
|
else xset dpms force "$@"
|
||||||
swaymsg "output * dpms on"
|
fi
|
||||||
|
}
|
||||||
|
dpms off
|
||||||
|
trap 'dpms on' INT
|
||||||
|
sleep 99999
|
||||||
|
dpms on
|
||||||
|
|
|
@ -8,4 +8,5 @@ case $1 in
|
||||||
(col) way-displays -s ARRANGE_ALIGN COLUMN MIDDLE; exit $?;;
|
(col) way-displays -s ARRANGE_ALIGN COLUMN MIDDLE; exit $?;;
|
||||||
esac
|
esac
|
||||||
shift $shift
|
shift $shift
|
||||||
way-displays -s SCALE '' $scale "$@" || swaymsg output \* scale $scale
|
way-displays -s SCALE '' $scale "$@" ||
|
||||||
|
swaymsg output \* scale $scale
|
||||||
|
|
Loading…
Reference in New Issue