From b77c9a2a29b8ebb85522a51cfbdf57933dca0701 Mon Sep 17 00:00:00 2001 From: nova Date: Tue, 8 Jul 2025 00:20:14 +0200 Subject: [PATCH] made configs constant --- config.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/config.h b/config.h index 4407f16..c698b79 100644 --- a/config.h +++ b/config.h @@ -2,7 +2,7 @@ #include "interactions.h" #include "sorting.h" -static mimetype mimetype_default_cmd[] = { +static const mimetype mimetype_default_cmd[] = { /* mimetype shell command * ^ substring of "file --mime-type -b ./hovered" * this does mean that this list is checked for completely linear. @@ -17,7 +17,7 @@ static mimetype mimetype_default_cmd[] = { { "audio", "mpv" } }; -static binding key_binding[] = { +static const binding key_binding[] = { /*key action blackmagic comment*/ /*you cannot add bindings that include other bindings in its entirety * possible: mk, mf @@ -37,10 +37,10 @@ static binding key_binding[] = { { "\n", open_with, NULL, "open \"open with\" dialog" }, /* opens the hovered file with an arbitrary command */ { "r", rename_hovered, NULL, "rename hovered file" }, /* renames currently hovered file/directory */ { "d", delete, NULL, "delete file" }, /* deletes currently hovered OR selected file/directory - * this means that it does not delete the hovered files if files are already selected */ + * this means that it does not delete the hovered files if files are already selected */ { "G", jump_bottom, NULL, "jump to last file in dir" }, - { "gg", jump_top, NULL, "jump to file 0" }, + { "gg", jump_top, NULL, "jump to first file in dir" }, { "gh", jump_to_dir, "$HOME", "jump to $HOME" }, { "gs", jump_to_dir, "$START_PATH", "jump to $START_PATH" }, { "gd", jump_to_dir, "/dev", "jump to /dev" }, @@ -70,5 +70,5 @@ static binding key_binding[] = { { "a", toggle_hidden_files, NULL, "toggle hidden files" }, }; -static unsigned long binding_count = sizeof(key_binding) / sizeof(binding); -static unsigned long mimetype_default_count = sizeof(mimetype_default_cmd) / sizeof(mimetype); +static const unsigned long binding_count = sizeof(key_binding) / sizeof(binding); +static const unsigned long mimetype_default_count = sizeof(mimetype_default_cmd) / sizeof(mimetype);