Files
bananarchy/overlay/rootfs/usr/bin/sxmo_dwminit.sh
T
Luxferre 7b6c6b25d4 Fix display DPMS power-down and schedutil rate limit
Enable the X11 DPMS extension and force the DRM connector off/on on blank
and wake, including the lid-close and lockscreen paths that write backlight
sysfs directly (driven by a backlight change udev rule and a small sync
helper). DPMS timeouts stay at zero so unlocked auto-blanking remains off.

Re-apply schedutil rate_limit_us=40000 after every powersave to schedutil
governor switch, which recreates the kobject with the 6.44 s default, and
drop the writes to nonexistent up_rate_limit_us / down_rate_limit_us files.

Remove the dead iw power-save call: NetworkManager wifi.powersave=3 and the
wcn36xx WIPHY_FLAG_PS_ON_BY_DEFAULT patch already report "Power save: on".
2026-11-05 21:04:06 +02:00

66 lines
1.8 KiB
Bash
Executable File

#!/bin/sh
# SPDX-License-Identifier: AGPL-3.0-only
# Copyright 2022 Sxmo Contributors
# shellcheck source=scripts/core/sxmo_common.sh
. sxmo_common.sh
envvars() {
unset WAYLAND_DISPLAY
export SXMO_WM=dwm
export XDG_CURRENT_DESKTOP=dwm
export SXMO_MENU=dmenu
export SXMO_TERMINAL=st
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS=@im=fcitx
command -v "$KEYBOARD" >/dev/null 2>&1 || defaultkeyboard
[ -z "$MOZ_USE_XINPUT2" ] && export MOZ_USE_XINPUT2=1
}
defaults() {
xsetroot -solid '#1c1c1c'
xset s off s noblank s 0 0 +dpms
xset dpms 0 0 0
[ -e "$HOME"/.Xresources ] && xrdb -merge "$HOME"/.Xresources
if command -v feh >/dev/null 2>&1; then
WP_FILE="/usr/share/wallpapers/bananarchy.png"
if [ -f "$XDG_CONFIG_HOME/sxmo/wallpaper" ]; then
custom_wp="$(head -n 1 "$XDG_CONFIG_HOME/sxmo/wallpaper" 2>/dev/null)"
[ -n "$custom_wp" ] && [ -f "$custom_wp" ] && WP_FILE="$custom_wp"
fi
WP_FLAG="--bg-fill"
if [ -f "$XDG_CONFIG_HOME/sxmo/wallpaper_mode" ]; then
wp_mode="$(head -n 1 "$XDG_CONFIG_HOME/sxmo/wallpaper_mode" 2>/dev/null)"
case "$wp_mode" in
scale|--bg-scale) WP_FLAG="--bg-scale" ;;
max|--bg-max) WP_FLAG="--bg-max" ;;
center|--bg-center) WP_FLAG="--bg-center" ;;
tile|--bg-tile) WP_FLAG="--bg-tile" ;;
*) WP_FLAG="--bg-fill" ;;
esac
fi
[ -f "$WP_FILE" ] && feh --no-fehbg "$WP_FLAG" "$WP_FILE" &
fi
}
defaultkeyboard() {
if command -v svkbd-mobile-intl >/dev/null 2>&1; then
export KEYBOARD=svkbd-mobile-intl
elif command -v svkbd-mobile-plain >/dev/null 2>&1; then
export KEYBOARD=svkbd-mobile-plain
else
export KEYBOARD=svkbd-sxmo
fi
}
with_dbus() {
echo "$DBUS_SESSION_BUS_ADDRESS" > "$XDG_RUNTIME_DIR"/dbus.bus
# shellcheck source=configs/appcfg/xinit_template
. "$XDG_CONFIG_HOME"/sxmo/xinit
exec dwm
}
# shellcheck source=scripts/core/sxmo_init.sh
. sxmo_init.sh