From 9143d291d42dde35eebc8777a18e52d4a77f7a48 Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Sat, 31 Dec 2022 00:23:48 +0100 Subject: [PATCH] [themes] don't use screenshot transparency in shipped themes --- source/rofi.c | 9 +++++++++ themes/arthur.rasi | 2 +- themes/paper-float.rasi | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/source/rofi.c b/source/rofi.c index e57ae721..7671f3af 100644 --- a/source/rofi.c +++ b/source/rofi.c @@ -804,6 +804,12 @@ static gboolean startup(G_GNUC_UNUSED gpointer data) { return G_SOURCE_REMOVE; } +static gboolean take_screenshot_quit ( G_GNUC_UNUSED void *data) +{ + rofi_capture_screenshot(); + rofi_quit_main_loop(); + return G_SOURCE_REMOVE; +} static gboolean record(G_GNUC_UNUSED void *data) { rofi_capture_screenshot(); return G_SOURCE_CONTINUE; @@ -1115,6 +1121,9 @@ int main(int argc, char *argv[]) { if (find_arg_uint("-record-screenshots", &interval)) { g_timeout_add((guint)(1000 / (double)interval), record, NULL); } + if ( find_arg_uint("-take-screenshot-quit", &interval)) { + g_timeout_add(interval, take_screenshot_quit, NULL); + } if (find_arg("-benchmark-ui") >= 0) { config.benchmark_ui = TRUE; } diff --git a/themes/arthur.rasi b/themes/arthur.rasi index 437778a7..58b951a3 100644 --- a/themes/arthur.rasi +++ b/themes/arthur.rasi @@ -52,7 +52,7 @@ window { location: center; anchor: center; - transparency: "screenshot"; + transparency: "real"; padding: 10px; border: 0px; border-radius: 10px; diff --git a/themes/paper-float.rasi b/themes/paper-float.rasi index 6b57ae7b..b327b8db 100644 --- a/themes/paper-float.rasi +++ b/themes/paper-float.rasi @@ -18,7 +18,7 @@ location: center; } window { - transparency: "screenshot"; + transparency: "real"; background-color: #00000000; border: 0; padding: 0% 0% 1em 0%;