diff --git a/programs/neovim/init.lua b/programs/neovim/init.lua index 4fb4036..1e1373d 100644 --- a/programs/neovim/init.lua +++ b/programs/neovim/init.lua @@ -14,6 +14,7 @@ local function load_plugins() use 'folke/lua-dev.nvim' use 'folke/tokyonight.nvim' -- Theme use { 'folke/trouble.nvim', requires = 'kyazdani42/nvim-web-devicons' } + use { 'justinhj/battery.nvim', requires = {{'kyazdani42/nvim-web-devicons'}, {'nvim-lua/plenary.nvim'}}} use { 'nvim-telescope/telescope.nvim', requires = { { 'nvim-lua/popup.nvim' }, { 'nvim-lua/plenary.nvim' } } } use 'nvim-telescope/telescope-dap.nvim' use {'nvim-telescope/telescope-fzf-native.nvim', run = 'make' } @@ -72,6 +73,17 @@ _G.load_config = function() -- nvim-autopairs require('nvim-autopairs').setup() + -- battery.nvim + local battery = require("battery") + battery.setup({ + update_rate_seconds = 30, -- Number of seconds between checking battery status + show_status_when_no_battery = true, -- Don't show any icon or text when no battery found (desktop for example) + show_plugged_icon = true, -- If true show a cable icon alongside the battery icon when plugged in + show_unplugged_icon = true, -- When true show a diconnected cable icon when not plugged in + show_percent = false, -- Whether or not to show the percent charge remaining in digits + vertical_icons = true, -- When true icons are vertical, otherwise shows horizontal battery icon + }) + -- nvim-dap local dap = require('dap') dap.configurations.lua = { diff --git a/programs/neovim/settings/salargalaxyline.lua b/programs/neovim/settings/salargalaxyline.lua index 1903b73..25bb01b 100644 --- a/programs/neovim/settings/salargalaxyline.lua +++ b/programs/neovim/settings/salargalaxyline.lua @@ -174,9 +174,20 @@ gls.right[3] = { gls.right[4] = { ScrollBar = { provider = 'ScrollBar', + separator_highlight = { colors.purple, colors.bg }, highlight = { colors.yellow, colors.purple }, }, } +gls.right[5] = { + BatteryNvim = { + provider = function() + return require 'battery'.get_status_line() + end, + separator = '', + separator_highlight = { colors.bg, colors.purple }, + highlight = { colors.grey, colors.purple }, + }, +} gls.short_line_left[1] = { BufferType = {