NoSignal-OS/os updates/cheatsheet-tidy/install-cheatsheet-tidy.sh
28allday 19fd794b6b NoSignal — fully-offline Arch → Hyprland desktop installer
Single-script builder (nosignal.sh) that turns a stock Arch Linux ISO into a
fully-offline installer for a themed Hyprland + caelestia (Quickshell) desktop:
matching SDDM greeter, Btrfs/Limine bootable snapshots, chwd-style GPU
detection, and a curated "os updates" layer (keybind cheatsheet, settings
panels, system polish, on-box management skill). See README.md.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21 11:03:10 +01:00

40 lines
1.7 KiB
Bash
Executable file

#!/bin/sh
# install-cheatsheet-tidy.sh — tidy the Super+K cheatsheet panel: key +
# action only, every line fits the panel.
#
# Ships full replacements of the keybinds-help scripts:
# - nosignal-keybinds-gen -> ~/.local/bin/ (no tag column, strips doc-only
# parentheticals, truncates actions to the panel budget)
# - nosignal-keybinds -> ~/.local/bin/ (fuzzel width 72 -> 100, kept in
# sync with the generator budget)
#
# Also refreshes the layer-root source copies when present, so a
# re-run of install-keybinds-help.sh cannot regress the panel.
# Safe to re-run (idempotent). No sudo needed.
set -eu
SRC=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
BIN="$HOME/.local/bin"
ROOT=$(dirname -- "$SRC") # the layer root when run from the layer tree
mkdir -p "$BIN"
install -m 0755 "$SRC/nosignal-keybinds-gen" "$BIN/nosignal-keybinds-gen"
install -m 0755 "$SRC/nosignal-keybinds" "$BIN/nosignal-keybinds"
echo ":: installed tidied cheatsheet scripts -> $BIN"
# Keep the keybinds-help source copies in step (they live flat at the layer root).
# Check both the tree this component sits in and the installed layer location,
# so running from a handoff folder still fixes the on-system layer copies.
for d in "$ROOT" "$HOME/.local/share/nosignal"; do
for f in nosignal-keybinds-gen nosignal-keybinds; do
if [ -f "$d/$f" ] && ! cmp -s "$SRC/$f" "$d/$f"; then
install -m 0755 "$SRC/$f" "$d/$f"
echo ":: refreshed layer copy -> $d/$f"
fi
done
done
# Refresh the cached list so the next Super+K shows the new format at once.
"$BIN/nosignal-keybinds-gen" > "$HOME/.local/share/nosignal/keybinds.list" 2>/dev/null || true
echo "Done. Super+K now shows key + action only, fitted to the panel."