Auto max res, laptop view

This commit is contained in:
Thomas Forgione 2024-03-31 14:10:15 +02:00
parent 1d95300a22
commit d0d698647c
1 changed files with 11 additions and 4 deletions

15
bin/x
View File

@ -2,23 +2,30 @@
# default view: only main screen
def "main d" [] {
^xrandr --output $env.PRIMARY_SCREEN --mode 2560x1440 --primary --output $env.SECONDARY_SCREEN --off --output HDMI-0 --off
let res = main | where name == $env.PRIMARY_SCREEN | get resolutions | get 0 | get 0
xrandr --output $env.PRIMARY_SCREEN --mode $res --primary --output $env.SECONDARY_SCREEN --off --output HDMI-0 --off
}
# bureau view: both screens side to side
def "main b" [] {
^xrandr --output $env.PRIMARY_SCREEN --mode 2560x1440 --primary --output $env.SECONDARY_SCREEN --mode 1920x1080 --right-of $env.PRIMARY_SCREEN --output HDMI-0 --off
let res = main | where name == $env.PRIMARY_SCREEN | get resolutions | get 0 | get 0
xrandr --output $env.PRIMARY_SCREEN --mode $res --primary --output $env.SECONDARY_SCREEN --mode 1920x1080 --right-of $env.PRIMARY_SCREEN --output HDMI-0 --off
}
# television view: only TV on (720p so that menus are readable)
def "main t" [] {
^xrandr --output $env.PRIMARY_SCREEN --off --output $env.SECONDARY_SCREEN --off --output HDMI-0 --mode 1280x720 --primary
xrandr --output $env.PRIMARY_SCREEN --off --output $env.SECONDARY_SCREEN --off --output HDMI-0 --mode 1280x720 --primary
}
# stream view: only secondary screen
def "main s" [] {
^xrandr --output $env.SECONDARY_SCREEN --mode 1920x1080 --primary --output $env.PRIMARY_SCREEN --off
xrandr --output $env.SECONDARY_SCREEN --mode 1920x1080 --primary --output $env.PRIMARY_SCREEN --off
}
# laptop view: only secondary screen
def "main l" [] {
xrandr --output $env.SECONDARY_SCREEN --mode 1920x1080 --primary --output $env.PRIMARY_SCREEN --off
}
def main [] {