From 5677a3d5dc911c198e8086bd6e004f20d0e32ac6 Mon Sep 17 00:00:00 2001 From: Nikita Bykov Date: Sun, 25 May 2025 23:16:46 +0500 Subject: [PATCH] auto refresh lualine on cursor move --- .config/nvim/lua/user/lualine.lua | 2 ++ .config/sway/config | 1 + 2 files changed, 3 insertions(+) diff --git a/.config/nvim/lua/user/lualine.lua b/.config/nvim/lua/user/lualine.lua index bbe6cf9..be24527 100644 --- a/.config/nvim/lua/user/lualine.lua +++ b/.config/nvim/lua/user/lualine.lua @@ -38,3 +38,5 @@ require('lualine').setup { inactive_winbar = {}, extensions = {} } + +vim.api.nvim_create_autocmd('CursorMoved', {callback=require('lualine').refresh}) diff --git a/.config/sway/config b/.config/sway/config index c0acb7d..c0110a8 100644 --- a/.config/sway/config +++ b/.config/sway/config @@ -152,6 +152,7 @@ bindsym --to-code $mod+o resize grow width 5ppt # special keys to adjust volume via pulseaudio bindsym --to-code $mod+Shift+bracketleft exec playerctl -p mpd volume 0.05- bindsym --to-code $mod+Shift+bracketright exec playerctl -p mpd volume 0.05+ +bindsym --to-code $mod+Shift+y exec playerctl -p mpd shuffle Toggle bindsym --to-code --locked XF86AudioMute exec pactl set-sink-mute \@DEFAULT_SINK@ toggle bindsym --to-code --locked XF86AudioLowerVolume exec pactl set-sink-volume \@DEFAULT_SINK@ -5%