I3 stacked Displays

#1

Hey everyone. So I have hooked a second display to my laptop and it sits above it. So they are stacked. I was able to use ARandR to set them they way I want. But I have no polybar.

Secondly, once I log out and back in I have to set them again with ARandR.

Any help would be great getting this working properly. Also I am wondering what will happen when I have laptop only and not the second display, will I be setting it up over and over?

Thanks

#2

I use such a line in my config:

exec_always --no-startup-id xrandr --auto --output HDMI1 --mode 1920x1080 --rate 60 --left-of eDP1

Of course you need to replace HDMI1 and eDPI1 with whatever your display names are. Also you may to change --left-of to --above.

Can’t help at polybar config. Anyone else?

#3

So I do have it working a little now… polybar shows up in the upper screen, but the desktop switcher thing…showing destop 1,2,3,4,5,6,7,8… only shows the desktops for it’s display…so 5-8…I don’t know if i need to have polybar on both desktops maybe?

#4

Or try plain ole’ i3 bar or somthing.

#5

Try this:

################################################################
###########          Workspace Bindings          ###############
################################################################

# workspace assignment
workspace $WS1 output $Mon1
workspace $WS2 output $Mon1
workspace $WS3 output $Mon1
workspace $WS4 output $Mon1
workspace $WS5 output $Mon2
workspace $WS6 output $Mon2
workspace $WS7 output $Mon2
workspace $WS8 output $Mon2
#6

It’s already like that. It’s polybar that is having the issue it seems. Everything works as it should… I just cant see if i’m on workspace 1,2,3, or 4

#7

Ah, ok. So I won’t help. I use tint2 on i3 and and sway-bar + py3status on sway.

#8

You’ve been plenty helpful already…thanks.

1 Like
#9

Your polybar workspace config needs to match your i3 config perfectly otherwise it won’t work correctly.

This is what I have:
i3config:

set $WS1 1:
set $WS2 2:
set $WS3 3:
set $WS4 4:
set $WS5 5:
set $WS6 6:
set $WS7 7:
set $WS8 8:
set $WS9 9:
set $WS10 10:

Workspace Layout:

# workspace assignment
workspace $WS1 output $Mon1
workspace $WS2 output $Mon1
workspace $WS3 output $Mon1
workspace $WS4 output $Mon1
workspace $WS5 output $Mon1
workspace $WS6 output $Mon2
workspace $WS7 output $Mon2
workspace $WS8 output $Mon2
workspace $WS9 output $Mon2
workspace $WS10 output $Mon2

Polybar Module:

;;;;;;;;;;;;;;;;
;;  i3 SPACES ;;
;;;;;;;;;;;;;;;;
[module/i3spaces]
type = internal/i3

pin-workspaces = true
strip-wsnumbers = true
index-sort = true
enable-click = true
enable-scroll = true
wrapping-scroll = true
reverse-scroll = false
fuzzy-match = true

ws-icon-0 = 1;
ws-icon-1 = 2;
ws-icon-2 = 3;
ws-icon-3 = 4;
ws-icon-4 = 5;
ws-icon-5 = 6;
ws-icon-6 = 7;
ws-icon-7 = 8;
ws-icon-8 = 9;
ws-icon-9 = 10;
;ws-icon-default = 


format = <label-state> <label-mode>
label-mode = %mode%
label-mode-padding = 2
label-mode-background = #e60053
label-focused = %icon%
label-focused-foreground = #a76843
label-focused-background = #141414
label-focused-underline = #5D3D3D
label-focused-padding = 4
label-unfocused = %icon%
label-unfocused-padding = 4
label-unfocused-foreground - #4F4F4F
label-visible = %icon%
label-visible-underline = #737f7f
label-visible-padding = 4
label-urgent = %icon%
label-urgent-foreground = #ffffff
label-urgent-background = #5d6546
label-urgent-padding = 4

Hope this helps.

#10

Non of this is even in my Polybar Module

;;;;;;;;;;;;;;;;;;;
;; i3 Workspaces ;;
;;;;;;;;;;;;;;;;;;;
[module/i3]
type = internal/i3
pin-workspaces = true
strip-wsnumbers = true
index-sort = true
enable-click = true
fuzzy-match = true
ws-icon-default = 
format = <label-state><label-mode>
label-mode = %mode%
label-mode-padding = 2
label-focused = %index% %name%
label-focused-padding = 2
label-unfocused = %index% %name%
label-unfocused-padding = 2
label-visible = %index% %name%
label-visible-padding = 2
label-urgent = %index% %name%
label-urgent-padding = 2
label-mode-underline = ${colors.urgent}
label-focused-underline = ${colors.blue}
label-visible-underline = ${colors.purple}
label-urgent-underline = ${colors.urgent}

My i3 config and workspace layout seem to match yours otherwise… except I only have 8 instead of 10

#11

I forgot to mention when I use polybar I use two instances, one for each screen. Are you just using the one?

#12

Yes, that may be it…it must have to be on it’s screen to see those desktops?

#13

Ah yes, sorry thought you were using two polybars. The workspace will only show the active workspace for that monitor.

#14

Might be able to use the xworkspaces module instead, not sure how it plays with i3

1 Like