From b2322f287706e1ae0c0a8c537703e8421b20c7ae Mon Sep 17 00:00:00 2001 From: Mark Riedesel Date: Fri, 14 Jun 2024 08:19:48 -0500 Subject: [PATCH] adding neovim config, splitting it up --- .config/nvim/.stylua.toml | 2 + .config/nvim/after/plugin/set_title.lua | 2 + .config/nvim/init.lua | 2 + .config/nvim/lazy-lock.json | 28 ++++ .config/nvim/lua/klowner/core.lua | 38 +++++ .config/nvim/lua/klowner/lazy.lua | 25 ++++ .config/nvim/lua/klowner/plugins/init.lua | 4 + .config/nvim/lua/klowner/plugins/lazygit.lua | 19 +++ .../lua/klowner/plugins/lsp/lspconfig.lua | 137 ++++++++++++++++++ .../nvim/lua/klowner/plugins/lsp/mason.lua | 54 +++++++ .config/nvim/lua/klowner/plugins/nvim-cmp.lua | 63 ++++++++ .config/nvim/lua/klowner/plugins/tagbar.lua | 6 + .../nvim/lua/klowner/plugins/telescope.lua | 49 +++++++ .../klowner/plugins/tpope-vim-commentary.lua | 7 + .../klowner/plugins/tpope-vim-fugitive.lua | 8 + .config/nvim/lua/klowner/plugins/trouble.lua | 12 ++ .config/waybar/style.css | 5 +- 17 files changed, 460 insertions(+), 1 deletion(-) create mode 100644 .config/nvim/.stylua.toml create mode 100644 .config/nvim/after/plugin/set_title.lua create mode 100644 .config/nvim/init.lua create mode 100644 .config/nvim/lazy-lock.json create mode 100644 .config/nvim/lua/klowner/core.lua create mode 100644 .config/nvim/lua/klowner/lazy.lua create mode 100644 .config/nvim/lua/klowner/plugins/init.lua create mode 100644 .config/nvim/lua/klowner/plugins/lazygit.lua create mode 100644 .config/nvim/lua/klowner/plugins/lsp/lspconfig.lua create mode 100644 .config/nvim/lua/klowner/plugins/lsp/mason.lua create mode 100644 .config/nvim/lua/klowner/plugins/nvim-cmp.lua create mode 100644 .config/nvim/lua/klowner/plugins/tagbar.lua create mode 100644 .config/nvim/lua/klowner/plugins/telescope.lua create mode 100644 .config/nvim/lua/klowner/plugins/tpope-vim-commentary.lua create mode 100644 .config/nvim/lua/klowner/plugins/tpope-vim-fugitive.lua create mode 100644 .config/nvim/lua/klowner/plugins/trouble.lua diff --git a/.config/nvim/.stylua.toml b/.config/nvim/.stylua.toml new file mode 100644 index 0000000..0435f67 --- /dev/null +++ b/.config/nvim/.stylua.toml @@ -0,0 +1,2 @@ +indent_type = "Spaces" +indent_width = 2 diff --git a/.config/nvim/after/plugin/set_title.lua b/.config/nvim/after/plugin/set_title.lua new file mode 100644 index 0000000..7c8231f --- /dev/null +++ b/.config/nvim/after/plugin/set_title.lua @@ -0,0 +1,2 @@ +-- By default title is off. Needed for detecting window as neovim instance (sworkstyle) +vim.cmd "set title" diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua new file mode 100644 index 0000000..0ff473a --- /dev/null +++ b/.config/nvim/init.lua @@ -0,0 +1,2 @@ +require('klowner.core') +require('klowner.lazy') diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json new file mode 100644 index 0000000..7af8b01 --- /dev/null +++ b/.config/nvim/lazy-lock.json @@ -0,0 +1,28 @@ +{ + "LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" }, + "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, + "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, + "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, + "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, + "friendly-snippets": { "branch": "main", "commit": "700c4a25caacbb4648c9a27972c2fe203948e0c2" }, + "lazy.nvim": { "branch": "main", "commit": "eb4957442e3182f051b0ae11da32e06d22c190e3" }, + "lazygit.nvim": { "branch": "main", "commit": "ad3e1ea592f9d13e86e0d4e850224d9d78069508" }, + "lspkind.nvim": { "branch": "master", "commit": "1735dd5a5054c1fb7feaf8e8658dbab925f4f0cf" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "37a336b653f8594df75c827ed589f1c91d91ff6c" }, + "mason-tool-installer.nvim": { "branch": "main", "commit": "c5e07b8ff54187716334d585db34282e46fa2932" }, + "mason.nvim": { "branch": "main", "commit": "0950b15060067f752fde13a779a994f59516ce3d" }, + "neodev.nvim": { "branch": "main", "commit": "02893eeb9d6e8503817bd52385e111cba9a90500" }, + "nvim-cmp": { "branch": "main", "commit": "a110e12d0b58eefcf5b771f533fc2cf3050680ac" }, + "nvim-lsp-file-operations": { "branch": "master", "commit": "223aca86b737dc66e9c51ebcda8788a8d9cc6cf2" }, + "nvim-lspconfig": { "branch": "master", "commit": "4d38bece98300e3e5cd24a9aa0d0ebfea4951c16" }, + "nvim-web-devicons": { "branch": "master", "commit": "c0cfc1738361b5da1cd0a962dd6f774cc444f856" }, + "plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" }, + "tagbar": { "branch": "master", "commit": "0815b5455c792a610d28ff3e7981642c9cf05d62" }, + "telescope-fzf-native.nvim": { "branch": "main", "commit": "9ef21b2e6bb6ebeaf349a0781745549bbb870d27" }, + "telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" }, + "todo-comments.nvim": { "branch": "main", "commit": "51e10f838e84b4756c16311d0b1ef0972c6482d2" }, + "trouble.nvim": { "branch": "main", "commit": "60b0ac3772e991bc194207afc28368a5f15d913a" }, + "vim-commentary": { "branch": "master", "commit": "c4b8f52cbb7142ec239494e5a2c4a512f92c4d07" }, + "vim-fugitive": { "branch": "master", "commit": "64d6cafb9dcbacce18c26d7daf617ebb96b273f3" }, + "vim-tmux-navigator": { "branch": "master", "commit": "5b3c701686fb4e6629c100ed32e827edf8dad01e" } +} \ No newline at end of file diff --git a/.config/nvim/lua/klowner/core.lua b/.config/nvim/lua/klowner/core.lua new file mode 100644 index 0000000..4969847 --- /dev/null +++ b/.config/nvim/lua/klowner/core.lua @@ -0,0 +1,38 @@ +vim.g.netrw_liststyle = 3 +vim.g.mapleader = " " +vim.g.maplocalleader = " " + +-- options +local opt = vim.opt +opt.relativenumber = true +opt.number = true +opt.autoread = true -- automatically reload modified files +opt.wildmenu = true -- handle autocompletion menu + +-- utility functions for key mappings +function ToggleLineNumbering() + vim.o.number = not vim.o.number + vim.o.relativenumber = vim.o.number +end + +-- keymappings +local keymap = vim.keymap + +keymap.set('n', 'n', ':lua ToggleLineNumbering()', {desc="Toggle line numbering"}) + +keymap.set('', '', ':bnext', {desc="Jump to next buffer"}) +keymap.set('', '', ':bprev', {desc="Jump to previous buffer"}) + +keymap.set('', '', 'h', {desc="Focus window left"}) +keymap.set('', '', 'j', {desc="Focus window down"}) +keymap.set('', '', 'k', {desc="Focus window up"}) +keymap.set('', '', 'l', {desc="Focus window right"}) + +keymap.set('n', 'pu', ':Lazy update', {desc="Update plugins managed by Lazy"}) +keymap.set('n', 'pi', ':Lazy install', {desc="Install missing plugins managed by Lazy"}) +keymap.set('n', 'pc', ':Lazy clean', {desc="Clean plugins managed by Lazy"}) + +keymap.set('n', 'w', ':w!', {desc="Quicksave"}) + +keymap.set('n', '', 'mzgg=G`z', {desc="Auto-format entire document"}) +keymap.set('v', '', ':sort', {desc="Sort selected lines alphanumerically"}) diff --git a/.config/nvim/lua/klowner/lazy.lua b/.config/nvim/lua/klowner/lazy.lua new file mode 100644 index 0000000..b2b42b0 --- /dev/null +++ b/.config/nvim/lua/klowner/lazy.lua @@ -0,0 +1,25 @@ +local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" +if not vim.loop.fs_stat(lazypath) then + vim.fn.system({ + "git", + "clone", + "--filter=blob:none", + "https://github.com/folke/lazy.nvim.git", + "--branch=stable", + lazypath, + }) +end +vim.opt.rtp:prepend(lazypath) + +require("lazy").setup({ + { import = "klowner.plugins" }, + { import = "klowner.plugins.lsp" }, +},{ + checker = { + enabled = true, + notify = false, + }, + change_detection = { + notify = false, + }, +}) diff --git a/.config/nvim/lua/klowner/plugins/init.lua b/.config/nvim/lua/klowner/plugins/init.lua new file mode 100644 index 0000000..2998013 --- /dev/null +++ b/.config/nvim/lua/klowner/plugins/init.lua @@ -0,0 +1,4 @@ +return { + "nvim-lua/plenary.nvim", -- commonly used lua functions + "christoomey/vim-tmux-navigator", -- tmux & split window navigation +} diff --git a/.config/nvim/lua/klowner/plugins/lazygit.lua b/.config/nvim/lua/klowner/plugins/lazygit.lua new file mode 100644 index 0000000..5d3f334 --- /dev/null +++ b/.config/nvim/lua/klowner/plugins/lazygit.lua @@ -0,0 +1,19 @@ +return { + "kdheepak/lazygit.nvim", + cmd = { + "LazyGit", + "LazyGitConfig", + "LazyGitCurrentFile", + "LazyGitFilter", + "LazyGitFilterCurrentFile", + }, + -- optional for floating window border decoration + dependencies = { + "nvim-lua/plenary.nvim", + }, + -- setting the keybinding for LazyGit with 'keys' is recommended in + -- order to load the plugin when the command is run for the first time + keys = { + { "lg", "LazyGit", desc = "Open lazy git" }, + }, +} diff --git a/.config/nvim/lua/klowner/plugins/lsp/lspconfig.lua b/.config/nvim/lua/klowner/plugins/lsp/lspconfig.lua new file mode 100644 index 0000000..00da4bf --- /dev/null +++ b/.config/nvim/lua/klowner/plugins/lsp/lspconfig.lua @@ -0,0 +1,137 @@ +return { + "neovim/nvim-lspconfig", + event = { "BufReadPre", "BufNewFile" }, + dependencies = { + "hrsh7th/cmp-nvim-lsp", + { "antosha417/nvim-lsp-file-operations", config = true }, + { "folke/neodev.nvim", opts = {} }, + }, + config = function() + -- import lspconfig plugin + local lspconfig = require("lspconfig") + + -- import mason_lspconfig plugin + local mason_lspconfig = require("mason-lspconfig") + + -- import cmp-nvim-lsp plugin + local cmp_nvim_lsp = require("cmp_nvim_lsp") + + local keymap = vim.keymap -- for conciseness + + vim.api.nvim_create_autocmd("LspAttach", { + group = vim.api.nvim_create_augroup("UserLspConfig", {}), + callback = function(ev) + -- Buffer local mappings. + -- See `:help vim.lsp.*` for documentation on any of the below functions + local opts = { buffer = ev.buf, silent = true } + + -- set keybinds + opts.desc = "Show LSP references" + keymap.set("n", "gR", "Telescope lsp_references", opts) -- show definition, references + + opts.desc = "Go to declaration" + keymap.set("n", "gD", vim.lsp.buf.declaration, opts) -- go to declaration + + opts.desc = "Show LSP definitions" + keymap.set("n", "gd", "Telescope lsp_definitions", opts) -- show lsp definitions + + opts.desc = "Show LSP implementations" + keymap.set("n", "gi", "Telescope lsp_implementations", opts) -- show lsp implementations + + opts.desc = "Show LSP type definitions" + keymap.set("n", "gt", "Telescope lsp_type_definitions", opts) -- show lsp type definitions + + opts.desc = "See available code actions" + keymap.set({ "n", "v" }, "ca", vim.lsp.buf.code_action, opts) -- see available code actions, in visual mode will apply to selection + + opts.desc = "Smart rename" + keymap.set("n", "rn", vim.lsp.buf.rename, opts) -- smart rename + + opts.desc = "Show buffer diagnostics" + keymap.set("n", "D", "Telescope diagnostics bufnr=0", opts) -- show diagnostics for file + + opts.desc = "Show line diagnostics" + keymap.set("n", "d", vim.diagnostic.open_float, opts) -- show diagnostics for line + + opts.desc = "Go to previous diagnostic" + keymap.set("n", "[d", vim.diagnostic.goto_prev, opts) -- jump to previous diagnostic in buffer + + opts.desc = "Go to next diagnostic" + keymap.set("n", "]d", vim.diagnostic.goto_next, opts) -- jump to next diagnostic in buffer + + opts.desc = "Show documentation for what is under cursor" + keymap.set("n", "K", vim.lsp.buf.hover, opts) -- show documentation for what is under cursor + + opts.desc = "Restart LSP" + keymap.set("n", "rs", ":LspRestart", opts) -- mapping to restart lsp if necessary + end, + }) + + -- used to enable autocompletion (assign to every lsp server config) + local capabilities = cmp_nvim_lsp.default_capabilities() + + -- Change the Diagnostic symbols in the sign column (gutter) + -- (not in youtube nvim video) + local signs = { Error = " ", Warn = " ", Hint = "󰠠 ", Info = " " } + for type, icon in pairs(signs) do + local hl = "DiagnosticSign" .. type + vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = "" }) + end + + mason_lspconfig.setup_handlers({ + -- default handler for installed servers + function(server_name) + lspconfig[server_name].setup({ + capabilities = capabilities, + }) + end, + ["svelte"] = function() + -- configure svelte server + lspconfig["svelte"].setup({ + capabilities = capabilities, + on_attach = function(client, bufnr) + vim.api.nvim_create_autocmd("BufWritePost", { + pattern = { "*.js", "*.ts" }, + callback = function(ctx) + -- Here use ctx.match instead of ctx.file + client.notify("$/onDidChangeTsOrJsFile", { uri = ctx.match }) + end, + }) + end, + }) + end, + ["graphql"] = function() + -- configure graphql language server + lspconfig["graphql"].setup({ + capabilities = capabilities, + filetypes = { "graphql", "gql", "svelte", "typescriptreact", "javascriptreact" }, + }) + end, + ["emmet_ls"] = function() + -- configure emmet language server + lspconfig["emmet_ls"].setup({ + capabilities = capabilities, + filetypes = { "html", "typescriptreact", "javascriptreact", "css", "sass", "scss", "less", "svelte" }, + }) + end, + ["lua_ls"] = function() + -- configure lua server (with special settings) + lspconfig["lua_ls"].setup({ + capabilities = capabilities, + settings = { + Lua = { + -- make the language server recognize "vim" global + diagnostics = { + globals = { "vim" }, + }, + completion = { + callSnippet = "Replace", + }, + }, + }, + }) + end, + }) + end, +} + diff --git a/.config/nvim/lua/klowner/plugins/lsp/mason.lua b/.config/nvim/lua/klowner/plugins/lsp/mason.lua new file mode 100644 index 0000000..748229c --- /dev/null +++ b/.config/nvim/lua/klowner/plugins/lsp/mason.lua @@ -0,0 +1,54 @@ +return { + "williamboman/mason.nvim", + dependencies = { + "williamboman/mason-lspconfig.nvim", + "WhoIsSethDaniel/mason-tool-installer.nvim", + }, + config = function() + -- import mason + local mason = require("mason") + + -- import mason-lspconfig + local mason_lspconfig = require("mason-lspconfig") + + local mason_tool_installer = require("mason-tool-installer") + + -- enable mason and configure icons + mason.setup({ + ui = { + icons = { + package_installed = "✓", + package_pending = "➜", + package_uninstalled = "✗", + }, + }, + }) + + mason_lspconfig.setup({ + -- list of servers for mason to install + ensure_installed = { + "tsserver", + "html", + "cssls", + "tailwindcss", + "svelte", + "lua_ls", + "graphql", + "emmet_ls", + "prismals", + "pyright", + }, + }) + + mason_tool_installer.setup({ + ensure_installed = { + "prettier", -- prettier formatter + "stylua", -- lua formatter + "isort", -- python formatter + "black", -- python formatter + "pylint", + "eslint_d", + }, + }) + end, +} diff --git a/.config/nvim/lua/klowner/plugins/nvim-cmp.lua b/.config/nvim/lua/klowner/plugins/nvim-cmp.lua new file mode 100644 index 0000000..0947011 --- /dev/null +++ b/.config/nvim/lua/klowner/plugins/nvim-cmp.lua @@ -0,0 +1,63 @@ +return { + "hrsh7th/nvim-cmp", + event = "InsertEnter", + dependencies = { + "hrsh7th/cmp-buffer", -- source for text in buffer + "hrsh7th/cmp-path", -- source for file system paths + { + "L3MON4D3/LuaSnip", + -- follow latest release. + version = "v2.*", -- Replace by the latest released major (first number of latest release) + -- install jsregexp (optional!). + build = "make install_jsregexp", + }, + "saadparwaiz1/cmp_luasnip", -- for autocompletion + "rafamadriz/friendly-snippets", -- useful snippets + "onsails/lspkind.nvim", -- vs-code like pictograms + }, + config = function() + local cmp = require("cmp") + + local luasnip = require("luasnip") + + local lspkind = require("lspkind") + + -- loads vscode style snippets from installed plugins (e.g. friendly-snippets) + require("luasnip.loaders.from_vscode").lazy_load() + + cmp.setup({ + completion = { + completeopt = "menu,menuone,preview,noselect", + }, + snippet = { -- configure how nvim-cmp interacts with snippet engine + expand = function(args) + luasnip.lsp_expand(args.body) + end, + }, + mapping = cmp.mapping.preset.insert({ + [""] = cmp.mapping.select_prev_item(), -- previous suggestion + [""] = cmp.mapping.select_next_item(), -- next suggestion + [""] = cmp.mapping.scroll_docs(-4), + [""] = cmp.mapping.scroll_docs(4), + [""] = cmp.mapping.complete(), -- show completion suggestions + [""] = cmp.mapping.abort(), -- close completion window + [""] = cmp.mapping.confirm({ select = false }), + }), + -- sources for autocompletion + sources = cmp.config.sources({ + { name = "nvim_lsp"}, + { name = "luasnip" }, -- snippets + { name = "buffer" }, -- text within current buffer + { name = "path" }, -- file system paths + }), + + -- configure lspkind for vs-code like pictograms in completion menu + formatting = { + format = lspkind.cmp_format({ + maxwidth = 50, + ellipsis_char = "...", + }), + }, + }) + end, +} diff --git a/.config/nvim/lua/klowner/plugins/tagbar.lua b/.config/nvim/lua/klowner/plugins/tagbar.lua new file mode 100644 index 0000000..9c4075c --- /dev/null +++ b/.config/nvim/lua/klowner/plugins/tagbar.lua @@ -0,0 +1,6 @@ +return { + "preservim/tagbar", + keys = { + { '\t', "TagbarToggle", desc = "Toggle tagbar"}, + }, +} diff --git a/.config/nvim/lua/klowner/plugins/telescope.lua b/.config/nvim/lua/klowner/plugins/telescope.lua new file mode 100644 index 0000000..abbd32f --- /dev/null +++ b/.config/nvim/lua/klowner/plugins/telescope.lua @@ -0,0 +1,49 @@ +return { + "nvim-telescope/telescope.nvim", + branch = "0.1.x", + dependencies = { + "nvim-lua/plenary.nvim", + { "nvim-telescope/telescope-fzf-native.nvim", build = "make" }, + "nvim-tree/nvim-web-devicons", + "folke/todo-comments.nvim", + }, + config = function() + local telescope = require("telescope") + local actions = require("telescope.actions") + local transform_mod = require("telescope.actions.mt").transform_mod + + local trouble = require("trouble") + + -- or create your custom action + local custom_actions = transform_mod({ + open_trouble_qflist = function(prompt_bufnr) + trouble.toggle("quickfix") + end, + }) + + telescope.setup({ + defaults = { + path_display = { "smart" }, + mappings = { + i = { + [""] = actions.move_selection_previous, -- move to prev result + [""] = actions.move_selection_next, -- move to next result + [""] = actions.send_selected_to_qflist + custom_actions.open_trouble_qflist, + [""] = require("trouble.sources.telescope").open, + }, + }, + }, + }) + + telescope.load_extension("fzf") + + -- set keymaps + local keymap = vim.keymap -- for conciseness + + keymap.set("n", "ff", "Telescope find_files", { desc = "Fuzzy find files in cwd" }) + keymap.set("n", "fr", "Telescope oldfiles", { desc = "Fuzzy find recent files" }) + keymap.set("n", "fs", "Telescope live_grep", { desc = "Find string in cwd" }) + keymap.set("n", "fc", "Telescope grep_string", { desc = "Find string under cursor in cwd" }) + keymap.set("n", "ft", "TodoTelescope", { desc = "Find todos" }) + end, +} diff --git a/.config/nvim/lua/klowner/plugins/tpope-vim-commentary.lua b/.config/nvim/lua/klowner/plugins/tpope-vim-commentary.lua new file mode 100644 index 0000000..37ad04d --- /dev/null +++ b/.config/nvim/lua/klowner/plugins/tpope-vim-commentary.lua @@ -0,0 +1,7 @@ +return { + 'tpope/vim-commentary', + keys = { + { 'c', 'Commentary', mode = {'n','o','x'}, desc = "Toggle commented"}, + { 'cc', 'CommentaryLine', mode = 'n', desc = "Toggle commented"}, + }, +} diff --git a/.config/nvim/lua/klowner/plugins/tpope-vim-fugitive.lua b/.config/nvim/lua/klowner/plugins/tpope-vim-fugitive.lua new file mode 100644 index 0000000..f2f27e7 --- /dev/null +++ b/.config/nvim/lua/klowner/plugins/tpope-vim-fugitive.lua @@ -0,0 +1,8 @@ +return { + "tpope/vim-fugitive", + keys = { + { "b", "Git blame", desc = "Show git blame" }, + { "l", "Git log", desc = "Show git log" }, + { "gs", "Git status", desc = "Show git status"}, + }, +} diff --git a/.config/nvim/lua/klowner/plugins/trouble.lua b/.config/nvim/lua/klowner/plugins/trouble.lua new file mode 100644 index 0000000..62e1527 --- /dev/null +++ b/.config/nvim/lua/klowner/plugins/trouble.lua @@ -0,0 +1,12 @@ +return { + "folke/trouble.nvim", + dependencies = { "nvim-tree/nvim-web-devicons", "folke/todo-comments.nvim" }, + keys = { + { "xx", "TroubleToggle", desc = "Open/close trouble list" }, + { "xw", "TroubleToggle workspace_diagnostics", desc = "Open trouble workspace diagnostics" }, + { "xd", "TroubleToggle document_diagnostics", desc = "Open trouble document diagnostics" }, + { "xq", "TroubleToggle quickfix", desc = "Open trouble quickfix list" }, + { "xl", "TroubleToggle loclist", desc = "Open trouble location list" }, + { "xt", "TodoTrouble", desc = "Open todos in trouble" }, + }, +} diff --git a/.config/waybar/style.css b/.config/waybar/style.css index 42dc1dd..12f5710 100644 --- a/.config/waybar/style.css +++ b/.config/waybar/style.css @@ -51,6 +51,9 @@ window#waybar { .modules-left { border-radius: 0 0 10px 0; } +.modules-center { + background: red; +} #backlight, #battery, @@ -76,7 +79,7 @@ window#waybar { #temperature, #tray { - padding: 0 10px; + padding: 0 8px; } #workspaces button {