Add Hyprland Void desktop profile

This commit is contained in:
Fabio Scotto di Santolo
2026-06-06 16:08:35 +02:00
parent 3460c2a9cb
commit 769e61a488
26 changed files with 746 additions and 17 deletions

View File

@@ -0,0 +1,29 @@
#!/bin/sh
choice="$(printf "⏻ Shutdown\n Reboot\n Logout\n Lock\n⏾ Suspend" \
| rofi -dmenu \
-i \
-p "Power" \
-theme ~/.config/rofi/config.rasi \
-theme-str 'window { width: 20%; location: center; anchor: center; } listview { columns: 1; spacing: 6px; }')"
[ -z "$choice" ] && exit 0
case "$choice" in
*Lock)
hyprlock
;;
*Logout)
hyprctl dispatch exit
;;
*Suspend)
hyprlock &
loginctl suspend
;;
*Reboot)
loginctl reboot
;;
*Shutdown)
loginctl poweroff
;;
esac

View File

@@ -0,0 +1,38 @@
#!/bin/sh
# Quick screenshot helpers for Hyprland. Captures via grim, saves to disk and
# also copies to the Wayland clipboard. Use the flameshot binding for
# annotations / fancy capture.
#
# Usage: screenshot {full|region|output|window}
set -eu
mode="${1:-full}"
dir="$HOME/Pictures/Screenshots"
mkdir -p "$dir"
file="$dir/$(date +%Y%m%d_%H%M%S).png"
case "$mode" in
full)
grim "$file"
;;
region)
grim -g "$(slurp)" "$file"
;;
output)
out=$(hyprctl monitors -j | jq -r '.[] | select(.focused == true) | .name')
grim -o "$out" "$file"
;;
window)
geom=$(hyprctl activewindow -j \
| jq -r '"\(.at[0]),\(.at[1]) \(.size[0])x\(.size[1])"')
grim -g "$geom" "$file"
;;
*)
printf 'Usage: %s {full|region|output|window}\n' "$0" >&2
exit 1
;;
esac
wl-copy < "$file"
notify-send "Screenshot saved" "$file" -i image-x-generic >/dev/null 2>&1 || true

View File

@@ -0,0 +1,34 @@
#!/bin/sh
# Cycle Hyprland workspaces within the fixed 1..10 desktop set.
set -eu
direction="${1:-next}"
current="$(hyprctl activeworkspace -j | jq -r '.id')"
case "$current" in
''|*[!0-9-]*) current=1 ;;
esac
case "$direction" in
next)
if [ "$current" -ge 10 ] || [ "$current" -lt 1 ]; then
target=1
else
target=$((current + 1))
fi
;;
prev)
if [ "$current" -le 1 ] || [ "$current" -gt 10 ]; then
target=10
else
target=$((current - 1))
fi
;;
*)
printf 'Usage: %s {next|prev}\n' "$0" >&2
exit 1
;;
esac
exec hyprctl dispatch workspace "$target"