diff options
| author | Craig Jennings <c@cjennings.net> | 2026-02-01 15:39:51 -0600 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-02-01 15:39:51 -0600 |
| commit | bd1551bbb8883da692645b26b1577c4f45e38689 (patch) | |
| tree | ae372acb0d2755d110757ff346e0d881ebb1bd8d /dotfiles/hyprland/.local/bin/hyprland-plugins-setup | |
| parent | a36b8dd29be6fcf5ad5c8a72882203da3548f288 (diff) | |
feat(hyprland): install plugins on first login via setup script
hyprpm requires running Hyprland to determine version for plugin
compilation. Move plugin installation from archsetup to a first-login
script (hyprland-plugins-setup) that runs via exec-once. Script checks
if plugins are already installed and skips if so. Update validation to
check for setup script presence instead of enabled plugins.
Diffstat (limited to 'dotfiles/hyprland/.local/bin/hyprland-plugins-setup')
| -rwxr-xr-x | dotfiles/hyprland/.local/bin/hyprland-plugins-setup | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/dotfiles/hyprland/.local/bin/hyprland-plugins-setup b/dotfiles/hyprland/.local/bin/hyprland-plugins-setup new file mode 100755 index 0000000..f0181c8 --- /dev/null +++ b/dotfiles/hyprland/.local/bin/hyprland-plugins-setup @@ -0,0 +1,61 @@ +#!/bin/bash +# hyprland-plugins-setup - Install Hyprland plugins on first login +# Called from hyprland.conf exec-once + +LOGFILE="$HOME/.local/var/log/hyprland-plugins-setup.log" +mkdir -p "$(dirname "$LOGFILE")" + +log() { + echo "[$(date '+%Y-%m-%d %H:%M:%S')] $1" >> "$LOGFILE" +} + +# Check if plugins already installed and enabled +if hyprpm list 2>/dev/null | grep -q "hyprscrolling"; then + if hyprpm list | grep -q "enabled: .*true"; then + log "Plugins already installed and enabled, skipping" + exit 0 + fi +fi + +log "Starting Hyprland plugin setup" + +# Add hyprland-plugins repository +log "Adding hyprland-plugins repository..." +if hyprpm add https://github.com/hyprwm/hyprland-plugins 2>&1 | tee -a "$LOGFILE"; then + log "hyprland-plugins repository added" +else + log "Failed to add hyprland-plugins repository" +fi + +# Enable plugins from hyprland-plugins +for plugin in hyprscrolling xtra-dispatchers; do + log "Enabling $plugin..." + if hyprpm enable "$plugin" 2>&1 | tee -a "$LOGFILE"; then + log "$plugin enabled" + else + log "Failed to enable $plugin" + fi +done + +# Add hy3 repository +log "Adding hy3 repository..." +if hyprpm add https://github.com/outfoxxed/hy3 2>&1 | tee -a "$LOGFILE"; then + log "hy3 repository added" +else + log "Failed to add hy3 repository" +fi + +# Enable hy3 +log "Enabling hy3..." +if hyprpm enable hy3 2>&1 | tee -a "$LOGFILE"; then + log "hy3 enabled" +else + log "Failed to enable hy3" +fi + +# Reload plugins into Hyprland +log "Reloading plugins..." +hyprpm reload 2>&1 | tee -a "$LOGFILE" + +log "Plugin setup complete" +notify-send "Hyprland Plugins" "Plugin setup complete" -t 3000 |
