diff --git a/.aliases b/.aliases index 930fe6a..2d6a7d8 100644 --- a/.aliases +++ b/.aliases @@ -16,8 +16,8 @@ alias ntopw='speedometer -rx wlp0s20f3 -tx wlp0s20f3' alias ntopeth='speedometer -rx enp7s0 -tx enp7s0' alias svc='sudo systemctl' alias svcup='svc start' -alias scvdown='svc stop' -alias scvrs='svc restart' +alias svcdown='svc stop' +alias svcrs='svc restart' alias py='python3.8' alias pkgi='sudo dpkg -i' alias scr='screen -S dev' @@ -26,6 +26,8 @@ alias tmr='tmux attach' alias ll='ls -lah --color=auto' alias reload='source ~/.termrc' +alias ssj="ssh -J pi@bst1.chenco.dev" + #alias mc-install-plugin='echo "Installing $2"; echo "Done !"' alias cls='lxc ls -c ns4DSP' alias cll='lxc ls -c ns4dD' @@ -34,3 +36,8 @@ alias vls='lxc storage volume ls -c tnUcu chongoose' alias zfs='sudo zfs' alias zls='sudo zfs list' + +sm() { + tmux new-window -n serial:$(basename ${@:-1}) sudo picocom --baud 921600 --parity n --databits 8 --stopbits 1 --flow n --escape z $@ +} + diff --git a/.termrc b/.termrc index 4f220d6..989ecae 100644 --- a/.termrc +++ b/.termrc @@ -29,9 +29,23 @@ if [ -n "$WSLENV" ] ; then # Load SSH keychain /usr/bin/keychain -q --nogui $HOME/.ssh/id_rsa - source $HOME/.keychain/$HOST-sh + source "$HOME/.keychain/$HOST-sh" # Enable entr workaround for incomplete inotify support on WSL export ENTR_INOTIFY_WORKAROUND=1 + + # Connect serial console port if found + if [ -z "$_SERIAL_INIT" ] ; then + source "$HOME/.usbipd" + echo "Connecting serial port... (device $USB_SERIAL_HWID)" + usbipd.exe wsl attach --hardware-id $USB_SERIAL_HWID + 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 467f7d6..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 @@ -46,6 +47,9 @@ set -g display-panes-colour colour244 #set-option -g status-utf8 on set -g default-terminal "xterm-256color" +# Scrollback buffer +set -g history-limit 64000 + # Enable mouse integration set -g mouse on