advance shell integration and session support

This commit is contained in:
Samuel Onoja committed 2026-09-25 09:15:07 +01:00
1 parent 0420242350
commit e85fc1e032
27 files changed
+1165 -201

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
# User configuration: ~/.config/ferese/config.toml
# Unspecified monitors use automatic placement and preferred modes.
[commands]
terminal = ["foot"]
[input]
xkb_layout = "us"
focus_follows_mouse = false
[layout]
smart_gaps = false
# Super+Enter opens Foot. Super+Shift+E logs out.
# See README.md for monitor profiles and additional bindings.
+41
View File
@@ -0,0 +1,41 @@
#!/usr/bin/env bash
set -euo pipefail
umask 077
backend=drm
if [[ ${1:-} == --nested ]]; then
backend=nested
shift
fi
if (($#)); then
echo 'usage: ferese-session [--nested]' >&2
exit 2
fi
: "${XDG_RUNTIME_DIR:?A login session with XDG_RUNTIME_DIR is required}"
# Resolve once, so upgrading current cannot mix compositor and shell versions.
release_dir=$(dirname -- "$(readlink -f -- "$0")")
state_dir=${XDG_STATE_HOME:-$HOME/.local/state}/ferese
mkdir -p -- "$state_dir"
log_file=$state_dir/session-$(date -u +%Y%m%dT%H%M%SZ)-$$.log
echo "Ferese session log: $log_file" >&2
exec >>"$log_file" 2>&1
export XDG_CURRENT_DESKTOP=Ferese
export XDG_SESSION_DESKTOP=ferese
export XDG_SESSION_TYPE=wayland
export MOZ_ENABLE_WAYLAND=1
export QT_QPA_PLATFORM=wayland
export PATH="$release_dir:$PATH"
unset WAYLAND_SOCKET
if [[ $backend == drm ]]; then
unset DISPLAY WAYLAND_DISPLAY
fi
command=("$release_dir/ferese" --backend "$backend" --grant-effects
--grant-shell-control -- "$release_dir/ferese-shell")
if [[ -z ${DBUS_SESSION_BUS_ADDRESS:-} ]]; then
exec dbus-run-session -- "${command[@]}"
else
exec "${command[@]}"
fi
+6
View File
@@ -0,0 +1,6 @@
[Desktop Entry]
Name=Ferese
Comment=Animation-first scrolling Wayland desktop
Exec=/usr/local/bin/ferese-session
TryExec=/usr/local/bin/ferese-session
Type=Application