From 17b30734237cbb4c965a62b2a6f0ea53b4887c10 Mon Sep 17 00:00:00 2001 From: Tanguy Herbron Date: Tue, 6 Dec 2022 15:27:54 +0100 Subject: [PATCH 1/7] (flameshot) Update save target and draw thickness --- .config/flameshot/flameshot.ini | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.config/flameshot/flameshot.ini b/.config/flameshot/flameshot.ini index fb8a18a..a26b726 100644 --- a/.config/flameshot/flameshot.ini +++ b/.config/flameshot/flameshot.ini @@ -1,7 +1,8 @@ [General] disabledTrayIcon=false drawColor=#ff0000 -drawThickness=0 +drawThickness=3 +savePath=/home/tanguy/Images showStartupLaunchMessage=true [Shortcuts] From e0051c51238d589abab72c421f8b480d40cd1eed Mon Sep 17 00:00:00 2001 From: Tanguy Herbron Date: Tue, 6 Dec 2022 15:31:35 +0100 Subject: [PATCH 2/7] (i3) Clean and update configuration for new integration with i3 gaps --- .config/i3/config | 77 +++++++++++------------------------------------ 1 file changed, 17 insertions(+), 60 deletions(-) diff --git a/.config/i3/config b/.config/i3/config index 35a3339..f889569 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -4,35 +4,6 @@ # Please see http://i3wm.org/docs/userguide.html for a complete reference! # ############################################################################### -# -# In this config file many values are taken from Xresources with the directive -# set_from_resource: -# -# set_from_resource -# -# This configuration file utilizes Xresource variables to change configuration -# without having to make a copy of this config file. -# The benefit to not copying this file is easier upgrades in the future. -# To update a value in this config without making a copy, update the Xresource -# value in the file ~/.config/regolith/Xresources. -# -# For example, to change the bar position to the top of the screen this is the -# i3 config entry in this file: -# set_from_resource $i3-wm.bar.position i3-wm.bar.position bottom -# -# So add this line to ~/.config/regolith/Xresources to change it's value: -# i3-wm.bar.position: top -# -# Reload i3 after making Xresource changes. Learn more at -# https://regolith-linux.org/docs/howto/override-xres/ -# -############################################################################### -# -# This file uses a machine-parsable format for comments. The schema is: -# ## // // ## -# Learn more at https://github.com/regolith-linux/remontoire -# -############################################################################### ############################################################################### # Meta Key Mappings @@ -285,7 +256,7 @@ floating_modifier $mod # Hiding borders adjacent to the screen edges. # The "smart" setting hides borders on workspaces with only one window visible. -set_from_resource $i3-wm.hide.edge.borders i3-wm.hide.edge.borders smart +set_from_resource $i3-wm.hide.edge.borders i3-wm.hide.edge.borders smart_no_gaps hide_edge_borders $i3-wm.hide.edge.borders ############################################################################### @@ -301,10 +272,6 @@ bindsym $mod+$alt+q [con_id="__focused__"] exec --no-startup-id kill -9 $(xdotoo ## Session // Reload i3 Config // <> c ## bindsym $mod+Shift+c reload -## Session // Refresh Session // <> r ## -set_from_resource $i3-wm.program.refresh_ui i3-wm.program.refresh_ui /usr/bin/regolith-look refresh -bindsym $mod+Shift+r exec --no-startup-id $i3-wm.program.refresh_ui - ## Session // Restart i3 // <> r ## bindsym $mod+Ctrl+r restart @@ -561,9 +528,6 @@ font $i3-wm.font # set_from_resource $i3-wm.bar.trayoutput i3-wm.bar.trayoutput none # set_from_resource $i3-wm.bar.stripworkspacenumbers i3-wm.bar.stripworkspacenumbers yes -# i3xrocks config file. Override this for a custom status bar generator. -# set_from_resource $i3-wm.bar.status_command i3-wm.bar.status_command i3xrocks -u ~/.config/regolith/i3xrocks/conf.d -d /etc/regolith/i3xrocks/conf.d -# # The bar configuration # bar { # position $i3-wm.bar.position @@ -586,6 +550,7 @@ font $i3-wm.font # } # } + ############################################################################### # External programs launched with i3 ############################################################################### @@ -594,34 +559,26 @@ font $i3-wm.font set_from_resource $i3-wm.program.compositor i3-wm.program.compositor /usr/share/regolith-compositor/init exec --no-startup-id $i3-wm.program.compositor -# Start Rofication for notifications -set_from_resource $i3-wm.program.notifications i3-wm.program.notifications /usr/bin/rofication-daemon -exec --no-startup-id $i3-wm.program.notifications +############################################################################### +# Automatically make some windows sticky +############################################################################### -# Launch first time user experience script -set_from_resource $i3-wm.program.ftui i3-wm.program.ftui /usr/bin/regolith-ftue -exec --no-startup-id $i3-wm.program.ftui +for_window [instance="Toolkit" class="firefox"] sticky enable -# Hide the mouse pointer if unused for a duration -set_from_resource $i3-wm.program.unclutter i3-wm.program.unclutter /usr/bin/unclutter -b -exec --no-startup-id $i3-wm.program.unclutter +############################################################################### +# External programs launched with i3 +############################################################################### -# User programs from Xresources -# To use, define an Xresource key i3-wm.program.[1-3] with the value of the program to launch. -# See https://regolith-linux.org/docs/howto/override-xres/ for details. -set_from_resource $i3-wm.program.1 i3-wm.program.1 : -exec --no-startup-id $i3-wm.program.1 -set_from_resource $i3-wm.program.2 i3-wm.program.2 : -exec --no-startup-id $i3-wm.program.2 -set_from_resource $i3-wm.program.3 i3-wm.program.3 : -exec --no-startup-id $i3-wm.program.3 - -# Start polybar -exec_always --no-startup-id ~/.config/polybar/launch.sh & -exec_always --no-startup-id feh --bg-scale ~/Images/Wallpapers/aerial_waves.jpg -# exec_always --no-startup-id ~/.config/picom/launch.sh & +# Keyboard shortcut daemon exec_always --no-startup-id xbindkeys --poll-rc + +# Floating panel daemon exec_always --no-startup-id eww daemon & + +# Drive automount deamon exec_always --no-startup-id udiskie & exec --no-startup-id /home/tanguy/multihead.sh + +# Set the wallpaper last to avoid wallpaper missplacement +exec_always --no-startup-id feh --bg-scale ~/Images/Wallpapers/aerial_waves.jpg From e0b16539b46b95288764202e51dff2739dbdb207 Mon Sep 17 00:00:00 2001 From: Tanguy Herbron Date: Tue, 6 Dec 2022 15:33:02 +0100 Subject: [PATCH 3/7] (i3) Add auto workspace setup and multi monitor dynamic configuration --- .bin/display | 36 ++++++++++++++++++++++++++++++++++++ .bin/swf | 9 +++++++++ .config/i3/config | 12 +++++++----- 3 files changed, 52 insertions(+), 5 deletions(-) create mode 100755 .bin/display create mode 100755 .bin/swf diff --git a/.bin/display b/.bin/display new file mode 100755 index 0000000..c7e3a7c --- /dev/null +++ b/.bin/display @@ -0,0 +1,36 @@ +#!/bin/sh + +export DISPLAY=:0 +export XAUTHORITY=/home/tanguy/.Xauthority + +/home/tanguy/.screenlayout/base.sh +# TODO : Configure each dock configuration with MAC addresses + +if [[ "$(ip a | grep 'e0:4f:43:59:98:f4' | wc -l)" == 1 ]]; then + /home/tanguy/.screenlayout/tegl-e0-4f.sh + + i3-msg "workspace 1, move workspace to output DVI-I-1-1"; + i3-msg "workspace 2, move workspace to output DCI-I-2-2"; + i3-msg "workspace 3, move workspace to output eDP-1" + i3-msg "workspace 4, move workspace to output eDP-1" +fi + +if [[ "$(ip a | grep 'f4:a8:0d:41:e1:aa' | wc -l)" == 1 ]]; then + /home/tanguy/.screenlayout/tegl-e1-aa.sh + + i3-msg "workspace 1, move workspace to output DP-2-2"; + i3-msg "workspace 2, move workspace to output DP-2-3"; + i3-msg "workspace 3, move workspace to output eDP-1" + i3-msg "workspace 4, move workspace to output eDP-1" +fi + +if [[ "$(ip a | grep '00:50:b6:f7:e5:d3' | wc -l)" == 1 ]]; then + /home/tanguy/.screenlayout/tegl-e5-d3.sh + + i3-msg "workspace 1, move workspace to output DVI-I-2-2"; + i3-msg "workspace 2, move workspace to output DVI-I-1-1"; + i3-msg "workspace 3, move workspace to output eDP-1" + i3-msg "workspace 4, move workspace to output eDP-1" +fi + +/home/tanguy/.config/polybar/launch.sh > /dev/null 2>&1 diff --git a/.bin/swf b/.bin/swf new file mode 100755 index 0000000..11c07c2 --- /dev/null +++ b/.bin/swf @@ -0,0 +1,9 @@ +#!/bin/sh + +i3-msg "workspace 2; exec /usr/bin/firefox" +i3-msg "workspace 3; exec /usr/bin/teams" +i3-msg "workspace 3; exec /usr/bin/slack" +i3-msg "workspace 4; exec /usr/bin/element-desktop" +i3-msg "workspace 1; exec /usr/bin/alacritty" +sleep 1 +i3-msg "workspace 1; fullscreen enable" diff --git a/.config/i3/config b/.config/i3/config index f889569..a4b9543 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -552,12 +552,12 @@ font $i3-wm.font ############################################################################### -# External programs launched with i3 +# Program binding to specific workspace ############################################################################### -# Start the installed regolith-compositor -set_from_resource $i3-wm.program.compositor i3-wm.program.compositor /usr/share/regolith-compositor/init -exec --no-startup-id $i3-wm.program.compositor +for_window [class="Microsoft Teams - Preview"] move to workspace $ws3 +for_window [class="Slack"] move to workspace $ws3 +for_window [class="Element"] move to workspace $ws4 ############################################################################### # Automatically make some windows sticky @@ -578,7 +578,9 @@ exec_always --no-startup-id eww daemon & # Drive automount deamon exec_always --no-startup-id udiskie & -exec --no-startup-id /home/tanguy/multihead.sh +# Execute workspace configuration routine +exec --no-startup-id /home/tanguy/.bin/display +exec --no-startup-id /home/tanguy/.bin/swf # Set the wallpaper last to avoid wallpaper missplacement exec_always --no-startup-id feh --bg-scale ~/Images/Wallpapers/aerial_waves.jpg From f4a4daefa8f4885dfe365a8e89203fa4b5a830b9 Mon Sep 17 00:00:00 2001 From: Tanguy Herbron Date: Tue, 6 Dec 2022 15:34:33 +0100 Subject: [PATCH 4/7] (vim-coc) Add language server for sql, vim and terraform --- .config/nvim/coc-settings.json | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/.config/nvim/coc-settings.json b/.config/nvim/coc-settings.json index 7e8a68d..e8784ec 100644 --- a/.config/nvim/coc-settings.json +++ b/.config/nvim/coc-settings.json @@ -1,8 +1,26 @@ { - "suggest.noselect": false, + "suggest.noselect": true, "vetur.format.options.tabSize": 4, "vetur.format.options.useTabs": true, "rust-analyzer.procMacro.enable": true, "rust-analyzer.procMacro.attributes.enable": true, - "rust-analyzer.diagnostics.disabled": ["unresolved-proc-macro"] + "rust-analyzer.diagnostics.disabled": ["unresolved-proc-macro"], + "languageserver": { + "sql": { + "module": "~/.node_modules/lib/node_modules/sql-language-server/dist/bin/cli.js", + "args": ["up", "--method", "node-ipc"], + "filetypes": ["sql", "mysql"] + }, + "terraform": { + "command": "terraform-ls", + "args": ["serve"], + "filetypes": ["terraform", "tf", "hcl"], + "initializationOptions": {} + }, + "efm": { + "command": "efm-langserver", + "args": [], + "filetypes": ["vim"] + } + } } From c9d436b864915a01b0d6d44644ff5f792e71d4b4 Mon Sep 17 00:00:00 2001 From: Tanguy Herbron Date: Tue, 6 Dec 2022 15:36:31 +0100 Subject: [PATCH 5/7] (vim) Replace ctrl-p and ps with Telescope --- .config/nvim/init.vim | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index 3f7de30..7ca5a53 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -13,9 +13,13 @@ Plug 'yuezk/vim-js' Plug 'neoclide/coc.nvim', {'branch': 'release'} Plug 'vim-airline/vim-airline' -Plug 'ctrlpvim/ctrlp.vim' Plug 'ryanoasis/vim-devicons' +" File finder and live grep +Plug 'nvim-telescope/telescope.nvim', {'branch': '0.1.x'} +Plug 'nvim-lua/plenary.nvim' +Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'} + " Grep utility for whole project Plug 'jremmen/vim-ripgrep' " Git integration @@ -89,12 +93,6 @@ endif source ~/.config/nvim/coc.vim -let g:ctrlp_custom_ignore = 'node_modules\|DS_Store' -let g:ctrlp_prompt_mappings = { - \ 'AcceptSelection("h")': ['', ''], - \ 'ToggleType(1)': ['h :wincmd h @@ -102,7 +100,6 @@ nnoremap j :wincmd j nnoremap k :wincmd k nnoremap l :wincmd l nnoremap u :UndotreeToggle -nnoremap ps :Rg nnoremap 1 1gt nnoremap 2 2gt @@ -115,6 +112,9 @@ nnoremap 8 8gt nnoremap 9 9gt nnoremap 0 10gt +nnoremap Telescope find_files +nnoremap Telescope live_grep + " Add folding shortcuts and settings set foldmethod=indent set foldnestmax=10 From 4dda39363b0d276dc82d319d249ed1d2ea9892da Mon Sep 17 00:00:00 2001 From: Tanguy Herbron Date: Tue, 6 Dec 2022 15:37:25 +0100 Subject: [PATCH 6/7] (vim) Complete healthcheck, disable mouse and fix coc auto completion --- .config/nvim/coc.vim | 2 ++ .config/nvim/init.vim | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.config/nvim/coc.vim b/.config/nvim/coc.vim index 6fdd232..74f01b9 100644 --- a/.config/nvim/coc.vim +++ b/.config/nvim/coc.vim @@ -158,6 +158,8 @@ inoremap inoremap coc#pum#visible() ? coc#pum#prev(1) : "\" inoremap coc#refresh() +inoremap coc#pum#visible() ? "=coc#pum#confirm()\ " : "\" + hi CocSearch ctermfg=12 guifg=#18A3FF hi CocMenuSel ctermbg=109 guibg=#13354A diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index 7ca5a53..277f208 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -53,6 +53,11 @@ Plug 'mboughaba/i3config.vim' call plug#end() +" Disable integrated providers +let g:loaded_ruby_provider = 0 +let g:loaded_perl_provider = 0 +let g:loaded_node_provider = 0 + " autocmd vimenter * NERDTree | wincmd w map :NERDTreeToggle autocmd BufEnter * lcd %:p:h @@ -84,7 +89,7 @@ set splitbelow " Remove the duplicate --INSERT-- information set noshowmode -" rg smart root founder and adds git ingore loading for faster execution +" rg smart root founder and adds git ignore loading for faster execution if executable('rg') let g:rg_derive_root="true" endif @@ -175,3 +180,4 @@ augroup python \ | highlight def link pythonSelf Special augroup end +set mouse= From 419c15a282bca7d308b272d0548c53ddb49dc41d Mon Sep 17 00:00:00 2001 From: Tanguy Herbron Date: Tue, 6 Dec 2022 15:39:38 +0100 Subject: [PATCH 7/7] (tmux) Fix integration with nvim --- .tmux.conf | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.tmux.conf b/.tmux.conf index 96ee40e..0cd3a0f 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -143,12 +143,14 @@ set -g @plugin 'jimeh/tmux-themepack' # Bitwarden integration in Tmux set -g @plugin 'Alkindi42/tmux-bitwarden' -# Custom made plugin +# Tmux copy to system clipboard set -g @plugin 'tmux-plugins/tmux-yank' -# Custom made plugin +# Custom powerline theme set -g @themepack 'powerline/default/custom' +set -g focus-events on + run -b '~/.tmux/plugins/tpm/tpm' ## Plugin specific configuration