#Force app window to tile on startup - not float

1 messages ยท Page 1 of 1 (latest)

charred seal
#

Hi everyone,
I started using a new application "Power BI Desktop" ().
When I open this app it is not recognized by komorebi, meaning it is unmanged.
I looked into https://github.com/LGUG2Z/komorebi-application-specific-configuration and did not find an entry for this app there.
So I adjusted my komorebi config to include

"manage_rules": [ { "kind": "Exe", "id": "PBIDesktop.exe", "matching_strategy": "Equals" } ]

When I now open the app it is recognized but managed as a floating window.
Why is that? And what do I have to do to have it tiling like all other app windows on startup?
Thank you!

GitHub

A central place to document all tweaks required for Komorebi to 'just work' with as many applications as possible - LGUG2Z/komorebi-application-specific-configuration

naive lark
#

Use the komorebi-gui to check on the debug part the information for that window. There it should say why it is being floated. Also make sure you don't have float_override enabled or that you are not on the floating layer since those could make newly opened windows be floating...

charred seal
#

I don't have any float_override setting configured and am not on the floating layer.
This is the debug information for the window from komorebi-gui:

{ "should_manage": true, "is_window": true, "has_minimum_width": true, "has_minimum_height": true, "has_title": true, "is_cloaked": false, "allow_cloaked": false, "allow_layered_transparency": false, "window_style": "BORDER | CAPTION | CLIPCHILDREN | CLIPSIBLINGS | GROUP | MAXIMIZEBOX | OVERLAPPEDWINDOW | VISIBLE", "extended_window_style": "APPWINDOW | CONTROLPARENT | WINDOWEDGE", "title": "Central Dataset", "exe_name": "PBIDesktop.exe", "class": "WindowsForms10.Window.8.app.0.3b721ea_r10_ad1", "path": "C:\\Program Files\\WindowsApps\\Microsoft.MicrosoftPowerBIDesktop_2.142.928.0_x64__8wekyb3d8bbwe\\bin\\PBIDesktop.exe", "matches_permaignore_class": null, "matches_ignore_identifier": null, "matches_managed_override": { "kind": "Exe", "id": "PBIDesktop.exe", "matching_strategy": "Equals" }, "matches_layered_whitelist": null, "matches_floating_applications": { "kind": "Class", "id": "WindowsForms10.Window.8.app", "matching_strategy": "StartsWith" }, "matches_wsl2_gui": null, "matches_no_titlebar": null }

It seems to be the "matches_floating_applications" property, right?
I have not set this up, so it is probably comming from the default applications.json file I retrieve via komorebic fetch-asc.
Can I change this somehow?

somber star
#

you can submit a PR. I just hope Ssms would still work after changing to a composite rule

#

I actually have what is needed added to my komorebi.json ๐Ÿ˜„ (added to ignore_rules)

    [
      {
        "kind": "Exe",
        "id": "Ssms.exe",
        "matching_strategy": "Equals"
      },
      {
        "kind": "Class",
        "id": "WindowsForms10.Window.8.app",
        "matching_strategy": "StartsWith"
      }
    ],

try to change your own application.json file first (before a PR) and see if that fixes this issue

late scroll
#

Badly written Microsoft apps strike again AnyaShock

charred seal
#

I changed my local version of application.json to:
"Microsoft SQL Server Management Studio": { "floating": [ [ { "kind": "Exe", "id": "Ssms.exe", "matching_strategy": "Equals" }, { "kind": "Class", "id": "WindowsForms10.Window.8.app", "matching_strategy": "StartsWith" } ] ] },

When I start Power BI Desktop now, it is still a floating window but the debug information for the window is now:

{ "should_manage": false, "is_window": true, "has_minimum_width": true, "has_minimum_height": true, "has_title": true, "is_cloaked": true, "allow_cloaked": false, "allow_layered_transparency": false, "window_style": null, "extended_window_style": null, "title": null, "exe_name": null, "class": null, "path": null, "matches_permaignore_class": null, "matches_ignore_identifier": null, "matches_managed_override": null, "matches_layered_whitelist": null, "matches_floating_applications": null, "matches_wsl2_gui": null, "matches_no_titlebar": null }

somber star
#

I assume you did this, but just to be sure, make sure you completely restart both the app and komorebi, I would even go as far as to restart my computer ๐Ÿ™‚ you never know. At least then we have nothing else to suggest

charred seal
#

Okay, a complete restart fixed it. It now tiles! Thank you.

I just tested SSMS and it now tiles as well and does not float anymore... I don't mind that but since it is in the official repo this was suggested by someone.
Is there a way for me to use the comunity application.json while overriding it just for SSMS?

