diff --git a/bin/x b/bin/x index b6d7a43..82457fa 100755 --- a/bin/x +++ b/bin/x @@ -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 [] {