From ba2175e122870d54ad3c52b7bc23199d7b3850f0 Mon Sep 17 00:00:00 2001 From: Ryan Schanzenbacher Date: Sat, 18 Nov 2023 00:03:46 -0500 Subject: [PATCH] family guy funny moments --- home-config/hypr/hyprland.conf | 15 +++++++++++++++ home-config/hypr/wallpaper-daemon.sh | 18 ++++++++++++++++++ home-config/hypr/wallpaper.sh | 2 +- home-config/nix-home-manager/home.nix | 1 + 4 files changed, 35 insertions(+), 1 deletion(-) diff --git a/home-config/hypr/hyprland.conf b/home-config/hypr/hyprland.conf index a3545b8..d7f0211 100644 --- a/home-config/hypr/hyprland.conf +++ b/home-config/hypr/hyprland.conf @@ -221,6 +221,21 @@ windowrulev2 = size 740 712, class:^(ala-wttr)$ # Change color of pinned windows windowrulev2 = bordercolor rgba(bf0000ee) rgba(ab00adee) 45deg,pinned:1 +# Fun Keybinds +# Subway surfer +bind = $mainMod CTRL SHIFT, S, exec, mpv ~/Videos/subwaysurfer.webm --start=3 +windowrulev2 = float,class:^(mpv)$, title:^(subwaysurfer.webm - mpv)$ +windowrulev2 = size 310 554,class:^(mpv)$, title:^(subwaysurfer.webm - mpv)$ +windowrulev2 = move 81% 46% ,class:^(mpv)$, title:^(subwaysurfer.webm - mpv)$ +windowrulev2 = pin,class:^(mpv)$, title:^(subwaysurfer.webm - mpv)$ + +# Family guy funny moments +bind = $mainMod CTRL SHIFT, F, exec, mpv ~/Videos/family_guy.mp4 +windowrulev2 = float,class:^(mpv)$, title:^(family_guy.mp4 - mpv)$ +windowrulev2 = size 595 336,class:^(mpv)$, title:^(family_guy.mp4 - mpv)$ +windowrulev2 = move 67% 5% ,class:^(mpv)$, title:^(family_guy.mp4 - mpv)$ +windowrulev2 = pin,class:^(mpv)$, title:^(family_guy.mp4 - mpv)$ + exec-once = ~/.config/hypr/autostart.sh misc { diff --git a/home-config/hypr/wallpaper-daemon.sh b/home-config/hypr/wallpaper-daemon.sh index 83c5229..39b2aae 100755 --- a/home-config/hypr/wallpaper-daemon.sh +++ b/home-config/hypr/wallpaper-daemon.sh @@ -72,9 +72,27 @@ switch_check() { fi } +check_load() { + # If system is under stress, disable animated wallpaper. If not, allow them + while :; do + sleep 60 + ANIM_ENABLE=`cat /tmp/$USER-desktop-anim` + LOAD=`cat /proc/loadavg | cut -d' ' -f1` + + if [ "$ANIM_ENABLE" == "true" ] && [ $LOAD -gt 8.00 ] && [ $ANIM_READY = true ]; then + sed -i '1c\false' /tmp/$USER-desktop-anim + switch_check `find ~/.config/hypr/Wallpapers/static/ -type f | sort -R | tail -n1` + elif [ "$ANIM_ENABLE" == "false" ] && [ $LOAD -lt 8.00 ] && [ $ANIM_READY = true ]; then + sed -i '1c\true' /tmp/$USER-desktop-anim + switch_check `find ~/.config/hypr/Wallpapers/animated/ -name '*.gif' | sort -R | tail -n1` + fi + done +} + script_init check_if_ac begin_randomizer & +check_load & dbus-monitor --system "interface='org.freedesktop.DBus.Properties',member='PropertiesChanged',sender=':1.2',path='/org/freedesktop/UPower/devices/line_power_AC'" 2>/dev/null | stdbuf -o0 awk -F' ' '/variant boolean/ {print $(NF)}' | while read -r line; do diff --git a/home-config/hypr/wallpaper.sh b/home-config/hypr/wallpaper.sh index ac2c627..c6266fc 100755 --- a/home-config/hypr/wallpaper.sh +++ b/home-config/hypr/wallpaper.sh @@ -6,4 +6,4 @@ sleep 2 IMG=`cat /tmp/$USER-desktop-anim | tail -n1` # Load it for the monitors -swww img $IMG +swww img $IMG -o $1 diff --git a/home-config/nix-home-manager/home.nix b/home-config/nix-home-manager/home.nix index 59eab88..e1ec08a 100644 --- a/home-config/nix-home-manager/home.nix +++ b/home-config/nix-home-manager/home.nix @@ -39,6 +39,7 @@ wl-clip-persist gifski waypaper + gdu # # It is sometimes useful to fine-tune packages, for example, by applying # # overrides. You can do that directly here, just don't forget the