added config folder

This commit is contained in:
Matthieu Fortin 2024-09-07 11:44:31 -04:00
parent 74e9953070
commit 8272dd46a1
17 changed files with 856 additions and 0 deletions

View file

@ -0,0 +1,2 @@
source "$HOME/.atuin/bin/env.fish"

231
i3/.config/i3/config Normal file
View file

@ -0,0 +1,231 @@
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
for_window [class="^.*"] border pixel 1
set $mod Mod4
# set $mod Mod1
exec --no-startup-id picom
exec --no-startup-id feh --bg-scale ~/backgrounds/nice-blue-background.png
exec --no-startup-id xrdb -merge ~/.Xresources
exec_always --no-startup-id setxkbmap -option ctrl:nocaps
# kill any hanging polybar processes
exec_always --no-startup-id killall polybar
exec_always --no-startup-id ~/.config/polybar/launch_polybar.sh
bindsym Print exec maim "/home/$USER/Pictures/$(date).jpg"
bindsym $mod+Print exec maim --window $(xdotool getactivewindow) "/home/$USER/Pictures/$(date).jpg"
bindsym Shift+Print exec maim --select "/home/$USER/Pictures/$(date).jpg"
## Clipboard Screenshots
bindsym Ctrl+Print exec maim | xclip -selection clipboard -t image/png
bindsym Ctrl+$mod+Print exec maim --window $(xdotool getactivewindow) | xclip -selection clipboard -t image/png
bindsym Ctrl+Shift+Print exec maim --select | xclip -selection clipboard -t image/png
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
font pango:MesloLGS Nerd Font Mono Bold 14
# This font is widely installed, provides lots of unicode glyphs, right-to-left
# text rendering and scalability on retina/hidpi displays (thanks to pango).
#font pango:DejaVu Sans Mono 8
# Start XDG autostart .desktop files using dex. See also
# https://wiki.archlinux.org/index.php/XDG_Autostart
exec --no-startup-id dex --autostart --environment i3
# The combination of xss-lock, nm-applet and pactl is a popular choice, so
# they are included here as an example. Modify as you see fit.
# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the
# screen before suspend. Use loginctl lock-session to lock your screen.
exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork
# NetworkManager is the most popular way to manage wireless networks on Linux,
# and nm-applet is a desktop environment-independent system tray GUI for it.
exec --no-startup-id nm-applet
# 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
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status
bindsym XF86MonBrightnessUp exec --no-startup-id brightnessctl set +5%
bindsym XF86MonBrightnessDown exec --no-startup-id brightnessctl set 5%-
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# start a terminal
bindsym $mod+Return exec wezterm
# kill focused window
bindsym $mod+Shift+q kill
# start rofi (a program launcher)
bindsym $mod+d exec --no-startup-id rofi -show drun
bindsym $mod+space exec --no-startup-id rofi -show combi
bindsym $mod+Tab exec --no-startup-id rofi -show window
# change focus
bindsym $mod+h focus left
bindsym $mod+j focus down
bindsym $mod+k focus up
bindsym $mod+l focus right
# alternatively, you can use the cursor keys:
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# move focused window
bindsym $mod+Shift+h move left
bindsym $mod+Shift+j move down
bindsym $mod+Shift+k move up
bindsym $mod+Shift+l move right
# alternatively, you can use the cursor keys:
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen toggle
# change container layout (stacked, tabbed, toggle split)
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
# toggle tiling / floating
bindsym $mod+Shift+space floating toggle
# focus the parent container
bindsym $mod+a focus parent
# focus the child container
#bindsym $mod+d focus child
# Define names for default workspaces for which we configure key bindings later on.
# We use variables to avoid repeating the names in multiple places.
set $ws1 "1"
set $ws2 "2"
set $ws3 "3"
set $ws4 "4"
set $ws5 "5"
set $ws6 "6"
set $ws7 "7"
set $ws8 "8"
set $ws9 "9"
set $ws10 "10"
# switch to workspace
bindsym $mod+1 workspace number $ws1
bindsym $mod+2 workspace number $ws2
bindsym $mod+3 workspace number $ws3
bindsym $mod+4 workspace number $ws4
bindsym $mod+5 workspace number $ws5
bindsym $mod+6 workspace number $ws6
bindsym $mod+7 workspace number $ws7
bindsym $mod+8 workspace number $ws8
bindsym $mod+9 workspace number $ws9
bindsym $mod+0 workspace number $ws10
# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace number $ws1
bindsym $mod+Shift+2 move container to workspace number $ws2
bindsym $mod+Shift+3 move container to workspace number $ws3
bindsym $mod+Shift+4 move container to workspace number $ws4
bindsym $mod+Shift+5 move container to workspace number $ws5
bindsym $mod+Shift+6 move container to workspace number $ws6
bindsym $mod+Shift+7 move container to workspace number $ws7
bindsym $mod+Shift+8 move container to workspace number $ws8
bindsym $mod+Shift+9 move container to workspace number $ws9
bindsym $mod+Shift+0 move container to workspace number $ws10
# reload the configuration file
bindsym $mod+Shift+c reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $mod+Shift+r restart
# exit i3 (logs you out of your X session)
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'"
# resize window (you can also use the mouse for that)
mode "resize" {
# These bindings trigger as soon as you enter the resize mode
# Pressing left will shrink the windows width.
# Pressing right will grow the windows width.
# Pressing up will shrink the windows height.
# Pressing down will grow the windows height.
bindsym j resize shrink width 10 px or 10 ppt
bindsym k resize grow height 10 px or 10 ppt
bindsym l resize shrink height 10 px or 10 ppt
bindsym semicolon resize grow width 10 px or 10 ppt
# same bindings, but for the arrow keys
bindsym Left resize shrink width 10 px or 10 ppt
bindsym Down resize grow height 10 px or 10 ppt
bindsym Up resize shrink height 10 px or 10 ppt
bindsym Right resize grow width 10 px or 10 ppt
# back to normal: Enter or Escape or $mod+r
bindsym Return mode "default"
bindsym Escape mode "default"
bindsym $mod+r mode "default"
}
bindsym $mod+r mode "resize"
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
set $rosewater #f5e0dc
set $flamingo #f2cdcd
set $pink #f5c2e7
set $mauve #cba6f7
set $red #f38ba8
set $maroon #eba0ac
set $peach #fab387
set $yellow #f9e2af
set $green #a6e3a1
set $teal #94e2d5
set $sky #89dceb
set $sapphire #74c7ec
set $blue #89b4fa
set $lavender #b4befe
set $text #cdd6f4
set $subtext1 #bac2de
set $subtext0 #a6adc8
set $overlay2 #9399b2
set $overlay1 #7f849c
set $overlay0 #6c7086
set $surface2 #585b70
set $surface1 #45475a
set $surface0 #313244
set $base #1e1e2e
set $mantle #181825
set $crust #11111b
# target title bg text indicator border
client.focused $mantle $mauve $mantle $rosewater $mauve
client.focused_inactive $overlay0 $base $text $rosewater $overlay0
client.unfocused $overlay0 $base $text $rosewater $overlay0
client.urgent $peach $base $peach $overlay0 $peach
client.placeholder $overlay0 $base $text $overlay0 $overlay0
client.background $base