dense glen
#

Not 100% sure on the order of operation but you could make a second app-specific file and see if that gets loaded last or see if adding the rules to the main komorebi.json works

  "app_specific_configuration_path": [
    "C:/Users/USERNAME/.config/komorebi/applications.json",
    "C:/Users/USERNAME/.config/komorebi/custom_applications.json"
  ],
somber star
#

I was typing the exact same thing, but I would even suggest to make a pr for changing the floating rule on ssms to be composite. I think that is more correct anyway

dense glen
#

Funnily enough I also had to change this rule to fix another application with the WindowsForms10.Window.8.app.0.1400c58_r3_ad1 class

#

kind of forgot until I scrolled past this

somber star
#

I did have to "fix" a few rules on the repo to be more strict, so I would not hold back. Apps could change with updates as well, so this might just fix the same bug for someone else if it's in asc (which is its purpose)

charred seal
#

I might have understood something wrong ๐Ÿ™‚
I thought someone wanted SSMS to float by default and thus added this to the repo.
When I now add the additional array to this config (=composite rule), it fixes my problem with Power BI but when I open SSMS it does not float anymore.
So if I would suggest the change as an issue, it would break the intention of the original rule.
That's why I asked for a local override for me only.

GitHub

A central place to document all tweaks required for Komorebi to 'just work' with as many applications as possible - LGUG2Z/komorebi-application-specific-configuration

willow folioBOT
#

GG @charred seal, you just advanced to level 1!

somber star
#

ah, I think it might break the floating rule, because that window that meant to be floating does not match. so the Exe is not Ssms.exe, but the Class does start with WindowsForms10.Window.8.app. works when separate rules, not when composite. ๐Ÿค”

dense glen
#

At the end of the day I would say that catching all applications with the WindowsForms10.Window.8.app class is probably bad form but I wouldn't know what to target to tighten that net sadly.

somber star
#

yes, sadly I am familiar with the intent, That window should not be tiled for sure. this might actually be the reason for me having the ignore rule. I will play around a bit and see if it can be done any better

#

well, a composite rule should work as you can see the main window and the connecting window

    {
      "title": "Microsoft SQL Server Management Studio",
      "exe": "Ssms.exe",
      "class": "HwndWrapper[DefaultDomain;;de608ba4-6b0c-42ad-94a9-73480a1dfbe8]"
    },
    {
      "title": "Connect to Server",
      "exe": "Ssms.exe",
      "class": "WindowsForms10.Window.8.app.0.3a9f2bb_r18_ad1"
    }

I will look at this when I have more time, but a composite rule would be my goto. Perhaps you need 2 composite rules instead to make both of these float

naive lark
#

@somber star The ASC needs to be changed to have a composite rule like you mentioned, something like:

"Microsoft SQL Server Management Studio": {
  "floating": [
    {
      "kind": "Exe",
      "id": "Ssms.exe",
      "matching_strategy": "Equals"
    },
    {
      "kind": "Class",
      "id": "WindowsForms10.Window.8.app",
      "matching_strategy": "StartsWith"
    }
  ]
}

So that the main window is tiled but the windows with class starting with the "WindowsForms10..." are floating...

somber star
#

I was thinking about something like this (what you posted is exactly what's in ASC)

The original PR's author wanted it floating? (I am actually no longer sure about that, on his pictures, the main window is still tiled), so this would just (hopefully) make the rule on the class specific for ssms.

  "Microsoft SQL Server Management Studio": {
    "floating": [
      {
        "kind": "Exe",
        "id": "Ssms.exe",
        "matching_strategy": "Equals"
      },
// perhaps this instead?
//      [
//        {
//          "kind": "Exe",
//          "id": "Ssms.exe",
//          "matching_strategy": "Equals"
//        },
//        {
//          "kind": "Class",
//          "id": "HwndWrapper[DefaultDomain;;",
//          "matching_strategy": "StartsWith"
//        }
//      ],
      [
        {
          "kind": "Exe",
          "id": "Ssms.exe",
          "matching_strategy": "Equals"
        },
        {
          "kind": "Class",
          "id": "WindowsForms10.Window.8.app",
          "matching_strategy": "StartsWith"
        }
      ]
    ]
  },

(not yet tested)

naive lark
late scroll
#

@charred seal catching up on this thread and judging vaguely by the apps we're talking about, either I need to give you a commercial license users role on the server (dm me the email you used), or you should check out https://lgug2z.com/software/komorebi for licensing info

late scroll
#

@somber star merged your PR

#

I should start giving a "sus" role to people who immediately disappear at the mention of the license ๐Ÿค”