mirror of
https://github.com/zephrynis/nix-flake.git
synced 2026-02-18 20:21:53 +00:00
feat: add wallpaper script and integrate it into Hyprland configuration
This commit is contained in:
@@ -234,6 +234,12 @@
|
|||||||
executable = true;
|
executable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Wallpaper script
|
||||||
|
home.file.".local/bin/set-wallpaper" = {
|
||||||
|
source = ./scripts/set-wallpaper.sh;
|
||||||
|
executable = true;
|
||||||
|
};
|
||||||
|
|
||||||
# Flatpaks are managed in system/flatpak.nix
|
# Flatpaks are managed in system/flatpak.nix
|
||||||
|
|
||||||
# Let Home Manager manage itself
|
# Let Home Manager manage itself
|
||||||
|
|||||||
@@ -13,12 +13,8 @@
|
|||||||
|
|
||||||
# Autostart applications
|
# Autostart applications
|
||||||
exec-once = [
|
exec-once = [
|
||||||
# For GIF/WebP/static images - use swww (works on all monitors):
|
# Set wallpaper on all monitors automatically
|
||||||
# "swww-daemon && swww img ~/nix-flake/assets/wallpaper.gif"
|
"$HOME/.local/bin/set-wallpaper"
|
||||||
|
|
||||||
# For MP4 videos - run separate instances per monitor for proper scaling:
|
|
||||||
"mpvpaper -o 'no-audio loop' DP-2 ~/nix-flake/assets/wallpaper.mp4"
|
|
||||||
"mpvpaper -o 'no-audio loop' DP-1 ~/nix-flake/assets/wallpaper.mp4"
|
|
||||||
|
|
||||||
"ags run --gtk 4" # Start AGS with colorshell (includes notification daemon)
|
"ags run --gtk 4" # Start AGS with colorshell (includes notification daemon)
|
||||||
# "dunst" # Disabled - colorshell handles notifications
|
# "dunst" # Disabled - colorshell handles notifications
|
||||||
|
|||||||
15
home/scripts/set-wallpaper.sh
Normal file
15
home/scripts/set-wallpaper.sh
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Set wallpaper on all connected monitors using mpvpaper
|
||||||
|
|
||||||
|
WALLPAPER="$HOME/nix-flake/assets/wallpaper.mp4"
|
||||||
|
|
||||||
|
# Kill existing mpvpaper instances
|
||||||
|
pkill -9 mpvpaper 2>/dev/null
|
||||||
|
|
||||||
|
# Get all connected monitors from Hyprland
|
||||||
|
MONITORS=$(hyprctl monitors -j | jq -r '.[].name')
|
||||||
|
|
||||||
|
# Start mpvpaper for each monitor
|
||||||
|
for monitor in $MONITORS; do
|
||||||
|
mpvpaper -o 'no-audio loop' "$monitor" "$WALLPAPER" &
|
||||||
|
done
|
||||||
Reference in New Issue
Block a user