Nix fmt rfc style (more or less)

This commit is contained in:
Filippo Berto 2024-08-13 12:22:23 +02:00
parent e7496c447a
commit 515f098644
No known key found for this signature in database
GPG key ID: FE98AE5EC52B1056
146 changed files with 2607 additions and 906 deletions

View file

@ -4,16 +4,20 @@
, coreutils
, editor ? "hx"
, terminal-command ? "kitty -e"
,
}:
# 64 │ function clipcopy() { xclip -in -selection clipboard < "${1:-/dev/stdin}"; }
# 65 │ function clippaste() { xclip -out -selection clipboard; } clip
writeShellScriptBin "wl-clipedit" ''
PATH=$PATH:"${lib.makeBinPath [ coreutils wl-clipboard ]}"
PATH=$PATH:"${
lib.makeBinPath [
coreutils
wl-clipboard
]
}"
tmp_file=$(mktemp)
wl-paste -t 'text/plain;charset=utf-8' -n > "$tmp_file"
${terminal-command} ''${VISUAL:-''${EDITOR:-${editor}}} "$tmp_file"
wl-copy -t 'text/plain;charset=utf-8' -n < "$tmp_file"
rm "$tmp_file"
''