chore(bin): retirer les anciens helpers et documenter le tri
This commit is contained in:
parent
91c39ecf9b
commit
766c2ee109
9 changed files with 21 additions and 187 deletions
|
|
@ -21,9 +21,10 @@ Ces éléments sont volontairement hors du dépôt de dotfiles. Les liens ou
|
||||||
unités du dépôt supposent leur présence à ces emplacements :
|
unités du dépôt supposent leur présence à ces emplacements :
|
||||||
|
|
||||||
- `~/.local/src/arch-sentinel` fournit `~/.local/bin/arch-sentinel` ;
|
- `~/.local/src/arch-sentinel` fournit `~/.local/bin/arch-sentinel` ;
|
||||||
- `~/Documents/Development/trainlog` fournit les exécutables et agents Trainlog ;
|
- les exécutables Trainlog actifs sont installés dans
|
||||||
|
`~/.local/share/trainlog/rollouts/` ; les unités utilisateur utilisent
|
||||||
|
des drop-ins pour sélectionner les versions déployées ;
|
||||||
- `~/Documents/Lardon` fournit la session FreeCAD et ses outils ;
|
- `~/Documents/Lardon` fournit la session FreeCAD et ses outils ;
|
||||||
- `~/Documents/Development/labfy-remote-ui` fournit `labfy-remote-ui` ;
|
|
||||||
- `~/.local/opt/openmvs-2.4.0` fournit OpenMVS au pipeline `scan3d` ;
|
- `~/.local/opt/openmvs-2.4.0` fournit OpenMVS au pipeline `scan3d` ;
|
||||||
- `~/.codex/packages/standalone/current` fournit le lien utilisateur `codex`.
|
- `~/.codex/packages/standalone/current` fournit le lien utilisateur `codex`.
|
||||||
|
|
||||||
|
|
|
||||||
4
.gitignore
vendored
4
.gitignore
vendored
|
|
@ -30,12 +30,8 @@ bin/.local/bin/android
|
||||||
bin/.local/bin/arch-sentinel
|
bin/.local/bin/arch-sentinel
|
||||||
bin/.local/bin/codex
|
bin/.local/bin/codex
|
||||||
bin/.local/bin/goose
|
bin/.local/bin/goose
|
||||||
bin/.local/bin/labfy-remote-ui
|
|
||||||
bin/.local/bin/trainlog
|
bin/.local/bin/trainlog
|
||||||
bin/.local/bin/trainlog-bt-watch
|
bin/.local/bin/trainlog-bt-watch
|
||||||
bin/.local/bin/trainlog-btd
|
|
||||||
bin/.local/bin/trainlog-sync-once
|
|
||||||
bin/.local/bin/trainlog-syncd
|
|
||||||
|
|
||||||
# Session V2 : sorties locales reproductibles, jamais distribuées par Git.
|
# Session V2 : sorties locales reproductibles, jamais distribuées par Git.
|
||||||
/build/session-v2/
|
/build/session-v2/
|
||||||
|
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
wl-paste --type text --watch cliphist store &
|
|
||||||
wl-paste --type image --watch cliphist store &
|
|
||||||
wait
|
|
||||||
|
|
@ -1,10 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
set -e
|
|
||||||
|
|
||||||
cd "$HOME"
|
|
||||||
|
|
||||||
# lance ssh-add dans ce kitty
|
|
||||||
ssh-add "$HOME/.ssh/id_ed25519-admin"
|
|
||||||
|
|
||||||
# quand c'est fini, on lance un shell interactif normal
|
|
||||||
exec zsh
|
|
||||||
|
|
@ -1,108 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
set -u
|
|
||||||
|
|
||||||
usage() {
|
|
||||||
printf '%s\n' 'usage: opencode-away [--check] [opencode arguments...]'
|
|
||||||
}
|
|
||||||
|
|
||||||
require_command() {
|
|
||||||
command -v "$1" >/dev/null 2>&1 || {
|
|
||||||
printf 'opencode-away: required command not found: %s\n' "$1" >&2
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if [[ ${1-} == --help ]]; then
|
|
||||||
usage
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
check_only=0
|
|
||||||
if [[ ${1-} == --check ]]; then
|
|
||||||
check_only=1
|
|
||||||
shift
|
|
||||||
fi
|
|
||||||
|
|
||||||
require_command opencode || exit 127
|
|
||||||
require_command systemd-inhibit || exit 127
|
|
||||||
require_command git || exit 127
|
|
||||||
require_command ps || exit 127
|
|
||||||
require_command kill || exit 127
|
|
||||||
|
|
||||||
if [[ $(systemd-inhibit --help 2>&1) != *handle-lid-switch* ]]; then
|
|
||||||
printf '%s\n' 'opencode-away: systemd-inhibit lacks handle-lid-switch' >&2
|
|
||||||
exit 3
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ! git rev-parse --show-toplevel >/dev/null 2>&1; then
|
|
||||||
printf '%s\n' 'opencode-away: run this command inside a Git worktree' >&2
|
|
||||||
exit 2
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ((check_only)); then
|
|
||||||
printf '%s\n' 'OpenCode away mode check: OK'
|
|
||||||
printf 'repository: %s\n' "$(git rev-parse --show-toplevel)"
|
|
||||||
printf 'opencode: %s\n' "$(command -v opencode)"
|
|
||||||
printf 'systemd-inhibit: %s\n' "$(command -v systemd-inhibit)"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
declare -a suspended_pids=()
|
|
||||||
cleanup_done=0
|
|
||||||
|
|
||||||
restore_swayidle() {
|
|
||||||
local pid
|
|
||||||
((cleanup_done)) && return 0
|
|
||||||
cleanup_done=1
|
|
||||||
for pid in "${suspended_pids[@]}"; do
|
|
||||||
if kill -0 "$pid" 2>/dev/null &&
|
|
||||||
[[ $(ps -o comm= -p "$pid" 2>/dev/null) == swayidle ]]; then
|
|
||||||
kill -CONT "$pid" 2>/dev/null || true
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
if ((${#suspended_pids[@]})); then
|
|
||||||
printf '%s\n' 'swayidle restored'
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
trap restore_swayidle EXIT
|
|
||||||
|
|
||||||
while read -r pid state; do
|
|
||||||
[[ $pid =~ ^[0-9]+$ ]] || continue
|
|
||||||
[[ $state == T* ]] && continue
|
|
||||||
if kill -STOP "$pid" 2>/dev/null; then
|
|
||||||
suspended_pids+=("$pid")
|
|
||||||
fi
|
|
||||||
done < <(ps -C swayidle -o pid=,stat= 2>/dev/null)
|
|
||||||
|
|
||||||
printf '%s\n' 'OpenCode away mode'
|
|
||||||
printf '%s\n' 'sleep inhibited'
|
|
||||||
printf '%s\n' 'lid switch inhibited'
|
|
||||||
if ((${#suspended_pids[@]})); then
|
|
||||||
printf 'swayidle suspended:'
|
|
||||||
printf ' %s' "${suspended_pids[@]}"
|
|
||||||
printf '\n'
|
|
||||||
else
|
|
||||||
printf '%s\n' 'swayidle suspended: none active'
|
|
||||||
fi
|
|
||||||
|
|
||||||
export LARDON_OPENCODE_LONG_RUN=1
|
|
||||||
|
|
||||||
if [[ -n ${OPENCODE_AWAY_COMMAND-} ]]; then
|
|
||||||
child_command=(bash -c "$OPENCODE_AWAY_COMMAND")
|
|
||||||
else
|
|
||||||
child_command=(opencode --auto "$@")
|
|
||||||
fi
|
|
||||||
|
|
||||||
systemd-inhibit \
|
|
||||||
--what=sleep:idle:handle-lid-switch \
|
|
||||||
--who='OpenCode Long Run' \
|
|
||||||
--why='Autonomous Lardon3D development ticket' \
|
|
||||||
--mode=block \
|
|
||||||
"${child_command[@]}"
|
|
||||||
|
|
||||||
child_status=$?
|
|
||||||
|
|
||||||
restore_swayidle
|
|
||||||
|
|
||||||
exit "$child_status"
|
|
||||||
|
|
@ -1,29 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
set -e
|
|
||||||
|
|
||||||
# Laisser le temps aux fenêtres de se lancer
|
|
||||||
sleep 5
|
|
||||||
|
|
||||||
# Aller sur le workspace 1
|
|
||||||
swaymsg "workspace 1"
|
|
||||||
|
|
||||||
# Regrouper les trois fenêtres sur le bon workspace (au cas où)
|
|
||||||
swaymsg '[app_id="kitty-1"] move to workspace 1'
|
|
||||||
swaymsg '[app_id="kitty-2"] move to workspace 1'
|
|
||||||
swaymsg '[title="Perplexity"] move to workspace 1'
|
|
||||||
|
|
||||||
# Layout horizontal global
|
|
||||||
swaymsg '[app_id="kitty-1"] focus'
|
|
||||||
swaymsg 'move left'
|
|
||||||
|
|
||||||
# Revenir sur la zone gauche (un des kitty)
|
|
||||||
swaymsg '[app_id="kitty-2"] focus'
|
|
||||||
swaymsg 'move down'
|
|
||||||
|
|
||||||
# Envoyer Perplexity à droite
|
|
||||||
swaymsg '[title="Perplexity"] focus'
|
|
||||||
swaymsg 'move right'
|
|
||||||
|
|
||||||
# Envoyer Perplexity à droite
|
|
||||||
swaymsg '[title="Perplexity"] focus'
|
|
||||||
swaymsg 'move right'
|
|
||||||
|
|
@ -1,15 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# Récupère la ligne "TLP profile = balanced/BAT" et isole "balanced/BAT"
|
|
||||||
# profile=$(tlp-stat -s 2>/dev/null | awk -F'= ' '/TLP profile/ {print $2}')
|
|
||||||
|
|
||||||
# Optionnel : ne garder que le profil logique (performance/balanced/power-saver)
|
|
||||||
# profile=$(printf "%s" "$profile" | cut -d'/' -f1)
|
|
||||||
|
|
||||||
# [ -z "$profile" ] && profile="unknown"
|
|
||||||
# printf " %s\n" "$profile"
|
|
||||||
|
|
||||||
tlp=$(tlp-stat -s 2>/dev/null | awk -F'= ' '/TLP profile/ {print $2}')
|
|
||||||
platform=$(cat /sys/firmware/acpi/platform_profile 2>/dev/null)
|
|
||||||
|
|
||||||
printf " %s | %s\n" "$tlp" "$platform"
|
|
||||||
|
|
@ -57,10 +57,10 @@ Le package `bin` déploie des commandes dans `~/.local/bin`. Les familles
|
||||||
principales sont :
|
principales sont :
|
||||||
|
|
||||||
- maintenance Pacman/AUR (`aurinstall`, `aurremove`, `aursearch`, `aurupdate`) ;
|
- maintenance Pacman/AUR (`aurinstall`, `aurremove`, `aursearch`, `aurupdate`) ;
|
||||||
- énergie et batterie (`batlimit`, `battery-low-notify.sh`, `tlp-profile.sh`) ;
|
- énergie et batterie (`batlimit`, `battery-low-notify.sh`) ;
|
||||||
- session et applications (`sway-close`, `thunderbird-proton`,
|
- session et applications (`sway-close`, `thunderbird-proton`,
|
||||||
`vmware-on-demand`, `nextcloud-sync`) ;
|
`vmware-on-demand`, `nextcloud-sync`) ;
|
||||||
- développement local (`dcnvim`, `goose`, `pi-dev`, `opencode-away`) ;
|
- développement local (`dcnvim`, `pi-dev`) ;
|
||||||
- acquisition/3D (`colmap-amd`, `scan3d`, `scan3d-watch`) ;
|
- acquisition/3D (`colmap-amd`, `scan3d`, `scan3d-watch`) ;
|
||||||
- intégrations Trainlog (`trainlog-bt-watch`) et autres projets locaux.
|
- intégrations Trainlog (`trainlog-bt-watch`) et autres projets locaux.
|
||||||
|
|
||||||
|
|
@ -69,6 +69,22 @@ projets externes, credentials ou binaires système qu'ils appellent. Consulter
|
||||||
[`external-tools.md`](../.assets/external-tools.md) avant de les réutiliser sur
|
[`external-tools.md`](../.assets/external-tools.md) avant de les réutiliser sur
|
||||||
une autre machine.
|
une autre machine.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Le 1er novembre 2026, les anciens helpers `cliphist-daemon.sh` (remplacé
|
||||||
|
par deux unités systemd), `sway-layout-ws1.sh`, `tlp-profile.sh`,
|
||||||
|
`kitty-ssh-add.sh` et `opencode-away` ont été retirés.
|
||||||
|
Les exécutables non versionnés `goose` et `agy` ont été mis en quarantaine
|
||||||
|
sous `~/.local/share/local-bin-archive/2026-11-01/`, hors du `PATH`.
|
||||||
|
Ils restent récupérables sans téléchargement ; supprimer cette archive
|
||||||
|
ultérieurement seulement après vérification de leur inutilité.
|
||||||
|
Les liens cassés `labfy-remote-ui`, `trainlog-btd`, `trainlog-syncd`
|
||||||
|
et `trainlog-sync-once` ont été retirés de `~/.local/bin` :
|
||||||
|
les services Trainlog en cours utilisent leurs exécutables de déploiement
|
||||||
|
via les drop-ins systemd. La commande `trainlog` reste disponible.
|
||||||
|
Le lien `labfy-investigation-web` a été préservé malgré sa cible
|
||||||
|
actuellement absente, car son unité systemd référence encore ce chemin.
|
||||||
|
|
||||||
## Données locales
|
## Données locales
|
||||||
|
|
||||||
L'historique Zsh et le store Atuin sont des données utilisateur, pas de la
|
L'historique Zsh et le store Atuin sont des données utilisateur, pas de la
|
||||||
|
|
|
||||||
13
zsh/.zshrc
13
zsh/.zshrc
|
|
@ -405,19 +405,6 @@ export LESS_TERMCAP_so=$'\e[1;44;33m' # standout (titres encadrés)
|
||||||
export LESS_TERMCAP_ue=$'\e[0m' # reset underline
|
export LESS_TERMCAP_ue=$'\e[0m' # reset underline
|
||||||
export LESS_TERMCAP_us=$'\e[1;32m' # underline
|
export LESS_TERMCAP_us=$'\e[1;32m' # underline
|
||||||
|
|
||||||
# Added by Antigravity CLI installer
|
|
||||||
export PATH="/home/fy59/.local/bin:$PATH"
|
|
||||||
|
|
||||||
export OPENCODE_ENABLE_EXA=1
|
|
||||||
export OPENCODE_EXPERIMENTAL_BACKGROUND_SUBAGENTS=true
|
|
||||||
|
|
||||||
alias ocaway="$HOME/.local/bin/opencode-away"
|
|
||||||
|
|
||||||
# Goose — bornes agentiques
|
|
||||||
export GOOSE_MAX_TURNS=80
|
|
||||||
export GOOSE_SUBAGENT_MAX_TURNS=12
|
|
||||||
export GOOSE_MAX_BACKGROUND_TASKS=2
|
|
||||||
|
|
||||||
# Android SDK
|
# Android SDK
|
||||||
export ANDROID_HOME="$HOME/Android/Sdk"
|
export ANDROID_HOME="$HOME/Android/Sdk"
|
||||||
export PATH="$PATH:$ANDROID_HOME/platform-tools"
|
export PATH="$PATH:$ANDROID_HOME/platform-tools"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue