From ef2bff1dd2443fcf1f9aecb66f80e334bbd95b66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Gremaud?= Date: Mon, 2 Sep 2024 19:47:25 +0200 Subject: [PATCH 1/6] Update 02.09.2024 --- config/i3/config.d/01_theme.conf | 6 +++--- gitignore_global | 2 ++ neovim-config | 2 +- scripts | 2 +- tmux.conf | 28 ++++++++++++++-------------- zshrc | 4 ++++ 6 files changed, 25 insertions(+), 19 deletions(-) diff --git a/config/i3/config.d/01_theme.conf b/config/i3/config.d/01_theme.conf index 91bdbe5..84c66fb 100644 --- a/config/i3/config.d/01_theme.conf +++ b/config/i3/config.d/01_theme.conf @@ -19,9 +19,9 @@ set $i3_gaps_smart off #~ Colors set $i3_cl_col_bg #1E2128 set $i3_cl_col_fg #ABB2BF -set $i3_cl_col_in #98C379 -set $i3_cl_col_afoc #5294E2 -set $i3_cl_col_ifoc #62AEEF +set $i3_cl_col_in #1786e8 +set $i3_cl_col_afoc #96cf6e +set $i3_cl_col_ifoc #a2cff6 set $i3_cl_col_ufoc #292d37 set $i3_cl_col_urgt #C778DD set $i3_cl_col_phol #1E2128 diff --git a/gitignore_global b/gitignore_global index 4a8ff76..20650a9 100644 --- a/gitignore_global +++ b/gitignore_global @@ -28,6 +28,8 @@ celery-exporter *.sqlite3 +pyrightconfig.json + arcanite_gestion/lib/ dependencies.html diff --git a/neovim-config b/neovim-config index 8762db9..f3bf598 160000 --- a/neovim-config +++ b/neovim-config @@ -1 +1 @@ -Subproject commit 8762db974385fa2de392dec5053c0143f770d887 +Subproject commit f3bf598361b9da8753495b067772cd74fadf40b1 diff --git a/scripts b/scripts index 78ce7da..36bd56b 160000 --- a/scripts +++ b/scripts @@ -1 +1 @@ -Subproject commit 78ce7dac4855c6b32c5c8023c6fdb442fb5e9ab8 +Subproject commit 36bd56bcc48c6818802fe177debaf98cdda25d3d diff --git a/tmux.conf b/tmux.conf index 485059c..ad08b9a 100644 --- a/tmux.conf +++ b/tmux.conf @@ -20,7 +20,7 @@ bind -n M-s select-pane -D bind -n M-d select-pane -R # reload conf -bind r source-file ~/.tmux.conf +bind r source-file ~/.tmux.conf; display-message "Tmux source file reloaded!" set-window-option -g mode-keys vi bind -T copy-mode-vi v send-keys -X begin-selection @@ -30,17 +30,16 @@ set -g default-terminal "tmux-256color" set -ag terminal-overrides ",*:RGB" # change color -#set -g pane-border-style 'fg=#660033' -#set -g pane-active-border-style 'fg=#990033 bg=default' -set -g pane-border-style 'fg=#000055' -set -g pane-active-border-style 'fg=#6a00aa' +set -g pane-border-style '#{?pane_synchronized, fg=yellow, fg=black}' +set -g pane-active-border-style '#{?pane_synchronized, fg=red, fg=#52862d}' # status bar set -g status-position top -set -g status-justify left -#set -g status-style 'fg=#660033 bg=#202020' -set -g status-style 'fg=#a000ff bg=#202020' +set -g status-justify centre +set -g status-style 'fg=#ffffff #{?pane_synchronized, bg=red, bg=default}' +set -g status-left "[#{session_name}] " +set -g status-left-length 60 # native xterm scrolling set -g mouse on @@ -63,9 +62,10 @@ run -b '~/.tmux/plugins/tpm/tpm' set -s escape-time 0 set-option -g default-terminal "screen-256color" -bind-key -r f run-shell "tmux neww /home/legrems/miniconda3/bin/python ~/Documents/dotfiles/scripts/tmux_sessionizer.py" -bind-key -r g run-shell "tmux neww /home/legrems/miniconda3/bin/python ~/Documents/dotfiles/scripts/tmux_select_session.py" -bind-key -r h run-shell "tmux neww /home/legrems/miniconda3/bin/python ~/Documents/dotfiles/scripts/tmux_select_pane.py" -bind-key -r m run-shell "tmux neww /home/legrems/miniconda3/bin/python ~/Documents/dotfiles/scripts/tmux_ssh_group.py" -bind-key -r j run-shell "tmux neww /home/legrems/miniconda3/bin/python ~/Documents/dotfiles/scripts/tmux_multi_ssh.py" -bind-key -r i set-window-option synchronize-panes\; display-message "synchronize-panes is now #{?pane_synchronized, #[bg=red]!! ON !!,OFF}" +bind f run-shell "tmux neww /home/legrems/miniconda3/bin/python ~/Documents/dotfiles/scripts/tmux_sessionizer.py" +bind g run-shell "tmux neww /home/legrems/miniconda3/bin/python ~/Documents/dotfiles/scripts/tmux_select_session.py" +bind h run-shell "tmux neww /home/legrems/miniconda3/bin/python ~/Documents/dotfiles/scripts/tmux_select_pane.py" +bind m run-shell "tmux neww /home/legrems/miniconda3/bin/python ~/Documents/dotfiles/scripts/tmux_ssh_group.py" +bind j run-shell "tmux neww /home/legrems/miniconda3/bin/python ~/Documents/dotfiles/scripts/tmux_multi_ssh.py" +bind i set-window-option synchronize-panes\; +# bind i set-window-option synchronize-panes\; display-message "synchronize-panes is now #{?pane_synchronized, #[bg=red]!! ON !!,OFF}" diff --git a/zshrc b/zshrc index 8d01230..62357f9 100644 --- a/zshrc +++ b/zshrc @@ -22,3 +22,7 @@ eval "$(zoxide init zsh | sed -e 's/\\builtin cd/cdwe/g')" # Add RVM to PATH for scripting. Make sure this is the last PATH variable change. export PATH="$PATH:$HOME/.rvm/bin" export KEYTIMEOUT=1 + +fpath+=~/.zfunc; autoload -Uz compinit; compinit + +zstyle ':completion:*' menu select From bf80b5054acc0a8eee4d2a7e69f0be6f3f6976c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Gremaud?= Date: Wed, 23 Oct 2024 11:53:12 +0200 Subject: [PATCH 2/6] Change bindings in I3 + update neovim --- config/i3/config | 2 +- config/i3/config.d/02_keybindings.conf | 19 ++++++++++--------- config/i3/scripts/i3_term | 8 +++++--- gitignore_global | 1 + neovim-config | 2 +- tmux.conf | 14 +++++++++----- zsh/alias.sh | 1 + zsh/keys.sh | 2 ++ 8 files changed, 30 insertions(+), 19 deletions(-) diff --git a/config/i3/config b/config/i3/config index 2e6a620..c10bef0 100644 --- a/config/i3/config +++ b/config/i3/config @@ -320,7 +320,7 @@ tiling_drag modifier titlebar ## Syntax: #exec [--no-startup-id] #exec_always [--no-startup-id] -exec_always --no-startup-id setxkbmap us +# exec_always --no-startup-id setxkbmap us exec_always --no-startup-id ~/.screenlayout/default.sh exec_always --no-startup-id ~/.config/i3/scripts/i3_autostart diff --git a/config/i3/config.d/02_keybindings.conf b/config/i3/config.d/02_keybindings.conf index aa33ccb..68e8b18 100644 --- a/config/i3/config.d/02_keybindings.conf +++ b/config/i3/config.d/02_keybindings.conf @@ -38,8 +38,8 @@ set $web_browser firefox ## -- Terminal -- bindsym $MOD+Return exec --no-startup-id $terminal -bindsym $MOD+Shift+Return exec --no-startup-id $terminal --float -bindsym $MOD+$ALT+Return exec --no-startup-id $terminal --full +# bindsym $MOD+Shift+Return exec --no-startup-id "$terminal --float" +# bindsym $MOD+$ALT+Return exec --no-startup-id "$terminal --full" ## -- GUI Apps -- bindsym $MOD+Shift+f exec --no-startup-id $file_manager @@ -47,10 +47,8 @@ bindsym $MOD+Shift+e exec --no-startup-id $text_editor bindsym $MOD+Shift+w exec --no-startup-id $web_browser ## -- CLI Apps -- -bindsym $ALT+Control+v exec --no-startup-id "$alacritty -e vim" -bindsym $ALT+Control+r exec --no-startup-id "$alacritty -e ranger" -bindsym $ALT+Control+h exec --no-startup-id "$alacritty -e htop" -bindsym $ALT+Control+m exec --no-startup-id $music_player +bindsym $MOD+Shift+Return exec --no-startup-id "$terminal --float -e tmux new-session nvim" +# bindsym $MOD+Control+h exec --no-startup-id "$terminal -e tmux new-session htop" ## -- Rofi Applets -- bindsym $MOD+p exec --no-startup-id $rofi_applets/rofi_launcher -dpi 1 @@ -78,7 +76,7 @@ bindsym XF86AudioStop exec --no-startup-id "mpc stop" bindsym Print exec --no-startup-id "$screenshot --now" bindsym Control+Print exec --no-startup-id "$screenshot --in5" # bindsym Shift+Print exec --no-startup-id "$screenshot --in10" -bindsym Shift+Print exec --no-startup-id $rofi_applets/rofi_screenshot +bindsym Shift+Print exec --no-startup-id $rofi_applets/rofi_screenshot bindsym Control+Shift+Print exec --no-startup-id "$screenshot --win" bindsym $MOD+Print exec --no-startup-id "$screenshot --area" @@ -137,10 +135,13 @@ bindsym $MOD+Left focus left bindsym $MOD+Down focus down bindsym $MOD+Up focus up bindsym $MOD+Right focus right + +bindsym $MOD+a focus left +bindsym $MOD+d focus right ## Sets focus to the parent container of the current container. -bindsym $MOD+a focus parent +# bindsym $MOD+a focus parent ## The opposite of `focus parent`, sets the focus to the last focused child container. -bindsym $MOD+d focus child +# bindsym $MOD+d focus child ## Automatically sets focus to the adjacent container. bindsym $MOD+Tab focus next ## Toggles focus between floating/tiling containers. diff --git a/config/i3/scripts/i3_term b/config/i3/scripts/i3_term index ac7014c..31b2f82 100755 --- a/config/i3/scripts/i3_term +++ b/config/i3/scripts/i3_term @@ -9,12 +9,14 @@ DIR="$HOME/.config/i3" CONFIG="$DIR/alacritty/alacritty.toml" if [ "$1" == "--float" ]; then - alacritty --class 'alacritty-float,alacritty-float' --config-file "$CONFIG" + shift + alacritty --class 'alacritty-float,alacritty-float' --config-file "$CONFIG" $@ elif [ "$1" == "--full" ]; then + shift alacritty --class 'Fullscreen,Fullscreen' --config-file "$CONFIG" \ -o window.startup_mode=fullscreen \ window.padding.x=30 window.padding.y=30 \ - window.opacity=0.95 font.size=14 + window.opacity=0.95 font.size=14 $@ else - alacritty --config-file "$CONFIG" + alacritty --config-file "$CONFIG" $@ fi diff --git a/gitignore_global b/gitignore_global index 20650a9..7bf8838 100644 --- a/gitignore_global +++ b/gitignore_global @@ -2,6 +2,7 @@ .autoenv_leave.zsh tags Session.vim +.exrc *.rest cert.crt cert.key diff --git a/neovim-config b/neovim-config index f3bf598..3d96771 160000 --- a/neovim-config +++ b/neovim-config @@ -1 +1 @@ -Subproject commit f3bf598361b9da8753495b067772cd74fadf40b1 +Subproject commit 3d9677192a225903529a437e6974fa97efffd675 diff --git a/tmux.conf b/tmux.conf index ad08b9a..6d019af 100644 --- a/tmux.conf +++ b/tmux.conf @@ -6,9 +6,9 @@ bind-key C-a send-prefix # split panes bind | split-window -h -c "#{pane_current_path}" bind - split-window -v -c "#{pane_current_path}" -bind s split-window -h -p 20 -c "#{pane_current_path}" -bind g split-window -h -p 20 -c "#{pane_current_path}" -b -bind v split-window -v -p 30 -c "#{pane_current_path}" +# bind s split-window -h -p 20 -c "#{pane_current_path}" +# bind g split-window -h -p 20 -c "#{pane_current_path}" -b +# bind v split-window -v -p 30 -c "#{pane_current_path}" # Switch to last sesions, usefull for cross-project (since i'm using a session per project, with tmux-sessionizer script) bind k switch-client -l @@ -22,21 +22,24 @@ bind -n M-d select-pane -R # reload conf bind r source-file ~/.tmux.conf; display-message "Tmux source file reloaded!" +# VI mode for keys, not sure i'm using this set-window-option -g mode-keys vi bind -T copy-mode-vi v send-keys -X begin-selection bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -in -selection clipboard' +# Color terminal, it's probably the default set -g default-terminal "tmux-256color" set -ag terminal-overrides ",*:RGB" -# change color +# Change color if the panes are synchronized (since it can be deadly) set -g pane-border-style '#{?pane_synchronized, fg=yellow, fg=black}' set -g pane-active-border-style '#{?pane_synchronized, fg=red, fg=#52862d}' -# status bar +# Status bar set -g status-position top set -g status-justify centre +# Change color if the panes are synchronized (since it can be deadly) set -g status-style 'fg=#ffffff #{?pane_synchronized, bg=red, bg=default}' set -g status-left "[#{session_name}] " set -g status-left-length 60 @@ -55,6 +58,7 @@ set -g @resurrect-strategy-nvim 'session' set -g @resurrect-processes 'ssh vim nvim django-run "~manage.py"' set -g @plugin 'tmux-plugins/tmux-yank' +set -g @yank_selection_mouse 'clipboard' run -b '~/.tmux/plugins/tpm/tpm' # run-shell ~/tmux-resurrect/resurrect.tmux diff --git a/zsh/alias.sh b/zsh/alias.sh index c3bb72e..d9cb180 100644 --- a/zsh/alias.sh +++ b/zsh/alias.sh @@ -3,6 +3,7 @@ alias la='ls -A' alias l='ls -CF' alias lla='ls -al' alias mux='tmuxinator' +alias i="ipython" alias pm='python manage.py' alias pmt='clear && pm test' diff --git a/zsh/keys.sh b/zsh/keys.sh index e69de29..a140d90 100644 --- a/zsh/keys.sh +++ b/zsh/keys.sh @@ -0,0 +1,2 @@ +bindkey "^k" up-line-or-history +bindkey "^j" up-line-or-history From 0bbebf1438f854a4950b1be06f5d275044778fa5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Gremaud?= Date: Wed, 23 Oct 2024 11:59:25 +0200 Subject: [PATCH 3/6] Add Hyprland config --- hyprland-config | 1 + 1 file changed, 1 insertion(+) create mode 160000 hyprland-config diff --git a/hyprland-config b/hyprland-config new file mode 160000 index 0000000..c3f41e3 --- /dev/null +++ b/hyprland-config @@ -0,0 +1 @@ +Subproject commit c3f41e39aa0ef6a9648598b3e99c132f9f652e02 From 7a89dd68132298d983e759e6e4a96b593de989c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Gremaud?= Date: Wed, 23 Oct 2024 12:07:19 +0200 Subject: [PATCH 4/6] Update gitmodules to use relative path --- .gitmodules | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitmodules b/.gitmodules index 5fdfb21..a7e0854 100644 --- a/.gitmodules +++ b/.gitmodules @@ -3,10 +3,10 @@ url = https://github.com/Legrems/nv-chad.git [submodule "scripts"] path = scripts - url = git@github.com:Legrems/scripts.git + url = ../scripts.git [submodule "scripts-hidden"] path = scripts-hidden - url = git@github.com:Legrems/scripts-hidden.git + url = ../scripts-hidden.git [submodule "neovim-config"] path = neovim-config - url = git@github.com:Legrems/neovim-config.git + url = ../neovim-config.git From c618c411a531ec8a68e11986e7c4a07a1ee3efe3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Gremaud?= Date: Wed, 23 Oct 2024 12:28:41 +0200 Subject: [PATCH 5/6] Update hyprland config --- hyprland-config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hyprland-config b/hyprland-config index c3f41e3..3d9ba69 160000 --- a/hyprland-config +++ b/hyprland-config @@ -1 +1 @@ -Subproject commit c3f41e39aa0ef6a9648598b3e99c132f9f652e02 +Subproject commit 3d9ba69c56f75052fec257d9214f5b6fa5f540ec From eb08d5da265d37cb4977df78e818157e41eed35e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Gremaud?= Date: Wed, 23 Oct 2024 12:29:52 +0200 Subject: [PATCH 6/6] Update gitmodules --- .gitmodules | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitmodules b/.gitmodules index a7e0854..dcacaf9 100644 --- a/.gitmodules +++ b/.gitmodules @@ -10,3 +10,6 @@ [submodule "neovim-config"] path = neovim-config url = ../neovim-config.git +[submodule "hyprland-config"] + path = hyprland-config + url = ../hyprland-config.git