From c53d93c59c39df587448bba7a4423a4319fafb90 Mon Sep 17 00:00:00 2001 From: Peritia Date: Tue, 3 Mar 2026 09:13:33 +0100 Subject: [PATCH] Setup Clipboard --- nixosVista/homeManager/cliphist/default.nix | 6 +++ nixosVista/homeManager/cliphist/main.nix | 51 +++++++++++++++++++++ nixosVista/homeManager/cliphist/option.nix | 14 ++++++ nixosVista/homeManager/hyprland/main.nix | 5 +- 4 files changed, 74 insertions(+), 2 deletions(-) create mode 100644 nixosVista/homeManager/cliphist/default.nix create mode 100644 nixosVista/homeManager/cliphist/main.nix create mode 100644 nixosVista/homeManager/cliphist/option.nix diff --git a/nixosVista/homeManager/cliphist/default.nix b/nixosVista/homeManager/cliphist/default.nix new file mode 100644 index 0000000..19bf12e --- /dev/null +++ b/nixosVista/homeManager/cliphist/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./option.nix + ./main.nix + ]; +} diff --git a/nixosVista/homeManager/cliphist/main.nix b/nixosVista/homeManager/cliphist/main.nix new file mode 100644 index 0000000..b234752 --- /dev/null +++ b/nixosVista/homeManager/cliphist/main.nix @@ -0,0 +1,51 @@ +{ + config, + lib, + nixosVista, + ... +}: + { + + config = lib.mkIf nixosVista.enable { + + + environment.systemPackages = with pkgs; [ + wl-clipboard + cliphist + rofi + ]; + + ########################################################## + # XDG Portal (IMPORTANT for Firefox / Flatpak) + ########################################################## + + xdg.portal.enable = true; + xdg.portal.extraPortals = [ + pkgs.xdg-desktop-portal-hyprland + ]; + + + + + services.cliphist.enable = true; + + + + + + + nixosVista.hyprland.fragments.internalClipboard = '' + ############################################################ + # This is configuration for the Clipboard + ############################################################ + + exec-once = wl-paste --type text --watch cliphist store + exec-once = wl-paste --type image --watch cliphist store + bind = $mainMod, V, exec, cliphist list | rofi -dmenu | cliphist decode | wl-copy" + + + ''; + }; +} + + diff --git a/nixosVista/homeManager/cliphist/option.nix b/nixosVista/homeManager/cliphist/option.nix new file mode 100644 index 0000000..9caa859 --- /dev/null +++ b/nixosVista/homeManager/cliphist/option.nix @@ -0,0 +1,14 @@ +{ + config, + lib, + nixosVista, + ... +}: let + cfg = nixosVista.hyprland; +in { + + + + + +} diff --git a/nixosVista/homeManager/hyprland/main.nix b/nixosVista/homeManager/hyprland/main.nix index 3ab1210..a472e56 100644 --- a/nixosVista/homeManager/hyprland/main.nix +++ b/nixosVista/homeManager/hyprland/main.nix @@ -16,16 +16,17 @@ ordered = [ (get "header") (get "customTop") - (get "monitors") - (get "startup") (get "variables") (get "environment") + (get "monitors") + (get "startup") (get "special") (get "input") (get "style") (get "animation") (get "keybinds") (get "windowRules") + (get "internalClipboard") (get "customBottom") ];