From 63d7830987e4cef628ef760828793f8ba037f559 Mon Sep 17 00:00:00 2001 From: Tobias Reisinger Date: Thu, 23 May 2024 19:48:30 +0200 Subject: [PATCH] Add tmux --- .bin/.e | 1 + .config/autoinstall.conf | 5 +++++ .config/env.d/20-files | 2 +- .config/env.d/99-local##hostname.portalo | 4 ++-- .config/home-manager/common.nix | 1 + .config/tmux/.gitignore | 1 + .config/tmux/emgauwa.conf | 7 +++++++ .config/tmux/tmux.conf | 18 ++++++++++++++++++ .config/zsh/.zshrc | 7 +++++-- 9 files changed, 41 insertions(+), 5 deletions(-) create mode 100644 .config/tmux/.gitignore create mode 100644 .config/tmux/emgauwa.conf create mode 100644 .config/tmux/tmux.conf diff --git a/.bin/.e b/.bin/.e index 3656465..235763c 100755 --- a/.bin/.e +++ b/.bin/.e @@ -24,6 +24,7 @@ declare -A mapper=( ["ssh"]="$HOME/.ssh/config" ["starship"]="$HOME/.config/starship.toml" ["sxhkd"]="$HOME/.config/sxhkd/sxhkdrc" + ["tmux"]="$HOME/.config/tmux/tmux.conf" ["vim"]="$HOME/.config/vim/vimrc" ["wakatime"]="$HOME/.config/wakatime/.wakatime.cfg##template" ["waybar"]="$HOME/.config/waybar/" diff --git a/.config/autoinstall.conf b/.config/autoinstall.conf index 05ccc70..037764e 100644 --- a/.config/autoinstall.conf +++ b/.config/autoinstall.conf @@ -10,6 +10,11 @@ AUTOINSTALL_ITEM_TARGET="$HOME/.config/nvim" AUTOINSTALL_ITEM_HOOK='[ -x "$(command -v nvim)" ] && nvim --headless +q' AUTOINSTALL_ITEM_GROUPS="base" +AUTOINSTALL_ITEM_TYPE="git" +AUTOINSTALL_ITEM_SOURCE="https://github.com/tmux-plugins/tpm" +AUTOINSTALL_ITEM_TARGET="$HOME/.tmux/plugins/tpm" +AUTOINSTALL_ITEM_GROUPS="base" + AUTOINSTALL_ITEM_TYPE="exe" AUTOINSTALL_ITEM_SOURCE="https://github.com/starship/starship/releases/download/v1.17.1/starship-x86_64-unknown-linux-gnu.tar.gz" AUTOINSTALL_ITEM_TARGET="starship" diff --git a/.config/env.d/20-files b/.config/env.d/20-files index 5f8142b..b244363 100755 --- a/.config/env.d/20-files +++ b/.config/env.d/20-files @@ -3,7 +3,7 @@ export KUBECONFIG="$HOME/.kube/config" export MAILCAPS="$XDG_CONFIG_HOME/mailcap/mailcaprc" -export MARKPATH="$XDG_CONFIG_HOME/zsh/jump_marks" +export MARKPATH="$XDG_CONFIG_HOME/jump_marks" export NOTMUCH_CONFIG="$XDG_CONFIG_HOME/notmuch/config" diff --git a/.config/env.d/99-local##hostname.portalo b/.config/env.d/99-local##hostname.portalo index ff522a2..e4b6f65 100755 --- a/.config/env.d/99-local##hostname.portalo +++ b/.config/env.d/99-local##hostname.portalo @@ -2,7 +2,7 @@ export AUTOSTART_DISPLAY="Hyprland" +export DUNST_MONITOR="$MONITOR_SECONDARY" + export MONITOR_PRIMARY="DP-1" export MONITOR_SECONDARY="HDMI-A-1" - -export DUNST_MONITOR="$MONITOR_SECONDARY" diff --git a/.config/home-manager/common.nix b/.config/home-manager/common.nix index 0c4381b..a70a227 100644 --- a/.config/home-manager/common.nix +++ b/.config/home-manager/common.nix @@ -35,6 +35,7 @@ rmtrash # rm wrapper to use trash shellcheck # tool for shell-syntax starship # shell prompt + tmux # terminal multiplexer tokei # project-language statistics trash-cli # trash utils unzip # unzip diff --git a/.config/tmux/.gitignore b/.config/tmux/.gitignore new file mode 100644 index 0000000..16873f6 --- /dev/null +++ b/.config/tmux/.gitignore @@ -0,0 +1 @@ +plugins/ diff --git a/.config/tmux/emgauwa.conf b/.config/tmux/emgauwa.conf new file mode 100644 index 0000000..1b909b8 --- /dev/null +++ b/.config/tmux/emgauwa.conf @@ -0,0 +1,7 @@ +neww -c ~/projects/emgauwa/workspace -n emgauwa + +splitw -c ~/projects/emgauwa/workspace/common -h -p 50 -t 0 +splitw -c ~/projects/emgauwa/workspace/controller -v -p 66 -t 1 +splitw -c ~/projects/emgauwa/workspace/core -v -p 50 -t 2 + +selectp -t 0 diff --git a/.config/tmux/tmux.conf b/.config/tmux/tmux.conf new file mode 100644 index 0000000..1bbee18 --- /dev/null +++ b/.config/tmux/tmux.conf @@ -0,0 +1,18 @@ +set -g default-terminal "xterm-256color" +set-option -ga terminal-overrides ",xterm-256color:Tc" +set -as terminal-features ",alacritty*:RGB" + +# List of plugins +set -g @plugin 'tmux-plugins/tpm' +set -g @plugin 'tmux-plugins/tmux-sensible' +set -g @plugin 'dracula/tmux' + +set -g @dracula-show-powerline true +set -g @dracula-show-left-icon shortname +set -g @dracula-plugins "cpu-usage ram-usage" + +# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) +run '~/.tmux/plugins/tpm/tpm' + +# Sessions +bind E source-file ~/.config/tmux/emgauwa.conf diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index 3131608..9df5331 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -1,5 +1,10 @@ source "$HOME/.config/environment" +if [ -x "$(command -v tmux)" ] && [ -z "$TMUX" ]; then + tmux + exit + fi + autoinstall git "https://github.com/ohmyzsh/ohmyzsh.git" "$ZSH" # Set name of the theme to load --- if set to "random", it will @@ -107,8 +112,6 @@ source "$HOME/.config/completionsrc" source "$HOME/.config/aliasrc" [ -x "$(command -v thefuck)" ] && eval $(thefuck --alias) -export MARKPATH="$HOME/.config/zsh/jump_marks" - setopt HIST_IGNORE_DUPS export SAVEHIST=1000000 export HISTSIZE=1000000