From d9fe451ad46cc46583f62e0652593390b2dfbfeb Mon Sep 17 00:00:00 2001 From: afonso Date: Thu, 22 Feb 2024 11:32:07 +0000 Subject: [PATCH 1/8] [NVIM] updated nvim config with some stuff has tmux line integrated --- .config/nvim/lazy-lock.json | 70 +++++++++++++--------------- .config/nvim/lua/core/variables.lua | 5 +- .config/nvim/lua/plugins/cmp.lua | 23 ++------- .config/nvim/lua/plugins/jukit.lua | 21 ++++----- .config/nvim/lua/plugins/lazy.lua | 19 ++------ .config/nvim/lua/plugins/none-ls.lua | 3 +- .gitconfig-gh | 2 + 7 files changed, 60 insertions(+), 83 deletions(-) create mode 100644 .gitconfig-gh diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json index efa58eb..c146ecc 100644 --- a/.config/nvim/lazy-lock.json +++ b/.config/nvim/lazy-lock.json @@ -1,7 +1,6 @@ { - "LuaSnip": { "branch": "master", "commit": "2463d687fe704b76eb0aa3bb34e95f69a5bb0362" }, - "bufferline.nvim": { "branch": "main", "commit": "243893ba9d5d1049dd451a25cab32ec7f8f67bcf" }, - "catppuccin": { "branch": "main", "commit": "b901cf144573b293b6cefeb1ac8c97d5d239ee7a" }, + "LuaSnip": { "branch": "master", "commit": "f3b3d3446bcbfa62d638b1903ff00a78b2b730a1" }, + "catppuccin": { "branch": "main", "commit": "9703f227bfab20d04bcee62d2f08f1795723b4ae" }, "cinnamon.nvim": { "branch": "master", "commit": "c406ffda3a0302f32c23b24ab756ea20467d6578" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, "cmp-cmdline": { "branch": "main", "commit": "8ee981b4a91f536f52add291594e89fb6645e451" }, @@ -10,48 +9,45 @@ "cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, - "copilot.lua": { "branch": "master", "commit": "858bbfa6fa81c88fb1f64107d7981f1658619e0a" }, - "distant.nvim": { "branch": "v0.3", "commit": "998724f62386c8022a4e6c885f4509cf9477451a" }, - "dressing.nvim": { "branch": "master", "commit": "94b0d24483d56f3777ee0c8dc51675f21709318c" }, - "fidget.nvim": { "branch": "main", "commit": "a4a7edfea37e557dbff5509ee374ffb57051bba9" }, - "friendly-snippets": { "branch": "main", "commit": "53d3df271d031c405255e99410628c26a8f0d2b0" }, + "copilot.lua": { "branch": "master", "commit": "03f825956ec49e550d07875d867ea6e7c4dc8c00" }, + "distant.nvim": { "branch": "v0.3", "commit": "de7288b1af6fdb2d2e7a8aa00f07a236261c2491" }, + "dressing.nvim": { "branch": "master", "commit": "6f212262061a2120e42da0d1e87326e8a41c0478" }, + "fidget.nvim": { "branch": "main", "commit": "4e854f3299e21d1c18279add340428a97520fc44" }, + "friendly-snippets": { "branch": "main", "commit": "dbd45e9ba76d535e4cba88afa1b7aa43bb765336" }, "gruvbox-material": { "branch": "master", "commit": "b17fe51688b76e2ccf118e5f76f3978b9a8c503e" }, - "gruvbox.nvim": { "branch": "main", "commit": "4176b0b720db0c90ab4030e5c1b4893faf41fd51" }, "impatient.nvim": { "branch": "main", "commit": "47302af74be7b79f002773011f0d8e85679a7618" }, - "lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" }, - "leap.nvim": { "branch": "main", "commit": "47262a9beadd6945f51b0a4fc2d005aaa2095f04" }, - "lualine.nvim": { "branch": "master", "commit": "566b7036f717f3d676362742630518a47f132fff" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "56e435e09f8729af2d41973e81a0db440f8fe9c9" }, - "mason-nvim-dap.nvim": { "branch": "main", "commit": "9e82ded0515186edd4f69e4ce6b1a5f1b55b47e9" }, - "mason.nvim": { "branch": "main", "commit": "a09da6ac634926a299dd439da08bdb547a8ca011" }, - "neovim": { "branch": "main", "commit": "c6d53a99d4c5c50fd10d5091208491b25130486b" }, - "nerdy.nvim": { "branch": "main", "commit": "548437ebcea9106156e7ea3a5612ee6444a1aba4" }, - "none-ls.nvim": { "branch": "main", "commit": "e7382de51b4cf629e56f1fa18192e716e5ba8145" }, - "nvim-autopairs": { "branch": "master", "commit": "9fd41181693dd4106b3e414a822bb6569924de81" }, - "nvim-cmp": { "branch": "main", "commit": "538e37ba87284942c1d76ed38dd497e54e65b891" }, + "lazy.nvim": { "branch": "main", "commit": "aedcd79811d491b60d0a6577a9c1701063c2a609" }, + "leap.nvim": { "branch": "main", "commit": "657752e806916a72b0da4b669506d93c49a0c82b" }, + "lualine.nvim": { "branch": "master", "commit": "7d131a8d3ba5016229e8a1d08bf8782acea98852" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "fe4cce44dec93c69be17dad79b21de867dde118a" }, + "mason-nvim-dap.nvim": { "branch": "main", "commit": "3614a39aae98ccd34124b072939d6283853b3dd2" }, + "mason.nvim": { "branch": "main", "commit": "c43eeb5614a09dc17c03a7fb49de2e05de203924" }, + "nerdy.nvim": { "branch": "main", "commit": "7c9a4ea4a9ca7063e86dbcf7ce0f233cb59bdc10" }, + "none-ls.nvim": { "branch": "main", "commit": "34b1311bd07bd3741e60e06b34d0709d6e5a9f0f" }, + "nvim-autopairs": { "branch": "master", "commit": "2e8a10c5fc0dcaf8296a5f1a7077efcd37065cc8" }, + "nvim-cmp": { "branch": "main", "commit": "04e0ca376d6abdbfc8b52180f8ea236cbfddf782" }, "nvim-colorizer.lua": { "branch": "master", "commit": "85855b38011114929f4058efc97af1059ab3e41d" }, - "nvim-dap": { "branch": "master", "commit": "f0dca670fa059eb89dda8869a6310c804241345c" }, - "nvim-dap-ui": { "branch": "master", "commit": "34160a7ce6072ef332f350ae1d4a6a501daf0159" }, + "nvim-dap": { "branch": "master", "commit": "fc880e82059eb21c0fa896be60146e5f17680648" }, + "nvim-dap-ui": { "branch": "master", "commit": "9720eb5fa2f41988e8770f973cd11b76dd568a5d" }, "nvim-ghost.nvim": { "branch": "main", "commit": "a1ca0b2dac59881066d7ac9373cf64d59ba29d6a" }, - "nvim-lspconfig": { "branch": "master", "commit": "0d9e870d01894c592d7ea93cfe0fa451916d9a7f" }, - "nvim-tmux-navigation": { "branch": "main", "commit": "d9efffa413a530bdea3783af4fea86be84940283" }, - "nvim-treesitter": { "branch": "master", "commit": "362ebd3a210f20aab80be05557f216cbaf4531e6" }, - "nvim-treesitter-context": { "branch": "master", "commit": "652ec514d6ba8bc4a3c2de76c855fe668e2c7196" }, - "nvim-web-devicons": { "branch": "master", "commit": "43aa2ddf476012a2155f5f969ee55ab17174da7a" }, - "oil.nvim": { "branch": "master", "commit": "523b61430cb7365f8f86609c2ea60e48456bac63" }, - "orgmode": { "branch": "master", "commit": "ab045e3084d5987e8939d25d69b09baaf762278c" }, - "plenary.nvim": { "branch": "master", "commit": "55d9fe89e33efd26f532ef20223e5f9430c8b0c0" }, + "nvim-lspconfig": { "branch": "master", "commit": "d1bab4cf4b69e49d6058028fd933d8ef5e74e680" }, + "nvim-tmux-navigation": { "branch": "main", "commit": "4898c98702954439233fdaf764c39636681e2861" }, + "nvim-treesitter": { "branch": "master", "commit": "b3e53e94232d2bc6d70516efbd932bcce3ba8e1e" }, + "nvim-treesitter-context": { "branch": "master", "commit": "6a4b354233b12f094d824575e09db089355e59dd" }, + "nvim-web-devicons": { "branch": "master", "commit": "14ac5887110b06b89a96881d534230dac3ed134d" }, + "oil.nvim": { "branch": "master", "commit": "bf753c3e3f8736939ad5597f92329dfe7b1df4f5" }, + "orgmode": { "branch": "master", "commit": "5657e2f721d582bdd665686a0399c616bc697ccf" }, + "plenary.nvim": { "branch": "master", "commit": "4f71c0c4a196ceb656c824a70792f3df3ce6bb6d" }, "presence.nvim": { "branch": "main", "commit": "87c857a56b7703f976d3a5ef15967d80508df6e6" }, "telescope.nvim": { "branch": "master", "commit": "7011eaae0ac1afe036e30c95cf80200b8dc3f21a" }, - "themery.nvim": { "branch": "main", "commit": "1005a58801276d29c4b1e11244cf7631250f9143" }, "tla.nvim": { "branch": "master", "commit": "e419c75e805ab6d9967c7325bf35734c372d3d4b" }, - "todo-comments.nvim": { "branch": "main", "commit": "4a6737a8d70fe1ac55c64dfa47fcb189ca431872" }, - "typst.vim": { "branch": "main", "commit": "308e7737d09de8c1100320ddc6bc270615ae791a" }, - "undotree": { "branch": "master", "commit": "36ff7abb6b60980338344982ad4cdf03f7961ecd" }, + "todo-comments.nvim": { "branch": "main", "commit": "833d8dd8b07eeda37a09e99460f72a02616935cb" }, + "typst.vim": { "branch": "main", "commit": "e28d440c7ba4df2516d7d7f908c4fb664a8cf86c" }, + "undotree": { "branch": "master", "commit": "9dbbf3b7d19dda0d22ceca461818e4739ad8154d" }, "vim-alloy": { "branch": "master", "commit": "5bd57c4890be39e221dd3e1f6735457dce454bbd" }, "vim-jukit": { "branch": "master", "commit": "73214c9a8abc4b6aa7a6266b5bc2ddbf8b3e3c00" }, "vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" }, - "vimtex": { "branch": "master", "commit": "6179414f2eb3db977a513b7b19c23e7e62a0f388" }, - "which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" }, - "zen-mode.nvim": { "branch": "main", "commit": "50e2e2a36cc97847d9ab3b1a3555ba2ef6839b50" } + "vim-tpipeline": { "branch": "master", "commit": "649f079a0bee19565978b82b672d831c6641d952" }, + "vimtex": { "branch": "master", "commit": "9df79e15bf035d1cfb32c11fffed38dd7b6a0501" }, + "zen-mode.nvim": { "branch": "main", "commit": "78557d972b4bfbb7488e17b5703d25164ae64e6a" } } \ No newline at end of file diff --git a/.config/nvim/lua/core/variables.lua b/.config/nvim/lua/core/variables.lua index 83e4810..b0669b5 100644 --- a/.config/nvim/lua/core/variables.lua +++ b/.config/nvim/lua/core/variables.lua @@ -43,4 +43,7 @@ vim.g.jukit_shell_cmd = 'ipython3' vim.g.jukit_terminal = 'nvimterm' vim.g.jukit_show_prompt = 1 vim.g.jukit_pdf_viewer = 'zathura' -vim.g.jukit_mappings = 1 +vim.g.jukit_mappings = 0 +--Format Options +vim.opt.formatoptions:remove("ro") + diff --git a/.config/nvim/lua/plugins/cmp.lua b/.config/nvim/lua/plugins/cmp.lua index 5ad0408..dee1733 100644 --- a/.config/nvim/lua/plugins/cmp.lua +++ b/.config/nvim/lua/plugins/cmp.lua @@ -151,30 +151,17 @@ cmp.setup { name = "nvim_lsp", entry_filter = function(entry, context) local kind = entry:get_kind() - local line = context.cursor_line - local col = context.cursor.col - local char_before_cursor = string.sub(line, col - 1, col - 1) - - if char_before_cursor == "." then - if kind == 2 or kind == 5 then - return true - else - return false - end - elseif string.match(line, "^%s*%w*$") then - if kind == 3 or kind == 6 then - return true - else - return false - end - end + vim.api.nvim_out_write(kind .. '\n') + if kind == "Text" then return false end return true end }, + + { name = 'orgmode' }, { name = 'nvim_lua' }, { name = 'luasnip' }, - { name = "vim-dadbod-completion" }, + --{ name = "vim-dadbod-completion" }, { name = "path" }, }, { diff --git a/.config/nvim/lua/plugins/jukit.lua b/.config/nvim/lua/plugins/jukit.lua index 7118fcc..49bcd25 100644 --- a/.config/nvim/lua/plugins/jukit.lua +++ b/.config/nvim/lua/plugins/jukit.lua @@ -1,26 +1,25 @@ +local opts = { noremap = true, silent = true, buffer = true } -- Create new code cell below. Argument: Whether to create code cell (0) or markdown cell (1) -vim.api.nvim_set_keymap('n', 'jco', ':call jukit#cells#create_below(0)', { noremap = true, silent = true}) +vim.keymap.set('n', 'jco', 'call jukit#cells#create_below(0)', opts) -- Create new code cell above. Argument: Whether to create code cell (0) or markdown cell (1) -vim.api.nvim_set_keymap('n', 'jcO', ':call jukit#cells#create_above(0)', { noremap = true, silent = true}) +vim.keymap.set('n', 'jcO', 'call jukit#cells#create_above(0)', opts) -- Create new text (markdown) cell below. Argument: Whether to create code cell (0) or markdown cell (1) -vim.api.nvim_set_keymap('n', 'jct', ':call jukit#cells#create_below(1)', { noremap = true, silent = true }) +vim.keymap.set('n', 'jct', 'call jukit#cells#create_below(1)', opts) -- Create new text (markdown) cell above. Argument: Whether to create code cell (0) or markdown cell (1) -vim.api.nvim_set_keymap('n', 'jcT', ':call jukit#cells#create_above(1)', { noremap = true, silent = true }) +vim.keymap.set('n', 'jcT', 'call jukit#cells#create_above(1)', opts) -- Deletes the current cell -vim.api.nvim_set_keymap('n', 'jcd', ':call jukit#cells#delete()', { noremap = true, silent = true }) +vim.keymap.set('n', 'jcd', 'call jukit#cells#delete()', opts) -- Send current section (argument: 0 indicates the current section) -vim.api.nvim_set_keymap('n', 'jcc', ':call jukit#send#section(0)', { noremap = true, silent = true }) +vim.keymap.set('n', 'jcc', 'call jukit#send#section(0)', opts) -- Send all sections up to the current section -vim.api.nvim_set_keymap('n', 'jcac', ':call jukit#send#until_current_section()', { noremap = true, silent = true }) +vim.keymap.set('n', 'jcac', 'call jukit#send#until_current_section()', opts) -- Send all sections -vim.api.nvim_set_keymap('n', 'jca', ':call jukit#send#all()', { noremap = true, silent = true }) +vim.keymap.set('n', 'jca', 'call jukit#send#all()', opts) -- Open an output split -vim.api.nvim_set_keymap('n', 'jos', ':call jukit#splits#output()', { noremap = true, silent = true }) - - +vim.keymap.set('n', 'jos', 'call jukit#splits#output()', opts) diff --git a/.config/nvim/lua/plugins/lazy.lua b/.config/nvim/lua/plugins/lazy.lua index e55c0ee..9e3c571 100644 --- a/.config/nvim/lua/plugins/lazy.lua +++ b/.config/nvim/lua/plugins/lazy.lua @@ -54,6 +54,10 @@ lazy.setup({ }) end }, + + 'vimpostor/vim-tpipeline', + + --Python notebooks { 'luk400/vim-jukit', @@ -121,21 +125,6 @@ lazy.setup({ end }, - { - - "folke/which-key.nvim", - event = "VeryLazy", - init = function() - vim.o.timeout = true - vim.o.timeoutlen = 300 - end, - opts = { - -- your configuration comes here - -- or leave it empty to use the default settings - -- refer to the configuration section below - } - }, - { "folke/todo-comments.nvim", event = "VeryLazy", diff --git a/.config/nvim/lua/plugins/none-ls.lua b/.config/nvim/lua/plugins/none-ls.lua index 6980746..837ccac 100644 --- a/.config/nvim/lua/plugins/none-ls.lua +++ b/.config/nvim/lua/plugins/none-ls.lua @@ -4,7 +4,8 @@ local null_ls = require("null-ls") null_ls.setup({ sources = { null_ls.builtins.formatting.rustfmt, - null_ls.builtins.formatting.blue, + null_ls.builtins.formatting.black, + null_ls.builtins.diagnostics.flake8, null_ls.builtins.formatting.gofmt, null_ls.builtins.code_actions.shellcheck, null_ls.builtins.formatting.beautysh, diff --git a/.gitconfig-gh b/.gitconfig-gh new file mode 100644 index 0000000..8f3993e --- /dev/null +++ b/.gitconfig-gh @@ -0,0 +1,2 @@ +[user] + name = afonsofrancof From e05139fd0f812794fad9a8a0a15c88b7be694cb5 Mon Sep 17 00:00:00 2001 From: afonso Date: Thu, 22 Feb 2024 11:32:43 +0000 Subject: [PATCH 2/8] [SKHD] updated yabai keybinds --- .config/skhd/scripts/menubar.sh | 10 ++++++++++ .config/skhd/skhdrc | 5 +++-- 2 files changed, 13 insertions(+), 2 deletions(-) create mode 100755 .config/skhd/scripts/menubar.sh diff --git a/.config/skhd/scripts/menubar.sh b/.config/skhd/scripts/menubar.sh new file mode 100755 index 0000000..17010c7 --- /dev/null +++ b/.config/skhd/scripts/menubar.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +#test if output of command is 0.0000 + +current_value=$(yabai -m config menubar_opacity) +if [ "$current_value" == "0.0000" ]; then + yabai -m config menubar_opacity 1.0 +else + yabai -m config menubar_opacity 0.0 +fi diff --git a/.config/skhd/skhdrc b/.config/skhd/skhdrc index e9acaca..6ab3604 100644 --- a/.config/skhd/skhdrc +++ b/.config/skhd/skhdrc @@ -1,6 +1,7 @@ # Terminal and Applications -cmd - t : open -na alacritty -cmd - b : open -a Firefox +cmd + alt - t : open -na alacritty +cmd + alt - b : open -a Firefox +cmd + shift - v : ~/.config/skhd/scripts/menubar.sh # System Controls cmd - return : yabai -m window --swap west From eed614e017e31fa8c88e4d62ca98a6d6add756e8 Mon Sep 17 00:00:00 2001 From: afonso Date: Thu, 22 Feb 2024 11:33:07 +0000 Subject: [PATCH 3/8] [TMUX] updated config --- .config/tmux/plugins/tmux-fzf | 1 + .../tmux/themes/catppuccin-frappe.tmuxtheme | 14 ++++++++++ .../tmux/themes/catppuccin-latte.tmuxtheme | 14 ++++++++++ .config/tmux/tmux_plugins.conf | 16 ++++++----- .config/tmux/tmux_status_bar.conf | 27 +++++++++++++++++++ 5 files changed, 65 insertions(+), 7 deletions(-) create mode 160000 .config/tmux/plugins/tmux-fzf create mode 100644 .config/tmux/themes/catppuccin-frappe.tmuxtheme create mode 100644 .config/tmux/themes/catppuccin-latte.tmuxtheme create mode 100644 .config/tmux/tmux_status_bar.conf diff --git a/.config/tmux/plugins/tmux-fzf b/.config/tmux/plugins/tmux-fzf new file mode 160000 index 0000000..6b31cbe --- /dev/null +++ b/.config/tmux/plugins/tmux-fzf @@ -0,0 +1 @@ +Subproject commit 6b31cbe454649736dcd6dc106bb973349560a949 diff --git a/.config/tmux/themes/catppuccin-frappe.tmuxtheme b/.config/tmux/themes/catppuccin-frappe.tmuxtheme new file mode 100644 index 0000000..dc84b4d --- /dev/null +++ b/.config/tmux/themes/catppuccin-frappe.tmuxtheme @@ -0,0 +1,14 @@ +# --> Catppuccin (Frappe) +thm_bg="#303446" +thm_fg="#c6d0f5" +thm_cyan="#99d1db" +thm_black="#292c3c" +thm_gray="#414559" +thm_magenta="#ca9ee6" +thm_pink="#f4b8e4" +thm_red="#e78284" +thm_green="#a6d189" +thm_yellow="#e5c890" +thm_blue="#8caaee" +thm_orange="#ef9f76" +thm_black4="#626880" diff --git a/.config/tmux/themes/catppuccin-latte.tmuxtheme b/.config/tmux/themes/catppuccin-latte.tmuxtheme new file mode 100644 index 0000000..ea4623c --- /dev/null +++ b/.config/tmux/themes/catppuccin-latte.tmuxtheme @@ -0,0 +1,14 @@ +# --> Catppuccin (Latte) +"bg=#dce0e8 , +fg=#4c4f69 , +cyan=#179299 , +black=#e6e9ef , +gray=#bcc0cc , +magenta=#ea76cb, +pink=#8839ef , +red=#d20f39 , +green=#40a02b , +yellow=#df8e1d , +blue=#1e66f5 , +orange=#fe640b , +black4=#acb0be ," diff --git a/.config/tmux/tmux_plugins.conf b/.config/tmux/tmux_plugins.conf index 044ac7c..fff680a 100644 --- a/.config/tmux/tmux_plugins.conf +++ b/.config/tmux/tmux_plugins.conf @@ -4,16 +4,18 @@ set -g @plugin 'tmux-plugins/tpm' set -g @plugin 'tmux-plugins/tmux-sensible' #set -g @plugin 'catppuccin/tmux' -#set -g @plugin 'tmux-plugins/tmux-resurrect' -#set -g @plugin 'tmux-plugins/tmux-continuum' +set -g @plugin 'tmux-plugins/tmux-resurrect' +set -g @plugin 'tmux-plugins/tmux-continuum' +set -g @plugin 'sainnhe/tmux-fzf' #set -g @plugin 'tomhey/tmux-remote-sessions' # Plugin settings #set -g @catppuccin_flavour 'latte' #set -g @catppuccin_window_tabs_enabled on -#set -g @resurrect-strategy-nvim 'session' -#set -g @resurrect-capture-pane-contents 'on' -#set -g @continuum-restore 'on' -#set -g @continuum-save-interval '10' -#set -g @continuum-boot 'on' +set -g @resurrect-strategy-nvim 'session' +set -g @resurrect-capture-pane-contents 'on' +set -g @continuum-restore 'on' +set -g @continuum-save-interval '5' +set -g @continuum-boot 'on' +set -g @continuum-boot-options 'alacritty' diff --git a/.config/tmux/tmux_status_bar.conf b/.config/tmux/tmux_status_bar.conf new file mode 100644 index 0000000..5aea37c --- /dev/null +++ b/.config/tmux/tmux_status_bar.conf @@ -0,0 +1,27 @@ +#!/usr/bin/env bash + +# Hardcoded values +set -g status-bg "#282828" +set -g @unfocused-fg "#d4be98" +set -g @focused-bg "#d4be98" +set -g @focused-fg "#282828" +# Set status bar position +set -g status-position top + +# Set status bar style +set -g status-style ' #[bg=#{status-bg},fg=#{@unfocused-fg}] ' + +# Set status bar justification +set -g status-justify left + +# Set right side of the status bar +set -g status-right '#[bg=#{status-bg},fg=#{@unfocused-fg}] #S' + +# Set window status format +set -g window-status-format ' #I:#W ' + +# Set window status format +set -g window-status-format ' #[bg=#{status-bg},fg=#{@unfocused-fg}] #I:#W ' + +# Set window status format for the current window +set -g window-status-current-format ' #[bg=#{@focused-bg},fg=#{@focused-fg}] #I:#W ' From c38a49f2b3c5a22e48d1b5c55f999851c36a6530 Mon Sep 17 00:00:00 2001 From: afonso Date: Thu, 22 Feb 2024 11:38:36 +0000 Subject: [PATCH 4/8] [ZSH] plugins, themes and prompt --- .config/zsh/main.zsh | 31 ++++++------------ .config/zsh/plugins/fast-syntax-highlighting | 1 + .config/zsh/plugins/fzf-tab | 1 + .config/zsh/plugins/zsh-autosuggestions | 1 + .config/zsh/plugins/zsh-completions | 1 + .../zsh/plugins/zsh-history-substring-search | 1 + .config/zsh/plugins/zsh-syntax-highlighting | 1 + .config/zsh/plugins/zsh-vi-mode | 1 + .config/zsh/prompts/pure | 1 + .config/zsh/qol.zsh | 9 ++++++ .config/zsh/replacements.zsh | 11 +++++-- .config/zsh/themes/catppuccin_frappe.zsh | 30 +++++++++++++++++ .config/zsh/themes/catppuccin_latte.zsh | 30 +++++++++++++++++ .config/zsh/themes/gruvbox_dark.zsh | 32 +++++++++++++++++++ .config/zsh/themes/gruvbox_light.zsh | 30 +++++++++++++++++ 15 files changed, 157 insertions(+), 24 deletions(-) create mode 160000 .config/zsh/plugins/fast-syntax-highlighting create mode 160000 .config/zsh/plugins/fzf-tab create mode 160000 .config/zsh/plugins/zsh-autosuggestions create mode 160000 .config/zsh/plugins/zsh-completions create mode 160000 .config/zsh/plugins/zsh-history-substring-search create mode 160000 .config/zsh/plugins/zsh-syntax-highlighting create mode 160000 .config/zsh/plugins/zsh-vi-mode create mode 160000 .config/zsh/prompts/pure diff --git a/.config/zsh/main.zsh b/.config/zsh/main.zsh index 2be6c70..2a1ad9d 100644 --- a/.config/zsh/main.zsh +++ b/.config/zsh/main.zsh @@ -15,30 +15,13 @@ setopt HIST_VERIFY export EDITOR=nvim export READER=mupdf -# Add paths -export PATH="/opt/homebrew/bin:$PATH" -export PATH="/opt/homebrew/opt/openjdk@17/bin:$PATH" -export PATH="$HOME/.bun/bin:$PATH" -export PATH="$HOME/go/bin:$PATH" -export PATH="$HOME/.local/share/nvim/mason/bin:$PATH" -export PATH="$HOME/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin:$PATH" -export PATH="$HOME/.local/bin:$PATH" -export PATH="$HOME/.cargo/bin:$PATH" -export PATH="$HOME/.ghcup/bin:$PATH" -export PATH="/usr/bin/vendor_perl:$PATH" -export PATH="/Applications/usdpython/usdpython/USD:$PATH" -export PATH="/Applications/usdpython/usdzconvert:$PATH" -export PATH="/Users/afonso/Library/Python/3.11/bin:$PATH" -[ -f "/Users/afonso/.ghcup/env" ] && source "/Users/afonso/.ghcup/env" # ghcup-env -export PYTHONPATH="/Applications/usdpython/USD/lib/python:$PYTHONPATH" -export JAVA_HOME="/opt/homebrew/opt/openjdk@17/libexec/openjdk.jdk/Contents/Home" -if [ "$(arch)" = "arm64" ]; then - eval "$(/opt/homebrew/bin/brew shellenv)" -else - eval "$(/usr/local/bin/brew shellenv)" -fi +#if [ "$(arch)" = "arm64" ]; then +eval "$(/opt/homebrew/bin/brew shellenv)" +#else +# eval "$(/usr/local/bin/brew shellenv)" +#fi [ -f ~/.fzf.zsh ] && source ~/.fzf.zsh @@ -49,3 +32,7 @@ enable-fzf-tab # opam configuration source $HOME/.opam/opam-init/init.zsh > /dev/null 2>&1 || true + +eval "$(zoxide init zsh)" + +eval "$(direnv hook zsh)" diff --git a/.config/zsh/plugins/fast-syntax-highlighting b/.config/zsh/plugins/fast-syntax-highlighting new file mode 160000 index 0000000..cf318e0 --- /dev/null +++ b/.config/zsh/plugins/fast-syntax-highlighting @@ -0,0 +1 @@ +Subproject commit cf318e06a9b7c9f2219d78f41b46fa6e06011fd9 diff --git a/.config/zsh/plugins/fzf-tab b/.config/zsh/plugins/fzf-tab new file mode 160000 index 0000000..c2b4aa5 --- /dev/null +++ b/.config/zsh/plugins/fzf-tab @@ -0,0 +1 @@ +Subproject commit c2b4aa5ad2532cca91f23908ac7f00efb7ff09c9 diff --git a/.config/zsh/plugins/zsh-autosuggestions b/.config/zsh/plugins/zsh-autosuggestions new file mode 160000 index 0000000..c3d4e57 --- /dev/null +++ b/.config/zsh/plugins/zsh-autosuggestions @@ -0,0 +1 @@ +Subproject commit c3d4e576c9c86eac62884bd47c01f6faed043fc5 diff --git a/.config/zsh/plugins/zsh-completions b/.config/zsh/plugins/zsh-completions new file mode 160000 index 0000000..f7c3173 --- /dev/null +++ b/.config/zsh/plugins/zsh-completions @@ -0,0 +1 @@ +Subproject commit f7c3173886f4f56bf97d622677c6d46ab005831f diff --git a/.config/zsh/plugins/zsh-history-substring-search b/.config/zsh/plugins/zsh-history-substring-search new file mode 160000 index 0000000..8dd05bf --- /dev/null +++ b/.config/zsh/plugins/zsh-history-substring-search @@ -0,0 +1 @@ +Subproject commit 8dd05bfcc12b0cd1ee9ea64be725b3d9f713cf64 diff --git a/.config/zsh/plugins/zsh-syntax-highlighting b/.config/zsh/plugins/zsh-syntax-highlighting new file mode 160000 index 0000000..bb27265 --- /dev/null +++ b/.config/zsh/plugins/zsh-syntax-highlighting @@ -0,0 +1 @@ +Subproject commit bb27265aeeb0a22fb77f1275118a5edba260ec47 diff --git a/.config/zsh/plugins/zsh-vi-mode b/.config/zsh/plugins/zsh-vi-mode new file mode 160000 index 0000000..ea1f58a --- /dev/null +++ b/.config/zsh/plugins/zsh-vi-mode @@ -0,0 +1 @@ +Subproject commit ea1f58ab9b1f3eac50e2cde3e3bc612049ef683b diff --git a/.config/zsh/prompts/pure b/.config/zsh/prompts/pure new file mode 160000 index 0000000..4e0ce0a --- /dev/null +++ b/.config/zsh/prompts/pure @@ -0,0 +1 @@ +Subproject commit 4e0ce0a2f8576894e5dad83857e9a9851faa0f5b diff --git a/.config/zsh/qol.zsh b/.config/zsh/qol.zsh index e723104..b348137 100644 --- a/.config/zsh/qol.zsh +++ b/.config/zsh/qol.zsh @@ -16,3 +16,12 @@ capture() { } ' } + +sourceall(){ + set -e + pids=$(pgrep zsh) + while IFS= read -r pid; do + kill -USR1 "$pid" + done <<< "$pids" + set +e +} diff --git a/.config/zsh/replacements.zsh b/.config/zsh/replacements.zsh index 8eadaa1..eb1562c 100644 --- a/.config/zsh/replacements.zsh +++ b/.config/zsh/replacements.zsh @@ -4,6 +4,10 @@ ls() { eza --icons -l --sort type "$@" } +cd(){ + z "$@" +} + nvim() { /opt/homebrew/bin/nvim --listen /tmp/nvim.pipe "$@" } @@ -12,6 +16,9 @@ vim() { /opt/homebrew/bin/nvim --listen /tmp/nvim.pipe "$@" } -alias find="fd" -alias df="duf" +v() { + /opt/homebrew/bin/nvim --listen /tmp/nvim.pipe "$@" +} + alias lg="lazygit" +alias calcurse-caldav='CALCURSE_CALDAV_PASSWORD=$(keyring get caldav afonso) calcurse-caldav' diff --git a/.config/zsh/themes/catppuccin_frappe.zsh b/.config/zsh/themes/catppuccin_frappe.zsh index 37284d0..023ad23 100644 --- a/.config/zsh/themes/catppuccin_frappe.zsh +++ b/.config/zsh/themes/catppuccin_frappe.zsh @@ -72,3 +72,33 @@ ZSH_HIGHLIGHT_STYLES[redirection]='fg=#c6d0f5' ZSH_HIGHLIGHT_STYLES[arg0]='fg=#c6d0f5' ZSH_HIGHLIGHT_STYLES[default]='fg=#c6d0f5' ZSH_HIGHLIGHT_STYLES[cursor]='fg=#c6d0f5' + +#Pure prompt +# Define cappuccin frappe colors +pure_prompt_colors() { + local colors + colors=( + execution_time='%F{#bdae93}' # The execution time of the last command when exceeding PURE_CMD_MAX_EXEC_TIME. + git:arrow='%F{#bdae93}' # For PURE_GIT_UP_ARROW and PURE_GIT_DOWN_ARROW. + git:stash='%F{#bdae93}' # For PURE_GIT_STASH_SYMBOL. + git:branch='%F{#98971a}' # The name of the current branch when in a Git repository. + git:branch:cached='%F{#cc241d}' # The name of the current branch when the data isn't fresh. + git:action='%F{#b16286}' # The current action in progress (cherry-pick, rebase, etc.) when in a Git repository. + git:dirty='%F{#d65d0e}' # The asterisk showing the branch is dirty. + host='%F{#7c6f64}' # The hostname when on a remote machine. + path='%F{#458588}' # The current path, for example, PWD. + prompt:error='%F{#fb4934}' # The PURE_PROMPT_SYMBOL when the previous command has failed. + prompt:success='%F{#98971a}' # The PURE_PROMPT_SYMBOL when the previous command has succeeded. + prompt:continuation='%F{#b16286}' # The color for showing the state of the parser in the continuation prompt (PS2). + suspended_jobs='%F{#fb4934}' # The ✦ symbol indicates that jobs are running in the background. + user='%F{#7c6f64}' # The username when on remote machine. + user:root='%F{default}' # The username when the user is root. + virtualenv='%F{#b16286}' # The name of the Python virtualenv when in use. + ) + (( $#colors )) || echo $colors +} + +# Apply cappuccin frappe colors to Zsh Pure prompt +for color in $(pure_prompt_colors); do + zstyle ":prompt:pure:$color" color "$color" +done diff --git a/.config/zsh/themes/catppuccin_latte.zsh b/.config/zsh/themes/catppuccin_latte.zsh index 09b4cf9..7b9c6c5 100644 --- a/.config/zsh/themes/catppuccin_latte.zsh +++ b/.config/zsh/themes/catppuccin_latte.zsh @@ -72,3 +72,33 @@ ZSH_HIGHLIGHT_STYLES[redirection]='fg=#4c4f69' ZSH_HIGHLIGHT_STYLES[arg0]='fg=#4c4f69' ZSH_HIGHLIGHT_STYLES[default]='fg=#4c4f69' ZSH_HIGHLIGHT_STYLES[cursor]='fg=#4c4f69' + +#Pure prompt +# Define cappuccin latte colors +pure_prompt_colors() { + local colors + colors=( + execution_time='%F{#bdae93}' # The execution time of the last command when exceeding PURE_CMD_MAX_EXEC_TIME. + git:arrow='%F{#458588}' # For PURE_GIT_UP_ARROW and PURE_GIT_DOWN_ARROW. + git:stash='%F{#bdae93}' # For PURE_GIT_STASH_SYMBOL. + git:branch='%F{#98971a}' # The name of the current branch when in a Git repository. + git:branch:cached='%F{#cc241d}' # The name of the current branch when the data isn't fresh. + git:action='%F{#b16286}' # The current action in progress (cherry-pick, rebase, etc.) when in a Git repository. + git:dirty='%F{#d65d0e}' # The asterisk showing the branch is dirty. + host='%F{#7c6f64}' # The hostname when on a remote machine. + path='%F{#458588}' # The current path, for example, PWD. + prompt:error='%F{#cc241d}' # The PURE_PROMPT_SYMBOL when the previous command has failed. + prompt:success='%F{#98971a}' # The PURE_PROMPT_SYMBOL when the previous command has succeeded. + prompt:continuation='%F{#b16286}' # The color for showing the state of the parser in the continuation prompt (PS2). + suspended_jobs='%F{#cc241d}' # The ✦ symbol indicates that jobs are running in the background. + user='%F{#7c6f64}' # The username when on remote machine. + user:root='%F{default}' # The username when the user is root. + virtualenv='%F{#b16286}' # The name of the Python virtualenv when in use. + ) + (( $#colors )) || echo $colors +} + +# Apply cappuccin latte colors to Zsh Pure prompt +for color in $(pure_prompt_colors); do + zstyle ":prompt:pure:$color" color "$color" +done diff --git a/.config/zsh/themes/gruvbox_dark.zsh b/.config/zsh/themes/gruvbox_dark.zsh index c776a66..52a3092 100644 --- a/.config/zsh/themes/gruvbox_dark.zsh +++ b/.config/zsh/themes/gruvbox_dark.zsh @@ -74,3 +74,35 @@ ZSH_HIGHLIGHT_STYLES[default]='fg=#83a598' ZSH_HIGHLIGHT_STYLES[cursor]='fg=#83a598' #ZSH Syntax Highlighting ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=#928374,italic,underline" + + + +#Pure prompt +# Define gruvbox dark colors +pure_prompt_colors() { + local colors + colors=( + execution_time='%F{#fabd2f}' # The execution time of the last command when exceeding PURE_CMD_MAX_EXEC_TIME. + git:arrow='%F{#83a598}' # For PURE_GIT_UP_ARROW and PURE_GIT_DOWN_ARROW. + git:stash='%F{#83a598}' # For PURE_GIT_STASH_SYMBOL. + git:branch='%F{#b8bb26}' # The name of the current branch when in a Git repository. + git:branch:cached='%F{#fb4934}' # The name of the current branch when the data isn't fresh. + git:action='%F{#d3869b}' # The current action in progress (cherry-pick, rebase, etc.) when in a Git repository. + git:dirty='%F{#fe8019}' # The asterisk showing the branch is dirty. + host='%F{#ebdbb2}' # The hostname when on a remote machine. + path='%F{#83a598}' # The current path, for example, PWD. + prompt:error='%F{#fb4934}' # The PURE_PROMPT_SYMBOL when the previous command has failed. + prompt:success='%F{#b16286}' # The PURE_PROMPT_SYMBOL when the previous command has succeeded. + prompt:continuation='%F{#d3869b}' # The color for showing the state of the parser in the continuation prompt (PS2). + suspended_jobs='%F{#fb4934}' # The ✦ symbol indicates that jobs are running in the background. + user='%F{#ebdbb2}' # The username when on remote machine. + user:root='%F{default}' # The username when the user is root. + virtualenv='%F{#d3869b}' # The name of the Python virtualenv when in use. + ) + (( $#colors )) || echo $colors +} + +# Apply gruvbox dark colors to Zsh Pure prompt +for color in $(pure_prompt_colors); do + zstyle ":prompt:pure:$color" color "$color" +done diff --git a/.config/zsh/themes/gruvbox_light.zsh b/.config/zsh/themes/gruvbox_light.zsh index bc2d666..1c2507e 100644 --- a/.config/zsh/themes/gruvbox_light.zsh +++ b/.config/zsh/themes/gruvbox_light.zsh @@ -72,3 +72,33 @@ ZSH_HIGHLIGHT_STYLES[redirection]='fg=#83a598' ZSH_HIGHLIGHT_STYLES[arg0]='fg=#83a598' ZSH_HIGHLIGHT_STYLES[default]='fg=#83a598' ZSH_HIGHLIGHT_STYLES[cursor]='fg=#83a598' + +#Pure prompt +# Define gruvbox light colors +pure_prompt_colors() { + local colors + colors=( + execution_time='%F{#d65d0e}' # The execution time of the last command when exceeding PURE_CMD_MAX_EXEC_TIME. + git:arrow='%F{#458588}' # For PURE_GIT_UP_ARROW and PURE_GIT_DOWN_ARROW. + git:stash='%F{#458588}' # For PURE_GIT_STASH_SYMBOL. + git:branch='%F{#98971a}' # The name of the current branch when in a Git repository. + git:branch:cached='%F{#cc241d}' # The name of the current branch when the data isn't fresh. + git:action='%F{#b16286}' # The current action in progress (cherry-pick, rebase, etc.) when in a Git repository. + git:dirty='%F{#d65d0e}' # The asterisk showing the branch is dirty. + host='%F{#3c3836}' # The hostname when on a remote machine. + path='%F{#458588}' # The current path, for example, PWD. + prompt:error='%F{#cc241d}' # The PURE_PROMPT_SYMBOL when the previous command has failed. + prompt:success='%F{#b16286}' # The PURE_PROMPT_SYMBOL when the previous command has succeeded. + prompt:continuation='%F{#b16286}' # The color for showing the state of the parser in the continuation prompt (PS2). + suspended_jobs='%F{#cc241d}' # The ✦ symbol indicates that jobs are running in the background. + user='%F{#3c3836}' # The username when on remote machine. + user:root='%F{default}' # The username when the user is root. + virtualenv='%F{#b16286}' # The name of the Python virtualenv when in use. + ) + (( $#colors )) || echo $colors +} + +# Apply gruvbox light colors to Zsh Pure prompt +for color in $(pure_prompt_colors); do + zstyle ":prompt:pure:$color" color "$color" +done From 57bbbe8228776b3c26ea89ede50244b1cb7197c0 Mon Sep 17 00:00:00 2001 From: afonso Date: Thu, 22 Feb 2024 11:39:22 +0000 Subject: [PATCH 5/8] [GIT] change identity based on remote url --- .gitconfig | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitconfig b/.gitconfig index 2e1d6a7..c2cf472 100644 --- a/.gitconfig +++ b/.gitconfig @@ -1,7 +1,11 @@ [user] - email = me@afonsofrancof.com - name = afonsofrancof + email = afonso@francof.net + name = afonso signingkey = ~/.ssh/id_ed25519_sk.pub +[includeIf "hasconfig:remote.*.url:https://github.com/**"] + path = ~/.gitconfig-gh +[includeIf "hasconfig:remote.*.url:ssh://git@github.com/**"] + path = ~/.gitconfig-gh [filter "lfs"] process = git-lfs filter-process required = true From bedc9e683dd930766a31668931e642ceaeefb447 Mon Sep 17 00:00:00 2001 From: afonso Date: Thu, 22 Feb 2024 11:39:36 +0000 Subject: [PATCH 6/8] [CLANG] fixed format file --- .clang-format | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.clang-format b/.clang-format index 3f48b3f..45b9ef8 100644 --- a/.clang-format +++ b/.clang-format @@ -1,10 +1,9 @@ BasedOnStyle: LLVM +UseTab: Always IndentWidth: 4 TabWidth: 4 -UseTab: Always BreakBeforeBraces: Attach ColumnLimit: 100 PenaltyReturnTypeOnItsOwnLine: 1000000 AlwaysBreakAfterDefinitionReturnType: None -AlwaysBreakAfterDefinitionReturnType: None SeparateDefinitionBlocks: Always From 6cf06bb11b7a2eac39929c799efeaf818d742ced Mon Sep 17 00:00:00 2001 From: afonso Date: Thu, 22 Feb 2024 11:39:50 +0000 Subject: [PATCH 7/8] [ZSH] added vi mode --- .zshrc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.zshrc b/.zshrc index cf30db0..da33519 100644 --- a/.zshrc +++ b/.zshrc @@ -73,10 +73,10 @@ ZSH_CUSTOM=/Users/afonso/.config/zsh #THEME -source $HOME/.config/zsh/themes/gruvbox_light.zsh +source $HOME/.config/zsh/themes/gruvbox_dark.zsh source $HOME/.config/zsh/overrides.zsh -plugins=(git sudo macos tmux command-not-found web-search zsh-autosuggestions zsh-history-substring-search zsh-syntax-highlighting fzf-tab) +plugins=(zsh-vi-mode git sudo macos tmux command-not-found web-search zsh-autosuggestions zsh-history-substring-search zsh-syntax-highlighting fzf-tab) #Completions From 929bc579106c0d9647a33d5e40a6f82ca6579cbd Mon Sep 17 00:00:00 2001 From: afonso Date: Thu, 22 Feb 2024 11:40:12 +0000 Subject: [PATCH 8/8] [SSH] changed persist config --- .ssh/config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ssh/config b/.ssh/config index a00b423..9d2a315 100644 --- a/.ssh/config +++ b/.ssh/config @@ -14,7 +14,7 @@ Host gh User git Port 22 ControlPath ~/.ssh/session.%r@%h:%p - ControlPersist 5m + ControlPersist 10m IdentityFile ~/.ssh/id_ed25519_sk IdentityFile ~/.ssh/id_ed25519_sk_secondary