diff --git a/hosts/goopnet-interface/default.nix b/hosts/goopnet-interface/default.nix index 176afe9..7bb89e4 100755 --- a/hosts/goopnet-interface/default.nix +++ b/hosts/goopnet-interface/default.nix @@ -56,6 +56,7 @@ batsignal.enable = true; wob.enable = true; gammastep.enable = true; + clipse.enable = true; # display manager sddm.enable = true; diff --git a/modules/desktop/clipse.nix b/modules/desktop/clipse.nix new file mode 100644 index 0000000..2cf47db --- /dev/null +++ b/modules/desktop/clipse.nix @@ -0,0 +1,37 @@ +{ lib, config, pkgs, ... }: + +with lib; +let + cfg = config.modules.desktop.clipse; +in { + options.modules.desktop.clipse = { + enable = mkEnableOption "Enable clipse, a generic clipboard manager"; + package = mkOption { + type = types.package; + default = pkgs.clipse; + }; + }; + + config = mkIf cfg.enable { + # runtime dependencies + user.packages = with pkgs; [ wl-clipboard ]; + + hm.wayland.windowManager.hyprland.settings = let + class = "clipse"; + in { + exec-once = [ "${lib.getExe cfg.package} -listen-shell" ]; + + windowrulev2 = [ + "float, class:^${class}$" + "size 622 652, class:^${class}$" + "center, class:^${class}$" + "stayfocused, class:^${class}$" + "dimaround, class:^${class}$" + ]; + + bind = [ + "$mod, V, exec, ${lib.getExe pkgs.wezterm} start --class ${class} -e '${lib.getExe cfg.package}'" + ]; + }; + }; +} \ No newline at end of file