diff --git a/doc/rofi-theme.5.markdown b/doc/rofi-theme.5.markdown index 2fc60df3..c0381035 100644 --- a/doc/rofi-theme.5.markdown +++ b/doc/rofi-theme.5.markdown @@ -1118,6 +1118,10 @@ The following properties are currently supported: - **require-input**: boolean Listview requires user input to be unhidden. The list is still present and hitting accept will activate the first entry. +### Overlay widget + +- **timeout**: The time the widget is visible when showing a temporary message. + ## Listview widget The listview widget is special container widget. diff --git a/source/view.c b/source/view.c index ff4f844f..59d4d663 100644 --- a/source/view.c +++ b/source/view.c @@ -2847,6 +2847,7 @@ static gboolean rofi_view_overlay_timeout(G_GNUC_UNUSED gpointer user_data) { widget_disable(WIDGET(state->overlay)); } CacheState.overlay_timeout = 0; + rofi_view_queue_redraw(); return G_SOURCE_REMOVE; } @@ -2859,8 +2860,9 @@ void rofi_view_set_overlay_timeout(RofiViewState *state, const char *text) { return; } rofi_view_set_overlay(state, text); + int timeout = rofi_theme_get_integer(WIDGET(state->overlay), "timeout", 3); CacheState.overlay_timeout = - g_timeout_add_seconds(3, rofi_view_overlay_timeout, state); + g_timeout_add_seconds(timeout, rofi_view_overlay_timeout, state); } void rofi_view_set_overlay(RofiViewState *state, const char *text) {