mirror of
https://github.com/kmein/niveum
synced 2026-03-16 18:21:07 +01:00
fix(klem): rename clipboardSelection to selection
This commit is contained in:
@@ -8,7 +8,7 @@ let
|
||||
_file = toString ./klem.nix;
|
||||
imports = [ (args.config or { }) ];
|
||||
options = {
|
||||
clipboardSelection = lib.mkOption {
|
||||
selection = lib.mkOption {
|
||||
default = "clipboard";
|
||||
type = lib.types.enum [ "primary" "secondary" "clipboard" ];
|
||||
};
|
||||
@@ -20,7 +20,8 @@ let
|
||||
default = {
|
||||
pastebin = "${pkgs.curl}/bin/curl -fSs -F 'f:1=<-' ix.io";
|
||||
shorten = ''
|
||||
${pkgs.curl}/bin/curl -fSs -F "shorten=$(${pkgs.coreutils}/bin/cat)" https://0x0.st'';
|
||||
${pkgs.curl}/bin/curl -fSs -F "shorten=$(${pkgs.coreutils}/bin/cat)" https://0x0.st
|
||||
'';
|
||||
"replace p.r" = "${pkgs.gnused}/bin/sed 's/\\<r\\>/krebsco.de/'";
|
||||
};
|
||||
type = lib.types.attrs;
|
||||
@@ -33,7 +34,7 @@ let
|
||||
'${option}') ${toString script} ;;
|
||||
'';
|
||||
in pkgs.writers.writeDashBin "klem" ''
|
||||
${pkgs.xclip}/bin/xclip -selection ${cfg.clipboardSelection} -out \
|
||||
${pkgs.xclip}/bin/xclip -selection ${cfg.selection} -out \
|
||||
| case $(echo "${
|
||||
lib.concatStringsSep "\n" (lib.attrNames cfg.scripts)
|
||||
}" | ${cfg.dmenu.package}/bin/dmenu -i -p klem) in
|
||||
@@ -41,5 +42,5 @@ in pkgs.writers.writeDashBin "klem" ''
|
||||
*) ${pkgs.coreutils}/bin/cat ;;
|
||||
esac \
|
||||
| tr -d '\r\n' \
|
||||
| ${pkgs.xclip}/bin/xclip -selection ${cfg.clipboardSelection} -in
|
||||
| ${pkgs.xclip}/bin/xclip -selection ${cfg.selection} -in
|
||||
''
|
||||
|
||||
Reference in New Issue
Block a user