Added hide_search

This commit is contained in:
Scoopta 2020-02-29 01:04:00 -08:00
parent 0a0ba35075
commit b88c6727ea
2 changed files with 7 additions and 1 deletions

View File

@ -147,6 +147,9 @@ Specifies the line wrap mode to use. The options are off, word, char, and word_c
.TP .TP
.B global_coords=\fIBOOL\fR .B global_coords=\fIBOOL\fR
Specifies whether x and y offsets should be calculated using the global compositor space instead of the current monitor. Default is false. This does not play well with locations and using it with them is not advised. Specifies whether x and y offsets should be calculated using the global compositor space instead of the current monitor. Default is false. This does not play well with locations and using it with them is not advised.
.TP
.B hide_search=\fIBOOL\fR
Specifies whether the search bar should be hidden. Default is false.
.SH CSS SELECTORS .SH CSS SELECTORS
Any GTK widget can be selected by using the name of its CSS node, these however might change with updates and are not guarenteed to stay constant. Wofi also provides certain widgets with names and classes which can be referenced from CSS to give access to the most important widgets easily. \fBwofi\fR(7) contains the current widget layout used by wofi so if you want to get into CSS directly using GTK widget names look there for info. Any GTK widget can be selected by using the name of its CSS node, these however might change with updates and are not guarenteed to stay constant. Wofi also provides certain widgets with names and classes which can be referenced from CSS to give access to the most important widgets easily. \fBwofi\fR(7) contains the current widget layout used by wofi so if you want to get into CSS directly using GTK widget names look there for info.

View File

@ -1278,6 +1278,7 @@ void wofi_init(struct map* _config) {
sort_order = config_get_mnemonic(config, "sort_order", "default", 2, "default", "alphabetical"); sort_order = config_get_mnemonic(config, "sort_order", "default", 2, "default", "alphabetical");
line_wrap = config_get_mnemonic(config, "line_wrap", "off", 4, "off", "word", "char", "word_char") - 1; line_wrap = config_get_mnemonic(config, "line_wrap", "off", 4, "off", "word", "char", "word_char") - 1;
bool global_coords = strcmp(config_get(config, "global_coords", "false"), "true") == 0; bool global_coords = strcmp(config_get(config, "global_coords", "false"), "true") == 0;
bool hide_search = strcmp(config_get(config, "hide_search", "false"), "true") == 0;
key_up = config_get(config, "key_up", "Up"); key_up = config_get(config, "key_up", "Up");
key_down = config_get(config, "key_down", "Down"); key_down = config_get(config, "key_down", "Down");
@ -1370,7 +1371,9 @@ void wofi_init(struct map* _config) {
gtk_widget_set_name(entry, "input"); gtk_widget_set_name(entry, "input");
gtk_entry_set_placeholder_text(GTK_ENTRY(entry), prompt); gtk_entry_set_placeholder_text(GTK_ENTRY(entry), prompt);
if(!hide_search) {
gtk_container_add(GTK_CONTAINER(outer_box), entry); gtk_container_add(GTK_CONTAINER(outer_box), entry);
}
if(password_char != NULL) { if(password_char != NULL) {
gtk_entry_set_visibility(GTK_ENTRY(entry), FALSE); gtk_entry_set_visibility(GTK_ENTRY(entry), FALSE);
gtk_entry_set_invisible_char(GTK_ENTRY(entry), password_char[0]); gtk_entry_set_invisible_char(GTK_ENTRY(entry), password_char[0]);