| 1 | #!/bin/env bash |
| 2 | # Hyprland Lua plugins in ~/.config/hypr/plugins: clone the missing ones, update the rest. |
| 3 | # hyprland.lua runs this by itself when split-monitor-workspaces is missing, install.sh after stowing. |
| 4 | |
| 5 | dir="$HOME/.config/hypr/plugins" |
| 6 | mkdir -p "$dir" || exit 1 |
| 7 | |
| 8 | status=0 |
| 9 | for url in https://github.com/zjeffer/split-monitor-workspaces; do |
| 10 | name="$(basename "$url")" |
| 11 | if [ -d "$dir/$name/.git" ]; then |
| 12 | git -C "$dir/$name" pull --ff-only --quiet || status=1 |
| 13 | else |
| 14 | git clone --quiet "$url" "$dir/$name" || status=1 |
| 15 | fi |
| 16 | done |
| 17 | exit "$status" |