baskerville / bspwm

A tiling window manager based on binary space partitioning
BSD 2-Clause "Simplified" License
7.8k stars 415 forks source link

bspwm closes all nodes of a program #1426

Closed navakelvin closed 2 years ago

navakelvin commented 2 years ago

I have mapped this in sxhdkrc:

alt + Escape
bspc node -{c,k}

This closes the focused node with Alt + Escape.

However, in the case that I open Chrome, I press Ctrl+Shift+t to open the last session.

When I switch to the initially open empty tab Chrome window and press Alt+Escape, it should close only that window but bspwm close all open Chrome windows.

emanuele6 commented 2 years ago
alt + Escape
bspc node -{c,k}

(Assuming there is supposed to be a space before bspc)

That is a nonsensical sxhkd hotkey. It doesn't have a macro in the HOTKEY part alt + Escape, but it has one macro in the COMMAND part bspc node -{c,k} which is not valid.

sxhkd is probably silently ignoring the mistake and interpreting that as if the COMMAND part was bspc node -k. If you want to close windows, "node -k" is absolutely the wrong command. That will "kill" all the clients that own windows in the focused node.

If you want to close windows, you should use the "node -c" command, which closes all the windows in the focused node.

So you should use:

alt + Escape
    bspc node -c

When I switch to the initially open empty tab Chrome window and press Alt+Escape, it should close only that window but bspwm close all open Chrome windows.

That is what happens/should happen because you are probably actually "killining" chrome, not closing the chrome window.

navakelvin commented 2 years ago
alt + Escape
  bspc node -c

Thank you sir, it works fine apparently.

P.S. My mistake. I was using bspc node -{c,k} because that's what I noticed in the config file regarding to close nodes.