diff --git a/modules/desktop/clipman.nix b/modules/desktop/clipman.nix new file mode 100644 index 0000000..7ad4db6 --- /dev/null +++ b/modules/desktop/clipman.nix @@ -0,0 +1,18 @@ +{ home-manager, lib, pkgs, ... }: { + # https://github.com/yory8/clipman + + home-manager.users.caspervk = { + services.clipman = { + enable = true; + }; + + # The home manager module doesn't use --no-persist, but it is required if you want to copy images + # https://github.com/yory8/clipman/issues/59 + # https://github.com/nix-community/home-manager/blob/master/modules/services/clipman.nix + systemd.user.services.clipman = { + Service = { + ExecStart = lib.mkForce "${pkgs.wl-clipboard}/bin/wl-paste -t text --watch ${pkgs.clipman}/bin/clipman store --no-persist"; + }; + }; + }; +} diff --git a/modules/desktop/default.nix b/modules/desktop/default.nix index f0c8678..25f5400 100644 --- a/modules/desktop/default.nix +++ b/modules/desktop/default.nix @@ -1,6 +1,7 @@ { pkgs, ... }: { imports = [ ./alacritty.nix + ./clipman.nix ./network.nix ./ssh.nix ./sway.nix diff --git a/modules/desktop/sway.nix b/modules/desktop/sway.nix index d39f705..849adff 100644 --- a/modules/desktop/sway.nix +++ b/modules/desktop/sway.nix @@ -36,7 +36,8 @@ modifier = "Mod4"; # super keybindings = lib.mkOptionDefault { # Menu - "Mod4+backspace" = "exec rofi -show combi"; + "Mod4+backspace" = "exec wofi"; + "Mod4+p" = "exec clipman pick -t wofi"; # Lock "Mod4+Escape" = "exec loginctl lock-session"; @@ -184,20 +185,15 @@ ]; }; - # https://github.com/davatorium/rofi - # https://github.com/lbonn/rofi (wayland fork) - # https://wiki.archlinux.org/title/rofi - programs.rofi = { + # https://hg.sr.ht/~scoopta/wofi + programs.wofi = { enable = true; - package = pkgs.rofi-wayland; - plugins = with pkgs; [ - rofi-emoji - ]; - theme = "glue_pro_blue"; - extraConfig = { - modi = "combi"; - combi-modi = "window,drun,emoji"; - show-icons = true; + settings = { + show = "drun"; + allow_images = true; + gtk_dark = true; + insensitive = true; + prompt = ""; # hides 'drun' from the search bar }; };