Persist screen brightness, enable universal evdev key/lid wake, and add *+# screenshot combo
This commit is contained in:
1 parent
eef8584a8d
commit
2e2adcc7f2
38 files changed
+574
-161
No files matched your search
@@ -38,12 +38,13 @@ restart_sxmo_hook_lisgd() {
|
||||
|
||||
xorgisrotated() {
|
||||
if [ -r "$ROT_STATE_FILE" ]; then
|
||||
read -r rotation < "$ROT_STATE_FILE" 2>/dev/null || rotation="normal"
|
||||
rotation="normal"
|
||||
read -r rotation < "$ROT_STATE_FILE" 2>/dev/null || true
|
||||
else
|
||||
rotation="$(
|
||||
xrandr | grep primary | cut -d' ' -f 5 | sed s/\(//
|
||||
)"
|
||||
printf %s "${rotation:-normal}" > "$ROT_STATE_FILE"
|
||||
printf '%s\n' "${rotation:-normal}" > "$ROT_STATE_FILE"
|
||||
fi
|
||||
if [ "$rotation" = "normal" ] || [ -z "$rotation" ]; then
|
||||
return 1;
|
||||
@@ -54,12 +55,13 @@ xorgisrotated() {
|
||||
|
||||
swayisrotated() {
|
||||
if [ -r "$ROT_STATE_FILE" ]; then
|
||||
read -r rotation < "$ROT_STATE_FILE" 2>/dev/null || rotation="normal"
|
||||
rotation="normal"
|
||||
read -r rotation < "$ROT_STATE_FILE" 2>/dev/null || true
|
||||
else
|
||||
rotation="$(
|
||||
swayfocusedtransform | sed -e s/90/right/ -e s/270/left/ -e s/180/reverse/
|
||||
)"
|
||||
printf %s "${rotation:-normal}" > "$ROT_STATE_FILE"
|
||||
printf '%s\n' "${rotation:-normal}" > "$ROT_STATE_FILE"
|
||||
fi
|
||||
if [ "$rotation" = "normal" ] || [ -z "$rotation" ]; then
|
||||
return 1
|
||||
@@ -72,7 +74,7 @@ riverisrotated() {
|
||||
rotation="$(
|
||||
riverfocusedtransform | sed -e s/270/right/ -e s/90/left/ -e s/180/reverse/
|
||||
)"
|
||||
printf %s "$rotation" > "$ROT_STATE_FILE"
|
||||
printf '%s\n' "$rotation" > "$ROT_STATE_FILE"
|
||||
if [ "$rotation" = "normal" ]; then
|
||||
return 1
|
||||
fi
|
||||
@@ -83,7 +85,7 @@ riverisrotated() {
|
||||
xorgrotinvert() {
|
||||
sxmo_keyboard.sh close
|
||||
xrandr -o inverted
|
||||
printf %s "reverse" > "$ROT_STATE_FILE"
|
||||
printf '%s\n' "reverse" > "$ROT_STATE_FILE"
|
||||
applyptrmatrix -1 0 1 0 -1 1 0 0 1
|
||||
restart_sxmo_hook_lisgd
|
||||
sxmo_hook_rotate.sh invert
|
||||
@@ -92,7 +94,7 @@ xorgrotinvert() {
|
||||
|
||||
swayrotinvert() {
|
||||
swaymsg -- output "-" transform 180
|
||||
printf %s "reverse" > "$ROT_STATE_FILE"
|
||||
printf '%s\n' "reverse" > "$ROT_STATE_FILE"
|
||||
restart_sxmo_hook_lisgd
|
||||
sxmo_hook_rotate.sh invert
|
||||
exit 0
|
||||
@@ -101,7 +103,7 @@ swayrotinvert() {
|
||||
riverrotinvert() {
|
||||
focused_output=$(river-bedload -print outputs | jq -r ".[] | select(.focused).name")
|
||||
wlr-randr --output "$focused_output" --transform 180
|
||||
printf %s "reverse" > "$ROT_STATE_FILE"
|
||||
printf '%s\n' "reverse" > "$ROT_STATE_FILE"
|
||||
restart_sxmo_hook_lisgd
|
||||
sxmo_hook_rotate.sh invert
|
||||
exit 0
|
||||
@@ -110,7 +112,7 @@ riverrotinvert() {
|
||||
xorgrotnormal() {
|
||||
sxmo_keyboard.sh close
|
||||
xrandr -o normal
|
||||
printf %s "normal" > "$ROT_STATE_FILE"
|
||||
printf '%s\n' "normal" > "$ROT_STATE_FILE"
|
||||
applyptrmatrix 0 0 0 0 0 0 0 0 0
|
||||
restart_sxmo_hook_lisgd
|
||||
sxmo_hook_rotate.sh normal
|
||||
@@ -119,7 +121,7 @@ xorgrotnormal() {
|
||||
|
||||
swayrotnormal() {
|
||||
swaymsg -- output "-" transform 0
|
||||
printf %s "normal" > "$ROT_STATE_FILE"
|
||||
printf '%s\n' "normal" > "$ROT_STATE_FILE"
|
||||
restart_sxmo_hook_lisgd
|
||||
sxmo_hook_rotate.sh normal
|
||||
exit 0
|
||||
@@ -128,7 +130,7 @@ swayrotnormal() {
|
||||
riverrotnormal() {
|
||||
focused_output=$(river-bedload -print outputs | jq -r ".[] | select(.focused).name")
|
||||
wlr-randr --output "$focused_output" --transform normal
|
||||
printf %s "normal" > "$ROT_STATE_FILE"
|
||||
printf '%s\n' "normal" > "$ROT_STATE_FILE"
|
||||
restart_sxmo_hook_lisgd
|
||||
sxmo_hook_rotate.sh normal
|
||||
exit 0
|
||||
@@ -137,7 +139,7 @@ riverrotnormal() {
|
||||
xorgrotright() {
|
||||
sxmo_keyboard.sh close
|
||||
xrandr -o right
|
||||
printf %s "right" > "$ROT_STATE_FILE"
|
||||
printf '%s\n' "right" > "$ROT_STATE_FILE"
|
||||
applyptrmatrix 0 1 0 -1 0 1 0 0 1
|
||||
restart_sxmo_hook_lisgd
|
||||
sxmo_hook_rotate.sh right
|
||||
@@ -146,7 +148,7 @@ xorgrotright() {
|
||||
|
||||
swayrotright() {
|
||||
swaymsg -- output "-" transform 90
|
||||
printf %s "right" > "$ROT_STATE_FILE"
|
||||
printf '%s\n' "right" > "$ROT_STATE_FILE"
|
||||
restart_sxmo_hook_lisgd
|
||||
sxmo_hook_rotate.sh right
|
||||
exit 0
|
||||
@@ -155,7 +157,7 @@ swayrotright() {
|
||||
riverrotright() {
|
||||
focused_output=$(river-bedload -print outputs | jq -r ".[] | select(.focused).name")
|
||||
wlr-randr --output "$focused_output" --transform 270
|
||||
printf %s "right" > "$ROT_STATE_FILE"
|
||||
printf '%s\n' "right" > "$ROT_STATE_FILE"
|
||||
restart_sxmo_hook_lisgd
|
||||
sxmo_hook_rotate.sh right
|
||||
exit 0
|
||||
@@ -164,7 +166,7 @@ riverrotright() {
|
||||
xorgrotleft() {
|
||||
sxmo_keyboard.sh close
|
||||
xrandr -o left
|
||||
printf %s "left" > "$ROT_STATE_FILE"
|
||||
printf '%s\n' "left" > "$ROT_STATE_FILE"
|
||||
applyptrmatrix 0 -1 1 1 0 0 0 0 1
|
||||
restart_sxmo_hook_lisgd
|
||||
sxmo_hook_rotate.sh left
|
||||
@@ -173,7 +175,7 @@ xorgrotleft() {
|
||||
|
||||
swayrotleft() {
|
||||
swaymsg -- output "-" transform 270
|
||||
printf %s "left" > "$ROT_STATE_FILE"
|
||||
printf '%s\n' "left" > "$ROT_STATE_FILE"
|
||||
restart_sxmo_hook_lisgd
|
||||
sxmo_hook_rotate.sh left
|
||||
exit 0
|
||||
@@ -182,7 +184,7 @@ swayrotleft() {
|
||||
riverrotleft() {
|
||||
focused_output=$(river-bedload -print outputs | jq -r ".[] | select(.focused).name")
|
||||
wlr-randr --output "$focused_output" --transform 90
|
||||
printf %s "left" > "$ROT_STATE_FILE"
|
||||
printf '%s\n' "left" > "$ROT_STATE_FILE"
|
||||
restart_sxmo_hook_lisgd
|
||||
sxmo_hook_rotate.sh left
|
||||
exit 0
|
||||
|
||||
Reference in new issue
Block a user