File tree Expand file tree Collapse file tree 5 files changed +16
-3
lines changed
Expand file tree Collapse file tree 5 files changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -30,13 +30,15 @@ Window settings.
3030- ** ` window_bar_height ` ** (integer): Height of the window title bars in pixels (default: ` 20 ` ).
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" ` ).
33+ - ** ` reverse_resize ` ** (boolean): Reverse the direction of window resizing (default: ` false ` ).
3334 ``` toml
3435 [window ]
3536 scale_steps = 20
3637 window_bars = false
3738 window_bar_height = 20
3839 text_color = " #ffffff"
3940 background_color = " #272727"
41+ reverse_resize = false
4042 ```
4143
4244### ` [keyboard] `
Original file line number Diff line number Diff line change 1+ - Window title changes do not trigger a bar refresh, leaving them unupdated until the next general bar update.
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ update_ms = "auto"
88scale_steps = 20
99window_bars = true
1010window_bar_height = 20
11+ reverse_resize = true
1112
1213[keyboard ]
1314layout = " de"
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ pub struct Window {
2626 pub window_bar_height : u32 ,
2727 pub text_color : String ,
2828 pub background_color : String ,
29+ pub reverse_resize : bool ,
2930}
3031
3132impl Default for Window {
@@ -36,6 +37,7 @@ impl Default for Window {
3637 window_bar_height : 20 ,
3738 text_color : "#ffffff" . into ( ) ,
3839 background_color : "#272727" . into ( ) ,
40+ reverse_resize : false ,
3941 }
4042 }
4143}
Original file line number Diff line number Diff line change @@ -500,13 +500,20 @@ impl GridWM {
500500 false
501501 } ;
502502
503- // TODO: make resize direction configurable
504503 if is_drag_bind {
505504 self . handle_drag_start ( btn_event) ;
506505 } else if is_scroll_up {
507- self . scale_up ( btn_event) ;
506+ if !self . config . window . reverse_resize {
507+ self . scale_up ( btn_event) ;
508+ } else {
509+ self . scale_down ( btn_event) ;
510+ }
508511 } else if is_scroll_down {
509- self . scale_down ( btn_event) ;
512+ if !self . config . window . reverse_resize {
513+ self . scale_down ( btn_event) ;
514+ } else {
515+ self . scale_up ( btn_event) ;
516+ }
510517 } else {
511518 self . handle_button ( event) ;
512519 }
You can’t perform that action at this time.
0 commit comments