sway: factor/generalize the TV workspace/output assignment

This commit is contained in:
Colin 2024-03-08 09:50:35 +00:00
parent a4ab60b836
commit 3200188a32

View File

@ -17,6 +17,14 @@ set $volume_down pulsemixer --change-volume -5
set $mute pulsemixer --toggle-mute
set $default_workspace_layout @workspace_layout@
set $out_tv "LG Electronics LG TV 0x01010101"
set $out_projector "MS Telematica TV 0x00000001"
set $out_desko_1 "LG Electronics LG ULTRAWIDE 0x00004E94"
set $out_desko_2 "Samsung Electric Company S22C300 0x00007F35"
set $out_lappy "BOE 0x0637 Unknown"
# DSI-1 a.k.a. "Unknown Unknown Unknown"
set $out_moby "DSI-1"
### default font (for e.g. window titles)
font @font@
@ -146,7 +154,7 @@ mode "resize" {
for_window [title="megapixels"] inhibit_idle open
# workspace assignments
workspace TV output "LG Electronics LG TV 0x01010101"
workspace TV output $out_tv $out_projector
for_window [workspace="TV"] fullscreen enable
# mostly, messengers belong on WS 1
@ -170,48 +178,51 @@ for_window [app_id="deadd-notification-center"] {
move left 360
}
for_window [app_id="mpv"] move to output "LG Electronics LG TV 0x01010101"
# this only works if Celeste doesn't itself request fullscreen (else, random chance of which display it gets).
# so enter in-game options and disable "Fullscreen", then we manage it here ourselves
for_window [app_id="Celeste64"] move to output "LG Electronics LG TV 0x01010101"
# Celeste64: only works if Celeste doesn't itself request fullscreen (else, random chance of which display it gets).
# so enter in-game options and disable "Fullscreen", then we manage it here ourselves
for_window [app_id="Celeste64|mpv"] {
move to output $out_projector
move to output $out_tv
}
### displays
## DESKTOP
output "LG Electronics LG ULTRAWIDE 0x00004E94" {
pos 0,0
res 3440x1440
}
output "Samsung Electric Company S22C300 0x00007F35" {
pos 3440,0
res 1920x1080
}
# projector
output "MS Telematica TV 0x00000001" {
pos 5360,0
res 1920x1080
}
## LAPTOP
# laptop internal display (a.k.a. "eDP-1")
input "1386:20606:Wacom_Pen_and_multitouch_sensor_Pen" map_to_output "BOE 0x0637 Unknown"
input "1386:20606:Wacom_Pen_and_multitouch_sensor_Finger" map_to_output "BOE 0x0637 Unknown"
output "BOE 0x0637 Unknown" {
pos 0,0
res 1920x1080
}
## SHARED
# TV
output "LG Electronics LG TV 0x01010101" {
output $out_tv {
pos 1920,0
res 1920x1080
# 4k is limited to 30Hz; 1080p is the next-highest resolution (at 120Hz)
# res 3840x2160
}
# projector
output $out_projector {
pos 5360,0
res 1920x1080
}
## DESKTOP
output $out_desko_1 {
pos 0,0
res 3440x1440
}
output $out_desko_2 {
pos 3440,0
res 1920x1080
}
## LAPTOP
# laptop internal display (a.k.a. "eDP-1")
input "1386:20606:Wacom_Pen_and_multitouch_sensor_Pen" map_to_output $out_lappy
input "1386:20606:Wacom_Pen_and_multitouch_sensor_Finger" map_to_output $out_lappy
output $out_lappy {
pos 0,0
res 1920x1080
}
## MOBILE
# pinephone internal display (a.k.a. "Unknown Unknown Unknown")
input "1046:4097:Goodix_Capacitive_TouchScreen" map_to_output "DSI-1"
output "DSI-1" {
input "1046:4097:Goodix_Capacitive_TouchScreen" map_to_output $out_moby
output $out_moby {
# scale defaults to 2 in portrait mode, 1 in landscape
scale 2
# scale 1.6