Added new hook for when screen is rotated.
Signed-off-by: Peter John Hartman <peterjohnhartman@gmail.com>
This commit is contained in:

committed by
Stacy Harper

parent
2a4a614be7
commit
180332ae7a
9
configs/default_hooks/sxmo_hook_rotate.sh
Normal file
9
configs/default_hooks/sxmo_hook_rotate.sh
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# This script is executed after the screen is rotated.
|
||||||
|
# You can use this to change your conky/wayout layout or status
|
||||||
|
# bar to something more appropriate to the current orientation.
|
||||||
|
|
||||||
|
# The following parameters are provided:
|
||||||
|
# $1 = the new orientation
|
||||||
|
# possible values are "normal", "left" and "right"
|
@@ -44,6 +44,7 @@ xorgrotnormal() {
|
|||||||
xrandr -o normal
|
xrandr -o normal
|
||||||
applyptrmatrix 0 0 0 0 0 0 0 0 0
|
applyptrmatrix 0 0 0 0 0 0 0 0 0
|
||||||
sxmo_hook_lisgdstart.sh &
|
sxmo_hook_lisgdstart.sh &
|
||||||
|
sxmo_hook_rotate.sh normal
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -53,6 +54,7 @@ swayrotnormal() {
|
|||||||
swaymsg -- input type:touch map_to_output "$focused_name"
|
swaymsg -- input type:touch map_to_output "$focused_name"
|
||||||
swaymsg -- input type:tablet_tool map_to_output "$focused_name"
|
swaymsg -- input type:tablet_tool map_to_output "$focused_name"
|
||||||
sxmo_hook_lisgdstart.sh &
|
sxmo_hook_lisgdstart.sh &
|
||||||
|
sxmo_hook_rotate.sh normal
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -61,6 +63,7 @@ xorgrotright() {
|
|||||||
xrandr -o right
|
xrandr -o right
|
||||||
applyptrmatrix 0 1 0 -1 0 1 0 0 1
|
applyptrmatrix 0 1 0 -1 0 1 0 0 1
|
||||||
sxmo_hook_lisgdstart.sh &
|
sxmo_hook_lisgdstart.sh &
|
||||||
|
sxmo_hook_rotate.sh right
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -70,6 +73,7 @@ swayrotright() {
|
|||||||
swaymsg -- input type:touch map_to_output "$focused_name"
|
swaymsg -- input type:touch map_to_output "$focused_name"
|
||||||
swaymsg -- input type:tablet_tool map_to_output "$focused_name"
|
swaymsg -- input type:tablet_tool map_to_output "$focused_name"
|
||||||
sxmo_hook_lisgdstart.sh &
|
sxmo_hook_lisgdstart.sh &
|
||||||
|
sxmo_hook_rotate.sh right
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -78,6 +82,7 @@ xorgrotleft() {
|
|||||||
xrandr -o left
|
xrandr -o left
|
||||||
applyptrmatrix 0 -1 1 1 0 0 0 0 1
|
applyptrmatrix 0 -1 1 1 0 0 0 0 1
|
||||||
sxmo_hook_lisgdstart.sh &
|
sxmo_hook_lisgdstart.sh &
|
||||||
|
sxmo_hook_rotate.sh left
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -87,6 +92,7 @@ swayrotleft() {
|
|||||||
swaymsg -- input type:touch map_to_output "$focused_name"
|
swaymsg -- input type:touch map_to_output "$focused_name"
|
||||||
swaymsg -- input type:tablet_tool map_to_output "$focused_name"
|
swaymsg -- input type:tablet_tool map_to_output "$focused_name"
|
||||||
sxmo_hook_lisgdstart.sh &
|
sxmo_hook_lisgdstart.sh &
|
||||||
|
sxmo_hook_rotate.sh left
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user