forked from speedie/spmenu
Move some configuration stuff around
This commit is contained in:
parent
505f06ac6c
commit
da0faccfa3
|
@ -40,6 +40,8 @@ spmenu = {
|
|||
password = "*"; // Password character (text)
|
||||
prompt = ""; // Prompt text (text)
|
||||
input = ""; // Input text (text)
|
||||
normal = "Normal"; // Normal mode text (text)
|
||||
insert = "Insert"; // Insert mode text (text)
|
||||
capslockon = "Caps Lock"; // Caps Lock On text (text)
|
||||
capslockoff = ""; // Caps Lock Off text (text)
|
||||
} );
|
||||
|
@ -220,8 +222,6 @@ spmenu = {
|
|||
|
||||
/* Mode options */
|
||||
mode = ( { default = 0; // Mode to start spmenu in (0: Normal mode, 1: Insert mode)
|
||||
normal_text = "Normal"; // Normal mode text (text)
|
||||
insert_text = "Insert"; // Insert mode text (text)
|
||||
} );
|
||||
|
||||
/* Pango markup options */
|
||||
|
@ -241,39 +241,15 @@ spmenu = {
|
|||
*
|
||||
* See https://spmenu.speedie.site/index.php/Configurable+keybindings for a list of valid options.
|
||||
*/
|
||||
mouse = ( // Left click on input: Clear the input
|
||||
{ click = "ClickInput";
|
||||
button = "Left Click";
|
||||
function = "clear";
|
||||
argument = "0";
|
||||
},
|
||||
// Left click on prompt: Clear the input
|
||||
{ click = "ClickPrompt";
|
||||
button = "Left Click";
|
||||
function = "clear";
|
||||
argument = "0";
|
||||
},
|
||||
// Left click on the mode indicator: Toggle mode
|
||||
{ click = "ClickMode";
|
||||
button = "Left Click";
|
||||
function = "switchmode";
|
||||
argument = "0";
|
||||
},
|
||||
// Click on the match count: Toggle viewing history buffer
|
||||
{ click = "ClickNumber";
|
||||
button = "Left Click";
|
||||
function = "viewhist";
|
||||
argument = "0";
|
||||
},
|
||||
// Left click on an item: Select it
|
||||
{ click = "ClickSelItem";
|
||||
button = "Left Click";
|
||||
function = "None";
|
||||
argument = "0";
|
||||
},
|
||||
mouse = (
|
||||
/* Click Button Function Argument */
|
||||
{ click = "ClickInput"; button = "Left Click"; function = "clear"; argument = "0"; }, // Left click on input: Clear the input
|
||||
{ click = "ClickPrompt"; button = "Left Click"; function = "clear"; argument = "0"; }, // Left click on prompt: Clear the input
|
||||
{ click = "ClickMode"; button = "Left Click"; function = "switchmode"; argument = "0"; }, // Left click on the mode indicator: Toggle mode
|
||||
{ click = "ClickNumber"; button = "Left Click"; function = "viewhist"; argument = "0"; }, // Click on the match count: Toggle viewing history buffer
|
||||
{ click = "ClickSelItem"; button = "Left Click"; function = "None"; argument = "0"; }, // Left click on an item: Select it
|
||||
|
||||
{ ignoreglobalmouse = 1; // Ignore hardcoded mouse binds (0/1)
|
||||
} );
|
||||
{ ignoreglobalmouse = 1; } ); // Ignore hardcoded mouse binds (0/1)
|
||||
|
||||
/* Keys
|
||||
*
|
||||
|
@ -283,6 +259,7 @@ spmenu = {
|
|||
* See https://spmenu.speedie.site/index.php/Configurable+keybindings for a list of valid options.
|
||||
*/
|
||||
keys = (
|
||||
/* Mode Modifier Key Function Argument */
|
||||
{ mode = -1; modifier = "None"; key = "Enter"; function = "selectitem"; argument = "+1"; }, // Enter: Select item
|
||||
{ mode = -1; modifier = "Shift"; key = "Enter"; function = "selectitem"; argument = "0"; }, // Shift+Enter: Select input
|
||||
{ mode = -1; modifier = "Ctrl"; key = "Enter"; function = "markitem"; argument = "0"; }, // Ctrl+Enter: Mark input
|
||||
|
|
|
@ -158,6 +158,12 @@ void conf_init(void) {
|
|||
if (config_setting_lookup_string(conf, "capslockoff", &dest))
|
||||
capslockofftext = strdup(dest);
|
||||
|
||||
if (config_setting_lookup_string(conf, "normal", &dest))
|
||||
normtext = strdup(dest);
|
||||
|
||||
if (config_setting_lookup_string(conf, "insert", &dest))
|
||||
instext = strdup(dest);
|
||||
|
||||
if (config_setting_lookup_string(conf, "input", &dest))
|
||||
input = strdup(dest);
|
||||
}
|
||||
|
@ -468,12 +474,6 @@ void conf_init(void) {
|
|||
|
||||
// look up
|
||||
config_setting_lookup_int(conf, "default", &mode); // spmenu.mode.default
|
||||
|
||||
config_setting_lookup_string(conf, "normal_text", &dest); // spmenu.mode.normal_text
|
||||
normtext = strdup(dest);
|
||||
|
||||
config_setting_lookup_string(conf, "insert_text", &dest); // spmenu.mode.insert_text
|
||||
instext = strdup(dest);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue