aboutsummaryrefslogtreecommitdiffstats
path: root/xorg-xrandr/setres
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xxorg-xrandr/setres/__main__.py.gpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/xorg-xrandr/setres/__main__.py.gpp b/xorg-xrandr/setres/__main__.py.gpp
index f794339..ad8cfcf 100755
--- a/xorg-xrandr/setres/__main__.py.gpp
+++ b/xorg-xrandr/setres/__main__.py.gpp
@@ -21,6 +21,7 @@ crt = t('crt', 'c')
large = t('large', 'l')
single = t('single', '1')
pretend = t('pretend', 'P')
+rotated = t('rotated', 'r')
[screen] = get_setup()
ok = False
@@ -49,6 +50,10 @@ if hostname == 'zenith':
sec_position = 'left'
+elif hostname == 'hades':
+ embed = 'eDP1'
+ embed.want_mode = '1920x1280'
+
%%>hostname="$(hostname | tr '[A-Z]' '[a-z]')"
%%>file="${HOME}/.dotfiles/.private/setres/${hostname}"
%%>if test -r "${file}"; then
@@ -146,6 +151,10 @@ if '-embed' in args:
embed.connected = False
+prime_output = None
+sec_output = None
+embed_output = None
+
### Apply
@@ -155,6 +164,7 @@ if prime is not None and prime.connected and sec is not None and sec.connected a
ok = True
output = Output(prime.name)
+ prime_output = output
display.outputs.append(output)
output.mode = prime.want_mode
output.rate = prime.want_rate
@@ -163,6 +173,7 @@ if prime is not None and prime.connected and sec is not None and sec.connected a
output.relto = None
output = Output(sec.name)
+ sec_output = output
display.outputs.append(output)
output.mode = sec.want_mode
output.rate = sec.want_rate
@@ -174,6 +185,7 @@ if prime is not None and prime.connected and sec is not None and sec.connected a
output = Output(embed.name)
display.outputs.append(output)
if embed.want_mode == prime.want_mode:
+ embed_output = output
output.mode = embed.want_mode
output.rate = embed.want_rate
output.primary = False
@@ -189,6 +201,7 @@ elif prime is not None and prime.connected:
ok = True
output = Output(prime.name)
+ prime_output = output
display.outputs.append(output)
output.mode = prime.want_mode
output.rate = prime.want_rate
@@ -203,6 +216,7 @@ elif prime is not None and prime.connected:
output = Output(embed.name)
display.outputs.append(output)
if embed.want_mode == prime.want_mode:
+ embed_output = output
output.mode = embed.want_mode
output.rate = embed.want_rate
output.primary = False
@@ -218,6 +232,7 @@ elif sec is not None and sec.connected:
ok = True
output = Output(sec.name)
+ prime_output = output
display.outputs.append(output)
output.mode = sec.want_mode
output.rate = sec.want_rate
@@ -232,6 +247,7 @@ elif sec is not None and sec.connected:
output = Output(embed.name)
display.outputs.append(output)
if embed.want_mode == sec.want_mode:
+ embed_output = output
output.mode = embed.want_mode
output.rate = embed.want_rate
output.primary = False
@@ -251,6 +267,7 @@ else:
ok = True
output = Output(embed.name)
+ prime_output = output
display.outputs.append(output)
output.mode = embed.want_mode
output.rate = embed.want_rate
@@ -265,6 +282,7 @@ else:
output = Output(sec.name)
display.outputs.append(output)
output.off = True
+
if ok:
@@ -283,6 +301,9 @@ if ok:
display.outputs.append(output)
output.off = True
+ embed_output is not None:
+ embed_output.rotated = ('left' if rotated else 'normal')
+
ok = apply_setup(display)