blob: 29619c7252f346e14408eb955c6fb8cd87cdea18 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
#!/bin/bash
# hyprland-plugins-setup - Install Hyprland plugins on first login
# Called from hyprland.conf exec-once
#
# As of Hyprland 0.54, hyprscrolling is in core. Only xtra-dispatchers
# needs to be installed via hyprpm.
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 xtra-dispatchers already installed and enabled
if hyprpm list 2>/dev/null | grep -q "xtra-dispatchers"; then
if hyprpm list | grep -q "enabled: .*true"; then
log "Plugins already installed, loading into session"
hyprpm reload 2>&1 | tee -a "$LOGFILE"
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 xtra-dispatchers (provides plugin:xtd:bringallfrom used by focus-restore)
log "Enabling xtra-dispatchers..."
if hyprpm enable xtra-dispatchers 2>&1 | tee -a "$LOGFILE"; then
log "xtra-dispatchers enabled"
else
log "Failed to enable xtra-dispatchers"
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
|