mirror of
https://github.com/zoriya/flake.git
synced 2026-08-15 18:43:42 +00:00
Use osc52 for every copy/paste in the terminal
This commit is contained in:
@@ -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
|
||||
'';
|
||||
|
||||
@@ -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 [
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user