Dock + pill z-order and icon centering pass; GlobalStates.qml and a ConflictKiller service for the ii sidebar.
84 lines
3.7 KiB
Shell
Executable file
84 lines
3.7 KiB
Shell
Executable file
#!/usr/bin/env bash
|
|
# Deploy the Souveraine quickshell surface over illogical-impulse.
|
|
# Overlay pattern: full replacement files, SYMLINKED so this repo checkout
|
|
# stays the source of truth — a "live edit" in ~/.config is an edit to the
|
|
# repo tree, visible in git status. Idempotent; -u restores upstream.
|
|
#
|
|
# deploy.sh symlink the surface into this machine's ii config
|
|
# deploy.sh -u restore upstream files, remove our additions
|
|
# deploy.sh --phone rsync this surface to the phone and deploy there
|
|
# (tree lands in ~/souveraine-surfaces/quickshell)
|
|
set -euo pipefail
|
|
|
|
SRC="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
QS="${HOME}/.config/quickshell"
|
|
II="${QS}/ii"
|
|
|
|
# Manifest: "<repo-relative> <target-relative-to-~/.config/quickshell>"
|
|
# Files replacing an upstream ii file get a one-time .upstream backup;
|
|
# files with no upstream counterpart (new components) are just linked.
|
|
MANIFEST="
|
|
GlobalStates.qml ii/GlobalStates.qml
|
|
services/Souveraine.qml ii/services/Souveraine.qml
|
|
services/Ai.qml ii/services/Ai.qml
|
|
services/TaskbarApps.qml ii/services/TaskbarApps.qml
|
|
services/GlobalFocusGrab.qml ii/services/GlobalFocusGrab.qml
|
|
services/Idle.qml ii/services/Idle.qml
|
|
services/ConflictKiller.qml ii/services/ConflictKiller.qml
|
|
modules/ii/sidebarLeft/SidebarLeft.qml ii/modules/ii/sidebarLeft/SidebarLeft.qml
|
|
modules/ii/sidebarLeft/AiChat.qml ii/modules/ii/sidebarLeft/AiChat.qml
|
|
modules/ii/sidebarRight/SidebarRight.qml ii/modules/ii/sidebarRight/SidebarRight.qml
|
|
modules/common/Config.qml ii/modules/common/Config.qml
|
|
modules/ii/dock/Dock.qml ii/modules/ii/dock/Dock.qml
|
|
modules/ii/dock/DockApps.qml ii/modules/ii/dock/DockApps.qml
|
|
modules/ii/dock/DockAppButton.qml ii/modules/ii/dock/DockAppButton.qml
|
|
modules/ii/dock/DockButton.qml ii/modules/ii/dock/DockButton.qml
|
|
modules/ii/dock/DockSeparator.qml ii/modules/ii/dock/DockSeparator.qml
|
|
modules/ii/dock/DockStack.qml ii/modules/ii/dock/DockStack.qml
|
|
modules/ii/overview/Overview.qml ii/modules/ii/overview/Overview.qml
|
|
pill/shell.qml pill/shell.qml
|
|
"
|
|
|
|
PHONE_USB=casey@172.16.42.1
|
|
PHONE_DEST="souveraine-surfaces/quickshell"
|
|
|
|
if [[ "${1:-}" == "--phone" ]]; then
|
|
ssh_i=(ssh -i "$HOME/.ssh/ani" -o ConnectTimeout=5)
|
|
"${ssh_i[@]}" "$PHONE_USB" "mkdir -p ~/$PHONE_DEST"
|
|
rsync -a --delete -e "ssh -i $HOME/.ssh/ani" "$SRC/" "$PHONE_USB:$PHONE_DEST/"
|
|
"${ssh_i[@]}" "$PHONE_USB" "bash ~/$PHONE_DEST/deploy.sh"
|
|
echo "Deployed to phone. Quickshell hot-reloads; if the dock misbehaves: pkill -f 'qs -c ii' (autostart relaunches)."
|
|
exit 0
|
|
fi
|
|
|
|
if [[ "${1:-}" == "-u" || "${1:-}" == "--uninstall" ]]; then
|
|
while read -r rel target; do
|
|
[[ -z "$rel" ]] && continue
|
|
t="$QS/$target"
|
|
if [[ -f "$t.upstream" ]]; then
|
|
rm -f "$t"; mv "$t.upstream" "$t"
|
|
echo "restored $target"
|
|
elif [[ -L "$t" ]]; then
|
|
rm -f "$t"
|
|
echo "removed $target (no upstream)"
|
|
fi
|
|
done <<< "$MANIFEST"
|
|
exit 0
|
|
fi
|
|
|
|
[[ -d "$II" ]] || { echo "illogical-impulse config not found at $II" >&2; exit 1; }
|
|
mkdir -p "$QS/pill"
|
|
|
|
while read -r rel target; do
|
|
[[ -z "$rel" ]] && continue
|
|
src="$SRC/$rel"; t="$QS/$target"
|
|
[[ -f "$src" ]] || { echo "missing $src" >&2; exit 1; }
|
|
# Back up upstream once (a real file, not our own symlink)
|
|
if [[ -f "$t" && ! -L "$t" && ! -f "$t.upstream" ]]; then
|
|
cp "$t" "$t.upstream"
|
|
fi
|
|
ln -sf "$src" "$t"
|
|
done <<< "$MANIFEST"
|
|
|
|
echo "Souveraine quickshell surface deployed ($(echo "$MANIFEST" | grep -c .) files symlinked from $SRC)"
|
|
echo "Quickshell hot-reloads on change; restart with: pkill -f 'qs -c ii' && pkill -f 'qs -c pill'"
|