-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscreens_db.lua
98 lines (96 loc) · 3.65 KB
/
screens_db.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
local defaultOutput = 'eDP1'
outputMapping = {
['DP-1'] = 'DP1',
['DP-2'] = 'DP2',
['DP-3'] = 'DP3',
['VGA-1'] = 'VGA1',
['LVDS-1'] = 'LVDS1',
['HDMI-A-1'] = 'HDMI1',
['HDMI-A-2'] = 'HDMI2',
['HDMI-A-3'] = 'HDMI3',
['eDP-1'] = 'eDP1',
['eDP-2'] = 'eDP2',
-- ['DP-4'] = 'DP1-2',
-- ['DP-5'] = 'DP1-3',
}
screens = {
['2088484784921'] = { -- Home DELL 2k monitor, left (DP3)
['connected'] = function (xrandrOutput, count)
local currentOut = '--output ' .. xrandrOutput .. ' --mode 1920x1080'
local disablePrime = '--output ' .. defaultOutput .. ' --off'
if count > 2 then
return disablePrime
else
return currentOut .. ' --left-of ' .. defaultOutput .. ' --primary'
end
end,
['disconnected'] = function (xrandrOutput, count)
if xrandrOutput ~= defaultOutput then
return '--output ' .. xrandrOutput .. ' --off --output ' .. defaultOutput .. ' --auto'
end
return nil
end
},
['2088490884821'] = { -- Home DELL 2k monitor, right (DP2)
['connected'] = function (xrandrOutput, count)
local currentOut = '--output ' .. xrandrOutput .. ' --primary --mode 1920x1080'
if count > 2 then
return disablePrime
else
return currentOut .. ' --left-of ' .. defaultOutput
end
end,
['disconnected'] = function (xrandrOutput, count)
if xrandrOutput ~= defaultOutput then
return '--output ' .. xrandrOutput .. ' --off --output ' .. defaultOutput .. ' --auto'
end
return nil
end
},
['2408376716826'] = { -- DELL FullHD monitor on work place, right
['connected'] = function (xrandrOutput, count)
local currentOut = '--output ' .. xrandrOutput .. ' --mode 1920x1080'
local disablePrime = '--output ' .. defaultOutput .. ' --off'
if count > 2 then
return disablePrime .. ' ' .. currentOut .. ' --left-of DP1-3'
else
return currentOut .. ' --left-of ' .. defaultOutput
end
end,
['disconnected'] = function (xrandrOutput, count)
if xrandrOutput ~= defaultOutput then
return '--output ' .. xrandrOutput .. ' --off --output ' .. defaultOutput .. ' --auto'
end
return nil
end
},
['2408367846726'] = { -- DELL FullHD monitor on work place, left
['connected'] = function (xrandrOutput, count)
local currentOut = '--output ' .. xrandrOutput .. ' --mode 1920x1080'
return currentOut .. ' --right-of ' .. defaultOutput .. '--primary'
end,
['disconnected'] = function (xrandrOutput, count)
if xrandrOutput ~= defaultOutput then
return '--output ' .. xrandrOutput .. ' --off --output ' .. defaultOutput .. ' --auto'
end
return nil
end
},
['default'] = {
['connected'] = function (xrandrOutput, count)
if count > 1 then
return '--output ' .. xrandrOutput .. ' --off ' .. defaultOutput .. ' --auto'
elseif xrandrOutput ~= defaultOutput then
return '--output --primary ' .. xrandrOutput .. ' --same-as' .. defaultOutput
else
return nil
end
end,
['disconnected'] = function (xrandrOutput, count)
if xrandrOutput ~= defaultOutput then
return '--output ' .. xrandrOutput .. ' --off --output ' .. defaultOutput .. ' --auto'
end
return nil
end
},
}