komorebi icon indicating copy to clipboard operation
komorebi copied to clipboard

New Instannces based on new workspace

Open nahid6970 opened this issue 1 year ago • 3 comments

is it possible to use new instances of application for each workspace for example i wold like to start new instance of chrome in the new workspace like glazewm

nahid6970 avatar Apr 13 '24 16:04 nahid6970

There is nothing prohibiting this if I'm understanding the question.

If you want different instances to be automatically assigned to workspaces you can use composite workspace matching rules to target a window by a mixture of exe and title.

If you're referring to something else please provide a video example or diagram to help illustrate the use case.

LGUG2Z avatar Apr 13 '24 16:04 LGUG2Z

what is an example to setup an application for example VS Code on workspace 3?

pex81 avatar Apr 17 '24 13:04 pex81

https://www.youtube.com/watch?v=eX7CXzin7x0

LGUG2Z avatar Apr 17 '24 13:04 LGUG2Z

@LGUG2Z , I cannot make the composite rules work for 'workspace_rules' following the youtube example. For example, I am trying to move all edge browser (title contains "Personal -") instance to a workspace combined with exe as this:

"workspace_rules": [
            [
              {
                "kind": "Exe",
                "id": "msedge.exe",
                "matching_strategy": "Equals"
              },
              {
                "kind": "Title",
                "id": "Personal - ",
                "matching_strategy": "Contains"
              }
            ]
           ]

When I start the komorebi.exe, it complains about:

Error:
   0: unknown variant `kind`, expected one of `Exe`, `Class`, `Title`, `Path` at line 74 column 22

Location:
   komorebi\src\static_config.rs:632


  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
                                ⋮ 4 frames hidden ⋮
   5: komorebi::static_config::StaticConfig::preload::h1835b307a9a4aa39
      at <unknown source file>:<unknown line>
   6: <komorebi::Opts as clap_builder::derive::CommandFactory>::command::h373277d79c379946
      at <unknown source file>:<unknown line>
   7: std::sys_common::backtrace::__rust_begin_short_backtrace::hcb8c04de7ebc2448
      at <unknown source file>:<unknown line>
   8: std::rt::lang_start::{{closure}}::h2cf068eb97798b5b
      at <unknown source file>:<unknown line>
   9: std::rt::lang_start_internal::closure$2<unknown>
      at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library\std\src\rt.rs:148
  10: std::panicking::try::do_call<unknown>
      at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library\std\src\panicking.rs:504
  11: std::panicking::try<unknown>
      at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library\std\src\panicking.rs:468
  12: std::panic::catch_unwind<unknown>
      at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library\std\src\panic.rs:142
  13: std::rt::lang_start_internal<unknown>
      at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library\std\src\rt.rs:148
  14: main<unknown>
      at <unknown source file>:<unknown line>
  15: invoke_main<unknown>
      at D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:78
  16: __scrt_common_main_seh<unknown>
      at D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288
  17: BaseThreadInitThunk<unknown>
      at <unknown source file>:<unknown line>
  18: RtlUserThreadStart<unknown>
      at <unknown source file>:<unknown line>

ZhichaoHong avatar May 20 '24 04:05 ZhichaoHong