Files
kyle 3e564d57db Add Omarchy-style Hyprland desktop for straylight
Ports the classic dotfiles Omarchy setup to a no-home-manager NixOS
system module (configs/omarchy.nix), scoped to straylight only so the
other desktop hosts keep i3.

- Hyprland (programs.hyprland) becomes the default lightdm session; i3
  stays enabled and selectable as a fallback.
- Omarchy config layout under ~/.config/{hypr,waybar,rofi,wlogout,
  swayosd,alacritty} symlinked from the store; mutable theme/wallpaper
  state in ~/.config/omarchy/current.
- omarchy-dots generates 8 themes (hyprland/hyprlock/waybar/rofi/
  swayosd/wlogout/alacritty/mako colour files) from each theme's
  palette, with wallpapers fetched from the Omarchy v3.8.4 tag.
- Helper scripts: omarchy-theme-set/bg-next/bg-set/apply, omarchy-menu
  (rofi power/theme/background menus), waybar toggle, screenshot, lock.
- Shared desktop modules (desktop.nix / desktop-light.nix) untouched.
2026-10-14 01:18:23 -07:00

34 lines
1.2 KiB
Bash

#!/usr/bin/env bash
# Resolve ~/.config/omarchy/current/{theme,background} symlinks from the
# persisted theme.name / background.name state files. Only manages symlinks;
# restarting clients (swaybg/waybar/hyprland) is the caller's job.
#
# Safe to run as root (system activation) or as the user: honour $HOME.
set -euo pipefail
OMARCHY_PATH="${OMARCHY_PATH:-$HOME/.local/share/omarchy}"
CURRENT="$HOME/.config/omarchy/current"
THEMES="$OMARCHY_PATH/themes"
mkdir -p "$CURRENT"
# --- theme ---
name="$(cat "$CURRENT/theme.name" 2>/dev/null || true)"
if [ -z "$name" ] || [ ! -d "$THEMES/$name" ]; then
name="$(find "$THEMES" -maxdepth 1 -mindepth 1 -type d -printf '%f\n' | sort | head -n1)"
printf '%s\n' "$name" >"$CURRENT/theme.name"
fi
ln -sfn "$THEMES/$name" "$CURRENT/theme"
# --- background ---
bg="$(cat "$CURRENT/background.name" 2>/dev/null || true)"
if [ -z "$bg" ] || [ ! -e "$THEMES/$name/backgrounds/$bg" ]; then
bg="$(find "$THEMES/$name/backgrounds" -maxdepth 1 -type f -printf '%f\n' 2>/dev/null | sort | head -n1)"
printf '%s\n' "$bg" >"$CURRENT/background.name"
fi
if [ -n "$bg" ]; then
ln -sfn "$THEMES/$name/backgrounds/$bg" "$CURRENT/background"
fi
exit 0