Add tmux installation script

This commit is contained in:
2026-04-16 22:52:16 +02:00
parent ace4b0c7f7
commit a2edbc33e7
2 changed files with 71 additions and 43 deletions
+34 -43
View File
@@ -3,6 +3,39 @@
#+PROPERTY: header-args :tangle ~/.config/tmux/tmux.conf
#+PROPERTY: header-args+ :comments both :mkdirp yes
* Tmux Install Script
:PROPERTIES:
:header-args:bash: :tangle scripts/install-tmux.sh :shebang "#!/bin/bash" :mkdirp yes
:END:
#+begin_src bash
set -euo pipefail
#+end_src
** Packages
#+begin_src bash
echo "==> Tmux packages"
paru -S --needed --noconfirm tmux
#+end_src
** Tangle Configuration
#+begin_src bash
echo "==> Tangling tmux.org"
emacsclient -e '(org-babel-tangle-file "/home/thomas/.config/literate-dotfiles/tmux.org")'
#+end_src
** Install TPM Plugins
#+begin_src bash
echo "==> Installing TPM plugins"
if [ ! -d ~/.config/tmux/plugins/tpm ]; then
git clone https://github.com/tmux-plugins/tpm ~/.config/tmux/plugins/tpm
fi
tmux source ~/.config/tmux/tmux.conf
#+end_src
* Line
#+begin_src conf
# Activate the status bar
@@ -206,52 +239,10 @@ set-window-option -g aggressive-resize
** Install plugins
#+BEGIN_SRC conf
set -g @plugin 'tmux-plugins/tpm'
# set -g @plugin 'tmux-plugins/tmux-sessionist'
# set -g @plugin 'tmux-plugins/tmux-resurrect'
# set -g @plugin 'tmux-plugins/tmux-continuum'
# set -g @plugin 'tmux-plugins/tmux-battery'
set -g @plugin 'nhdaly/tmux-better-mouse-mode'
set -g @plugin 'seebi/tmux-colors-solarized'
#+END_SRC
** Configuration
#+BEGIN_SRC conf
# =============================================================
# tmux-resurrect
# =============================================================
# for vim
set -g @resurrect-strategy-vim 'session'
# for neovim
set -g @resurrect-strategy-nvim 'session'
# Restoring pane contents
set -g @resurrect-capture-pane-contents 'on'
run-shell ~/.tmux/plugins/tmux-resurrect/resurrect.tmux
# =============================================================
# =============================================================
# tmux-continuum
# =============================================================
set -g @continuum-boot 'on'
set -g @continuum-boot-options 'iterm,fullscreen'
set -g @continuum-save-interval '15'
run-shell ~/.tmux/plugins/tmux-continuum/continuum.tmux
# =============================================================
# =============================================================
# tmux-battery
# =============================================================
set -g @batt_charged_icon "="
set -g @batt_charging_icon "+"
set -g @batt_discharging_icon "-"
set -g @batt_attached_icon "o"
# =============================================================
#+END_SRC
* Colors
#+BEGIN_SRC conf
set -g @colors-solarized 'light'
@@ -259,5 +250,5 @@ set -g @colors-solarized 'light'
* Initialize TMUX plugin manager
#+BEGIN_SRC conf
run '~/.tmux/plugins/tpm/tpm'
run '~/.config/tmux/plugins/tpm/tpm'
#+END_SRC