I3blocks with dual screens


#1

I have recently switched from Polybar to i3blocks and I am hoping someone knows how to extend the i3block panel across two screens rather than it mirror itself across the two.

Any help would be appreciated


#2

Extend or duplicate?


#3

Extend. At the moment I have the same modules on each bar but the workspaces are separated evenly between the two (workspace 1-4 is on the left bar and 5-8 is on the right bar).

I only want modules on one bar.


#4

I dont know about extending but as you know, it does duplicate pretty much on it’s own. I have not tried setting that up for blocks and thats something I should do. Was pretty easy for polybar and I hope there is something like that for blocks.

Will need to keep an eye on this thread myself.
This seems to touch on that.


#5

I saw that thread earlier, creating the other bar doesn’t quite work. I’ll probably have to put up with it for now. I’m actually contemplating running no panels/bars at all.


#6

And just have conky?


#7

Pretty much, I don’t even really use that much either.


#8

Read the i3 wiki, it clearly explains anything you can do in i3 and likely has an example.

Configuring your workspace bar starts with opening a bar block. You can have multiple bar blocks to use different settings for different outputs (monitors):

Example :

bar {
   status_command i3status
}

In other words, use output and tell i3blocks to use a different config for the given output.

source: https://i3wm.org/docs/userguide.html#_configuring_i3bar

NOTE: the bar is not i3blocks, it’s i3bar. i3blocks is the script that can be used to create i3bars.


#9

So yeah! I did get this to work and pretty fang happy too.
I have included a screen shot and you will see what my i3 config looks like.

I simply duplicated the i3bocks config file and removed what I didn’t want on the HDMI.
The only item that is duplicated on both bars is the date/time module.


#10

The only real drawback; if I unplug the hdmi and use only the lappy monitor - I do lose the modules that were set for HDMI. For me, I can live with the original way I did this simply because in the next few months I’ll be building a nice desktop and that will have the dual monitors. Then it wont matter. But at least it is doable (I guess, lol).


#11

That’s what confused me.

@chris60601, got mine working. Just need to sort the keybinds for hiding the bar and I am 100%.


#12

Yeah - Same here. Happy you have it working as you wanted. Im glad you brought it up too.
It pushed me to work through it for the near future, lol!


#13

I am too, it’s a nice change from Polybar.