From ee86e98da9775a046b13c7eb20b3b5f2b37321a5 Mon Sep 17 00:00:00 2001 From: Jens Luedicke Date: Mon, 29 Sep 2025 17:21:55 +0200 Subject: [PATCH] Update i3 and tmux configurations * modified: alacritty/alacritty.toml * modified: i3/config * modified: tmux/tmux.conf --- alacritty/alacritty.toml | 3 +- i3/config | 61 ++++++++++++++++++++++++++++- tmux/tmux.conf | 83 +++++++++++++++++++++++++++++++--------- 3 files changed, 125 insertions(+), 22 deletions(-) diff --git a/alacritty/alacritty.toml b/alacritty/alacritty.toml index a5563a5..e3465e9 100644 --- a/alacritty/alacritty.toml +++ b/alacritty/alacritty.toml @@ -2,7 +2,7 @@ [window] padding = { x = 2, y = 2 } decorations = "Full" -opacity = 0.90 +opacity = 0.75 startup_mode = "Windowed" dimensions = { columns = 140, lines = 45 } option_as_alt = "Both" @@ -169,4 +169,3 @@ blue = '#99ace5' magenta = '#d694d0' cyan = '#64becd' white = '#eef1f8' - diff --git a/i3/config b/i3/config index 127c3eb..fce3b99 100644 --- a/i3/config +++ b/i3/config @@ -11,6 +11,15 @@ set $mod Mod4 +# Color scheme for window borders (matches Root Loops theme) +# class border backgr. text indicator child_border +client.focused #7f95db #7f95db #ffffff #c877c1 #7f95db +client.focused_inactive #424f7a #424f7a #acb8dc #424f7a #424f7a +client.unfocused #1a2137 #1a2137 #888888 #1a2137 #1a2137 +client.urgent #d77c6e #d77c6e #ffffff #e4978a #d77c6e +client.placeholder #050812 #050812 #dde2f2 #050812 #050812 +client.background #050812 + # Font for window titles. Will also be used by the bar unless a different font # is used in the bar {} block below. font pango:monospace 8 @@ -37,6 +46,35 @@ exec --no-startup-id nm-applet # Start picom compositor for transparency effects exec --no-startup-id picom -b +# Gaps configuration (requires i3-gaps) +gaps inner 10 +gaps outer 5 +smart_gaps on + +# Border styles for clean look +default_border pixel 2 +default_floating_border pixel 2 +for_window [class=".*"] border pixel 2 + +# Window transparency rules (handled by picom instead) +# for_window [class="Alacritty"] exec --no-startup-id picomm-trans -c 0.9 +# for_window [class="rofi"] exec --no-startup-id picom-trans -c 0.85 + +# Floating window rules for better window management +for_window [window_role="pop-up"] floating enable +for_window [window_role="task_dialog"] floating enable +for_window [class="Pavucontrol"] floating enable, resize set 800 600 + +# Focus behavior and mouse settings +focus_follows_mouse yes +mouse_warping output + +# Workspace back-and-forth navigation +workspace_auto_back_and_forth yes + +# Hide borders intelligently +hide_edge_borders smart + # Use pactl to adjust volume in PulseAudio. set $refresh_i3status killall -SIGUSR1 i3status bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status @@ -67,7 +105,27 @@ bindsym $mod+Shift+q kill # There also is i3-dmenu-desktop which only displays applications shipping a # .desktop file. It is a wrapper around dmenu, so you need that installed. # bindcode $mod+40 exec --no-startup-id i3-dmenu-desktop -bindsym $mod+d exec rofi -show run + +# OLD ROFI CONFIG (commented out to use exek instead) +# bindsym $mod+d exec --no-startup-id rofi -show drun -show-icons + +# EXEK LAUNCHER - Fast TUI application launcher with fuzzy matching +# Launch with Super+d (replaces rofi) +bindsym $mod+d exec --no-startup-id $HOME/.cargo/bin/alacritty --class exek-launcher -e /usr/local/bin/exek + +# Window rules for exek launcher +for_window [class="exek-launcher"] floating enable +for_window [class="exek-launcher"] resize set 900 500 +for_window [class="exek-launcher"] move position center +for_window [class="exek-launcher"] border pixel 3 + +# Optional: Scratchpad launcher for quick access with Super+minus +bindsym $mod+Shift+d exec --no-startup-id $HOME/.cargo/bin/alacritty --class exek-scratchpad -e /usr/local/bin/exek +for_window [class="exek-scratchpad"] move scratchpad, resize set 900 500 +bindsym $mod+minus [class="exek-scratchpad"] scratchpad show, move position center + +# Keep rofi for window switching (works well for this) +bindsym $mod+Tab exec rofi -show window # Screenshot bindings bindsym Print exec --no-startup-id $HOME/.local/bin/screenshot.sh full @@ -249,4 +307,3 @@ workspace $ws9 output DVI-I-1-1 workspace $ws10 output DVI-I-1-1 # Fallback for any monitor if specific ones are disconnected (removed duplicates) - diff --git a/tmux/tmux.conf b/tmux/tmux.conf index ad6f611..3d6dcea 100644 --- a/tmux/tmux.conf +++ b/tmux/tmux.conf @@ -53,35 +53,65 @@ bind -r C-l select-window -t :+ # Reload config file bind r source-file ~/.config/tmux/tmux.conf \; display "Config reloaded!" +# Screenshot bindings +bind C-s run-shell "tmux capture-pane -peS - > ~/tmux-screenshot-$(date +%Y%m%d-%H%M%S).txt && tmux display-message 'Screenshot saved to ~/tmux-screenshot-*.txt'" +bind C-S run-shell "tmux capture-pane -peS - -e | ansi2html > ~/tmux-screenshot-$(date +%Y%m%d-%H%M%S).html && tmux display-message 'HTML screenshot saved'" + # Enable vi mode in copy mode setw -g mode-keys vi +# Enable word-wise jumping with Ctrl+Left/Right +bind -n C-Left send-keys M-b +bind -n C-Right send-keys M-f + +# Enable word-wise selection with Ctrl+Shift+Left/Right +bind -n C-S-Left send-keys M-B +bind -n C-S-Right send-keys M-F + # Copy mode bindings bind Enter copy-mode bind -T copy-mode-vi v send-keys -X begin-selection -bind -T copy-mode-vi y send-keys -X copy-selection-and-cancel +bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "xclip -selection clipboard -i -r" +bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xclip -selection clipboard -i -r" bind -T copy-mode-vi Escape send-keys -X cancel -# Status bar customization +# Strip trailing newlines when copying with mouse +set -s set-clipboard off + +# Status bar customization - Root Loops themed set -g status-position bottom -set -g status-style 'bg=colour235 fg=colour137' -set -g status-left '#[fg=colour233,bg=colour245,bold] #S ' -set -g status-right '#[fg=colour233,bg=colour241,bold] %d/%m #[fg=colour233,bg=colour245,bold] %H:%M:%S ' +set -g status-style 'bg=#1a2137 fg=#acb8dc' +set -g status-left '#[fg=#050812,bg=#7f95db,bold] #S #[fg=#7f95db,bg=#1a2137]' +set -g status-right '#[fg=#424f7a,bg=#1a2137]#[fg=#acb8dc,bg=#424f7a] %d/%m #[fg=#66ab75,bg=#424f7a]#[fg=#050812,bg=#66ab75,bold] %H:%M ' set -g status-right-length 50 -set -g status-left-length 20 +set -g status-left-length 30 -# Window status -setw -g window-status-current-style 'fg=colour81 bg=colour238 bold' -setw -g window-status-current-format ' #I#[fg=colour250]:#[fg=colour255]#W#[fg=colour50]#F ' -setw -g window-status-style 'fg=colour138 bg=colour235' -setw -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F ' +# Window status - Root Loops themed +setw -g window-status-current-style 'fg=#050812 bg=#c877c1 bold' +setw -g window-status-current-format '#[fg=#1a2137,bg=#c877c1]#[fg=#050812] #I #W #[fg=#c877c1,bg=#1a2137]' +setw -g window-status-style 'fg=#acb8dc bg=#1a2137' +setw -g window-status-format ' #I #W ' +setw -g window-status-separator '' -# Pane borders -set -g pane-border-style 'fg=colour238' -set -g pane-active-border-style 'fg=colour51' +# Pane borders - Root Loops themed +set -g pane-border-style 'fg=#424f7a bg=#050812' +set -g pane-active-border-style 'fg=#7f95db bg=#050812' -# Messages -set -g message-style 'fg=colour232 bg=colour166 bold' +# Messages - Root Loops themed +set -g message-style 'fg=#050812 bg=#b0964e bold' +set -g message-command-style 'fg=#050812 bg=#51a7b6' + +# Mode colors (selection) +set -g mode-style 'fg=#050812 bg=#c877c1' + +# Clock mode +set -g clock-mode-colour '#7f95db' +set -g clock-mode-style 24 + +# Copy mode colors +set -g copy-mode-match-style 'fg=#050812 bg=#d77c6e bold' +set -g copy-mode-current-match-style 'fg=#050812 bg=#66ab75 bold' +set -g copy-mode-mark-style 'fg=#050812 bg=#b0964e bold' # Activity monitoring setw -g monitor-activity on @@ -122,5 +152,22 @@ bind p display-popup -E "tmux list-windows -F '#{window_index}: #{window_name}' # Break pane into new window bind B break-pane -d -# Comprehensive tmux operations menu with fzf -bind Space display-popup -E -w 80% -h 80% "bash ~/.config/tmux/tmux-fzf-menu.sh --menu" \ No newline at end of file +# OLD FZF MENU (commented out to use exek launcher on Space) +# bind Space display-popup -E -w 80% -h 80% "bash ~/.config/tmux/tmux-fzf-menu.sh --menu" + +# EXEK LAUNCHER - Fast TUI application launcher with fuzzy matching +# Launch with prefix + Space in a popup (replaces fzf menu) +bind Space display-popup -E -w 80% -h 60% '/usr/local/bin/exek' + +# Alternative exek bindings: +# Launch in new window with prefix + o +bind o new-window -n launcher '/usr/local/bin/exek' + +# Launch in popup with prefix + p (smaller size) +bind P display-popup -E -w 70% -h 50% '/usr/local/bin/exek' + +# Quick launcher with Alt+Space (no prefix needed) +bind -n M-Space display-popup -E -w 80% -h 60% '/usr/local/bin/exek' + +# Keep the original tmux-fzf-menu on prefix + M for tmux operations +bind M display-popup -E -w 80% -h 80% "bash ~/.config/tmux/tmux-fzf-menu.sh --menu" \ No newline at end of file