Files
dotfiles/install.sh
T
funman300 1e3adbc842 feat: centralize theme palette + add waybar bluetooth module
Theme centralization:
- theme/colors.json is now the single source of truth for the palette.
- New theme/generate-theme.py renders, at install time, the three derived
  artifacts into ~/.config: colors.css (waybar/wofi @import), mako config,
  and hyprlock-colors.conf (hyprlang $tn_* variables).
- theme/colors.css removed from the repo (now generated); install.sh calls
  the generator instead of the old inline mako snippet.
- hyprlock.conf sources the generated color file and uses $tn_* variables
  instead of hardcoded rgba() values.
- Generator covered by theme/test_generate_theme.py.

Bluetooth:
- Added waybar built-in bluetooth module (config.jsonc + style.css), with
  bluez/bluez-utils in packages.txt.

Includes design spec and implementation plan under docs/superpowers/.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 16:45:01 -07:00

69 lines
2.8 KiB
Bash
Executable File

#!/bin/bash
set -e
echo "==> Detecting AUR helper"
if command -v yay &>/dev/null; then
AUR_HELPER=yay
elif command -v paru &>/dev/null; then
AUR_HELPER=paru
else
echo "ERROR: No AUR helper found. Install yay or paru first." >&2
exit 1
fi
echo "==> Installing packages (using $AUR_HELPER)"
$AUR_HELPER -S --needed - < packages.txt
echo "==> Creating config directories"
mkdir -p ~/.config/{niri,waybar,wofi,mako,alacritty,gtk-3.0,gtk-4.0,fish} ~/.config/environment.d ~/.config/xdg-desktop-portal
echo "==> Linking configs"
mkdir -p ~/.config/networkmanager-dmenu
ln -sf "$(pwd)/networkmanager-dmenu/config.ini" ~/.config/networkmanager-dmenu/config.ini
ln -sf "$(pwd)/niri/config.kdl" ~/.config/niri/config.kdl
ln -sf "$(pwd)/waybar/config.jsonc" ~/.config/waybar/config.jsonc
ln -sf "$(pwd)/waybar/style.css" ~/.config/waybar/style.css
mkdir -p ~/.config/theme
echo "==> Generating theme artifacts from colors.json"
python3 "$(pwd)/theme/generate-theme.py"
ln -sf "$(pwd)/wofi/config" ~/.config/wofi/config
ln -sf "$(pwd)/wofi/style.css" ~/.config/wofi/style.css
mkdir -p ~/.config/hypr
ln -sf "$(pwd)/hyprlock/hyprlock.conf" ~/.config/hypr/hyprlock.conf
ln -sf "$(pwd)/fish/config.fish" ~/.config/fish/config.fish
ln -sf "$(pwd)/starship/starship.toml" ~/.config/starship.toml
ln -sf "$(pwd)/alacritty/alacritty.toml" ~/.config/alacritty/alacritty.toml
ln -sf "$(pwd)/gtk-3.0/settings.ini" ~/.config/gtk-3.0/settings.ini
ln -sf "$(pwd)/gtk-4.0/settings.ini" ~/.config/gtk-4.0/settings.ini
ln -sf "$(pwd)/xdg/mimeapps.list" ~/.config/mimeapps.list
ln -sf "$(pwd)/environment.d/wayland.conf" ~/.config/environment.d/wayland.conf
ln -sf "$(pwd)/xdg-desktop-portal/portals.conf" ~/.config/xdg-desktop-portal/portals.conf
echo "==> Installing scripts"
mkdir -p ~/.local/bin
ln -sf "$(pwd)/scripts/powermenu.sh" ~/.local/bin/powermenu
ln -sf "$(pwd)/scripts/clipboard.sh" ~/.local/bin/clipboard-picker
ln -sf "$(pwd)/scripts/power-profile.sh" ~/.local/bin/power-profile
ln -sf "$(pwd)/scripts/fan-profile.sh" ~/.local/bin/fan-profile
ln -sf "$(pwd)/scripts/waybar-restart.sh" ~/.local/bin/waybar-restart
ln -sf "$(pwd)/scripts/screenshot.sh" ~/.local/bin/screenshot
ln -sf "$(pwd)/scripts/volume.sh" ~/.local/bin/volume
echo "==> Enabling systemd user services"
mkdir -p ~/.config/systemd/user
echo "==> Deploying greetd config"
sudo cp "$(pwd)/greetd/config.toml" /etc/greetd/config.toml
sudo cp "$(pwd)/greetd/regreet.toml" /etc/greetd/regreet.toml
echo "==> Deploying suspend/hibernate config"
sudo install -Dm644 "$(pwd)/logind/lid.conf" /etc/systemd/logind.conf.d/lid.conf
sudo install -Dm644 "$(pwd)/sleep/hibernate-delay.conf" /etc/systemd/sleep.conf.d/hibernate-delay.conf
echo "==> Deploying NetworkManager config"
sudo install -Dm644 "$(pwd)/NetworkManager/conf.d/wifi-backend.conf" /etc/NetworkManager/conf.d/wifi-backend.conf
echo "==> Done. Start Niri with: niri-session"