Files
hypr/scripts/setup-monitors.zsh
T
2026-06-05 23:49:54 -04:00

20 lines
623 B
Bash
Executable File

#!/usr/bin/env zsh
mon_count=$(hyprctl monitors -j | jq length)
current_profile=$(kanshictl status | awk -F': ' '{print $NF}')
if [[ ${mon_count} -eq 1 ]]; then
~/.config/hypr/scripts/multihead.zsh single_headed --force
else
~/.config/hypr/scripts/multihead.zsh ${current_profile} --force
fi
if nmcli dev wifi list | awk '/^\*/ {print $2}' | grep -q keep; then
~/.config/hypr/scripts/randomize-wallpaper
else
perl -i -pe 's/^\s*path = .*/ path = \/home\/trey\/images\/black.png/ if ! $found; $found=1 if /^\s*path = .*/' ${XDG_CONFIG_HOME}/hypr/hyprpaper.conf
fi
systemctl --user restart hyprpaper