Initial commit

This commit is contained in:
z0x 2025-07-20 12:57:27 -04:00
commit 5f78d74eca
178 changed files with 1952 additions and 0 deletions

23
.local/bin/scripts/backlight Executable file
View file

@ -0,0 +1,23 @@
#!/bin/sh
# Get the current brightness percentage from brightnessctl -m output
get_brightness() {
brightnessctl -m | awk -F, '{gsub(/%/,"",$4); print $4}'
}
case "$1" in
up)
brightnessctl set 5%+ >/dev/null
brightness=$(get_brightness)
dunstify -a "Backlight" -r 9994 -h int:value:"$brightness" -i "brightness" "Brightness" "Currently at $brightness%" -t 1000
;;
down)
brightnessctl set 5%- >/dev/null
brightness=$(get_brightness)
dunstify -a "Backlight" -r 9994 -h int:value:"$brightness" -i "brightness" "Brightness" "Currently at $brightness%" -t 1000
;;
*)
echo "Usage: $0 {up|down}"
exit 1
;;
esac

12
.local/bin/scripts/powermenu Executable file
View file

@ -0,0 +1,12 @@
#!/bin/bash
CHOSEN=$(printf "Lock\nSuspend\nReboot\nShutdown\nLog Out" | tofi --config "$XDG_CONFIG_HOME"/tofi/config)
case "$CHOSEN" in
"Lock") hyprlock ;;
"Suspend") loginctl suspend ;;
"Reboot") loginctl reboot ;;
"Shutdown") loginctl poweroff ;;
"Log Out") hyprctl dispatch exit ;;
*) exit 1 ;;
esac

11
.local/bin/scripts/record Executable file
View file

@ -0,0 +1,11 @@
#!/bin/bash
pgrep -x "wl-screenrec" && pkill -INT -x wl-screenrec && notify-send -h string:wl-screenrec:record -t 1000 "Finished Recording" && exit 0
for i in 3 2 1; do
notify-send -t 1000 "Recording starts in $i..."
sleep 1
done
dateTime=$(date +%Y-%m-%dT%H:%M:%S)
wl-screenrec --codec av1 --low-power=off -f $HOME/$dateTime.mp4

15
.local/bin/scripts/record-slurp Executable file
View file

@ -0,0 +1,15 @@
#!/bin/bash
# Check if wl-screenrec is running and stop it if it is
pgrep -x "wl-screenrec" && pkill -INT -x wl-screenrec && notify-send -h string:wl-screenrec:record -t 1000 "Finished Recording" && exit 0
area=$(slurp)
for i in 3 2 1; do
notify-send -t 1000 "Recording starts in $i..."
sleep 1
done
# Start recording
dateTime=$(date +%Y-%m-%dT%H:%M:%S)
wl-screenrec --codec av1 --low-power=off -g "$area" -f $HOME/$dateTime.mp4

36
.local/bin/scripts/volume Executable file
View file

@ -0,0 +1,36 @@
#!/bin/sh
case $1 in
up)
wpctl set-mute @DEFAULT_AUDIO_SINK@ 0
wpctl set-volume -l 1.0 @DEFAULT_AUDIO_SINK@ 5%+
;;
down)
wpctl set-mute @DEFAULT_AUDIO_SINK@ 0
wpctl set-volume -l 1.0 @DEFAULT_AUDIO_SINK@ 5%-
;;
mute)
wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
;;
esac
VOLUME=$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | tr -dc '0-9' | sed 's/^0\{1,2\}//')
send_notification() {
if [ "$1" = "mute" ]; then ICON="mute"; elif [ "$VOLUME" -lt 33 ]; then ICON="low"; elif [ "$VOLUME" -lt 66 ]; then ICON="medium"; else ICON="high"; fi
if [ "$1" = "mute" ]; then TEXT="Currently muted"; else TEXT="Currently at ${VOLUME}%"; fi
dunstify -a "Volume" -r 9993 -h int:value:"$VOLUME" -i "volume-$ICON" "Volume" "$TEXT" -t 2000
}
case $1 in
mute)
case "$(wpctl get-volume @DEFAULT_AUDIO_SINK@)" in
*MUTED*) send_notification mute ;;
*) send_notification ;;
esac
;;
*)
send_notification
;;
esac

11
.local/bin/scripts/wallpaper Executable file
View file

@ -0,0 +1,11 @@
#!/bin/bash
directory=$XDG_DATA_HOME/wallpapers
if [ -d "$directory" ]; then
random_background=$(ls $directory/*.{JPG,jpg,png} | shuf -n 1)
hyprctl hyprpaper unload all
hyprctl hyprpaper preload $random_background
hyprctl hyprpaper wallpaper ",$random_background"
fi

View file

@ -0,0 +1,11 @@
#!/bin/bash
# Check if waybar is running
if pgrep -x "waybar" > /dev/null; then
# If running, kill the waybar process
pkill -x "waybar"
else
# If not running, start waybar
waybar &
fi

View file

@ -0,0 +1,7 @@
#!/bin/bash
if pgrep -x "wlsunset" >/dev/null; then
pkill -x "wlsunset"
else
wlsunset -S 7:00 -s 21:00 &
fi

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show more