feat(x11): migrate to pure Xlibre + dwm/dmenu/st stack, fix fcitx5-t9 bottom bar, PM8909 PON shutdown, and remove Wayland
This commit is contained in:
@@ -75,7 +75,7 @@ get_pictures_dir() {
|
||||
}
|
||||
|
||||
notify_msg() {
|
||||
if command -v sxmo_notify_user.sh >/dev/null 2>&1 && [ -n "${WAYLAND_DISPLAY:-}" ]; then
|
||||
if command -v sxmo_notify_user.sh >/dev/null 2>&1 && [ -n "${DISPLAY:-}${WAYLAND_DISPLAY:-}" ]; then
|
||||
sxmo_notify_user.sh -t 2000 "$1" >/dev/null 2>&1 || true
|
||||
fi
|
||||
}
|
||||
@@ -135,8 +135,12 @@ take_photo() {
|
||||
printf "%s\n" "$target_path"
|
||||
notify_msg "Saved $(basename "$target_path")"
|
||||
|
||||
if [ "$VIEW_AFTER" -eq 1 ] && [ -n "${WAYLAND_DISPLAY:-}" ] && command -v imv >/dev/null 2>&1; then
|
||||
imv "$target_path" >/dev/null 2>&1 &
|
||||
if [ "$VIEW_AFTER" -eq 1 ] && [ -n "${DISPLAY:-}${WAYLAND_DISPLAY:-}" ]; then
|
||||
if command -v feh >/dev/null 2>&1 && [ -n "${DISPLAY:-}" ]; then
|
||||
feh --scale-down "$target_path" >/dev/null 2>&1 &
|
||||
elif command -v imv >/dev/null 2>&1; then
|
||||
imv "$target_path" >/dev/null 2>&1 &
|
||||
fi
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
@@ -169,7 +173,11 @@ run_menu() {
|
||||
*"View photos"*)
|
||||
pic_dir="$(get_pictures_dir)"
|
||||
if ls "$pic_dir"/*.jpg "$pic_dir"/*.png >/dev/null 2>&1; then
|
||||
imv "$pic_dir" >/dev/null 2>&1 &
|
||||
if command -v feh >/dev/null 2>&1 && [ -n "${DISPLAY:-}" ]; then
|
||||
feh --scale-down "$pic_dir" >/dev/null 2>&1 &
|
||||
else
|
||||
imv "$pic_dir" >/dev/null 2>&1 &
|
||||
fi
|
||||
else
|
||||
notify_msg "No photos in $pic_dir"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user