feat: Copy images from XWayland

This commit is contained in:
Sweetbread 2024-09-27 11:45:51 +03:00
parent 85caecc14e
commit 501c8aaa3b

View File

@ -7,6 +7,8 @@
wofi
clipse
grimblast
xclip
clipnotify
];
wayland.windowManager.hyprland =
@ -58,6 +60,15 @@
finally:
system(f"swww img {folder}/{filename} --transition-type center")
'';
clipsync = pkgs.writers.writeBash "clipsync" ''
while clipnotify; do
xclip -q -sel clip -t image/png -o > /dev/null && \
xclip -sel clip -t image/png -o | wl-copy
xclip -q -sel clip -o > /dev/null && \
xclip -sel clip -o | wl-copy
done
'';
in {
enable = true;
xwayland.enable = true;
@ -194,6 +205,7 @@
"swww init"
"python3 ${lib.getExe wallpaper_changer}"
"waybar"
"${clipsync}"
"clipse -listen"
];