You are not logged in.

#1 2022-10-14 17:44:43

tlg
Member
Registered: 2015-02-14
Posts: 4

[SOLVED] Specific bspwm rule for terminal app

Hi, i try write external rule for ranger but I couldn't do it.

I want to ranger open on workspace 3 and i want to kitty open on any workspace

in bspwmrc;

bspc rule -a kitty -name 'Ranger' state=tiled desktop='^3'

this way ranger open on workspace 3, but this time kitty open just on workspace 3

in sxhkdrc;

super + n
kitty ranger

Last edited by tlg (2022-10-16 17:18:43)

Offline

#2 2022-10-15 18:26:40

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: [SOLVED] Specific bspwm rule for terminal app

Well, your rule is exactly for running all kitty instances on workspace 3.

I do not think that what you want is possible. Your rule geverns kitty, not a terminal program (ranger) that is run within kitty.

Offline

#3 2022-10-15 23:30:05

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,494
Website

Re: [SOLVED] Specific bspwm rule for terminal app

It certainly is possible.  But you need to start the terminal with an instance or class name specific to this purpose (e.g., "ranger") then use the -a flag of the rule to match that name.  You pass the -name flag to the rule, but I don't see that in the documentation - what is that supposed to do?


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#4 2022-10-16 13:20:35

tlg
Member
Registered: 2015-02-14
Posts: 4

Re: [SOLVED] Specific bspwm rule for terminal app

Trilby wrote:

You pass the -name flag to the rule, but I don't see that in the documentation - what is that supposed to do?

I saw this in web, exactly i didn't look at documentation

Maybe, it can be with externel rule but i don't know how to write
I tried find WM_CLASS with xprop;

ranger open

$ xprop | grep WM_CLASS
WM_CLASS(STRING) = "kitty", "kitty"

Offline

#5 2022-10-16 13:24:08

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,494
Website

Re: [SOLVED] Specific bspwm rule for terminal app

tlg wrote:

i didn't look at documentation

You're expected to do so before you post a thread.  Please do so now - read the bspwm / bspc documentation and kitty man page or help output.  All the information you need is there.  Another hint / reminder:

Trilby wrote:

you need to start the terminal with an instance or class name specific to this purpose


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#6 2022-10-16 17:16:52

tlg
Member
Registered: 2015-02-14
Posts: 4

Re: [SOLVED] Specific bspwm rule for terminal app

Trilby wrote:

you need to start the terminal with an instance or class name specific to this purpose

It's all my stupidity, you're right. In kitty man page;

--name <NAME>
       Set the name part of the WM_CLASS property. Defaults to using the value from kitty --class.

And i wrote shortcut in sxhkrdc;

kitty --class ranger

But there is an important situation. That code open kitty but not open ranger because i gave just WM_CLASS name

The correct code;

kitty --class ranger ranger

And bspc rule;

bspc rule -a ranger desktop='^3'

Thank you very much

I changed subject name for more explanatory

Last edited by tlg (2022-10-16 17:21:59)

Offline

Board footer

Powered by FluxBB