Clipedit command

This commit is contained in:
Filippo Berto 2022-10-08 12:24:38 +02:00
parent 6328f14438
commit d70b3cd44a
Signed by: bertof
GPG key ID: 9DBF7E6A1D2CE9ED
5 changed files with 17 additions and 1 deletions

View file

@ -0,0 +1,12 @@
{ writeShellScriptBin, lib, xclip, coreutils, terminal-command ? "kitty sh -c", editor-command ? "hx" }:
# 64 │ function clipcopy() { xclip -in -selection clipboard < "${1:-/dev/stdin}"; }
# 65 │ function clippaste() { xclip -out -selection clipboard; } clip
writeShellScriptBin "clipedit" ''
PATH=$PATH:"${lib.makeBinPath [ coreutils xclip ]}"
tmp_file=$(mktemp)
xclip -out -selection -clipboard > $tmp_file
${terminal-command} "${editor-command} $tmp_file"
xclip -in -selection clipboard < $tmp_file
rm $tmp_file
''

View file

@ -2,6 +2,7 @@
let
self = with pkgs; {
clipedit = callPackage ./clipedit { };
cocktail-bar-cli = callPackage ./cocktail-bar-cli { };
lockscreen = callPackage ./lockscreen { };
sddm-theme-clairvoyance = callPackage ./sddm-theme-clairvoyance { };

View file

@ -12,7 +12,6 @@
}:
let strPalette = lib.rice.palette.toRGBAHex palette;
in writeScriptBin "lockscreen" ''
#!/bin/sh
# Using font package ${font.package}
${i3lock-color}/bin/i3lock-color \
--insidever-color="${strPalette.normal.green}" \