Bspwm edition

sxhkdrc config

# show help on key bindings
super + F1
	urxvt -name float -e ~/.config/bspwm/keybindings

in bspwmrc config

bspc rule -a URxvt:float state=floating retangle=1200x480+0+0 center=on focus=on

if you use termite
sxhkdrc config.

super + F1
    termite --name float -e ~/.config/bspwm/keybindings

bspwmrc config

bspc rule -a Termite:float state=floating retangle=1200x480+0+0 center=on focus=on
1 Like

@flyingcakes will take a look at it tmrw! See what he thinks!

you can use rofi too

#!/bin/bash

awk '/^[a-z]/ && last {print "<small>",$0,"\t",last,"</small>"} {last=""} /^#/{last=$0}' ~/.config/bspwm/sxhkd/sxhkdrc |
    column -t -s $'\t' |
    rofi -dmenu -i -p "keybindings:" -markup-rows -no-show-icons -width 1000 -lines 15 -yoffset 40

but with the first is nicer

2 Likes

This is very very nice, thank you for sharing. I got it running on my set up. Just a note for others that might give it a try, it needs fzf installed as well. A simple yay fzf does the trick, but it wasn’t something I had already and it took me a little bit to figure it out.

Do you just run the script or is there more to do?

Create the script, make it executable, then edit the bspwmrc (to handle the window correctly) and sxhkdrc (to make it pop up when you hit super+F1) files. Make sure it’s using whatever terminal you want, probably a second one. I use xfce4-terminal as my main one and set up termite for this. Also, make sure the path in the script file is correct, I had to edit it slightly.

Can you use the same terminal as you are using for the rest? I’m not great with bash stuff i have to admit so that is why i ask a lot of questions. :wink:

first install fzf
pacman -S fzf
open a text editor an copy and paste
change cat ~/.config/bspwm/sxhkd/sxhkdrc to your sxhkdrc folder
all my file are in ~/.config/bspwm

#! /bin/bash

cat ~/.config/bspwm/sxhkd/sxhkdrc | awk '/^[a-z]/ && last {print $0,"\t",last} {last=""} /^#/{last=$0}' | column -t -s $'\t' | fzf

save it as keybindings
chmod +x keybindings
mv keybindings ~/.config/bspwm

copy and paste in your sxhkdrc file

# show help on key bindings
super + F1
	urxvt -name float -e ~/.config/bspwm/keybindings

copy and paste in bspwmrc file

bspc rule -a URxvt:float state=floating retangle=1200x480+0+0 center=on focus=on

change the terminal you use in the 2 last files
you can use any terminal
i use URxvt

but if you use termite you have to chage to Termite --name with 2 of – font of the name

try my best to make it easy

2 Likes

i use URxvt or termite but you can use any terminal

yes you can use the same terminal

I had already switch over to I3 but I’m trying to understand some of these things. Not easy for me. I’m trying to understand also the big difference between i3 and Bspwm. I know the tiling is slightly different and some keybindings. I like both of them and they work well. But I’m trying to understand what the significant difference is.

basic config so i3wm and bspwm can do almost the same thing.
but after I learned the most basic of bspwm then I thought bspwm is easier to set up. In my opinion

You are probably right on that and i have very limited experience with the configs and keybindings so i just watch & learn from the best. :slightly_smiling_face:

You can, but then every time you open that terminal the window rules will apply to it.

What does that mean. What Window rules? The ones you set up above?

1 Like

I don’t think so.

The rule only applies to urxvt and when the attribute float is defined.

So possibly not. Because if it applied to all of URXVT then why would you have float defined in both.

1 Like

Now that you point it out, it makes sense to me.

-name defines the window title. And bspc rule is targeting only those instances of urxvt that have title ‘float’.

:brain: :bulb:

2 Likes

Only realised that now myself - I didn’t actually know you could do that!

Clever icebird!

2 Likes

Thank You @anon71489565

Your script has been added to our repo.

Successfully stolen :wink:

3 Likes

bspwm move window better than i3wm In my opinion

Peek 2021-04-16 14-19

6 Likes