Files
dotfiles/install.sh
T
funman300 8a087d123f Housekeeping: fix theme SSOT, wire screenshot, remove dead swaylock
- mako/config: generate from theme/colors.json in install.sh instead of
  symlinking a static file — mako is the only tool that can't use CSS
  variables, so colors.json is now the single source of truth for it
- gtklock/config.ini: remove hardcoded /home/alex absolute path for style;
  gtklock falls back to $XDG_CONFIG_HOME/gtklock/style.css by default
- niri: replace inline grim spawn-sh with `spawn "screenshot"` to use the
  existing script (which also copies to clipboard via wl-copy)
- install.sh: add screenshot symlink; mako generation step
- packages.txt: add snixembed (used in niri spawn-at-startup, was missing)
- swaylock/config: delete (replaced by gtklock in previous commit)
- .gitignore: add mako/config (now generated, not tracked)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 12:02:56 -07:00

71 lines
2.7 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,gtklock,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
ln -sf "$(pwd)/waybar/mouse-battery.sh" ~/.config/waybar/mouse-battery.sh
mkdir -p ~/.config/theme
ln -sf "$(pwd)/theme/colors.css" ~/.config/theme/colors.css
ln -sf "$(pwd)/wofi/config" ~/.config/wofi/config
ln -sf "$(pwd)/wofi/style.css" ~/.config/wofi/style.css
python3 - <<'PYEOF'
import json, os
c = json.load(open("theme/colors.json"))
config = f"""background-color={c['background']}
text-color={c['foreground']}
border-size=2
border-color={c['blue']}
default-timeout=4000
"""
open(os.path.expanduser("~/.config/mako/config"), "w").write(config)
PYEOF
ln -sf "$(pwd)/gtklock/config.ini" ~/.config/gtklock/config
ln -sf "$(pwd)/gtklock/style.css" ~/.config/gtklock/style.css
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/screenshot.sh" ~/.local/bin/screenshot
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 "==> Done. Start Niri with: niri-session"