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 wofi
clipse clipse
grimblast grimblast
xclip
clipnotify
]; ];
wayland.windowManager.hyprland = wayland.windowManager.hyprland =
@ -58,6 +60,15 @@
finally: finally:
system(f"swww img {folder}/{filename} --transition-type center") 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 { in {
enable = true; enable = true;
xwayland.enable = true; xwayland.enable = true;
@ -194,6 +205,7 @@
"swww init" "swww init"
"python3 ${lib.getExe wallpaper_changer}" "python3 ${lib.getExe wallpaper_changer}"
"waybar" "waybar"
"${clipsync}"
"clipse -listen" "clipse -listen"
]; ];