feat: Moves hyprland scripts that were missed and updates systemd services to the appropriate locations.

This commit is contained in:
2025-10-03 23:50:50 -04:00
parent d32d0cf64f
commit f911bfb7f1
6 changed files with 3 additions and 3 deletions

32
env/.local/scripts/hypr/battery-monitor vendored Executable file
View File

@@ -0,0 +1,32 @@
#!/bin/zsh
# Used with the systemd battery monitor service and timer to alert
# when the battery has dropped below the threshold and is not currently
# charging.
THRESHOLD=20 # Notify when below 20%
NOTIFICATION_FLAG="/run/user/${UID}/user_battery_notified"
function get-battery-percentage() {
local battery=$(upower --battery | grep percentage)
echo "${battery//[^0-9]/}"
}
function send-battery-alert() {
notify-send -u critical \
"Recharge battery!" "Batttery is down to ${1}" \
-i battery-caution \
-t 30000
}
battery_percentage=$(get-battery-percentage)
battery_state=$(upower --battery | grep -E state | awk '{print $2}')
if [[ "$battery_state" == "discharging" && "$battery_percentage" -le "$THRESHOLD" ]]; then
if [ ! -f "$NOTIFICATION_FLAG" ]; then
send-battery-alert "$battery_percentage"
touch "$NOTIFICATION_FLAG"
fi
else
rm -f "$NOTIFICATION_FLAG"
fi

View File

@@ -0,0 +1,8 @@
#!/bin/bash
#wl-copy --clear >/dev/null 2>&1 && \
if [ -n "$WAYLAND_DISPLAY" ]; then
wl-copy --clear
fi
rm ~/.local/share/clipse/clipboard_history.json >/dev/null 2>&1

11
env/.local/scripts/hypr/toggle-waybar vendored Executable file
View File

@@ -0,0 +1,11 @@
#!/bin/sh
WAYBAR_PID=$(pgrep -x waybar)
if [ -n "$WAYBAR_PID" ]; then
# kill waybar process if it's running.
kill "$WAYBAR_PID"
else
# start waybar in the background.
waybar &
fi