summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.config/tmux/tmux.conf42
-rw-r--r--.zshrc6
-rwxr-xr-xscripts/truecolor-test.sh17
3 files changed, 37 insertions, 28 deletions
diff --git a/.config/tmux/tmux.conf b/.config/tmux/tmux.conf
index 97044fa..8b277f1 100644
--- a/.config/tmux/tmux.conf
+++ b/.config/tmux/tmux.conf
@@ -1,8 +1,3 @@
-# Fix colors, undercurl etc, this way pain to figure out
-set-option -as terminal-overrides ",xterm-256color:Tc"
-set -as terminal-overrides ',*:Setulc=\E[58::2::::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m'
-set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm'
-
# Lua-style indexing
set -g base-index 1
set -g pane-base-index 1
@@ -26,7 +21,7 @@ bind-key s choose-tree -ZsN
bind-key w choose-tree -ZwN
set -g mouse on
-bind-key r source-file ~/.tmux.conf
+bind-key r source-file ~/.config/tmux/tmux.conf
# Navigate panes with Prefix + HJKL
bind-key h select-pane -L
@@ -39,33 +34,24 @@ set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'tmux-plugins/tmux-yank'
-set -g @plugin 'catppuccin/tmux'
-
-# Catppuccin Settings
-set -g @catppuccin_window_left_separator ""
-set -g @catppuccin_window_right_separator " "
-set -g @catppuccin_window_middle_separator " █"
-set -g @catppuccin_window_number_position "right"
-
-set -g @catppuccin_window_default_fill "number"
-set -g @catppuccin_window_default_text "#W"
-
-set -g @catppuccin_window_current_fill "number"
-set -g @catppuccin_window_current_text "#W"
-
-set -g @catppuccin_status_modules_right "directory session"
-set -g @catppuccin_status_left_separator " "
-set -g @catppuccin_status_right_separator ""
-set -g @catppuccin_status_fill "icon"
-set -g @catppuccin_status_connect_separator "no"
-
-set -g @catppuccin_directory_text "#{pane_current_path}"
set -g @plugin 'omerxx/tmux-floax'
set -g @floax-bind '-n M-f'
+# Fix stupid catppuccin renaming windows to hostname for some reason
+set -g @catppuccin_window_text " #W "
+set -g @catppuccin_window_current_text " #W "
+
+set -g @catppuccin_flavor "mocha"
+set -g @catppuccin_window_status_style "basic"
+run ~/.config/tmux/plugins/catppuccin/tmux/catppuccin.tmux
+set -g status-right-length 100
+set -g status-left-length 100
+set -g status-left " "
+set -g status-right "#{E:@catppuccin_status_session}"
+
# Load TPM, must be the last line
if "test ! -d ~/.tmux/plugins/tpm" \
- "run 'git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm && ~/.tmux/plugins/tpm/bin/install_plugins'"
+ "run 'git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm && ~/.tmux/plugins/tpm/bin/install_plugins'"
run '~/.tmux/plugins/tpm/tpm'
diff --git a/.zshrc b/.zshrc
index d79268c..d251f83 100644
--- a/.zshrc
+++ b/.zshrc
@@ -102,6 +102,12 @@ if [ ! -f "$MARKER_FILE" ]; then
touch "$MARKER_FILE"
fi
+# Install catppuccin automatically if it's not installed already
+if [[ ! -d "$HOME/.config/tmux/plugins/catppuccin" ]]; then
+ mkdir -p $HOME/.config/tmux/plugins/catppuccin
+ git clone -b v2.1.2 https://github.com/catppuccin/tmux.git ~/.config/tmux/plugins/catppuccin/tmux
+fi
+
# Open tmux in default user session if it's not open
if [ -z "$TMUX" ]; then
tms $HOME
diff --git a/scripts/truecolor-test.sh b/scripts/truecolor-test.sh
new file mode 100755
index 0000000..3c65446
--- /dev/null
+++ b/scripts/truecolor-test.sh
@@ -0,0 +1,17 @@
+#!/usr/bin/env bash
+
+awk -v term_cols="${width:-$(tput cols || echo 80)}" -v term_lines="${height:-1}" 'BEGIN{
+ s="/\\";
+ total_cols=term_cols*term_lines;
+ for (colnum = 0; colnum<total_cols; colnum++) {
+ r = 255-(colnum*255/total_cols);
+ g = (colnum*510/total_cols);
+ b = (colnum*255/total_cols);
+ if (g>255) g = 510-g;
+ printf "\033[48;2;%d;%d;%dm", r,g,b;
+ printf "\033[38;2;%d;%d;%dm", 255-r,255-g,255-b;
+ printf "%s\033[0m", substr(s,colnum%2+1,1);
+ if (colnum%term_cols==term_cols) printf "\n";
+ }
+ printf "\n";
+}'