Compare commits
7 Commits
Author | SHA1 | Date | |
---|---|---|---|
b1c0695134 | |||
b0e7888c64 | |||
88cc39cfce | |||
086f5281dc | |||
62865b26a3 | |||
b963894397 | |||
7fa107e02b |
@@ -68,7 +68,7 @@ playing_mpc() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
playing_mpris() {
|
playing_mpris() {
|
||||||
command -v playerctl && [ "$(playerctl status)" = "Playing" ]
|
command -v playerctl && playerctl --all-players status | grep -q "Playing"
|
||||||
}
|
}
|
||||||
|
|
||||||
photos_processing() {
|
photos_processing() {
|
||||||
|
@@ -37,7 +37,7 @@ sxmo_daemons.sh stop periodic_wakelock_check
|
|||||||
# Go to screenoff after 8 seconds of inactivity
|
# Go to screenoff after 8 seconds of inactivity
|
||||||
if ! [ -e "$XDG_CACHE_HOME/sxmo/sxmo.noidle" ]; then
|
if ! [ -e "$XDG_CACHE_HOME/sxmo/sxmo.noidle" ]; then
|
||||||
sxmo_daemons.sh start idle_locker sxmo_idle.sh -w \
|
sxmo_daemons.sh start idle_locker sxmo_idle.sh -w \
|
||||||
timeout 8 "sxmo_hook_screenoff.sh"
|
timeout "${SXMO_LOCK_IDLE_TIME:-8}" "sxmo_hook_screenoff.sh"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
wait
|
wait
|
||||||
|
@@ -158,13 +158,19 @@ _sxmo_grab_session() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_sxmo_prepare_dirs() {
|
_sxmo_prepare_dirs() {
|
||||||
|
uid=$(id -u)
|
||||||
|
gid=$(id -g)
|
||||||
mkdir -p "$XDG_RUNTIME_DIR"
|
mkdir -p "$XDG_RUNTIME_DIR"
|
||||||
chmod 700 "$XDG_RUNTIME_DIR"
|
chmod 700 "$XDG_RUNTIME_DIR"
|
||||||
chown "$USER:$USER" "$XDG_RUNTIME_DIR"
|
chown "$uid:$gid" "$XDG_RUNTIME_DIR"
|
||||||
|
|
||||||
mkdir -p "$XDG_CACHE_HOME/sxmo/"
|
mkdir -p "$XDG_CACHE_HOME/sxmo/"
|
||||||
chmod 700 "$XDG_CACHE_HOME"
|
chmod 700 "$XDG_CACHE_HOME"
|
||||||
chown "$USER:$USER" "$XDG_CACHE_HOME"
|
chown "$uid:$gid" "$XDG_CACHE_HOME"
|
||||||
|
|
||||||
|
mkdir -p "$XDG_STATE_HOME"
|
||||||
|
chmod 700 "$XDG_STATE_HOME"
|
||||||
|
chown "$uid:$gid" "$XDG_STATE_HOME"
|
||||||
}
|
}
|
||||||
|
|
||||||
_sxmo_grab_session
|
_sxmo_grab_session
|
||||||
|
@@ -18,6 +18,8 @@ while true; do
|
|||||||
x_raw="$(cat "$FILE_X")"
|
x_raw="$(cat "$FILE_X")"
|
||||||
if [ "$x_raw" -ge "$RIGHT_SIDE_UP" ] && sxmo_rotate.sh isrotated ; then
|
if [ "$x_raw" -ge "$RIGHT_SIDE_UP" ] && sxmo_rotate.sh isrotated ; then
|
||||||
sxmo_rotate.sh rotnormal
|
sxmo_rotate.sh rotnormal
|
||||||
|
elif [ "$x_raw" -le "$UPSIDE_DOWN" ] && [ "$(sxmo_rotate.sh isrotated)" != "invert" ]; then
|
||||||
|
sxmo_rotate.sh rotinvert
|
||||||
elif [ "$y_raw" -le "$UPSIDE_DOWN" ] && [ "$(sxmo_rotate.sh isrotated)" != "right" ]; then
|
elif [ "$y_raw" -le "$UPSIDE_DOWN" ] && [ "$(sxmo_rotate.sh isrotated)" != "right" ]; then
|
||||||
sxmo_rotate.sh rotright
|
sxmo_rotate.sh rotright
|
||||||
elif [ "$y_raw" -ge "$RIGHT_SIDE_UP" ] && [ "$(sxmo_rotate.sh isrotated)" != "left" ]; then
|
elif [ "$y_raw" -ge "$RIGHT_SIDE_UP" ] && [ "$(sxmo_rotate.sh isrotated)" != "left" ]; then
|
||||||
|
@@ -60,13 +60,13 @@ focused_name="$(
|
|||||||
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"
|
||||||
|
|
||||||
swaymsg -- input "$pwr" xkb_file "$(xdg_data_path sxmo/sway/xkb_mobile_normal_buttons)"
|
swaymsg -- input "$pwr" xkb_file "$(xdg_data_path sxmo/xkb/xkb_mobile_normal_buttons)"
|
||||||
|
|
||||||
if ! [ "$vols" = "none" ]; then
|
if ! [ "$vols" = "none" ]; then
|
||||||
for vol in $vols; do
|
for vol in $vols; do
|
||||||
swaymsg -- input "$vol" repeat_delay 200
|
swaymsg -- input "$vol" repeat_delay 200
|
||||||
swaymsg -- input "$vol" repeat_rate 15
|
swaymsg -- input "$vol" repeat_rate 15
|
||||||
swaymsg -- input "$vol" xkb_file "$(xdg_data_path sxmo/sway/xkb_mobile_normal_buttons)"
|
swaymsg -- input "$vol" xkb_file "$(xdg_data_path sxmo/xkb/xkb_mobile_normal_buttons)"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@@ -8,7 +8,7 @@ case "$1" in
|
|||||||
exit
|
exit
|
||||||
esac
|
esac
|
||||||
|
|
||||||
case "$(busybox head -n1 "$1")" in
|
case "$(head -n1 "$1")" in
|
||||||
"#"*)
|
"#"*)
|
||||||
comment="#"
|
comment="#"
|
||||||
;;
|
;;
|
||||||
@@ -23,7 +23,7 @@ case "$(busybox head -n1 "$1")" in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
busybox md5sum "$1" | \
|
md5sum "$1" | \
|
||||||
busybox cut -d" " -f1 | \
|
cut -d" " -f1 | \
|
||||||
busybox xargs -I{} busybox sed -i "2i$comment configversion: {}" \
|
xargs -I{} sed -i "2i$comment configversion: {}" \
|
||||||
"$1"
|
"$1"
|
||||||
|
Reference in New Issue
Block a user