From fdf3f567e5c6907ce76ed03d23615f5ae90dbc36 Mon Sep 17 00:00:00 2001 From: tiago Date: Thu, 14 Mar 2024 19:52:10 +0000 Subject: [PATCH] theme related stuff --- .Xresources.d/catppuccin-dark | 5 + .Xresources.d/gruvbox-dark | 27 - .Xresources.d/gruvbox-light | 27 - .Xresources.d/gruvbox-material-dark | 25 + .Xresources.d/gruvbox-material-light | 25 + .config/fish/themes/Catppuccin Frappe.theme | 29 -- .config/fish/themes/Catppuccin Mocha.theme | 29 -- ...-macchiato.theme => catppuccin-dark.theme} | 0 ...cin Latte.theme => catppuccin-light.theme} | 0 .../fish/themes/gruvbox-material-dark.theme | 19 + .../fish/themes/gruvbox-material-light.theme | 19 + .config/i3/config | 45 +- .../nvim/lua/tsousa/plugins/colorscheme.lua | 88 ++-- .config/nvim/lua/tsousa/plugins/init.lua | 4 + .config/nvim/lua/tsousa/plugins/lsp.lua | 482 +++++++++--------- .config/picom/picom.conf | 13 +- .config/polybar/config.ini | 18 +- .config/polybar/modules.ini | 25 +- .../rofi/colors/gruvbox-material-dark.rasi | 12 +- .../rofi/colors/gruvbox-material-light.rasi | 12 +- .config/rofi/config.rasi | 2 +- .config/tmux/tmux.conf | 2 +- .local/share/scripts/theme-selector.sh | 31 +- 23 files changed, 461 insertions(+), 478 deletions(-) delete mode 100644 .Xresources.d/gruvbox-dark delete mode 100644 .Xresources.d/gruvbox-light create mode 100644 .Xresources.d/gruvbox-material-dark create mode 100644 .Xresources.d/gruvbox-material-light delete mode 100644 .config/fish/themes/Catppuccin Frappe.theme delete mode 100644 .config/fish/themes/Catppuccin Mocha.theme rename .config/fish/themes/{catppuccin-macchiato.theme => catppuccin-dark.theme} (100%) rename .config/fish/themes/{Catppuccin Latte.theme => catppuccin-light.theme} (100%) create mode 100644 .config/fish/themes/gruvbox-material-dark.theme create mode 100644 .config/fish/themes/gruvbox-material-light.theme mode change 100644 => 100755 .local/share/scripts/theme-selector.sh diff --git a/.Xresources.d/catppuccin-dark b/.Xresources.d/catppuccin-dark index 6651b43..adf9a95 100644 --- a/.Xresources.d/catppuccin-dark +++ b/.Xresources.d/catppuccin-dark @@ -1,6 +1,8 @@ ! catppuccin color scheme *.background: #24273A + *.foreground: #CAD3F5 + *.cursorColor: #F4DBD6 *.color0: #494D64 *.color8: #5B6078 @@ -18,3 +20,6 @@ *.color14: #8BD5CA *.color7: #B8C0E0 *.color15: #A5ADCB + +! lavender +i3wm.border: #B7BDF8 diff --git a/.Xresources.d/gruvbox-dark b/.Xresources.d/gruvbox-dark deleted file mode 100644 index 2a5715a..0000000 --- a/.Xresources.d/gruvbox-dark +++ /dev/null @@ -1,27 +0,0 @@ -! gruvbox dark color scheme -! hard contrast: -! *.background: #1D2021 - -! soft contrast: -! *.background: #32302F - -! deafult contrast: -*.background: #282828 -*.foreground: #EBDBB2 -*.cursorColor: #EBDBB2 -*.color0: #282828 -*.color8: #928374 -*.color1: #CC241D -*.color9: #FB4934 -*.color2: #98971A -*.color10: #B8BB26 -*.color3: #D79921 -*.color11: #FABD2F -*.color4: #458588 -*.color12: #83A598 -*.color5: #B16286 -*.color13: #D3869B -*.color6: #689D6A -*.color14: #8EC07C -*.color7: #A89984 -*.color15: #EBDBB2 diff --git a/.Xresources.d/gruvbox-light b/.Xresources.d/gruvbox-light deleted file mode 100644 index df1a69d..0000000 --- a/.Xresources.d/gruvbox-light +++ /dev/null @@ -1,27 +0,0 @@ -!! gruvbox light color scheme -!! hard contrast: -!! *.background: #F9F5D7 - -!! soft contrast: -!! *.background: #F2E5BC - -!! default contrast: -*.background: #FBF1C7 -*.foreground: #3C3836 -*.cursorColor: #3C3836 -*.color0: #F9F5D7 -*.color8: #928374 -*.color1: #CC241D -*.color9: #9D0006 -*.color2: #98971A -*.color10: #79740E -*.color3: #D79921 -*.color11: #B57614 -*.color4: #458588 -*.color12: #076678 -*.color5: #B16286 -*.color13: #8F3F71 -*.color6: #689D6A -*.color14: #427B58 -*.color7: #7C6F64 -*.color15: #3C3836 diff --git a/.Xresources.d/gruvbox-material-dark b/.Xresources.d/gruvbox-material-dark new file mode 100644 index 0000000..e7175fc --- /dev/null +++ b/.Xresources.d/gruvbox-material-dark @@ -0,0 +1,25 @@ +! hard *.background: #1D2021 +! soft ! *.background: #32302F +! medium +*.background: #282828 + +*.foreground: #D4BE98 + +*.color0: #32302F +*.color8: #32302F +*.color1: #EA6962 +*.color9: #EA6962 +*.color2: #A9B665 +*.color10: #A9B665 +*.color3: #D8A657 +*.color11: #D8A657 +*.color4: #7DAEA3 +*.color12: #7DAEA3 +*.color5: #D3869B +*.color13: #D3869B +*.color6: #89B482 +*.color14: #89B482 +*.color7: #D4BE98 +*.color15: #D4BE98 + +i3wm.border: #DDC7A1 diff --git a/.Xresources.d/gruvbox-material-light b/.Xresources.d/gruvbox-material-light new file mode 100644 index 0000000..98555df --- /dev/null +++ b/.Xresources.d/gruvbox-material-light @@ -0,0 +1,25 @@ +! hard *.background: #F9F5D7 +! medium *.background: #FBF1C7 +! soft +*.background: #F2E5BC + +*.foreground: #654735 + +*.color0: #FBF1C7 +*.color8: #FBF1C7 +*.color1: #C14A4A +*.color9: #C14A4A +*.color2: #6C782E +*.color10: #6C782E +*.color3: #C35E0A +*.color11: #C35E0A +*.color4: #45707A +*.color12: #45707A +*.color5: #945E80 +*.color13: #945E80 +*.color6: #4C7A5D +*.color14: #4C7A5D +*.color7: #654735 +*.color15: #654735 + +i3wm.border: #F3EAC7 diff --git a/.config/fish/themes/Catppuccin Frappe.theme b/.config/fish/themes/Catppuccin Frappe.theme deleted file mode 100644 index 3431514..0000000 --- a/.config/fish/themes/Catppuccin Frappe.theme +++ /dev/null @@ -1,29 +0,0 @@ -# name: 'Catppuccin frappe' -# url: 'https://github.com/catppuccin/fish' -# preferred_background: 303446 - -fish_color_normal c6d0f5 -fish_color_command 8caaee -fish_color_param eebebe -fish_color_keyword e78284 -fish_color_quote a6d189 -fish_color_redirection f4b8e4 -fish_color_end ef9f76 -fish_color_comment 838ba7 -fish_color_error e78284 -fish_color_gray 737994 -fish_color_selection --background=414559 -fish_color_search_match --background=414559 -fish_color_operator f4b8e4 -fish_color_escape ea999c -fish_color_autosuggestion 737994 -fish_color_cancel e78284 -fish_color_cwd e5c890 -fish_color_user 81c8be -fish_color_host 8caaee -fish_color_host_remote a6d189 -fish_color_status e78284 -fish_pager_color_progress 737994 -fish_pager_color_prefix f4b8e4 -fish_pager_color_completion c6d0f5 -fish_pager_color_description 737994 diff --git a/.config/fish/themes/Catppuccin Mocha.theme b/.config/fish/themes/Catppuccin Mocha.theme deleted file mode 100644 index 3de58fc..0000000 --- a/.config/fish/themes/Catppuccin Mocha.theme +++ /dev/null @@ -1,29 +0,0 @@ -# name: 'Catppuccin mocha' -# url: 'https://github.com/catppuccin/fish' -# preferred_background: 1e1e2e - -fish_color_normal cdd6f4 -fish_color_command 89b4fa -fish_color_param f2cdcd -fish_color_keyword f38ba8 -fish_color_quote a6e3a1 -fish_color_redirection f5c2e7 -fish_color_end fab387 -fish_color_comment 7f849c -fish_color_error f38ba8 -fish_color_gray 6c7086 -fish_color_selection --background=313244 -fish_color_search_match --background=313244 -fish_color_operator f5c2e7 -fish_color_escape eba0ac -fish_color_autosuggestion 6c7086 -fish_color_cancel f38ba8 -fish_color_cwd f9e2af -fish_color_user 94e2d5 -fish_color_host 89b4fa -fish_color_host_remote a6e3a1 -fish_color_status f38ba8 -fish_pager_color_progress 6c7086 -fish_pager_color_prefix f5c2e7 -fish_pager_color_completion cdd6f4 -fish_pager_color_description 6c7086 diff --git a/.config/fish/themes/catppuccin-macchiato.theme b/.config/fish/themes/catppuccin-dark.theme similarity index 100% rename from .config/fish/themes/catppuccin-macchiato.theme rename to .config/fish/themes/catppuccin-dark.theme diff --git a/.config/fish/themes/Catppuccin Latte.theme b/.config/fish/themes/catppuccin-light.theme similarity index 100% rename from .config/fish/themes/Catppuccin Latte.theme rename to .config/fish/themes/catppuccin-light.theme diff --git a/.config/fish/themes/gruvbox-material-dark.theme b/.config/fish/themes/gruvbox-material-dark.theme new file mode 100644 index 0000000..f6cbf71 --- /dev/null +++ b/.config/fish/themes/gruvbox-material-dark.theme @@ -0,0 +1,19 @@ +fish_color_normal D4BE98 +fish_color_command 89B482 +fish_color_keyword 7DAEA3 +fish_color_quote D8A657 +fish_color_redirection D4BE98 +fish_color_end E78A4E +fish_color_error red +fish_color_param D3869B +fish_color_comment purple +fish_color_selection --background=504945 +fish_color_search_match --background=504945 +fish_color_operator A9B665 +fish_color_escape 7DAEA3 +fish_color_autosuggestion 8F3F71 + +fish_pager_color_progress 8F3F71 +fish_pager_color_prefix 89B482 +fish_pager_color_completion D4BE98 +fish_pager_color_description 8F3F71 diff --git a/.config/fish/themes/gruvbox-material-light.theme b/.config/fish/themes/gruvbox-material-light.theme new file mode 100644 index 0000000..f6cbf71 --- /dev/null +++ b/.config/fish/themes/gruvbox-material-light.theme @@ -0,0 +1,19 @@ +fish_color_normal D4BE98 +fish_color_command 89B482 +fish_color_keyword 7DAEA3 +fish_color_quote D8A657 +fish_color_redirection D4BE98 +fish_color_end E78A4E +fish_color_error red +fish_color_param D3869B +fish_color_comment purple +fish_color_selection --background=504945 +fish_color_search_match --background=504945 +fish_color_operator A9B665 +fish_color_escape 7DAEA3 +fish_color_autosuggestion 8F3F71 + +fish_pager_color_progress 8F3F71 +fish_pager_color_prefix 89B482 +fish_pager_color_completion D4BE98 +fish_pager_color_description 8F3F71 diff --git a/.config/i3/config b/.config/i3/config index 7b79107..941d87f 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -71,7 +71,7 @@ bindsym $mod+Return exec $terminal bindsym $mod+q kill # start dmenu (a program launcher) -bindsym $mod+d exec --no-startup-id $HOME/.config/rofi/launchers/type-4/launcher.sh +bindsym $mod+d exec --no-startup-id rofi -show drun # A more modern dmenu replacement is rofi: # bindcode $mod+40 exec "rofi -modi drun,run -show drun" # There also is i3-dmenu-desktop which only displays applications shipping a @@ -180,32 +180,6 @@ bindsym $mod+Shift+c reload # restart i3 inplace (preserves your layout/session, can be used to upgrade i3) bindsym $mod+Shift+r restart -# set colorscheme -# set $red #ed8796 -# set $rosewater #f4dbd6 -# set $flamingo #f0c6c6 -# set $pink #f5bde6 -# set $mauve #c6a0f6 -# set $maroon #ee99a0 -# set $peach #f5a97f -# set $green #a6da95 -# set $teal #8bd5ca -# set $sky #91d7e3 -# set $sapphire #7dc4e4 -# set $blue #8aadf4 -# set $lavender #b7bdf8 -# set $fg #cad3f5 -# set $subtext1 #b8c0e0 -# set $subtext0 #a5adcb -# set $overlay2 #939ab7 -# set $overlay1 #8087a2 -# set $overlay0 #6e738d -# set $surface2 #5b6078 -# set $surface1 #494d64 -# set $surface0 #363a4f -# set $bg #24273a -# set $mantle #1e2030 -# set $crust #181926 set_from_resource $bg i3wm.background #24273A set_from_resource $fg i3wm.foreground #CAD3F5 set_from_resource $red i3wm.color1 #ED8796 @@ -214,9 +188,10 @@ set_from_resource $grey i3wm.color8 #5B6078 set_from_resource $lightyellow i3wm.color11 #F4DBD6 set_from_resource $white i3wm.color15 #A5ADCB set_from_resource $black i3wm.color0 #181926 +set_from_resource $border i3wm.border #ED8796 # target title bg fg indicator border -client.focused $lavender $bg $fg $lightyellow $lightgrey +client.focused $white $bg $fg $lightyellow $border client.focused_inactive $white $bg $fg $lightyellow $black client.unfocused $white $bg $fg $lightyellow $black client.urgent $red $bg $fg $white $red @@ -231,17 +206,17 @@ bindsym $mod2+Shift+l resize grow width 10 px or 10 ppt # window settings gaps inner 5 -gaps top 37 +gaps top 32 -assign [class="^tidal-hifi$"] 5 +assign [class="tidal-hifi"] 5 assign [class="discord"] 5 +assign [class="thunderbird"] 7 # startup programs -exec --no-startup-id nextcloud -exec --no-startup-id nitrogen --restore -exec --no-startup-id i3-msg 'workspace 2; exec $browser; workspace 1; exec $terminal' -exec --no-startup-id openrgb -d 0 -m off -d 1 -m off # sets up monitors and picom exec_always --no-startup-id ~/.local/share/scripts/monitor.sh +exec --no-startup-id nextcloud +exec --no-startup-id nitrogen --restore +exec --no-startup-id i3-msg 'workspace 1; exec $terminal' +exec --no-startup-id openrgb -d 0 -m off -d 1 -m off exec_always --no-startup-id ~/.config/polybar/launch.sh - diff --git a/.config/nvim/lua/tsousa/plugins/colorscheme.lua b/.config/nvim/lua/tsousa/plugins/colorscheme.lua index f2e0172..4d68081 100644 --- a/.config/nvim/lua/tsousa/plugins/colorscheme.lua +++ b/.config/nvim/lua/tsousa/plugins/colorscheme.lua @@ -1,51 +1,53 @@ local color = "catppuccin" local background = "dark" +local transparency = false function SetColor() - vim.cmd.colorscheme(color) - vim.opt.background = background - - -- transparency - vim.api.nvim_set_hl(0, "Normal", { bg = "none" }) - vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" }) + vim.cmd.colorscheme(color) + vim.opt.background = background + -- transparency + if transparency then + vim.api.nvim_set_hl(0, "Normal", { bg = "none" }) + vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" }) + end end return { - { - "catppuccin/nvim", - priority = 1000, - config = function() - require("catppuccin").setup({ - -- flavour = "macchiato", -- latte, frappe, macchiato, mocha - background = { - dark = "macchiato", - light = "latte", - }, - transparent_background = false, - term_colors = false, - integrations = { - cmp = true, - gitsigns = true, - telescope = true, - treesitter = true, - treesitter_context = true, - fidget = true, - }, - SetColor() - }) - end - }, + { + "catppuccin/nvim", + priority = 1000, + config = function() + require("catppuccin").setup({ + -- flavour = "macchiato", -- latte, frappe, macchiato, mocha + background = { + dark = "macchiato", + light = "latte", + }, + transparent_background = false, + term_colors = false, + integrations = { + cmp = true, + gitsigns = true, + telescope = true, + treesitter = true, + treesitter_context = true, + fidget = true, + }, + SetColor(), + }) + end, + }, - { - "sainnhe/gruvbox-material", - priority = 1000, - config = function() - local contrast = "medium" - if background == "light" then - contrast = "soft" - end - vim.g.gruvbox_material_background = contrast - vim.g.gruvbox_material_foreground = "material" - SetColor() - end - }, + { + "sainnhe/gruvbox-material", + priority = 1000, + config = function() + local contrast = "medium" + if background == "light" then + contrast = "soft" + end + vim.g.gruvbox_material_background = contrast + vim.g.gruvbox_material_foreground = "material" + SetColor() + end, + }, } diff --git a/.config/nvim/lua/tsousa/plugins/init.lua b/.config/nvim/lua/tsousa/plugins/init.lua index af533be..80744ba 100644 --- a/.config/nvim/lua/tsousa/plugins/init.lua +++ b/.config/nvim/lua/tsousa/plugins/init.lua @@ -11,6 +11,10 @@ return { "tpope/vim-surround", "tpope/vim-repeat", "laytan/cloak.nvim", + { + "ThePrimeagen/vim-be-good", + disabled = false, + }, { "jbyuki/instant.nvim", config = function() diff --git a/.config/nvim/lua/tsousa/plugins/lsp.lua b/.config/nvim/lua/tsousa/plugins/lsp.lua index 3c2256e..ab139da 100644 --- a/.config/nvim/lua/tsousa/plugins/lsp.lua +++ b/.config/nvim/lua/tsousa/plugins/lsp.lua @@ -1,263 +1,255 @@ return { - { - 'hrsh7th/nvim-cmp', - dependencies = { - 'hrsh7th/cmp-nvim-lsp', -- lsp - 'hrsh7th/cmp-nvim-lua', -- Nvim API completions - 'hrsh7th/cmp-buffer', --buffer completions - 'hrsh7th/cmp-path', --path completions - 'hrsh7th/cmp-cmdline', --cmdline completions - 'L3MON4D3/LuaSnip', - 'saadparwaiz1/cmp_luasnip', - 'rafamadriz/friendly-snippets', - 'onsails/lspkind.nvim', - -- 'zbirenbaum/copilot-cmp', - }, - config = function() - local cmp = require("cmp") - local luasnip = require("luasnip") - local lspkind = require("lspkind") + { + "hrsh7th/nvim-cmp", + dependencies = { + "hrsh7th/cmp-nvim-lsp", -- lsp + "hrsh7th/cmp-nvim-lua", -- Nvim API completions + "hrsh7th/cmp-buffer", --buffer completions + "hrsh7th/cmp-path", --path completions + "hrsh7th/cmp-cmdline", --cmdline completions + "L3MON4D3/LuaSnip", + "saadparwaiz1/cmp_luasnip", + "rafamadriz/friendly-snippets", + "onsails/lspkind.nvim", + -- 'zbirenbaum/copilot-cmp', + }, + config = function() + local cmp = require("cmp") + local luasnip = require("luasnip") + local lspkind = require("lspkind") - -- require("copilot_cmp").setup() + -- require("copilot_cmp").setup() - lspkind.init { - symbol_map = { - Copilot = "", - }, - } - vim.api.nvim_set_hl(0, "CmpItemKindCopilot", { fg = "#6CC644" }) + lspkind.init({ + symbol_map = { + Copilot = "", + }, + }) + vim.api.nvim_set_hl(0, "CmpItemKindCopilot", { fg = "#6CC644" }) - require("luasnip.loaders.from_vscode").lazy_load() + require("luasnip.loaders.from_vscode").lazy_load() - cmp.setup { - snippet = { - expand = function(args) - luasnip.lsp_expand(args.body) -- For `luasnip` users. - end, - }, - mapping = { - [""] = cmp.mapping.select_next_item { behavior = cmp.SelectBehavior.Insert }, - [""] = cmp.mapping.select_prev_item { behavior = cmp.SelectBehavior.Insert }, - [""] = cmp.mapping(cmp.mapping.scroll_docs(-4), { "i", "c" }), - [""] = cmp.mapping(cmp.mapping.scroll_docs(4), { "i", "c" }), - [""] = cmp.mapping.abort(), - [""] = cmp.mapping.confirm({ - behavior = cmp.ConfirmBehavior.Insert, - select = true - }, - { "i", "c" } - ), - [""] = cmp.mapping(cmp.mapping.complete(), { "i", "c" }), + cmp.setup({ + snippet = { + expand = function(args) + luasnip.lsp_expand(args.body) -- For `luasnip` users. + end, + }, + mapping = { + [""] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }), + [""] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }), + [""] = cmp.mapping(cmp.mapping.scroll_docs(-4), { "i", "c" }), + [""] = cmp.mapping(cmp.mapping.scroll_docs(4), { "i", "c" }), + [""] = cmp.mapping.abort(), + [""] = cmp.mapping.confirm({ + behavior = cmp.ConfirmBehavior.Insert, + select = true, + }), + [""] = cmp.mapping(cmp.mapping.complete(), { "i", "c" }), - [""] = cmp.mapping(function() - if luasnip.expand_or_jumpable() then - luasnip.expand_or_jump() - end - end), - [""] = cmp.mapping(function() - if luasnip.jumpable(-1) then - luasnip.jump(-1) - end - end - ), - }, - formatting = { - -- fields = { "kind", "abbr", "menu" }, - format = lspkind.cmp_format { - with_text = true, - menu = { - buffer = "[buf]", - nvim_lsp = "[lsp]", - copilot = "[cop]", - orgmode = "[org]", - luasnip = "[snip]", - nvim_lsp_signature_help = "[sig]", - nvim_lua = "[lua]", - path = "[path]", - }, - }, - }, - sources = cmp.config.sources( - { - { name = "nvim_lua" }, - { name = "nvim_lsp" }, - { name = "luasnip" }, - --{ name = "nvim_lsp_signature_help" }, - { name = "path" }, - { name = "copilot" }, - { name = "orgmode" }, - }, - { - --This sources will only show up if there aren't any sources from the other list - { name = "buffer", keyword_length = 5 }, - } - ), - sorting = { - comparators = { - cmp.config.compare.offset, - cmp.config.compare.exact, - cmp.config.compare.score, + [""] = cmp.mapping(function() + if luasnip.expand_or_jumpable() then + luasnip.expand_or_jump() + end + end), + [""] = cmp.mapping(function() + if luasnip.jumpable(-1) then + luasnip.jump(-1) + end + end), + }, - -- copied from cmp-under, but I don't think I need the plugin for this. - -- I might add some more of my own. - function(entry1, entry2) - local _, entry1_under = entry1.completion_item.label:find "^_+" - local _, entry2_under = entry2.completion_item.label:find "^_+" - entry1_under = entry1_under or 0 - entry2_under = entry2_under or 0 - if entry1_under > entry2_under then - return false - elseif entry1_under < entry2_under then - return true - end - end, + formatting = { + expandable_indicator = true, + fields = { "abbr", "kind", "menu" }, + format = lspkind.cmp_format({ + with_text = true, + menu = { + buffer = "[buf]", + nvim_lsp = "[lsp]", + copilot = "[cop]", + orgmode = "[org]", + luasnip = "[snip]", + nvim_lsp_signature_help = "[sig]", + nvim_lua = "[lua]", + path = "[path]", + }, + }), + }, + sources = cmp.config.sources({ + { name = "nvim_lua" }, + { name = "nvim_lsp" }, + { name = "luasnip" }, + --{ name = "nvim_lsp_signature_help" }, + { name = "path" }, + { name = "copilot" }, + { name = "orgmode" }, + }, { + --This sources will only show up if there aren't any sources from the other list + { name = "buffer", keyword_length = 5 }, + }), + sorting = { + comparators = { + cmp.config.compare.offset, + cmp.config.compare.exact, + cmp.config.compare.score, - cmp.config.compare.kind, - cmp.config.compare.sort_text, - cmp.config.compare.length, - cmp.config.compare.order, - }, - }, - experimental = { - ghost_text = true, - native_menu = false, - }, - } - end, - }, + -- copied from cmp-under, but I don't think I need the plugin for this. + -- I might add some more of my own. + function(entry1, entry2) + local _, entry1_under = entry1.completion_item.label:find("^_+") + local _, entry2_under = entry2.completion_item.label:find("^_+") + entry1_under = entry1_under or 0 + entry2_under = entry2_under or 0 + if entry1_under > entry2_under then + return false + elseif entry1_under < entry2_under then + return true + end + end, - { - 'zbirenbaum/copilot.lua', - event = "InsertEnter", - config = function() - require("copilot").setup({ - suggestion = { - enabled = true, - auto_trigger = true, - keymap = { - accept = "", - }, - } - }) - end - }, - { - "neovim/nvim-lspconfig", - dependencies = { - "hrsh7th/nvim-cmp", - "williamboman/mason-lspconfig.nvim", - "williamboman/mason.nvim", - "j-hui/fidget.nvim", - }, - config = function() - require("fidget").setup({ - notification = { - window = { - winblend = 0, - } - } - }) + cmp.config.compare.kind, + cmp.config.compare.sort_text, + cmp.config.compare.length, + cmp.config.compare.order, + }, + }, + experimental = { + ghost_text = true, + native_menu = false, + }, + }) + end, + }, - vim.api.nvim_create_augroup("_mason", { clear = true }) - require("mason").setup({ - PATH = "skip", - ui = { - icons = { - package_installed = "", - package_pending = "󱥸", - package_uninstalled = "" - } - }, - max_concurrent_installers = 10, - }) + { + "zbirenbaum/copilot.lua", + event = "InsertEnter", + config = function() + require("copilot").setup({ + suggestion = { + enabled = true, + auto_trigger = true, + keymap = { + accept = "", + }, + }, + }) + end, + }, + { + "neovim/nvim-lspconfig", + dependencies = { + "hrsh7th/nvim-cmp", + "williamboman/mason-lspconfig.nvim", + "williamboman/mason.nvim", + "folke/neodev.nvim", + { + "j-hui/fidget.nvim", + opts = { + notification = { + window = { + winblend = 0, + }, + }, + }, + }, + }, + config = function() + require("neodev").setup({}) - local mason_lspconfig = require("mason-lspconfig") + require("mason").setup({ + PATH = "skip", + ui = { + icons = { + package_installed = "", + package_pending = "󱥸", + package_uninstalled = "", + }, + }, + }) - local lspconfig = require("lspconfig") + -- keybinds for diagnostics + vim.keymap.set("n", "vd", vim.diagnostic.open_float) + vim.keymap.set("n", "[d", vim.diagnostic.goto_prev) + vim.keymap.set("n", "]d", vim.diagnostic.goto_next) + vim.keymap.set("n", "ve", vim.diagnostic.setloclist) - -- ADD NVIM CMP AS A CAPABILITY - local lsp_defaults = lspconfig.util.default_config - local capabilities = vim.tbl_deep_extend( - 'force', - lsp_defaults.capabilities, - require('cmp_nvim_lsp').default_capabilities() - ) + -- autocmd LSP keybinds + vim.api.nvim_create_autocmd("LspAttach", { + group = vim.api.nvim_create_augroup("TsousaLspConfig", {}), + callback = function(e) + local bufopts = { buffer = e.buf } + vim.keymap.set("n", "gD", vim.lsp.buf.declaration, bufopts) + vim.keymap.set("n", "gd", vim.lsp.buf.definition, bufopts) + vim.keymap.set("n", "gi", vim.lsp.buf.implementation, bufopts) + vim.keymap.set("n", "K", vim.lsp.buf.hover, bufopts) + vim.keymap.set("n", "D", vim.lsp.buf.type_definition, bufopts) + vim.keymap.set("n", "rn", vim.lsp.buf.rename, bufopts) + vim.keymap.set({ "n", "v" }, "ca", vim.lsp.buf.code_action, bufopts) + vim.keymap.set("n", "wss", vim.lsp.buf.workspace_symbol, bufopts) + vim.keymap.set("n", "gr", vim.lsp.buf.references, bufopts) + -- vim.keymap.set('n', 'fo', function() vim.lsp.buf.format { async = true } end, bufopts) + vim.keymap.set("n", "fo", function() + require("conform").format({ lsp_fallback = true }) + end, bufopts) + vim.keymap.set("i", "", vim.lsp.buf.signature_help, bufopts) + end, + }) - -- keybinds for diagnostics - vim.keymap.set('n', 'vd', vim.diagnostic.open_float) - vim.keymap.set('n', '[d', vim.diagnostic.goto_prev) - vim.keymap.set('n', ']d', vim.diagnostic.goto_next) - vim.keymap.set('n', 've', vim.diagnostic.setloclist) + local lspconfig = require("lspconfig") + -- ADD NVIM CMP AS A CAPABILITY + local lsp_defaults = lspconfig.util.default_config - -- external (non mason) lsps - lspconfig.rust_analyzer.setup({ - on_init = on_init, - flags = lsp_flags, - capabilities = capabilities, - cmd = { - "rustup", "run", "stable", "rust-analyzer", - } - }) + local capabilities = + vim.tbl_deep_extend("force", lsp_defaults.capabilities, require("cmp_nvim_lsp").default_capabilities()) + -- external (non mason) lsps + lspconfig.rust_analyzer.setup({ + capabilities = capabilities, + cmd = { + "rustup", + "run", + "stable", + "rust-analyzer", + }, + }) - vim.api.nvim_create_autocmd("LspAttach", { - group = vim.api.nvim_create_augroup("TsousaLspConfig", {}), - callback = function(e) - local bufopts = { buffer = e.buf } - vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, bufopts) - vim.keymap.set('n', 'gd', vim.lsp.buf.definition, bufopts) - vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, bufopts) - vim.keymap.set('n', 'K', vim.lsp.buf.hover, bufopts) - vim.keymap.set('n', 'D', vim.lsp.buf.type_definition, bufopts) - vim.keymap.set('n', 'rn', vim.lsp.buf.rename, bufopts) - vim.keymap.set('n', 'ca', vim.lsp.buf.code_action, bufopts) - vim.keymap.set('n', 'wss', vim.lsp.buf.workspace_symbol, bufopts) - vim.keymap.set('n', 'gr', vim.lsp.buf.references, bufopts) - -- vim.keymap.set('n', 'fo', function() vim.lsp.buf.format { async = true } end, bufopts) - vim.keymap.set('n', 'fo', - function() require("conform").format({ lsp_fallback = true }) end, bufopts) - vim.keymap.set('i', '', vim.lsp.buf.signature_help, bufopts) - end - }) - - mason_lspconfig.setup({ - ensure_installed = { - lua_ls, - }, - automatic_installation = true, - handlers = { - function(server_name) - lspconfig[server_name].setup({ - on_init = on_init, - flags = lsp_flags, - capabilities = capabilities, - }) - end, - -- add here other custom overrides - ["hls"] = function() - lspconfig.hls.setup({ - settings = { - haskell = { - plugin = { - stan = { globalOn = false }, - hlint = { config = { flags = { "--ignore=Eta reduce" } } } - } - } - } - }) - end, - ["lua_ls"] = function() - lspconfig.lua_ls.setup({ - settings = { - Lua = { - diagnostics = { globals = { "vim" } }, - telemetry = { enable = false } - } - } - }) - end, - } - }) - end - }, + require("mason-lspconfig").setup({ + ensure_installed = { + "lua_ls", + }, + automatic_installation = true, + handlers = { + function(server_name) + lspconfig[server_name].setup({ + capabilities = capabilities, + }) + end, + -- add here other custom overrides + ["hls"] = function() + lspconfig.hls.setup({ + settings = { + haskell = { + plugin = { + stan = { globalOn = false }, + hlint = { config = { flags = { "--ignore=Eta reduce" } } }, + }, + }, + }, + }) + end, + ["lua_ls"] = function() + lspconfig.lua_ls.setup({ + settings = { + Lua = { + telemetry = { enable = false }, + }, + }, + }) + end, + }, + }) + end, + }, } diff --git a/.config/picom/picom.conf b/.config/picom/picom.conf index 8269d67..fefe2ba 100644 --- a/.config/picom/picom.conf +++ b/.config/picom/picom.conf @@ -203,10 +203,11 @@ focus-exclude = [ # # opacity-rule = [] opacity-rule = [ - "95:class_g = 'Alacritty'", - "100:class_g = 'Polybar'", - "100:class_g = 'firefox'", - "100:class_g = 'librewolf'", + # "95:class_g = 'Alacritty'", + # "100:class_g = 'Polybar'", + # "100:class_g = 'firefox'", + # "100:class_g = 'librewolf'", + # "100:class_g = 'android-studio'", ]; @@ -308,8 +309,8 @@ mark-ovredir-focused = true; # Try to detect windows with rounded corners and don't consider them # shaped windows. The accuracy is not very high, unfortunately. # -# detect-rounded-corners = false -detect-rounded-corners = true; +detect-rounded-corners = false +# detect-rounded-corners = true; # Detect '_NET_WM_OPACITY' on client windows, useful for window managers # not passing '_NET_WM_OPACITY' of client windows to frame windows. diff --git a/.config/polybar/config.ini b/.config/polybar/config.ini index 53e4f36..c134145 100644 --- a/.config/polybar/config.ini +++ b/.config/polybar/config.ini @@ -57,10 +57,13 @@ wm-restack = i3 [bar/laptop] inherit = section/base -width = 99.5% +; width = 99.5% +width = 100% height = 24pt -offset-x = 0.3% -offset-y = 0.5% +; offset-x = 0.3% +; offset-y = 0.5% +offset-x = 0% +offset-y = 0% ;radius = 8 modules-left = i3 sep title @@ -80,10 +83,13 @@ wm-restack = i3 [bar/secondary] inherit = section/base -width = 99.4% +; width = 99.5% +width = 100% height = 24pt -offset-x = 0.3% -offset-y = 0.7% +; offset-x = 0.3% +; offset-y = 0.5% +offset-x = 0% +offset-y = 0% ;radius = 8 modules-left = i3 diff --git a/.config/polybar/modules.ini b/.config/polybar/modules.ini index cb95adc..3731431 100644 --- a/.config/polybar/modules.ini +++ b/.config/polybar/modules.ini @@ -212,7 +212,7 @@ ramp-6-foreground = ${colors.yellow} type = internal/battery battery = BAT1 adapter = ADP1 -full-at = 90 +full-at = 100 low-at = 5 poll-interval = 5 time-format = %H:%M @@ -222,28 +222,29 @@ format-full= format-low= label-charging = %percentage%% label-discharging = %percentage%% %time% -label-full = 󱟢 +label-full = 󰁹 %percentage%% label-low = BATTERY LOW ramp-capacity-0 = 󰁺 -ramp-capacity-0-foreground = ${colors.blue} ramp-capacity-1 = 󰁻 -ramp-capacity-1-foreground = ${colors.blue} ramp-capacity-2 = 󰁼 -ramp-capacity-2-foreground = ${colors.blue} ramp-capacity-3 = 󰁽 -ramp-capacity-3-foreground = ${colors.blue} ramp-capacity-4 = 󰁾 -ramp-capacity-4-foreground = ${colors.blue} ramp-capacity-5 = 󰁿 -ramp-capacity-5-foreground = ${colors.blue} ramp-capacity-6 = 󰂀 -ramp-capacity-6-foreground = ${colors.blue} ramp-capacity-7 = 󰂁 -ramp-capacity-7-foreground = ${colors.blue} ramp-capacity-8 = 󰂂 -ramp-capacity-8-foreground = ${colors.blue} ramp-capacity-9 = 󰁹 -ramp-capacity-9-foreground = ${colors.blue} +; ramp-capacity-0-foreground = ${colors.blue} +; ramp-capacity-1-foreground = ${colors.blue} +; ramp-capacity-2-foreground = ${colors.blue} +; ramp-capacity-3-foreground = ${colors.blue} +; ramp-capacity-4-foreground = ${colors.blue} +; ramp-capacity-5-foreground = ${colors.blue} +; ramp-capacity-6-foreground = ${colors.blue} +; ramp-capacity-7-foreground = ${colors.blue} +; ramp-capacity-8-foreground = ${colors.blue} +; ramp-capacity-9-foreground = ${colors.blue} +ramp-capacity-foreground = ${colors.blue} bar-capacity-width = 10 animation-charging-0 = 󰢜 animation-charging-0-foreground = ${colors.green} diff --git a/.config/rofi/colors/gruvbox-material-dark.rasi b/.config/rofi/colors/gruvbox-material-dark.rasi index 11b945e..6f369b0 100644 --- a/.config/rofi/colors/gruvbox-material-dark.rasi +++ b/.config/rofi/colors/gruvbox-material-dark.rasi @@ -1,9 +1,9 @@ * { - background: #282828; - background-alt: #1D2021; - foreground: #D4BE98; - selected: #7DAEA3; - active: #A9B665; - urgent: #EA6962; + background: #282828FF; + background-alt: #1D2021FF; + foreground: #D4BE98FF; + selected: #7DAEA3FF; + active: #A9B665FF; + urgent: #EA6962FF; } diff --git a/.config/rofi/colors/gruvbox-material-light.rasi b/.config/rofi/colors/gruvbox-material-light.rasi index 68d5e3a..5ba4510 100644 --- a/.config/rofi/colors/gruvbox-material-light.rasi +++ b/.config/rofi/colors/gruvbox-material-light.rasi @@ -1,8 +1,8 @@ * { - background: #F2E5BC; - background-alt: #FBF1C7; - foreground: #654735; - selected: #45707A; - active: #6C782E; - urgent: #C14A4A; + background: #F2E5BCFF; + background-alt: #FBF1C7FF; + foreground: #654735FF; + selected: #45707AFF; + active: #6C782EFF; + urgent: #C14A4AFF; } diff --git a/.config/rofi/config.rasi b/.config/rofi/config.rasi index dae3cf7..248b7fd 100644 --- a/.config/rofi/config.rasi +++ b/.config/rofi/config.rasi @@ -101,7 +101,7 @@ configuration { @import "~/.config/rofi/colors/catppuccin-dark.rasi" * { - border-colour: var(selected); + border-colour: var(foreground); handle-colour: var(selected); background-colour: var(background); foreground-colour: var(foreground); diff --git a/.config/tmux/tmux.conf b/.config/tmux/tmux.conf index e07dc21..b6dc075 100644 --- a/.config/tmux/tmux.conf +++ b/.config/tmux/tmux.conf @@ -4,7 +4,7 @@ set -ag terminal-overrides ",*:RGB" unbind C-b set-option -g prefix C-a bind-key C-a send-prefix -set -g status-style 'bg=#24273A fg=#cad3f5' +set -g status-style 'bg=#24273A fg=#CAD3F5' set-option -g status-position top set-option -g status-right "" set -g status-left-length 20 diff --git a/.local/share/scripts/theme-selector.sh b/.local/share/scripts/theme-selector.sh old mode 100644 new mode 100755 index fed4d63..e5c2921 --- a/.local/share/scripts/theme-selector.sh +++ b/.local/share/scripts/theme-selector.sh @@ -10,15 +10,21 @@ theme_options=( # rofi script to get what theme to use chosen=$(printf '%s\n' "${theme_options[@]}" | rofi -dmenu -p "Theme") - +if [[ -z $chosen ]]; then + exit 1 +fi theme=$(echo "${chosen}" | rev | cut -d- -f2- | rev) background=$(echo "${chosen}" | awk -F'-' '{print $NF}') -echo "Theme: ${theme}" -echo "Background: ${background}" # change rofi theme -sed -i "s/\(@import \".config\/rofi\/colors\/\).*/\1${theme}-${background}.rasi\"/" ~/.config/rofi/config.rasi +rofi_conf=~/.config/rofi/config.rasi +rofi_theme_check="${rofi_conf}"/"${chosen}".rasi +if [[ -f $rofi_theme_check ]]; then + echo "Rofi Theme ${chosen} not found" + exit 1 +fi +sed -i "s/\(@import \"~\/.config\/rofi\/colors\/\).*/\1${theme}-${background}.rasi\"/" $rofi_conf # change neovim theme sed -i "s/\(local color = \).*/\1\"${theme}\"/" ~/.config/nvim/lua/tsousa/plugins/colorscheme.lua @@ -26,7 +32,22 @@ sed -i "s/\(local background = \).*/\1\"${background}\"/" ~/.config/nvim/lua/tso # change xresources xresources_themes=".Xresources.d" -sed -i "s/#include \".*\"/#include \"~\/${xresources_themes}\/${theme}-${background}\"/" ~/.Xresources +sed -i "s/#include \".*\"/#include \"${xresources_themes}\/${theme}-${background}\"/" ~/.Xresources xrdb ~/.Xresources +# change tmux +# add case for when tmux is not running +tmux_background=$(grep "^*.background" ~/"${xresources_themes}"/"${theme}"-"${background}" | awk '{print $2}') +tmux_foreground=$(grep "^*.foreground" ~/"${xresources_themes}"/"${theme}"-"${background}" | awk '{print $2}') +sed -i "s/set -g status-style 'bg=.* fg=.*'/set -g status-style 'bg=${tmux_background} fg=${tmux_foreground}'/" ~/.config/tmux/tmux.conf +tmux source "$HOME/.config/tmux/tmux.conf" +# change dunst + +# change fish +fish_config theme choose "$chosen" + +# maybe change gtk theme?? + +# recompile i3 +i3-msg restart