Files
DeeJanuzandClaude Opus 5.5 8b854fd424 Uninstall cleans up after itself; a shorter install command
- desktops.sh uninstall also removes Launch as Standalone's app copies
  and the title bar decoration, and Display Settings' uninstall the
  profiles' launcher entries; its install writes them back from the
  saved profiles (new: ft-layout launchers)
- the README says which settings an uninstall leaves
- the install command is now curl -fsSL https://deejanuz.github.io/
  frametop/get.sh | bash (GitHub Pages, from main)
- ft-gaze logs "action manifest ...: ok" instead of "error 0"

Found in a clean install test on the Frame (2026-10-01): uninstall,
then get.sh from the headset into a fresh clone; everything installed
and doctor.sh passed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 15:42:37 -06:00

30 lines
1.8 KiB
Bash
Executable File

#!/usr/bin/env bash
# Install (or remove) Frametop Display Settings and the Reset Screen Layout and Hide/Show Screens
# entries on the Frame, with global shortcuts in the Frametop desktop: Meta+Shift+R and
# Meta+Shift+H (they take effect the next time the desktop starts).
# Usage: display-settings/install.sh [install|uninstall]
set -euo pipefail
root=$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)
. "$root/scripts/_env.sh"
"$root/scripts/sync.sh" >/dev/null
apps=.local/share/applications
shortcuts=.config/frametop/kglobalshortcutsrc
case ${1:-install} in
install)
for f in ft-display-settings ft-layout-reset ft-screens-toggle; do
fill_template "$root/display-settings/$f.desktop" | on_frame "mkdir -p ~/$apps && cat > ~/$apps/$f.desktop"
done
on_frame "chmod +x display-settings/ft-display-settings layout/ft-layout layout/ft_layout.py
mkdir -p ~/.config/frametop
kwriteconfig6 --file ~/$shortcuts --group services --group ft-layout-reset.desktop --key _launch 'Meta+Shift+R'
kwriteconfig6 --file ~/$shortcuts --group services --group ft-screens-toggle.desktop --key _launch 'Meta+Shift+H'
layout/ft-layout launchers # each profile's entry (Frametop: NAME), if there are profiles"
echo "installed: Frametop Display Settings, Reset Screen Layout (Meta+Shift+R), Hide/Show Screens (Meta+Shift+H)" ;;
uninstall)
on_frame "rm -f ~/$apps/ft-display-settings.desktop ~/$apps/ft-layout-reset.desktop ~/$apps/ft-screens-toggle.desktop
rm -f ~/$apps/frametop-profile-*.desktop # the profiles' entries (the profiles stay in ~/.config/frametop-layout.json)
[ -f ~/$shortcuts ] && for f in ft-layout-reset ft-screens-toggle; do kwriteconfig6 --file ~/$shortcuts --group services --group \$f.desktop --key _launch --delete; done
echo removed" ;;
*) echo "usage: $0 [install|uninstall]" >&2; exit 2 ;;
esac