From 2f9b498c0f8e7dd5055a8a2511553a81734c3cec Mon Sep 17 00:00:00 2001 From: Max Richter Date: Mon, 23 Aug 2021 14:05:39 +0200 Subject: [PATCH 1/3] feat: add tmux conf --- configs/.tmux.conf | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 configs/.tmux.conf diff --git a/configs/.tmux.conf b/configs/.tmux.conf new file mode 100644 index 0000000..52bc08a --- /dev/null +++ b/configs/.tmux.conf @@ -0,0 +1,30 @@ +# remap prefix from 'C-b' to 'C-a' +unbind C-b +set-option -g prefix C-a +bind-key C-a send-prefix + +# split panes using | and - +bind | split-window -h +bind - split-window -v +unbind '"' +unbind % + +# reload config file (change file location to your the tmux.conf you want to use) +bind r source-file ~/.tmux.conf + +# switch panes using Alt-arrow without prefix +bind -n M-Left select-pane -L +bind -n M-Right select-pane -R +bind -n M-Up select-pane -U +bind -n M-Down select-pane -D + +# Enable mouse mode (tmux 2.1 and above) +set -g mouse on + +# Add some plugins + +set -g @plugin 'tmux-plugins/tpm' +set -g @plugin 'tmux-plugins/tmux-sensible' +set -g @plugin 'dracula/tmux' + +run '~/.tmux/plugins/tpm/tpm' From a5e5181b939de4d813593b842609e3fda682d04c Mon Sep 17 00:00:00 2001 From: Max Richter Date: Mon, 23 Aug 2021 18:47:09 +0200 Subject: [PATCH 2/3] feat: update p10k config --- configs/.p10k.zsh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/configs/.p10k.zsh b/configs/.p10k.zsh index e77531f..80d1a38 100644 --- a/configs/.p10k.zsh +++ b/configs/.p10k.zsh @@ -1,7 +1,7 @@ -# Generated by Powerlevel10k configuration wizard on 2021-03-18 at 22:41 CET. -# Based on romkatv/powerlevel10k/config/p10k-pure.zsh, checksum 13301. -# Wizard options: nerdfont-complete + powerline, small icons, pure, rpromt, 1 line, -# compact, instant_prompt=verbose. +# Generated by Powerlevel10k configuration wizard on 2021-08-23 at 14:33 CEST. +# Based on romkatv/powerlevel10k/config/p10k-pure.zsh. +# Wizard options: nerdfont-complete + powerline, large icons, pure, snazzy, rpromt, +# 1 line, compact, instant_prompt=verbose. # Type `p10k configure` to generate another config. # # Config file for Powerlevel10k with the style of Pure (https://github.com/sindresorhus/pure). @@ -39,12 +39,12 @@ # Prompt colors. local grey='242' - local red='1' - local yellow='3' - local blue='4' - local magenta='5' - local cyan='6' - local white='7' + local red='#FF5C57' + local yellow='#F3F99D' + local blue='#57C7FF' + local magenta='#FF6AC1' + local cyan='#9AEDFE' + local white='#F1F1F0' # Left prompt segments. typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=( From 5842e96acd665d2d06eb1d2c566c9cf9e51582d2 Mon Sep 17 00:00:00 2001 From: Max Richter Date: Mon, 23 Aug 2021 18:47:23 +0200 Subject: [PATCH 3/3] feat: add aautostart tmux if available --- configs/.zshrc | 16 +++++++--------- setup.sh | 1 + 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/configs/.zshrc b/configs/.zshrc index a7bf6d0..c9a6407 100644 --- a/configs/.zshrc +++ b/configs/.zshrc @@ -5,13 +5,16 @@ source $HOME/.dotfiles/configs/zsh/update-repo.zsh if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" fi + ZSH_THEME="powerlevel10k/powerlevel10k" +ZSH_TMUX_AUTOSTART=true plugins=( git asdf docker - zsh-autosuggestions + tmux + zsh-autosuggestions ) eval `dircolors ~/.dircolors` @@ -69,15 +72,12 @@ fi #If fdfind is installed force fzf to use it if [ -s $(which fdfind) ]; then - - # Symlink fdfind to fd if not already symlinked - [[ ! -s $(which fd) ]] && ln -s $(which fdfind) ~/.local/bin/fd # Feed the output of fd into fzf - # fd --type f | fzf + # fdfind --type f | fzf # Setting fd as the default source for fzf - export FZF_DEFAULT_COMMAND='fd --type f' + export FZF_DEFAULT_COMMAND='fdfind --type f' # To apply the command to CTRL-T as well export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND" @@ -90,7 +90,5 @@ fi # uninstall by removing these lines [[ -f ~/.config/tabtab/zsh/__tabtab.zsh ]] && . ~/.config/tabtab/zsh/__tabtab.zsh || true -export PNPM_HOME="/home/jim/.local/share/pnpm" +export PNPM_HOME="$HOME/.local/share/pnpm" export PATH="$PNPM_HOME:$PATH" - -alias luamake=/home/jim/bin/lua-language-server/3rd/luamake/luamake diff --git a/setup.sh b/setup.sh index 3efb559..c7ab76f 100755 --- a/setup.sh +++ b/setup.sh @@ -116,6 +116,7 @@ echo "-- linking .dotfiles --" linkFile .bashrc linkFile .p10k.zsh linkFile .dircolors +linkFile .tmux.conf echo "-----------------------------------"