diff --git a/.gitignore b/.gitignore index 99668f4..78401d1 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,9 @@ config/vifm/Trash config/vifm/vifminfo.json config/lazygit/state.yml config/mpv/shaders +config/tmux/plugins/* +!config/tmux/plugins/.gitkeep + config/spicetify/Backup # nixos/hardware-configuration.nix diff --git a/config/nvim/lua/aleidk/plugins/git.lua b/config/nvim/lua/aleidk/plugins/git.lua index d252da8..cd068d4 100644 --- a/config/nvim/lua/aleidk/plugins/git.lua +++ b/config/nvim/lua/aleidk/plugins/git.lua @@ -67,6 +67,7 @@ return { disable_insert_on_commit = "auto", kind = "replace", disable_line_numbers = false, + console_timeout = 8000, -- commit_editor = { -- kind = "tab", -- }, diff --git a/config/tmux/plugins/.gitkeep b/config/tmux/plugins/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/config/tmux/tmux.conf b/config/tmux/tmux.conf index 90aa74e..4f0a60c 100644 --- a/config/tmux/tmux.conf +++ b/config/tmux/tmux.conf @@ -66,7 +66,13 @@ bind l next-window # set -g status-right '#(bartib current | sed -n 3p | awk \'{print $NF}\')' ## Plugins -run -b '~/.tmux/plugins/tpm/tpm' + +## Auto install plugins +if "test ! -d ~/.config/tmux/plugins/tpm" \ + "run 'git clone https://github.com/tmux-plugins/tpm ~/.config/tmux/plugins/tpm && ~/.config/tmux/plugins/tpm/bin/install_plugins'" + +set-environment -g TMUX_PLUGIN_MANAGER_PATH '~/.config/tmux/plugins/tpm' +run -b '~/.config/tmux/plugins/tpm/tpm' set -g @plugin 'catppuccin/tmux' # set -g @plugin 'rwxd/catppuccin-tmux' diff --git a/config/tmuxp/coding.yml b/config/tmuxp/coding.yml new file mode 100644 index 0000000..a4b6e02 --- /dev/null +++ b/config/tmuxp/coding.yml @@ -0,0 +1,7 @@ +session_name: shorthands +windows: + - window_name: main + layout: main-vertical + panes: + - shell_command: vi + - shell_command: pnpm dev diff --git a/config/tmuxp/persona-page.yaml b/config/tmuxp/persona-page.yaml new file mode 100644 index 0000000..d862f32 --- /dev/null +++ b/config/tmuxp/persona-page.yaml @@ -0,0 +1,8 @@ +session_name: persona-page +windows: + layout: main-vertical + panes: + - shell_command: + - nvim + focus: true + - pnpm diff --git a/config/zsh/functions/tmux.zsh b/config/zsh/functions/tmux.zsh index 4a6736d..114137b 100644 --- a/config/zsh/functions/tmux.zsh +++ b/config/zsh/functions/tmux.zsh @@ -27,3 +27,15 @@ tm() { fi session=$(tmux list-sessions -F "#{session_name}" 2>/dev/null | fzf --exit-0 --select-1) && tmux $change -t "$session" || echo "No sessions found." } + +ta() { + export START_DIRECTORY="$(z -l 2>&1 | fzf --height 40% --nth 2.. --reverse --inline-info +s --tac --query "${*##-* }" | sed 's/^[0-9,.]* *//')" + + if [[ -z START_DIRECTORY ]]; then + exit 0 + fi + + export SESSION_NAME="$(basename $START_DIRECTORY)" + + tmuxp load $(fd -e yml . ~/.config/tmuxp | fzf) +} diff --git a/exports/dnf.txt b/exports/dnf.txt index c33ab1e..00f7b88 100644 --- a/exports/dnf.txt +++ b/exports/dnf.txt @@ -3,6 +3,7 @@ dnf-plugin-system-upgrade duf exa fd-find +firefox-dev flatpak fzf gcc @@ -13,6 +14,7 @@ lazygit neovim nodejs papirus-icon-theme +python3-tmuxp remove-retired-packages ripgrep sd @@ -21,4 +23,3 @@ tealdeer tmux tree-sitter-cli zsh -firefox-dev diff --git a/setup/config b/setup/config index 2cd17af..ef88ca9 100755 --- a/setup/config +++ b/setup/config @@ -6,15 +6,14 @@ original_pwd="$(pwd)" cd "$DOTS/config" || exit readarray -t configs < <( - fd -d 1 \ - --exclude "*.old" \ - --exclude "create*" \ - --exclude "tmux" \ - --exclude "git" + fd -d 1 \ + --exclude "*.old" \ + --exclude "create*" \ + --exclude "git" ) for dot in "${configs[@]}"; do - symlink "$(pwd)/$dot" "${CONFIG}" + symlink "$(pwd)/$dot" "${CONFIG}" done cd "$original_pwd" || exit diff --git a/setup/tmux b/setup/tmux deleted file mode 100755 index b235b50..0000000 --- a/setup/tmux +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env bash - -echo -e "\n${BLD}${SUL}${GRN}Setting up tmux...${RST}\n" - -setup_zsh() { - symlink "$DOTS/config/tmux/tmux.conf" "$HOME"/.tmux.conf -} - -setup_zsh