basilisk but actually + cleanup
This commit is contained in:
24
home/.basilisk/bin/basilisk-session
Executable file
24
home/.basilisk/bin/basilisk-session
Executable file
@@ -0,0 +1,24 @@
|
||||
#!/usr/bin/sh
|
||||
|
||||
# Detect if being run as a user service, which implies external session management,
|
||||
# exec compositor directly
|
||||
if [ -n "${MANAGERPID:-}" ] && [ "${SYSTEMD_EXEC_PID:-}" = "$$" ]; then
|
||||
case "$(ps -p "$MANAGERPID" -o cmd=)" in
|
||||
*systemd*--user*)
|
||||
exec niri --session
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
if [ -n "$SHELL" ] &&
|
||||
grep -q "$SHELL" /etc/shells &&
|
||||
! (echo "$SHELL" | grep -q "false") &&
|
||||
! (echo "$SHELL" | grep -q "nologin"); then
|
||||
if [ "$1" != '-l' ]; then
|
||||
exec bash -c "exec -l '$SHELL' -c '$0 -l $*'"
|
||||
else
|
||||
shift
|
||||
fi
|
||||
fi
|
||||
|
||||
niri --session -c "$(dirname "$(readlink "$0")")/../niri/config.kdl"
|
||||
Reference in New Issue
Block a user