The i3 FAQ has migrated to https://github.com/i3/i3/discussions. All content here is read-only.
Ask Your Question
0

Can Linux (I) name my dual screens always the same?

asked May 12 '15

erikdubois gravatar image

updated May 12 '15

Adaephon gravatar image

Question : Is that an xrandr issue?

I have one PC with several hard disks. Some have Antergos, Manjaro, Archlinux or even Linux Mint. All different kernels with just xorg or nVidia drivers. But all of them have i3.

I use the same config file but now comes the question.

On each of them xrandr shows the same monitors differently. DVI-0, DVI -1, DVI-2, DVI-3, DVI-0-0, DVI-1-1, even VGA-1

Question: Is there a way to tell Linux how the monitors should be named?

Someone pointed me in the direction of udev. I have been reading about udev rules but it is a bit out of my league (yet). Is it correct to assume that udev could solve this nagging issue?

For example: I just installed nVidia driver on Antergos and it changed from DVI-I-1 and 2 to DVI-I-2 and 3.

Here you have my current config to adept to these name changes:

If dualscreen is on

  • xrandr DVI-0 and 3
    workspace 1 output DVI-I-0
    workspace 2 output DVI-I-0
    workspace 3 output DVI-I-0
    workspace 4 output DVI-I-0
    workspace 5 output DVI-I-0
    workspace 6 output DVI-I-3
    workspace 7 output DVI-I-3
    workspace 8 output DVI-I-3
    workspace 9 output DVI-I-3
    workspace 10 output DVI-I-3
    
  • xrandr DVI-0 and 1
    workspace 1 output DVI-0
    workspace 2 output DVI-0
    workspace 3 output DVI-0
    workspace 4 output DVI-0
    workspace 5 output DVI-0
    workspace 6 output DVI-1
    workspace 7 output DVI-1
    workspace 8 output DVI-1
    workspace 9 output DVI-1
    workspace 10 output DVI-1
    
  • xrandr DVI-1 and 2
    workspace 1 output DVI-I-1
    workspace 2 output DVI-I-1
    workspace 3 output DVI-I-1
    workspace 4 output DVI-I-1
    workspace 5 output DVI-I-1
    workspace 6 output DVI-I-2
    workspace 7 output DVI-I-2
    workspace 8 output DVI-I-2
    workspace 9 output DVI-I-2
    workspace 10 output DVI-I-2
    
  • xrandr DVI-2 and 3
    workspace 1 output DVI-I-2
    workspace 2 output DVI-I-2
    workspace 3 output DVI-I-2
    workspace 4 output DVI-I-2
    workspace 5 output DVI-I-2
    workspace 6 output DVI-I-3
    workspace 7 output DVI-I-3
    workspace 8 output DVI-I-3
    workspace 9 output DVI-I-3
    workspace 10 output DVI-I-3
    

Comments

Its not a solution but you could minimize your problem by using variables: set $firstMonitor DVI-I-1 To use them: workspace 1 output $firstMonitor That way you only have to edit one entry per output per system...

gurkensalat gravatar imagegurkensalat (May 13 '15)edit

@gurkensalat While it may not be a complete solution, it is a viable workaround. Any real solution is probably far outside the scope of i3 anyway. Please consider posting that as an answer.

Adaephon gravatar imageAdaephon (May 18 '15)edit

2 answers

Sort by » oldest newest most voted
1

answered May 18 '15

gurkensalat gravatar image

updated May 18 '15

(Reposting as an answer) You can minimize your problem by using variables:

set $firstMonitor DVI-I-1
set $secondMonitor DVI-I-2

To use them:

workspace 1 output $firstMonitor
workspace 2 output $secondMonitor

That way you only have to edit one entry per output per system.

0

answered May 15 '15

erikdubois gravatar image

thanks gurkensalat your variable idea works and makes it a bit more tolerable

Comments

Please do not post comments as answers. While the ability to post comments is generally restricted by karma, you should be able to post comments on your own posts even with low karma.

Adaephon gravatar imageAdaephon (May 18 '15)edit

Question Tools

1 follower

Stats

Asked: May 12 '15

Seen: 244 times

Last updated: May 18