View file

View file

@ -0,0 +1,8 @@
backend = "glx";
vsync = true;
glx-use-copysubbuffer-mesa = true;
glx-copy-from-front = true;
glx-swap-method = 2;
xrender-sync = true;
xrender-sync-fence = true;

View file

@ -0,0 +1,235 @@
[colors]
base = #1e1e2e
mantle = #181825
crust = #11111b
text = #cdd6f4
subtext0 = #a6adc8
subtext1 = #bac2de
surface0 = #313244
surface1 = #45475a
surface2 = #585b70
overlay0 = #6c7086
overlay1 = #7f849c
overlay2 = #9399b2
blue = #89b4fa
lavender = #b4befe
sapphire = #74c7ec
sky = #89dceb
teal = #94e2d5
green = #a6e3a1
yellow = #f9e2af
peach = #fab387
maroon = #eba0ac
red = #f38ba8
mauve = #cba6f7
pink = #f5c2e7
flamingo = #f2cdcd
rosewater = #f5e0dc
transparent = #FF00000
;==========================================================
;
;
; ██████╗ ██████╗ ██╗ ██╗ ██╗██████╗ █████╗ ██████╗
; ██╔══██╗██╔═══██╗██║ ╚██╗ ██╔╝██╔══██╗██╔══██╗██╔══██╗
; ██████╔╝██║ ██║██║ ╚████╔╝ ██████╔╝███████║██████╔╝
; ██╔═══╝ ██║ ██║██║ ╚██╔╝ ██╔══██╗██╔══██║██╔══██╗
; ██║ ╚██████╔╝███████╗██║ ██████╔╝██║ ██║██║ ██║
; ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝
;
;
; To learn more about how to configure Polybar
; go to https://github.com/polybar/polybar
;
; The README contains a lot of information
;
;==========================================================
[colors]
background = ${colors.base}
background-alt = ${colors.blue}
foreground = ${colors.text}
primary = ${colors.mauve}
secondary = ${colors.mantle}
alert = ${colors.red}
disabled = ${colors.subtext1}
[bar/toph]
monitor = ${env:MONITOR:}
width = 100%
height = 28pt
radius = 0
; dpi = 96
background = ${colors.background}
foreground = ${colors.foreground}
bottom = true
line-size = 6pt
#border-size = 4pt
border-color = #00000000
padding-left = 0
padding-right = 1
module-margin = 1
separator = |
separator-foreground = ${colors.flamingo}
font-0 = MesloLGS Nerd Font Mono:size=14;6
modules-left = xworkspaces xwindow
modules-right = pulseaudio battery memory cpu wlan date
cursor-click = pointer
cursor-scroll = ns-resize
enable-ipc = true
; wm-restack = generic
; wm-restack = bspwm
; wm-restack = i3
; override-redirect = true
[module/systray]
type = internal/tray
format-margin = 8pt
tray-spacing = 16pt
[module/xworkspaces]
type = internal/xworkspaces
label-active = %name%
label-active-background = ${colors.mauve}
label-active-foreground = ${colors.crust}
label-active-underline= ${colors.lauve}
label-active-padding = 1
label-occupied = %name%
label-occupied-padding = 1
label-urgent = %name%
label-urgent-background = ${colors.alert}
label-urgent-padding = 1
label-empty = %name%
label-empty-foreground = ${colors.disabled}
label-empty-padding = 1
[module/xwindow]
type = internal/xwindow
label = %title:0:60:...%
[module/filesystem]
type = internal/fs
interval = 25
mount-0 = /
label-mounted = %{F#F0C674}%mountpoint%%{F-} %percentage_used%%
label-unmounted = %mountpoint% not mounted
label-unmounted-foreground = ${colors.disabled}
[module/pulseaudio]
type = internal/pulseaudio
format-volume-prefix = "VOL "
format-volume-prefix-foreground = ${colors.primary}
format-volume = <label-volume>
label-volume = %percentage%%
label-muted = muted
label-muted-foreground = ${colors.disabled}
[module/xkeyboard]
type = internal/xkeyboard
blacklist-0 = num lock
label-layout = %layout%
label-layout-foreground = ${colors.primary}
label-indicator-padding = 2
label-indicator-margin = 1
label-indicator-foreground = ${colors.background}
label-indicator-background = ${colors.secondary}
[module/memory]
type = internal/memory
interval = 2
format-prefix = "RAM "
format-prefix-foreground = ${colors.primary}
label = %percentage_used:2%%
[module/cpu]
type = internal/cpu
interval = 2
format-prefix = "CPU "
format-prefix-foreground = ${colors.primary}
label = %percentage:2%%
[module/battery]
type = internal/battery
format-prefix = "BAT "
format-prefix-foreground = ${colors.primary}
full-at = 99
format-charging = <animation-charging> <label-charging>
animation-charging-0 =
animation-charging-1 =
animation-charging-2 =
animation-charging-3 =
animation-charging-4 =
; Framerate in milliseconds
animation-charging-framerate = 750
animation-charging-foreground = ${colors.peach}
format-discharging = <ramp-capacity> <label-discharging>
ramp-capacity-0 =
ramp-capacity-1 =
ramp-capacity-2 =
ramp-capacity-3 =
ramp-capacity-4 =
low-at = 5
battery = BAT1
adapter = ACAD
poll-interval = 5
[network-base]
type = internal/network
interval = 5
format-connected = <label-connected>
format-disconnected = <label-disconnected>
label-disconnected = %{F#F0C674}%ifname%%{F#707880} disconnected
[module/wlan]
inherit = network-base
interface-type = wireless
label-connected = %{F#F0C674}%ifname%%{F-} %essid%
[module/eth]
inherit = network-base
interface-type = wired
label-connected = %{F#F0C674}%ifname%%{F-} %local_ip%
[module/date]
type = internal/date
interval = 1
date = %H:%M
date-alt = %Y-%m-%d %H:%M:%S
label = %date%
label-foreground = ${colors.primary}
[settings]
screenchange-reload = true
pseudo-transparency = true
; vim:ft=dosini

View file

@ -0,0 +1,7 @@
if type "xrandr"; then
for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do
MONITOR=$m polybar --reload toph &
done
else
polybar --reload toph &
fi

View file

@ -0,0 +1,111 @@
* {
bg-col: #1e1e2e;
bg-col-light: #1e1e2e;
border-col: #1e1e2e;
selected-col: #1e1e2e;
blue: #89b4fa;
fg-col: #cdd6f4;
fg-col2: #f38ba8;
grey: #6c7086;
width: 600;
font: "JetBrainsMono Nerd Font 14";
}
element-text, element-icon , mode-switcher {
background-color: inherit;
text-color: inherit;
}
window {
height: 360px;
border: 3px;
border-color: @border-col;
background-color: @bg-col;
}
mainbox {
background-color: @bg-col;
}
inputbar {
children: [prompt,entry];
background-color: @bg-col;
border-radius: 5px;
padding: 2px;
}
prompt {
background-color: @blue;
padding: 6px;
text-color: @bg-col;
border-radius: 3px;
margin: 20px 0px 0px 20px;
}
textbox-prompt-colon {
expand: false;
str: ":";
}
entry {
padding: 6px;
margin: 20px 0px 0px 10px;
text-color: @fg-col;
background-color: @bg-col;
}
listview {
border: 0px 0px 0px;
padding: 6px 0px 0px;
margin: 10px 0px 0px 20px;
columns: 2;
lines: 5;
background-color: @bg-col;
}
element {
padding: 5px;
background-color: @bg-col;
text-color: @fg-col ;
}
element-icon {
size: 25px;
}
element selected {
background-color: @selected-col ;
text-color: @fg-col2 ;
}
mode-switcher {
spacing: 0;
}
button {
padding: 10px;
background-color: @bg-col-light;
text-color: @grey;
vertical-align: 0.5;
horizontal-align: 0.5;
}
button selected {
background-color: @bg-col;
text-color: @blue;
}
message {
background-color: @bg-col-light;
margin: 2px;
padding: 2px;
border-radius: 5px;
}
textbox {
padding: 6px;
margin: 20px 0px 0px 20px;
text-color: @blue;
background-color: @bg-col-light;
}

View file

@ -0,0 +1,16 @@
configuration{
modi: "run,window,combi";
icon-theme: "Oranchelo";
show-icons: true;
terminal: "wezterm";
drun-display-format: "{icon} {name}";
location: 0;
disable-history: false;
hide-scrollbar: true;
display-combi: " 🖥️ All ";
display-run: " 🏃 Run ";
display-window: " 🪟 Window";
sidebar-mode: true;
}
@theme "catppuccin-mocha"

@ -0,0 +1 @@
Subproject commit b4e0715356f820fc72ea8e8baf34f0f60e891718

@ -0,0 +1 @@
Subproject commit 51e251321fb5011093c683acfde8bb5389a02139

@ -0,0 +1 @@
Subproject commit e7cd05facc22c18fbab3f718d8ecd6494538fe38

@ -0,0 +1 @@
Subproject commit 25cb91f42d020f675bb0a2ce3fbd3a5d96119efa

@ -0,0 +1 @@
Subproject commit acfd36e4fcba99f8310a7dfb432111c242fe7392

@ -0,0 +1 @@
Subproject commit 99469c4a9b1ccf77fade25842dc7bafbc8ce9946

@ -0,0 +1 @@
Subproject commit 5b3c701686fb4e6629c100ed32e827edf8dad01e

181
tmux/.config/tmux/tmux.conf Normal file
View file

@ -0,0 +1,181 @@
# GENERAL SETTINGS
set -g default-terminal "screen-256color" # 256 color
set -sa terminal-features ",*256col*:RGB" # True color support
set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm' # Undercurl support
set -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m' # Underscore colors
set -sg escape-time 0 # Time for tmux to wait for key sequence
set -g history-limit 50000 # Maximum number of lines held in window history
set -s buffer-limit 20 # Number of buffers, older than limit buffer will be removed
set -g display-time 1500 # Time for which status line messages and indicators are displayed in miliseconds, 0 means diplay until a key is pressed
setw -g remain-on-exit off # Destroy window when program exits
set -g repeat-time 500 # Typing command without pressing prefix key again in the specified time in miliseconds
setw -g automatic-rename on # Automatic window renaming
setw -g automatic-rename-format '#{pane_current_command}' # Format of automatic window renaming
setw -g allow-rename off # Allow programs to change the window name
setw -g xterm-keys on # Xterm style function key sequences
set -g mouse on # Enable mouse support
set -g status-keys vi # Use vi style keybindings in command prompt
setw -g mode-keys vi # Use vi style keybindings in copy mode
set -g base-index 1 # Starting index for new window
set -g pane-base-index 1 # Starting index for new pane
setw -g aggressive-resize on # Fix from a smaller client issue
# KEYBINDING SETTINGS
# Unbind the default key bindings
unbind C-b # send-prefix
unbind '"' # split-window
unbind '$' # command-prompt -I'#S' \"rename-session -- '%%'\"
unbind % # split-window -h
unbind & # confirm-before -p\"kill-window #W? (y/n)\" kill-window
unbind , # command-prompt -I'#W' \"rename-window -- '%%'\"
unbind - # delete-buffer
unbind . # command-prompt \"move-window -t '%%'\"
unbind \; # last-pane
unbind = # choose-buffer -Z
unbind E # select-layout -E
unbind L # switch-client -l
unbind M # select-pane -M
unbind [ # copy-mode
unbind ] # paste-buffer
unbind f # command-prompt \"find-window -Z -- '%%'\"
unbind l # last-window
unbind n # next-window
unbind o # select-pane -t:.+
unbind p # previous-window
unbind r # refresh-client
unbind s # choose-tree -Zs
unbind w # choose-tree -Zw
unbind x # confirm-before -p\"kill-pane #P? (y/n)\" kill-pane"
unbind '{' # swap-pane -U
unbind '}' # swap-pane -D
unbind M-n # next-window -a
unbind M-p # previous-window -a
unbind M-Up # resize-pane -U 5
unbind M-Down # resize-pane -D 5
unbind M-Left # resize-pane -L 5
unbind M-Right # resize-pane -R 5
unbind C-Up # resize-pane -U
unbind C-Down # resize-pane -D
unbind C-Left # resize-pane -L
unbind C-Right # resize-pane -R
# Now set our custom key bindings
set -g prefix M-a # Prefix key is now Alt+a
bind -n M-z send-prefix # Prefix key for client Tmux is Alt+z
# After pressing prefix key, you can continue with keybindings below to do stuffs
bind M-r source-file $HOME/.tmux.conf \; display 'Tmux Reloaded' # Alt+r to reload configuration
bind f choose-tree # f to find session, window, or pane from a list
bind M-s split-window -h # Alt+s to make new split window
bind M-v split-window -v # Alt+v to make new vertical split window
bind r command-prompt -I'#W' "rename-window -- '%%'" # r to rename current window
bind R command-prompt -I'#S' "rename-session -- '%%'" # R to rename current session
# Alt+e to edit tmux.conf.local file
bind M-e new-window "sh -c '\${EDITOR:-vim} ~/.tmux.conf.local && tmux source ~/.tmux.conf && tmux display \"Tmux Reloaded\"'"
# Moving between panes
bind -r h select-pane -L # h to move left
bind -r j select-pane -D # j to move down
bind -r k select-pane -U # k to move up
bind -r l select-pane -R # l to move right
bind -r > swap-pane -D # > to swap to the next pane
bind -r < swap-pane -U # < to swap to the previous pane
# Resizing panes
bind -r H resize-pane -L 2 # H to resize to the left
bind -r J resize-pane -D 2 # J to resize downwards
bind -r K resize-pane -U 2 # K to resize upwards
bind -r L resize-pane -R 2 # L to resize to the right
# Moving between windows
bind -r M-n next-window # Alt+n to move next window
bind -r M-p previous-window # Alt+p to move previous window
bind -r Tab next-window # Tab to move next window (in case your window manager use M-l already)
bind S choose-window "join-pane -v -t "%%"" # S to join pane to selected window in horizontal split
bind V choose-window "join-pane -h -t "%%"" # V to join pane to selected window in vertical split
# Closing everything
bind x kill-pane # x to close pane
bind X kill-window # X to close window
bind M-x confirm-before -p"kill other windows? (y/n)" "kill-window -a" # Alt+x to close other windows
# Copy and paste to bufer
bind a copy-mode # a to trigger copy mode
bind p paste-buffer # p to paste from top buffer
bind P choose-buffer # Alt+p to choose buffer to paste
# Copy mode keybindings
bind -T copy-mode-vi v send -X begin-selection # v in copy mode to begin selection
bind -T copy-mode-vi M-v send -X rectangle-toggle # Alt+v in copy mode to toggle rectangle select
bind -T copy-mode-vi y send -X copy-selection-and-cancel # y in copy mode to yank selection
bind -T copy-mode-vi Y send -X copy-line # Y in copy mode to yank a line
bind -T copy-mode-vi Escape send -X cancel # Esc in copy mode to exit copy mode
# macOS clipboard support with pbcopy
if -b "command -v reattach-to-user-namespace > /dev/null 2>&1" "\
run 'tmux set -g default-command \"exec $(tmux show -gv default-shell) 2>/dev/null & reattach-to-user-namespace -l $(tmux show -gv default-shell)\"'"
if -b "command -v pbcopy > /dev/null 2>&1" " \
bind -T copy-mode-vi y send -X copy-pipe-and-cancel 'reattach-to-user-namespace pbcopy'; \
bind -T copy-mode-vi Y send -X copy-line \\; run 'tmux save-buffer - | reattach-to-user-namespace pbcopy'; \
bind -T copy-mode-vi D send -X copy-end-of-line \\; run 'tmux save-buffer - | reattach-to-user-namespace pbcopy'; \
bind -T copy-mode-vi MouseDragEnd1Pane send -X copy-pipe-and-cancel 'reattach-to-user-namespace pbcopy'"
# Linux clipboard support with xsel or xclip
if -b "command -v xsel > /dev/null 2>&1" " \
bind -T copy-mode-vi y send -X copy-pipe-and-cancel 'xsel -i -b'; \
bind -T copy-mode-vi Y send -X copy-line \\; run 'tmux save-buffer - | xsel -i -b'; \
bind -T copy-mode-vi D send -X copy-end-of-line \\; run 'tmux save-buffer - | xsel -i -b'; \
bind -T copy-mode-vi MouseDragEnd1Pane send -X copy-pipe-and-cancel 'xsel -i -b'"
if -b "! command -v xsel > /dev/null 2>&1 && command -v xclip > /dev/null 2>&1" " \
bind -T copy-mode-vi y send -X copy-pipe-and-cancel 'xclip -i -selection clipboard >/dev/null 2>&1'; \
bind -T copy-mode-vi Y send -X copy-line \\; run 'tmux save-buffer - | xclip -i -selection clipboard >/dev/null 2>&1'; \
bind -T copy-mode-vi D send -X copy-end-of-line \\; run 'tmux save-buffer - | xclip -i -selection clipboard >/dev/null 2>&1'; \
bind -T copy-mode-vi MouseDragEnd1Pane send -X copy-pipe-and-cancel 'xclip -i -selection clipboard >/dev/null 2>&1'"
# APPEARANCE SETTINGS
# Default value for statusline format
POWERLINE_SEPARATOR_LEFT=""
POWERLINE_SEPARATOR_RIGHT=""
POWERLINE_SESSION_ICON=" "
POWERLINE_USER_ICON=" "
POWERLINE_WINDOW_ICON=""
POWERLINE_WINDOW_ACTIVE_ICON=" "
POWERLINE_CALENDAR_ICON=" "
POWERLINE_CLOCK_ICON=" "
POWERLINE_PREFIX_ACTIVE_ICON="󰌿 "
POWERLINE_PREFIX_ICON="󰌾 "
setw -g mode-style "fg=black,bg=yellow" # Window mode style
set -g message-style "fg=green" # Status line message style
set -g message-command-style "fg=green" # Status line message command style
set -g status on # Show or hide status line
set -g status-interval 1 # Update status line every interval second
set -g status-justify left # Set the position of the window list component of status line
set -g status-position bottom # Set the position of status line
setw -g clock-mode-colour yellow # Set clock color
setw -g clock-mode-style 12 # Set clock hour format
setw -g window-status-activity-style "fg=red" # Window with activity alert style
setw -g window-status-separator "" # Set the separator drawn between windows in status line
set -g status-left-length 100 # Set the maximum length of left status line
set -g status-right-length 100 # Set the maximum length of right status line
set -g status-style "fg=white" # Status line style
setw -g pane-border-status off # Pane border status line
setw -g pane-border-style "fg=blue" # Pane border style
setw -g pane-active-border-style "fg=red" # Active pane border style
# Move status line to top if tmux is nested inside another tmux so they don't colide
if -b "test -n '$SSH_CLIENT'" "set -g status-position top"
# Left status line configurations
set -g status-left " #[fg=blue,bold]$POWERLINE_SEPARATOR_LEFT$POWERLINE_SESSION_ICON#S$POWERLINE_SEPARATOR_RIGHT#[fg=yellow] $POWERLINE_SEPARATOR_LEFT$POWERLINE_USER_ICON#(whoami)$POWERLINE_SEPARATOR_RIGHT#[bg=terminal] #{?client_prefix,#[fg=green]$POWERLINE_PREFIX_ACTIVE_ICON,#[fg=red]$POWERLINE_PREFIX_ICON}"
# Right status line configurations
set -g status-right "#[fg=green,bold]$POWERLINE_SEPARATOR_LEFT$POWERLINE_CALENDAR_ICON %a, %d %b %y$POWERLINE_SEPARATOR_RIGHT#[fg=magenta] $POWERLINE_SEPARATOR_LEFT$POWERLINE_CLOCK_ICON %I:%M %p$POWERLINE_SEPARATOR_RIGHT "
# Window status line configurations
setw -g window-status-current-format "#[fg=blue,bold]$POWERLINE_SEPARATOR_LEFT$POWERLINE_WINDOW_ACTIVE_ICON#I:#W$POWERLINE_SEPARATOR_RIGHT "
setw -g window-status-format "#[bg=terminal,fg=white,bold]#I:$POWERLINE_WINDOW_ICON#W "
# Use user defined overrides if .config/tmux/tmux.conf.local file is found
if "[-f ~/.config/tmux/tmux.conf.local]" "source ~/.config/tmux/tmux.conf.local"

View file

@ -0,0 +1,58 @@
# Set true color
set-option -sa terminal-overrides ",xterm*:Tc"
set -g mouse on
# Set prefix
unbind C-b
set -g prefix C-Space
bind C-Space send-prefix
# Vim style pane selection
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Start windows and panes at 1
set -g base-index 1
set -g pane-base-index 1
set-window-option -g pane-base-index 1
set-option -g renumber-windows on
# Use Alt-arrow keys without prefix key to switch panes
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# Shift arrow to switch windows
bind -n S-Left previous-window
bind -n S-Right next-window
# Shift Alt vim keys to switch windows
bind -n M-H previous-window
bind -n M-L next-window
set -g @catppuccin_flavour 'mocha'
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'wenijinew/eu.tmux'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'christoomey/vim-tmux-navigator'
##set -g @plugin 'catppuccin/tmux'
set -g @plugin 'dreamsofcode-io/catppuccin-tmux'
set -g @plugin 'tmux-plugins/tmux-yank'
run '~/.config/tmux/plugins/tpm/tpm'
# set vi-mode
set-window-option -g mode-key vi
# keybindings
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle
bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel
# Open panes in current directory
bind '"' split-window -v -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"