From b14a1524ed23f9991c1474de1329e6d672cbb05c Mon Sep 17 00:00:00 2001 From: HerrCraziDev Date: Wed, 21 Jun 2023 10:34:04 +0200 Subject: [PATCH] usbipd init, tmux selection clear --- .termrc | 9 +++++++-- tmux/.tmux.conf | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.termrc b/.termrc index bee94cc..989ecae 100644 --- a/.termrc +++ b/.termrc @@ -39,8 +39,13 @@ if [ -n "$WSLENV" ] ; then source "$HOME/.usbipd" echo "Connecting serial port... (device $USB_SERIAL_HWID)" usbipd.exe wsl attach --hardware-id $USB_SERIAL_HWID - usbipd.exe wsl list - export _SERIAL_INIT + if [ $? -eq 0 ]; then + echo "Serial port connected" + usbipd.exe wsl list + export _SERIAL_INIT=1 + else + echo "Unable to connect serial port (device $USB_SERIAL_HWID)" + fi fi fi diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf index 54c6929..0ed2375 100644 --- a/tmux/.tmux.conf +++ b/tmux/.tmux.conf @@ -26,6 +26,7 @@ bind C-v paste-buffer bind -T copy-mode-vi Enter send -X copy-selection-no-clear \; send -X copy-pipe-and-cancel "xclip -i -sel c" \; display " [tmux] copied!" bind -T copy-mode-vi C-c send -X copy-selection-no-clear \; send -X copy-pipe-and-cancel "xclip -i -sel c" \; display " [tmux] copied!" bind -T copy-mode-vi y send -X copy-selection-no-clear \; send -X copy-pipe "xclip -i -sel c" \; display " [tmux] copied!" +bind -T copy-mode-vi c send -X clear-selection \; display " [tmux] Selection cleared" bind -T copy-mode-vi MouseDragEnd1Pane send -X copy-selection-no-clear bind -T copy-mode-vi DoubleClick1Pane select-pane \; send -X select-word bind -T copy-mode-vi TripleClick1Pane select-pane \; send -X select-line