Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Named Workspace' match title= 'any console-app'; Failure #1170

Open
plum opened this issue Feb 24, 2025 · 6 comments
Open

Named Workspace' match title= 'any console-app'; Failure #1170

plum opened this issue Feb 24, 2025 · 6 comments

Comments

@plum
Copy link

plum commented Feb 24, 2025

  • kernal: linux-zen 6.13.3.zen1-1
  • Niri: Versions: niri 25.02-1 and 25.01-2
  • Session: niri-session

As expected, using for example the following config, the contacts app will open in the named workspace, and so will the alarm-clock applet, BUT;

  • named terminal apps open only on the current workspace.

That is true for terminal apps whether or not I employ the 'match app-id' directive.

All such terminal apps have '.desktop' files created for them, and are being fired up from 'fuzzel'

window-rule {
    open-on-workspace "office"

    match app-id="kitty" title="ikhal"
    match app-id="kitty" title="neomutt"
    match app-id="alarm-clock-applet"
    match app-id="org.gnome.Contacts"

    max-width 700
    max-height 580
    open-floating true
    open-maximized false
}

Advice appreciated.
Cheers,
JOhn

@plum plum changed the title Named Workspace' match tile app-id= 'console-apps' Named Workspace' match title= 'any console-app'; Failure Feb 24, 2025
@YaLTeR
Copy link
Owner

YaLTeR commented Feb 25, 2025

  1. You can add something like
    focus-ring {
        on
        active-color "#f38ba8"
        inactive-color "#7d0d2d"
    }
    
    to check if the window rule applies at all to those windows.
  2. If it does, then kitty probably sets the window title after opening the window (so the rule doesn't apply at the time of opening). There is probably a commandline flag that you can use to set the kitty window title right away?

@plum
Copy link
Author

plum commented Feb 26, 2025

@YaLTeR Thanks for useful reply.

Confirmed: Judging by the uniquely colored focus-ring, the window rule is being applied.

Question: >> I wonder what terminal emulator you, or anyone else, have had success with, and whether you use bash or zsh or what?

I tried both the Foot and Alacritty emulators, but, according to niri mesg, neither appear to apply window titles from the executed programme (whereas kitty does) and neither work to obey the named workspace-window rules.

  • Output from $ niri msg windows...

Window ID 19:
  Title: "neomutt"
  App ID: "kitty"
  Is floating: yes
  PID: 304280
  Workspace ID: 3

Window ID 22:
  Title: "chuee@archlinux:~"
  App ID: "foot"
  Is floating: no
  PID: 338469
  Workspace ID: 3

Window ID 25:
  Title: "Alacritty"
  App ID: "Alacritty"
  Is floating: no
  PID: 344264
  Workspace ID: 3

The idea that kitty may set the window title after opening the window (so the rule doesn't apply at the time of opening) seems likely - though I have no actual confirmation of that.

I could not find anything related in Kitty man pages or by a search, for option to set window titles before/after opening. Only this, which is irrelevant to the issue:

       --title <TITLE>, -T <TITLE>
              Set the OS window title. This will override any title set by the program running inside kitty, permanently fixing the OS window's title. So only  use  this  if
              you are running a program that does not set titles.

Cheers, John

@YaLTeR
Copy link
Owner

YaLTeR commented Feb 26, 2025

I could not find anything related in Kitty man pages or by a search, for option to set window titles before/after opening. Only this, which is irrelevant to the issue:

No, that's what I meant. This should set the title right away so it'll be picked up by the window rule.

@plum
Copy link
Author

plum commented Feb 26, 2025

I could not find anything related in Kitty man pages or by a search, for option to set window titles before/after opening. Only this, which is irrelevant to the issue:

No, that's what I meant. This should set the title right away so it'll be picked up by the window rule.

I know the kitty -T option is not suitable here; So forget I mentioned it. I mean to say there is no option to change kitty's behavior in respect of time of window opening. :)

Other wayland compatible terminal emulators don't work either.
I also tried with a clean .bashrc file to check that, but gained no success.

Therefore it would be useful , if you have it working yourself, to tell me please,

  • Q. What terminal emulator do you use with success?

Thanks, John

@YaLTeR
Copy link
Owner

YaLTeR commented Feb 26, 2025

I use alacritty but I don't window-rule it like that so idk

@plum
Copy link
Author

plum commented Feb 26, 2025

I use alacritty but I don't window-rule it like that so idk

Cheers @YaLTeR .

IN which case, I think it would be useful to establish whether anyone at all has named workspaces working with any terminal emulator, in order to proceed in solving this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants