Merge branch 'main' of https://github.com/end-4/dots-hyprland into record-script.sh

This commit is contained in:
Sneethe
2025-06-15 15:38:24 +10:00
420 changed files with 22525 additions and 24725 deletions
File diff suppressed because it is too large Load Diff
+7
View File
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
for cmd in "$@"; do
eval "command -v ${cmd%% *}" >/dev/null 2>&1 || continue
eval "$cmd" &
exit
done
exit 1
+39
View File
@@ -0,0 +1,39 @@
#!/usr/bin/env bash
getdate() {
date '+%Y-%m-%d_%H.%M.%S'
}
getaudiooutput() {
pactl list sources | grep 'Name' | grep 'monitor' | cut -d ' ' -f2
}
getactivemonitor() {
hyprctl monitors -j | jq -r '.[] | select(.focused == true) | .name'
}
xdgvideo="$(xdg-user-dir VIDEOS)"
if [[ $xdgvideo = "$HOME" ]]; then
unset xdgvideo
fi
mkdir -p "${xdgvideo:-$HOME/Videos}"
cd "${xdgvideo:-$HOME/Videos}" || exit
if pgrep wf-recorder > /dev/null; then
notify-send "Recording Stopped" "Stopped" -a 'Recorder' &
pkill wf-recorder &
else
if ! region="$(slurp 2>&1)"; then
notify-send "Recording Cancelled" "Selection was Cancelled" -a 'Recorder'
exit 1
fi
notify-send "Starting recording" 'recording_'"$(getdate)"'.mp4' -a 'Recorder'
if [[ "$1" == "--sound" ]]; then
wf-recorder --pixel-format yuv420p -f './recording_'"$(getdate)"'.mp4' -t --geometry "$region" --audio="$(getaudiooutput)" & disown
elif [[ "$1" == "--fullscreen-sound" ]]; then
wf-recorder -o $(getactivemonitor) --pixel-format yuv420p -f './recording_'"$(getdate)"'.mp4' -t --audio="$(getaudiooutput)" & disown
elif [[ "$1" == "--fullscreen" ]]; then
wf-recorder -o $(getactivemonitor) --pixel-format yuv420p -f './recording_'"$(getdate)"'.mp4' -t & disown
else
wf-recorder --pixel-format yuv420p -f './recording_'"$(getdate)"'.mp4' -t --geometry "$region" & disown
fi
fi
+2
View File
@@ -0,0 +1,2 @@
#!/usr/bin/env bash
hyprctl dispatch "$1" $(((($(hyprctl activeworkspace -j | jq -r .id) - 1) / 10) * 10 + $2))
+54
View File
@@ -0,0 +1,54 @@
#!/usr/bin/env bash
# Controls Hyprland's cursor zoom_factor, clamped between 1.0 and 3.0
# Get current zoom level
get_zoom() {
hyprctl getoption -j cursor:zoom_factor | jq '.float'
}
# Clamp a value between 1.0 and 3.0
clamp() {
local val="$1"
awk "BEGIN {
v = $val;
if (v < 1.0) v = 1.0;
if (v > 3.0) v = 3.0;
print v;
}"
}
# Set zoom level
set_zoom() {
local value="$1"
clamped=$(clamp "$value")
hyprctl keyword cursor:zoom_factor "$clamped"
}
case "$1" in
reset)
set_zoom 1.0
;;
increase)
if [[ -z "$2" ]]; then
echo "Usage: $0 increase STEP"
exit 1
fi
current=$(get_zoom)
new=$(awk "BEGIN { print $current + $2 }")
set_zoom "$new"
;;
decrease)
if [[ -z "$2" ]]; then
echo "Usage: $0 decrease STEP"
exit 1
fi
current=$(get_zoom)
new=$(awk "BEGIN { print $current - $2 }")
set_zoom "$new"
;;
*)
echo "Usage: $0 {reset|increase STEP|decrease STEP}"
exit 1
;;
esac