From 7f0ca310aa63d6a2575bfc67f22637c8560c2910 Mon Sep 17 00:00:00 2001 From: Shaun Reed Date: Sun, 20 Nov 2022 13:48:40 -0500 Subject: [PATCH] Update command aliases --- .bash_aliases | 20 ++++++++++---------- .tmux.conf | 5 +++++ .tmux/.tmux-gui.conf | 15 +++++++++++++++ README.md | 2 -- 4 files changed, 30 insertions(+), 12 deletions(-) diff --git a/.bash_aliases b/.bash_aliases index 794c495..c94a378 100644 --- a/.bash_aliases +++ b/.bash_aliases @@ -1,22 +1,22 @@ # For Rust stuff, uncomment this line #. "$HOME/.cargo/env" -alias kapp-git='git config --global user.name "Shaun Reed" && git config --global user.email "shaunrd0@gmail.com"' +alias ,git='git config --global user.name "Shaun Reed" && git config --global user.email "shaunrd0@gmail.com"' if [ -f /.dockerenv ]; then export DOT_PACKAGES='git stow vim tmux ranger clang wget curl' - alias kapp-update='apt update -y && apt upgrade -y && apt upgrade --fix-broken --fix-missing --auto-remove' - alias kapp-init='apt update -y && apt install $DOT_PACKAGES -y' - alias kapp-swap='swapoff -a && swapon -a' + alias ,update='apt update -y && apt upgrade -y && apt upgrade --fix-broken --fix-missing --auto-remove' + alias ,init='apt update -y && apt install $DOT_PACKAGES -y' + alias ,swap='swapoff -a && swapon -a' else export DOT_PACKAGES='git stow vim xsel xclip tmux ranger clang yakuake wget curl' - alias kapp-update='sudo apt update -y && sudo apt upgrade -y && sudo apt upgrade --fix-broken --fix-missing --auto-remove' - alias kapp-init='sudo apt update -y && sudo apt install $DOT_PACKAGES' + alias ,update='sudo apt update -y && sudo apt upgrade -y && sudo apt upgrade --fix-broken --fix-missing --auto-remove' + alias ,init='sudo apt update -y && sudo apt install $DOT_PACKAGES' # Clear kscreen cached settings - alias kapp-kscreen='rm -rf ~/.local/share/kscreen/*' + alias ,kscreen='rm -rf ~/.local/share/kscreen/*' # Restart plasmashell - alias kapp-plasmashell='sudo pkill plasmashell && plasmashell --replace &> /dev/null &' - alias kapp-swap='sudo swapoff -a && sudo swapon -a' - alias kapp-vbox="ps aux www |grep 'VBoxClient --draganddrop' | awk '{print $2}' | xargs kill" + alias ,plasmashell='sudo pkill plasmashell && plasmashell --replace &> /dev/null &' + alias ,swap='sudo swapoff -a && sudo swapon -a' + alias ,vbox="ps aux www |grep 'VBoxClient --draganddrop' | awk '{print $2}' | xargs kill" fi # Alias / export customizations diff --git a/.tmux.conf b/.tmux.conf index d6d7230..7c978fa 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -34,6 +34,11 @@ bind -T copy-mode TripleClick1Pane select-pane \; send -X select-line \; send bind -T copy-mode-vi TripleClick1Pane select-pane \; send -X select-line \; send -X copy-pipe-no-clear "xsel -i" bind -n TripleClick1Pane select-pane \; copy-mode -M \; send -X select-line \; send -X copy-pipe-no-clear "xsel -i" bind -n MouseDown2Pane run "tmux set-buffer -b primary_selection \"$(xsel -o)\"; tmux paste-buffer -b primary_selection; tmux delete-buffer -b primary_selection" +#set -g @plugin 'tmux-plugins/tpm' +#set -g @plugin 'tmux-plugins/tmux-yank' +#set -g @yank_action 'copy-pipe-no-clear' +#bind -T copy-mode C-c send -X copy-pipe-no-clear "xsel -i --clipboard" +#bind -T copy-mode-vi C-c send -X copy-pipe-no-clear "xsel -i --clipboard" set-option -s set-clipboard external bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xclip -selection clipboard -i" diff --git a/.tmux/.tmux-gui.conf b/.tmux/.tmux-gui.conf index 9e1f55c..afc9062 100644 --- a/.tmux/.tmux-gui.conf +++ b/.tmux/.tmux-gui.conf @@ -1,6 +1,21 @@ set -g status-left "#[fg=colour233,bg=colour100,bold] #S #[fg=colour100,bg=colour240,nobold]#[fg=colour233,bg=colour240] #(whoami) #[fg=colour240,bg=colour235]#[fg=colour240,bg=colour235] #(hostname) #[fg=colour235,bg=colour233]#[fg=colour240,bg=colour233]" set -g status-right "#[fg=colour235,bg=colour233,bold]#[fg=colour240,bg=colour235,nobold] %H:%M:%S #[fg=colour240,bg=colour235,bold]#[fg=colour233,bg=colour240,nobold] %d-%b-%y #[fg=colour100,bg=colour240,bold]#[fg=colour233,bg=colour100,bold] #(git -C #{pane_current_path} remote get-url origin | sed 's/.*[/]//' | sed 's/\.git//') " +# Settings for terminal text selection / copy options +# + Source: https://www.seanh.cc/2020/12/27/copy-and-paste-in-tmux/ +# + Depends: https://github.com/tmux-plugins/tmux-yank#linux +set -g mouse on +# These bindings are for X Windows only. If you're using a different +# window system you have to replace the `xsel` commands with something +# else. See https://github.com/tmux/tmux/wiki/Clipboard#available-tools +bind -T copy-mode DoubleClick1Pane select-pane \; send -X select-word \; send -X copy-pipe-no-clear "xsel -i" +bind -T copy-mode-vi DoubleClick1Pane select-pane \; send -X select-word \; send -X copy-pipe-no-clear "xsel -i" +bind -n DoubleClick1Pane select-pane \; copy-mode -M \; send -X select-word \; send -X copy-pipe-no-clear "xsel -i" +bind -T copy-mode TripleClick1Pane select-pane \; send -X select-line \; send -X copy-pipe-no-clear "xsel -i" +bind -T copy-mode-vi TripleClick1Pane select-pane \; send -X select-line \; send -X copy-pipe-no-clear "xsel -i" +bind -n TripleClick1Pane select-pane \; copy-mode -M \; send -X select-line \; send -X copy-pipe-no-clear "xsel -i" +bind -n MouseDown2Pane run "tmux set-buffer -b primary_selection \"$(xsel -o)\"; tmux paste-buffer -b primary_selection; tmux delete-buffer -b primary_selection" + # List of plugins and their settings set -g @plugin 'tmux-plugins/tpm' set -g @plugin 'nhdaly/tmux-better-mouse-mode' diff --git a/README.md b/README.md index 99b4e5f..b65a668 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,3 @@ -# Headless - Dotfiles configurations for headless Ubuntu 22.04 linux environments. Be sure to clone recursively if you want to grab updated plugins / submodules included. For example, using Pathogen with Vim to manage plugins requires that the plugin to be installed are cloned to the `~/.vim/bundle/` directory. Cloning recursively allows git to clone these same nested repositories/submodules within this directory so Pathogen can handle running the Vim plugins. Once installed, editing source code in vim supports features displayed in the screenshot below