File tree Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -48,9 +48,9 @@ enum MatchingStrategy {
48
48
#[ derive( Parser ) ]
49
49
#[ clap( author, about, version) ]
50
50
struct Opts {
51
- /// Enable komorebi integration to avoid raising unmanaged windows
51
+ /// Disable automatic integrations with tiling window managers (e.g. komorebi)
52
52
#[ clap( long) ]
53
- komorebi : bool ,
53
+ disable_integrations : bool ,
54
54
/// Path to a file with known focus-able HWNDs (e.g. komorebi.hwnd.json)
55
55
#[ clap( long) ]
56
56
hwnds : Option < PathBuf > ,
@@ -60,20 +60,20 @@ fn main() -> Result<()> {
60
60
let opts: Opts = Opts :: parse ( ) ;
61
61
62
62
let hwnds = match opts. hwnds {
63
+ None if opts. disable_integrations => None ,
63
64
None => {
65
+ let hwnds: PathBuf = dirs:: data_local_dir ( )
66
+ . expect ( "there is no local data directory" )
67
+ . join ( "komorebi" )
68
+ . join ( "komorebi.hwnd.json" ) ;
69
+
64
70
// TODO: We can add checks for other window managers here
65
- let hwnds_option = if opts. komorebi {
66
- Some (
67
- dirs:: data_local_dir ( )
68
- . expect ( "there is no local data directory" )
69
- . join ( "komorebi" )
70
- . join ( "komorebi.hwnd.json" ) ,
71
- )
71
+
72
+ if hwnds. is_file ( ) {
73
+ Some ( hwnds)
72
74
} else {
73
75
None
74
- } ;
75
-
76
- hwnds_option. filter ( |hwnds| hwnds. is_file ( ) )
76
+ }
77
77
}
78
78
Some ( hwnds) => {
79
79
if hwnds. is_file ( ) {
You can’t perform that action at this time.
0 commit comments