feat: enable vim keys for btop (#1581)

* feat: enable vim keys for btop

* feat: add migration for btop vim keys

* Cleanup

---------

Co-authored-by: David Heinemeier Hansson <david@hey.com>
This commit is contained in:
Martin Mose Facondini
2025-10-13 02:13:45 +02:00
committed by GitHub
parent cac8b03821
commit 56e690b861
2 changed files with 10 additions and 1 deletions

View File

@@ -22,7 +22,7 @@ presets = "cpu:1:default,proc:0:default cpu:0:default,mem:0:default,net:0:defaul
#* Set to True to enable "h,j,k,l,g,G" keys for directional control in lists.
#* Conflicting keys for h:"help" and k:"kill" is accessible while holding shift.
vim_keys = False
vim_keys = True
#* Rounded corners on boxes, is ignored if TTY mode is ON.
rounded_corners = True

9
migrations/1757535736.sh Executable file
View File

@@ -0,0 +1,9 @@
echo "Enabling vim keys in btop"
CONFIG_FILE=~/.config/btop/btop.conf
if [[ -f $CONFIG_FILE ]]; then
if grep -q "^vim_keys = " "$CONFIG_FILE"; then
sed -i 's/^vim_keys = False/vim_keys = True/' "$CONFIG_FILE"
fi
fi