From 5a4c1fa472607f6fcaa372b07f259078724bca5a Mon Sep 17 00:00:00 2001 From: Matthias Puchstein Date: Sat, 17 May 2025 16:44:12 +0200 Subject: [PATCH] added tmux --- .config/hypr/conf.d/autostart.conf | 1 + .config/nvim/lua/plugins/astrocore.lua | 2 - .config/nvim/lua/plugins/astrolsp.lua | 2 - .config/nvim/lua/plugins/user.lua | 2 +- .config/tmux/tmux.conf | 119 +++++++++++++++++++++++++ 5 files changed, 121 insertions(+), 5 deletions(-) create mode 100644 .config/tmux/tmux.conf diff --git a/.config/hypr/conf.d/autostart.conf b/.config/hypr/conf.d/autostart.conf index b8728c5..a3a227f 100644 --- a/.config/hypr/conf.d/autostart.conf +++ b/.config/hypr/conf.d/autostart.conf @@ -3,3 +3,4 @@ # and ~/.config/autostart exec-once = wl-paste --type text --watch cliphist store exec-once = wl-paste --type image --watch cliphist store +exec-once = wl-clip-persist --clipboard regular diff --git a/.config/nvim/lua/plugins/astrocore.lua b/.config/nvim/lua/plugins/astrocore.lua index 03d7441..85f94dc 100644 --- a/.config/nvim/lua/plugins/astrocore.lua +++ b/.config/nvim/lua/plugins/astrocore.lua @@ -1,5 +1,3 @@ -if true then return {} end -- WARN: REMOVE THIS LINE TO ACTIVATE THIS FILE - -- AstroCore provides a central place to modify mappings, vim options, autocommands, and more! -- Configuration documentation can be found with `:h astrocore` -- NOTE: We highly recommend setting up the Lua Language Server (`:LspInstall lua_ls`) diff --git a/.config/nvim/lua/plugins/astrolsp.lua b/.config/nvim/lua/plugins/astrolsp.lua index 720b9d3..0b59244 100644 --- a/.config/nvim/lua/plugins/astrolsp.lua +++ b/.config/nvim/lua/plugins/astrolsp.lua @@ -1,5 +1,3 @@ -if true then return {} end -- WARN: REMOVE THIS LINE TO ACTIVATE THIS FILE - -- AstroLSP allows you to customize the features in AstroNvim's LSP configuration engine -- Configuration documentation can be found with `:h astrolsp` -- NOTE: We highly recommend setting up the Lua Language Server (`:LspInstall lua_ls`) diff --git a/.config/nvim/lua/plugins/user.lua b/.config/nvim/lua/plugins/user.lua index a92db55..7a04221 100644 --- a/.config/nvim/lua/plugins/user.lua +++ b/.config/nvim/lua/plugins/user.lua @@ -41,7 +41,7 @@ return { }, -- You can disable default plugins as follows: - { "max397574/better-escape.nvim", enabled = false }, + --{ "max397574/better-escape.nvim", enabled = false }, -- You can also easily customize additional setup of plugins that is outside of the plugin's setup call { diff --git a/.config/tmux/tmux.conf b/.config/tmux/tmux.conf new file mode 100644 index 0000000..af8074e --- /dev/null +++ b/.config/tmux/tmux.conf @@ -0,0 +1,119 @@ +#### GENERAL SETTINGS #### +set -g default-terminal "xterm-256color" +set -ga terminal-overrides ",xterm-256color:Tc" # truecolor support +set -g history-limit 10000 +set -g mouse on + +# Renaming +set -wg automatic-rename on +set -g renumber-window on +set -g allow-rename off + +# Border status +setw -g pane-border-status top + +#### KEYBINDINGS #### +# Use Alt-a as prefix +unbind C-b +set -g prefix M-a +bind M-a send-prefix + +# Better split bindings +unbind '"' +unbind % +bind | split-window -h -c "#{pane_current_path}" +bind - split-window -v -c "#{pane_current_path}" +bind -n M-H split-window -h -b -c "#{pane_current_path}" +bind -n M-L split-window -h -c "#{pane_current_path}" +bind -n M-K split-window -v -b -c "#{pane_current_path}" +bind -n M-J split-window -v -c "#{pane_current_path}" + +# Vim-like pane movement +bind h select-pane -L +bind j select-pane -D +bind k select-pane -U +bind l select-pane -R +bind -n M-h select-pane -L +bind -n M-j select-pane -D +bind -n M-k select-pane -U +bind -n M-l select-pane -R + +# Alt+Tab to switch between last panes +bind -n M-Tab last-pane + +# Resize panes with vimkeys +bind -n C-M-h resize-pane -L 5 +bind -n C-M-j resize-pane -D 5 +bind -n C-M-k resize-pane -U 5 +bind -n C-M-l resize-pane -R 5 + +# Reload config +bind r source-file ~/.config/tmux/tmux.conf \; display-message "Config reloaded!" + +#### COPY/CLIPBOARD SUPPORT #### +setw -g mode-keys vi +bind-key -T copy-mode-vi y send -X copy-pipe-and-cancel "kitty +kitten clipboard" + + +# For TPM, instead use `run ~/.tmux/plugins/tmux/catppuccin.tmux` +run ~/.config/tmux/plugins/tmux/catppuccin.tmux + +# Catppuccin +set -g @catppuccin_flavor "mocha" +set -g @catppuccin_date_time_text '%d.%m.%y %H:%M' + +set -g @tmux-weather-location "Nospelt" + +# Windows +set -g @catppuccin_window_tabs_enabled "on" +set -g @catppuccin_window_number_position 'right' +set -g @catppuccin_window_status 'yes' +set -g @catppuccin_window_default_text '#W' +set -g @catppuccin_window_current_fill 'number' +set -g @catppuccin_window_current_text '#W' +set -g @catppuccin_window_current_color '#{E:@thm_surface_2}' +set -g @catppuccin_status_module_text_bg '#{E:@thm_mantle}' +set -g @catppuccin_window_status_style "slanted" + +# Status +set -g status-justify "absolute-centre" +set -g @catppuccin_status_background "none" + +# Left status +set -g status-left-length 100 +set -g status-left "" +set -ga status-left "#{E:@catppuccin_status_user}" +set -ga status-left "#{E:@catppuccin_status_session}" +set -ga status-left "#{E:@catppuccin_status_application}" +set -g @catppuccin_host "on" +set -g @catppuccin_user "on" + +# Right status +set -g status-right-length 100 +set -g status-right "" +set -agF status-right "#{E:@catppuccin_status_cpu}" +set -ag status-right "#{E:@catppuccin_status_uptime}" +if 'test -r /sys/class/power_supply/BAT*' { + set -agF status-right '#{E:@catppuccin_status_battery}' +} +set -agF status-right "#{E:@catppuccin_status_weather}" +set -ag status-right "#{E:@catppuccin_status_date_time}" +set -ag status-right "#{E:@catppuccin_status_host}" + + +#### TMUX PLUGIN MANAGER + PLUGINS #### +set -g @plugin 'tmux-plugins/tpm' +set -g @plugin 'tmux-plugins/tmux-sensible' +set -g @plugin 'tmux-plugins/tmux-resurrect' +set -g @plugin 'tmux-plugins/tmux-continuum' +set -g @plugin 'tmux-plugins/tmux-yank' + +# style +set -g @plugin 'catppuccin/tmux' +set -g @plugin 'joshmedeski/tmux-nerd-font-window-name' +set -g @plugin 'tmux-plugins/tmux-cpu' +set -g @plugin 'tmux-plugins/tmux-battery' +set -g @plugin 'xamut/tmux-weather' + +# Initialize TPM (must be last) +run '~/.config/tmux/plugins/tpm/tpm'