added greetd support
Signed-off-by: Boris Yumankulov <boria138@altlinux.org>
This commit is contained in:
@@ -13,8 +13,6 @@ else
|
||||
config_dir="${XDG_CONFIG_HOME:-"$HOME/.config"}"
|
||||
fi
|
||||
|
||||
mkdir -p "${config_dir}/environment.d"
|
||||
|
||||
[[ -f "$config_dir/$SENTINEL_FILE" ]] && source "$config_dir/$SENTINEL_FILE"
|
||||
|
||||
session="${1:-portprotonqt}"
|
||||
@@ -51,6 +49,22 @@ configure_lightdm() {
|
||||
systemctl restart lightdm
|
||||
}
|
||||
|
||||
configure_greetd() {
|
||||
[[ ! -f "/etc/greetd/config.toml" ]] && die "Greetd config not found"
|
||||
|
||||
sed -i '/^\[initial_session\]/,/^$/d' "/etc/greetd/config.toml"
|
||||
|
||||
cat >> "/etc/greetd/config.toml" <<EOF
|
||||
|
||||
[initial_session]
|
||||
command = "$session_launcher"
|
||||
user = "${USER}"
|
||||
EOF
|
||||
|
||||
systemctl reset-failed greetd
|
||||
systemctl restart greetd
|
||||
}
|
||||
|
||||
configure_sddm() {
|
||||
sed -i "s/^.*Relogin=.*/Relogin=true/" /etc/sddm.conf.d/10-gamescope-session.conf
|
||||
sed -i "s/^.*Session=.*/Session=$session_launcher/" /etc/sddm.conf.d/10-gamescope-session.conf
|
||||
@@ -215,4 +229,8 @@ if [[ "$autologin" == "true" ]] ; then
|
||||
if systemctl is-active --quiet sddm; then
|
||||
configure_sddm
|
||||
fi
|
||||
|
||||
if systemctl is-active --quiet greetd; then
|
||||
configure_greetd
|
||||
fi
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user