From 8334109245e0714bd1f2436b82cdc86aa5990824 Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Thu, 17 Oct 2024 20:31:04 -0300 Subject: [PATCH] chore(hyprland): add clipboard-sync to sync xwayland and wayland clipboards --- flake.nix | 5 +++++ modules/home-manager/packages.nix | 3 ++- .../programs/hyprland/scripts/start_services.nix | 5 +++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 75f8b63..6cac292 100644 --- a/flake.nix +++ b/flake.nix @@ -14,6 +14,11 @@ inputs.nixpkgs.follows = "nixpkgs"; }; + clipboard-sync = { + url = "github:dnut/clipboard-sync"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1"; }; diff --git a/modules/home-manager/packages.nix b/modules/home-manager/packages.nix index 5bff1c3..895f6c9 100644 --- a/modules/home-manager/packages.nix +++ b/modules/home-manager/packages.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ pkgs, clipboard-sync, ... }: { imports = [ @@ -69,6 +69,7 @@ lazygit ## Desktop environment + clipboard-sync.packages.${pkgs.stdenv.hostPlatform.system}.default cliphist grim libsForQt5.ark diff --git a/modules/home-manager/programs/hyprland/scripts/start_services.nix b/modules/home-manager/programs/hyprland/scripts/start_services.nix index 367a16f..c6bf23e 100644 --- a/modules/home-manager/programs/hyprland/scripts/start_services.nix +++ b/modules/home-manager/programs/hyprland/scripts/start_services.nix @@ -56,4 +56,9 @@ pkgs.writeShellScriptBin "start_services" '' # Clipboard manager # ${pkgs.wl-clipboard}/bin/wl-paste --watch cliphist store & + + # + # Service that syncs X11 and Wayland clipboards + # + clipboard-sync ''