File tree Expand file tree Collapse file tree 4 files changed +11
-4
lines changed
Expand file tree Collapse file tree 4 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ Window settings.
3131- ** ` text_color ` ** (string): Text color of the window title bars in hex format (e.g., ` "#ffffff" ` ).
3232- ** ` background_color ` ** (string): Background color of the window title bars in hex format (e.g., ` "#272727" ` ).
3333- ** ` reverse_resize ` ** (boolean): Reverse the direction of window resizing (default: ` false ` ).
34+ - ** ` window_margin ` ** (integer): Margin around windows in pixels (default: ` 0 ` ).
3435 ``` toml
3536 [window ]
3637 scale_steps = 20
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ scale_steps = 20
99window_bars = true
1010window_bar_height = 20
1111reverse_resize = true
12+ window_margin = 14
1213
1314[keyboard ]
1415layout = " de"
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ pub struct Window {
2727 pub text_color : String ,
2828 pub background_color : String ,
2929 pub reverse_resize : bool ,
30+ pub window_margin : i32 ,
3031}
3132
3233impl Default for Window {
@@ -38,6 +39,7 @@ impl Default for Window {
3839 text_color : "#ffffff" . into ( ) ,
3940 background_color : "#272727" . into ( ) ,
4041 reverse_resize : false ,
42+ window_margin : 0 ,
4143 }
4244 }
4345}
Original file line number Diff line number Diff line change @@ -1127,10 +1127,13 @@ impl GridWM {
11271127 } ;
11281128
11291129 WindowInfo {
1130- x : ( i % cols) * w,
1131- y : ( ( i / cols) * h) + bar_height + window_bar_height,
1132- w,
1133- h : h - window_bar_height,
1130+ x : ( i % cols) * w + ( self . config . window . window_margin / 2 ) ,
1131+ y : ( ( i / cols) * h)
1132+ + bar_height
1133+ + window_bar_height
1134+ + ( self . config . window . window_margin / 2 ) ,
1135+ w : w - self . config . window . window_margin ,
1136+ h : h - window_bar_height - self . config . window . window_margin ,
11341137 }
11351138 } )
11361139 . collect ( )
You can’t perform that action at this time.
0 commit comments