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 2015-05-12 19:15:57 +0000

erikdubois gravatar image

updated 2015-05-12 21:05:50 +0000

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
    
edit retag flag offensive close merge delete

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 ( 2015-05-13 16:40:51 +0000 )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 ( 2015-05-18 06:25:07 +0000 )edit

2 answers

Sort by » oldest newest most voted
1

answered 2015-05-18 10:18:54 +0000

gurkensalat gravatar image

updated 2015-05-18 10:20:10 +0000

(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.

edit flag offensive delete link more
0

answered 2015-05-15 08:56:52 +0000

erikdubois gravatar image

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

edit flag offensive delete link more

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 ( 2015-05-18 06:27:10 +0000 )edit

Question Tools

1 follower

Stats

Asked: 2015-05-12 19:15:57 +0000

Seen: 244 times

Last updated: May 18