fixes waybar, adds cursors, fixes some hyprland stuff

This commit is contained in:
2026-02-15 21:03:00 +01:00
parent 73d6ca5bec
commit 5e55b51220
12 changed files with 247 additions and 86 deletions

View File

@@ -57,16 +57,26 @@ fi
# Get current outputs dynamically
OUTPUTS=$(hyprctl monitors | grep "Monitor" | awk '{print $2}' | paste -sd " " -)
OPTIONS=$(
cat <<EOF
TOP_LEVEL=$(printf "%b" "screenshot\nrecord" | "${DMENU_ARR[@]}" "󰄀 ")
[ -z "$TOP_LEVEL" ] && exit 0
if [ "$TOP_LEVEL" = "screenshot" ]; then
OPTIONS=$(
cat <<EOF
screenshot selection
$(for OUTPUT in $OUTPUTS; do echo "screenshot $OUTPUT"; done)
screenshot all
EOF
)
else
OPTIONS=$(
cat <<EOF
record selection
$(for OUTPUT in $OUTPUTS; do echo "record $OUTPUT"; done)
record all
EOF
)
)
fi
SELECTION=$(printf "%b" "$OPTIONS" | "${DMENU_ARR[@]}" "󰄀 ")
[ -z "$SELECTION" ] && exit 0
@@ -92,6 +102,11 @@ select_audio_mode() {
esac
}
open_in_satty() {
[ -x "$(command -v satty)" ] || return 0
satty -f "$1" >/dev/null 2>&1 &
}
# Screenshot or record depending on selection
case "$SELECTION" in
"screenshot selection")
@@ -99,6 +114,7 @@ case "$SELECTION" in
IMG="${SCREENSHOT_DIR}/${TIMESTAMP}.png"
grim -g "$(slurp)" "$IMG" || { notify-send "Error" "Failed to take screenshot"; exit 1; }
[ -x "$(command -v wl-copy)" ] && wl-copy < "$IMG"
open_in_satty "$IMG"
notify-send "Screenshot Taken" "$IMG"
;;
@@ -114,6 +130,7 @@ case "$SELECTION" in
montage "${TEMP_FILES[@]}" -tile x1 -geometry +0+0 "$IMG"
rm "${TEMP_FILES[@]}"
[ -x "$(command -v wl-copy)" ] && wl-copy < "$IMG"
open_in_satty "$IMG"
notify-send "Screenshot Taken" "$IMG"
else
notify-send "Error" "Not enough outputs to montage"
@@ -153,6 +170,7 @@ case "$SELECTION" in
OUT=$(echo "$SELECTION" | awk '{print $2}')
grim -c -o "$OUT" "$IMG" || { notify-send "Error" "Failed to screenshot $OUT"; exit 1; }
[ -x "$(command -v wl-copy)" ] && wl-copy < "$IMG"
open_in_satty "$IMG"
notify-send "Screenshot Taken" "$IMG"
;;