install.sh: point user hooks at runtime copies instead of the git checkout; deploy monitor-manager; wire xcompose/voxtype/branding/agent skills

swadhinbiswas committed 2 months ago
5bf7303
1 parent 56dc5ec
commit 5bf7303
1 file changed
+64 -7
Showing 1 changed file+64-7
▼install.sh
+64-7
61
61
2. Missing UI packages installed (system layer untouched)
62
62
3. Runtime deployed to $RUNTIME
63
63
4. Additive user config hooks installed:
64
- ~/.config/hypr/{deo-layer,deo-bindings,deo-autostart}.lua (new symlinks)
64
+ ~/.config/hypr/{deo-layer,deo-bindings,deo-autostart}.lua (symlinks -> runtime)
65
65
~/.config/hypr/hyprland.lua (marked block APPENDED)
66
- ~/.config/zshrc.d/50-de-omarchy.zsh (new symlink;
66
+ ~/.config/zshrc.d/50-de-omarchy.zsh (symlink -> runtime;
67
67
your .zshrc already sources this dir — zero edits to .zshrc)
68
68
5. Omarchy state initialized + rose-pine theme applied
69
69
143
143
sudo rsync -a --delete \
144
144
"$REPO_DIR/bin" "$REPO_DIR/shell" "$REPO_DIR/themes" \
145
145
"$REPO_DIR/applications" "$REPO_DIR/default" "$REPO_DIR/config" \
146
+ "$REPO_DIR/keybindings" "$REPO_DIR/plugin-library" \
147
+ "$REPO_DIR/monitor-manager" \
148
+ "$REPO_DIR/packages" \
149
+ "$REPO_DIR/registry.json" "$REPO_DIR/logo.txt" "$REPO_DIR/icon.txt" \
146
150
"$RUNTIME/"
147
151
sudo chmod +x "$RUNTIME"/bin/* 2>/dev/null || true
148
152
156
160
for cmd in omarchy-dns omarchy-menu omarchy-shell omarchy-theme-set omarchy-theme-list \
157
161
omarchy-theme-bg-set omarchy-theme-bg-next omarchy-theme-refresh \
158
162
omarchy-capture-screenshot omarchy-capture-region omarchy-capture-text \
159
- omarchy-system-lock omarchy-restart-shell; do
163
+ omarchy-system-lock omarchy-restart-shell omarchy-keybindings omarchy-plugin-manager; do
160
164
[[ -f "$RUNTIME/bin/$cmd" ]] && sudo ln -sf "$RUNTIME/bin/$cmd" "/usr/bin/$cmd" 2>/dev/null
161
165
done
162
166
165
169
# ----------------------------------------------------------------------------
166
170
log "Installing user config hooks"
167
171
172
+# Symlinks point at the RUNTIME copy, never at this git checkout: after
173
+# install, the desktop must keep working even if the repo is moved or deleted.
174
+# The runtime copies are refreshed by every install.sh / rsync run.
168
175
mkdir -p "$HOME/.config/hypr" "$HOME/.config/zshrc.d"
169
176
170
-ln -sfn "$REPO_DIR/config/hypr/deo-layer.lua" "$HOME/.config/hypr/deo-layer.lua"
171
-ln -sfn "$REPO_DIR/config/hypr/deo-bindings.lua" "$HOME/.config/hypr/deo-bindings.lua"
172
-ln -sfn "$REPO_DIR/config/hypr/deo-autostart.lua" "$HOME/.config/hypr/deo-autostart.lua"
173
-ln -sfn "$REPO_DIR/config/zshrc.d/50-de-omarchy.zsh" "$HOME/.config/zshrc.d/50-de-omarchy.zsh"
177
+ln -sfn "$RUNTIME/config/hypr/deo-layer.lua" "$HOME/.config/hypr/deo-layer.lua"
178
+ln -sfn "$RUNTIME/config/hypr/deo-bindings.lua" "$HOME/.config/hypr/deo-bindings.lua"
179
+ln -sfn "$RUNTIME/config/hypr/deo-autostart.lua" "$HOME/.config/hypr/deo-autostart.lua"
180
+ln -sfn "$RUNTIME/config/zshrc.d/50-de-omarchy.zsh" "$HOME/.config/zshrc.d/50-de-omarchy.zsh"
174
181
175
182
# Default omarchy user-state config (extensions/hooks/themed) — never overwrite.
176
183
if [[ -d $REPO_DIR/config/omarchy ]]; then
195
202
rsync -a --ignore-existing "$REPO_DIR/config/nvim/" "$HOME/.config/nvim/"
196
203
fi
197
204
205
+# CapsLock emoji compose sequences — only when the user has no XCompose of
206
+# their own. The include points at the runtime copy, so theme-independent.
207
+XCOMPOSE="$HOME/.XCompose"
208
+if [[ ! -f $XCOMPOSE && -f "$RUNTIME/default/xcompose" ]]; then
209
+ printf 'include "%s"\n' "$RUNTIME/default/xcompose" > "$XCOMPOSE"
210
+ log "deployed $XCOMPOSE (CapsLock emoji compose; delete to opt out)"
211
+fi
212
+
213
+# Voxtype dictation config template — same never-overwrite rule as above.
214
+VOXTYPE_CFG="$HOME/.config/voxtype/config.toml"
215
+if [[ ! -f $VOXTYPE_CFG && -f "$RUNTIME/default/voxtype/config.toml" ]]; then
216
+ mkdir -p "$(dirname "$VOXTYPE_CFG")"
217
+ cp "$RUNTIME/default/voxtype/config.toml" "$VOXTYPE_CFG"
218
+ log "deployed $VOXTYPE_CFG"
219
+fi
220
+
221
+# Branding art for the About window and screensaver — never-overwrite: the
222
+# user's edits (omarchy branding …) survive reinstalls. Without these the
223
+# branding editors fail with "no such file or directory" and the screensaver
224
+# has nothing to draw.
225
+if [[ -f "$RUNTIME/logo.txt" ]]; then
226
+ mkdir -p "$HOME/.config/omarchy/branding"
227
+ for art in screensaver:logo.txt about:icon.txt; do
228
+ dst_name=${art%%:*}; src_name=${art##*:}
229
+ dst="$HOME/.config/omarchy/branding/$dst_name.txt"
230
+ if [[ ! -f $dst ]]; then
231
+ cp "$RUNTIME/$src_name" "$dst"
232
+ log "deployed $dst"
233
+ fi
234
+ done
235
+fi
236
+
237
+# AI agent skills: symlink the bundled Omarchy/diagnose-crash skills into
238
+# every known agent skill directory (same loop omarchy-provision-user runs;
239
+# safe to re-run, ln -sfn is idempotent).
240
+if [[ -d $RUNTIME/default/agents/skills ]]; then
241
+ log "Linking agent skills"
242
+ mkdir -p "$HOME/.agents/skills" "$HOME/.claude/skills" "$HOME/.codex/skills" \
243
+ "$HOME/.pi/agent/skills" "$HOME/.gemini/config/skills"
244
+ for skill_dir in "$RUNTIME"/default/agents/skills/*/; do
245
+ skill_name=${skill_dir%/}
246
+ skill_name=${skill_name##*/}
247
+ ln -sfn "$skill_dir" "$HOME/.agents/skills/$skill_name"
248
+ ln -sfn "$skill_dir" "$HOME/.claude/skills/$skill_name"
249
+ ln -sfn "$skill_dir" "$HOME/.codex/skills/$skill_name"
250
+ ln -sfn "$skill_dir" "$HOME/.pi/agent/skills/$skill_name"
251
+ ln -sfn "$skill_dir" "$HOME/.gemini/config/skills/$skill_name"
252
+ done
253
+fi
254
+
198
255
# Append the marked activation block to hyprland.lua (idempotent).
199
256
HYPR_MAIN="$HOME/.config/hypr/hyprland.lua"
200
257
if [[ ! -f $HYPR_MAIN ]]; then
201
258