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.
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
#!/usr/bin/env bash
|
||||
# Set the active Omarchy theme (name or "<theme>" from the menu).
|
||||
set -euo pipefail
|
||||
|
||||
OMARCHY_PATH="${OMARCHY_PATH:-$HOME/.local/share/omarchy}"
|
||||
CURRENT="$HOME/.config/omarchy/current"
|
||||
|
||||
if [ -z "${1:-}" ]; then
|
||||
echo "Usage: omarchy-theme-set <theme-name>" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Normalise: strip markup, lowercase, spaces -> dashes
|
||||
name="$(printf '%s' "$1" | sed -E 's/<[^>]+>//g' | tr '[:upper:]' '[:lower:]' | tr ' ' '-')"
|
||||
|
||||
if [ ! -d "$OMARCHY_PATH/themes/$name" ]; then
|
||||
echo "Theme '$name' does not exist" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
printf '%s\n' "$name" >"$CURRENT/theme.name"
|
||||
# Start each theme on its first background
|
||||
find "$OMARCHY_PATH/themes/$name/backgrounds" -maxdepth 1 -type f -printf '%f\n' | sort | head -n1 \
|
||||
>"$CURRENT/background.name"
|
||||
|
||||
omarchy-theme-apply
|
||||
|
||||
# Restart clients so the new colours/wallpaper take effect
|
||||
pkill -x swaybg 2>/dev/null || true
|
||||
sleep 0.1
|
||||
setsid swaybg -i "$CURRENT/background" -m fill >/dev/null 2>&1 &
|
||||
pkill -SIGUSR2 waybar 2>/dev/null || true
|
||||
hyprctl reload >/dev/null 2>&1 || true
|
||||
|
||||
command -v notify-send >/dev/null && notify-send -u low "Theme: $name" || true
|
||||
exit 0
|
||||
Reference in New Issue
Block a user