Use osc52 for every copy/paste in the terminal

This commit is contained in:
2025-11-07 13:50:51 +01:00
parent 0e83fa95e0
commit 9aec0768ae
5 changed files with 16 additions and 12 deletions
+2
View File
@@ -45,7 +45,9 @@
ssh-tunnel = pkgs.writeShellScriptBin "ssh-tunnel" ''
while true; do
dns-sd -m -Q fuhen.local
echo "Host found, starting tunnel" | tee /dev/stderr
ssh -NR "2222:localhost:22" zoriya@fuhen.local
echo "Connetion closed" | tee /dev/stderr
sleep 5
done
'';
+1 -12
View File
@@ -93,8 +93,6 @@
if pkgs.stdenv.isLinux
then "ss -tlpun"
else "netstat -anvp tcp | awk 'NR<3 || /LISTEN/'";
# habits
copyfile = "clipcopy";
# viu doesn't work with tmux, icat does. using that while waiting
viu = "kitty +kitten icat";
@@ -128,16 +126,6 @@
src = pkgs.oh-my-zsh;
file = "share/oh-my-zsh/plugins/git/git.plugin.zsh";
}
{
name = "clipcopy"; # dependency of copypath & copyfile
src = pkgs.oh-my-zsh;
file = "share/oh-my-zsh/lib/clipboard.zsh";
}
{
name = "copypath";
src = pkgs.oh-my-zsh;
file = "share/oh-my-zsh/plugins/copypath/copypath.plugin.zsh";
}
];
completionInit =
#bash
@@ -362,6 +350,7 @@
usql
rsync
moreutils
osc
# bitwarden-cli
]
++ lib.optionals pkgs.stdenv.isLinux [
+7
View File
@@ -108,3 +108,10 @@ _kgy() {
_kubectl
}
compdef _kgy kgy
alias copyfile="osc copy"
copypath() {
local file="${1:-.}"
[[ $file = /* ]] || file="$PWD/$file"
print -n "${file:a}" | osc copy || return 1
}