diff --git a/examples/worf-hyprland-exit/hyprland_exit b/examples/worf-hyprland-exit/hyprland_exit index 735b093..8907432 100755 --- a/examples/worf-hyprland-exit/hyprland_exit +++ b/examples/worf-hyprland-exit/hyprland_exit @@ -14,6 +14,7 @@ result=`echo -e "$option_reboot\n$option_suspend\n$option_shutdown\n$option_logo --orientation horizontal \ --hide-search true \ --content-vcenter true \ + --blurred-background-fullscreen true \ --blurred-background true ` case "$result" in @@ -45,5 +46,3 @@ case "$result" in *) exit 1 esac - - diff --git a/worf/src/lib/config.rs b/worf/src/lib/config.rs index 6d1691b..b9356e9 100644 --- a/worf/src/lib/config.rs +++ b/worf/src/lib/config.rs @@ -430,9 +430,16 @@ pub struct Config { search_query: Option, /// Blur the background of the screen - /// can be style via `background` + /// can be styled via `background` #[clap(long = "blurred-background")] blurred_background: Option, + + /// Set the background to full screen. + /// Might look better for some things, but + /// there can only be one fullscreened app at the time. + /// Defaults to false. + #[clap(long = "blurred-background-fullscreen")] + blurred_background_fullscreen: Option, } impl Config { @@ -700,6 +707,11 @@ impl Config { pub fn blurred_background(&self) -> bool { self.blurred_background.unwrap_or(false) } + + #[must_use] + pub fn blurred_background_fullscreen(&self) -> bool { + self.blurred_background_fullscreen.unwrap_or(false) + } } fn default_false() -> bool { diff --git a/worf/src/lib/gui.rs b/worf/src/lib/gui.rs index 8696c71..edd2d40 100644 --- a/worf/src/lib/gui.rs +++ b/worf/src/lib/gui.rs @@ -760,7 +760,7 @@ fn create_background(config: &Config) -> Option { let background = ApplicationWindow::builder() .decorated(false) .resizable(false) - .fullscreened(false) + .fullscreened(config.blurred_background_fullscreen()) // arbitrary huge window so it fills the whole screen .default_width(100_000) .default_height(100_000)