mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-22 00:21:34 +01:00
Extract clipboard into it's own module
This commit is contained in:
parent
3ed158513e
commit
554b05c33b
5 changed files with 22 additions and 3 deletions
19
modules/home/clipboard.nix
Normal file
19
modules/home/clipboard.nix
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
wrappers,
|
||||
...
|
||||
}: {
|
||||
options.myConfig.clipboard.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.myConfig.clipboard.enable {
|
||||
services.cliphist.enable = true;
|
||||
|
||||
home.packages = [
|
||||
(pkgs.writeScriptBin "clipboard" ''
|
||||
${lib.getExe pkgs.cliphist} list | ${lib.getExe (wrappers.rofi {inherit (config.myConfig.de) theme;})} -dmenu -display-columns 2 | ${lib.getExe pkgs.cliphist} decode | ${lib.getExe' pkgs.wl-clipboard "wl-copy"}
|
||||
'')
|
||||
];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue