Open nikitarevenco opened 1 month ago
Why not just create it with a distinguishable classname like kitty-bpytop
and just add a rule for it to open it on desktop 9? I don't see the need of making a script for it.
bspc rule -a kitty-bpytop state=floating desktop='^9'
kitty --class kitty-bpytop -e bpytop &
Why not just create it with a distinguishable classname like
kitty-bpytop
and just add a rule for it to open it on desktop 9? I don't see the need of making a script for it.bspc rule -a kitty-bpytop state=floating desktop='^9' kitty --class kitty-bpytop -e bpytop &
Thank you for the response - But I should have also specified that I don't want to actually be sent to that desktop.Eg when my computer starts on desktop 1 kitty should be on desktop 9 but I should be on desktop 1
Found the problem, it seems that kitty
always want to have focus (it's a cat duh) and that's what cause spawing with kitty -e
always focus you to that window. When I used alacritty
instead of kitty
it will spawn the program without sending the focus to that window
bspc rule -a kitty-bpytop state=floating desktop='^9'
alacritty --class kitty-bpytop -e bpytop &
If you still want to use kitty
you could set the rule for that class to hidden=on
first, then once it spawned and sent to dektop 9, you can toggle the hidden
flag.
#!/bin/bash
bspc rule -a kitty-btop hidden=on state=floating
kitty --class kitty-btop -e btop &
sleep 0.25
kitty_window_id=$(xdotool search --class kitty-btop)
bspc node "$kitty_window_id" --to-desktop '^9' --flag hidden
The sleep
time should consider when the program fully loaded. 0.25
is the lowest I checked, otherwise kitty will take focus.
Hey, so I want to have
kitty
open withbpytop
on desktop 9 everytime I start my computer (aka whenbspwmrc
loads.This is one way to do it, but the problem is that you can see the window for a short period of time before it is sent over. And, sleeping an arbitrary amount of time doesn't feel right with me
Is there any way to create a node on a given desktop?