mirror of
https://github.com/fscotto/infra.git
synced 2026-07-30 00:30:00 +00:00
Update tmux clipboard and terminal styling
This commit is contained in:
26
dotfiles/desktop/.tmux/bin/copy-to-clipboard
Executable file
26
dotfiles/desktop/.tmux/bin/copy-to-clipboard
Executable file
@@ -0,0 +1,26 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -eu
|
||||
|
||||
if command -v wl-copy >/dev/null 2>&1 && [ -n "${WAYLAND_DISPLAY:-}" ]; then
|
||||
exec wl-copy
|
||||
fi
|
||||
|
||||
if command -v xclip >/dev/null 2>&1 && [ -n "${DISPLAY:-}" ]; then
|
||||
exec xclip -selection clipboard -in
|
||||
fi
|
||||
|
||||
if command -v xsel >/dev/null 2>&1 && [ -n "${DISPLAY:-}" ]; then
|
||||
exec xsel --clipboard --input
|
||||
fi
|
||||
|
||||
if command -v clip.exe >/dev/null 2>&1; then
|
||||
exec clip.exe
|
||||
fi
|
||||
|
||||
if command -v pbcopy >/dev/null 2>&1; then
|
||||
exec pbcopy
|
||||
fi
|
||||
|
||||
cat >/dev/null
|
||||
exit 1
|
||||
Reference in New Issue
Block a user