mirror of
https://github.com/tomasriveral/nixos.git
synced 2026-08-12 02:28:37 +02:00
added wallpaper with swww
This commit is contained in:
@@ -145,6 +145,8 @@ services.upower.enable = true;
|
|||||||
hyprkeys # keybind helper
|
hyprkeys # keybind helper
|
||||||
cowsay
|
cowsay
|
||||||
cmatrix
|
cmatrix
|
||||||
|
swww #wallpaper daemon
|
||||||
|
socat # Utility for bidirectional data transfer between two independent data channels (used to communicate between hyprland and swww to change wallpapers dinamically)
|
||||||
#we need to install gnome and kde utils individually as we dont use gnome
|
#we need to install gnome and kde utils individually as we dont use gnome
|
||||||
gnome-calculator
|
gnome-calculator
|
||||||
snapshot
|
snapshot
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ home.packages = [
|
|||||||
(pkgs.callPackage ../../modules/scripts/batterynotify.nix {})
|
(pkgs.callPackage ../../modules/scripts/batterynotify.nix {})
|
||||||
(pkgs.callPackage ../../modules/scripts/weather.nix {})
|
(pkgs.callPackage ../../modules/scripts/weather.nix {})
|
||||||
(pkgs.callPackage ../../modules/scripts/cowsay.nix {})
|
(pkgs.callPackage ../../modules/scripts/cowsay.nix {})
|
||||||
|
(pkgs.callPackage ../../modules/scripts/wallpaper.nix {})
|
||||||
# # Adds the 'hello' command to your environment. It prints a friendly
|
# # Adds the 'hello' command to your environment. It prints a friendly
|
||||||
# # "Hello, world!" when run.
|
# # "Hello, world!" when run.
|
||||||
# pkgs.hello
|
# pkgs.hello
|
||||||
|
|||||||
@@ -137,6 +137,7 @@
|
|||||||
"wl-paste --type text --watch cliphist store" # clipboard store text data
|
"wl-paste --type text --watch cliphist store" # clipboard store text data
|
||||||
"wl-paste --type image --watch cliphist store" # clipboard store image data
|
"wl-paste --type image --watch cliphist store" # clipboard store image data
|
||||||
"custom-batterynotify"
|
"custom-batterynotify"
|
||||||
|
"custom-wallpaper"
|
||||||
];
|
];
|
||||||
# █░░ ▄▀█ █▄█ █▀█ █░█ ▀█▀ █▀
|
# █░░ ▄▀█ █▄█ █▀█ █░█ ▀█▀ █▀
|
||||||
# █▄▄ █▀█ ░█░ █▄█ █▄█ ░█░ ▄█
|
# █▄▄ █▀█ ░█░ █▄█ █▄█ ░█░ ▄█
|
||||||
|
|||||||
@@ -0,0 +1,39 @@
|
|||||||
|
{ writeShellApplication, socat, swww, ... }:
|
||||||
|
|
||||||
|
writeShellApplication {
|
||||||
|
name = "custom-wallpaper";
|
||||||
|
runtimeInputs = [
|
||||||
|
socat
|
||||||
|
swww
|
||||||
|
];
|
||||||
|
text = ''
|
||||||
|
handle() {
|
||||||
|
case $1 in
|
||||||
|
workspace*)
|
||||||
|
str=$1
|
||||||
|
i=$((''${#str}-1))
|
||||||
|
workspace="''${str:$i:1}"
|
||||||
|
case $workspace in
|
||||||
|
1 | 6)
|
||||||
|
swww img -t none ../../assets/wallpaper1.jpg
|
||||||
|
;;
|
||||||
|
2 | 7)
|
||||||
|
swww img -t none ../../assets/wallpaper2.jpg
|
||||||
|
;;
|
||||||
|
3 | 8)
|
||||||
|
swww img -t none ../../assets/wallpaper3.jpg
|
||||||
|
;;
|
||||||
|
4 | 9)
|
||||||
|
swww img -t none ../../assets/wallpaper4.jpg
|
||||||
|
;;
|
||||||
|
5 | 10)
|
||||||
|
swww img -t none ../../assets/wallpaper5.jpg
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
socat -U - UNIX-CONNECT:$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock | while read -r line; do handle "$line"; done
|
||||||
|
'';
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user