@@ -16,7 +16,7 @@ use relm4::prelude::*;
16
16
use wl_clipboard_rs:: copy;
17
17
18
18
use crate :: {
19
- config:: { Action , Config , ConfigArgs , Keybind } ,
19
+ config:: { Action , Config , ConfigArgs , Keybind , Layer } ,
20
20
plugin_box:: { PluginBox , PluginBoxInput , PluginBoxOutput , PluginMatch } ,
21
21
} ;
22
22
@@ -118,7 +118,12 @@ impl Component for App {
118
118
view ! {
119
119
gtk:: Window {
120
120
init_layer_shell: ( ) ,
121
- set_layer: gtk4_layer_shell:: Layer :: Top ,
121
+ set_layer: match config. layer {
122
+ Layer :: Background => gtk4_layer_shell:: Layer :: Background ,
123
+ Layer :: Bottom => gtk4_layer_shell:: Layer :: Bottom ,
124
+ Layer :: Top => gtk4_layer_shell:: Layer :: Top ,
125
+ Layer :: Overlay => gtk4_layer_shell:: Layer :: Overlay ,
126
+ } ,
122
127
set_anchor: ( Edge :: Left , true ) ,
123
128
set_anchor: ( Edge :: Top , true ) ,
124
129
set_keyboard_mode: KeyboardMode :: OnDemand ,
@@ -332,9 +337,7 @@ impl Component for App {
332
337
widgets. main . set_halign ( gtk:: Align :: Fill ) ;
333
338
widgets. main . set_margin_start ( x) ;
334
339
widgets. main . set_margin_top ( y) ;
335
- widgets
336
- . main
337
- . set_margin_end ( mon_width as i32 - x - width) ;
340
+ widgets. main . set_margin_end ( mon_width as i32 - x - width) ;
338
341
widgets
339
342
. main
340
343
. set_margin_bottom ( mon_height as i32 - y - height) ;
0 commit comments