feat: add scripts to set primary screen

This commit is contained in:
ryan4yin
2023-05-31 20:41:50 +08:00
parent df8a7e68e1
commit 5b99c2ceca
3 changed files with 14 additions and 1 deletions

View File

@@ -342,7 +342,7 @@ exec --no-startup-id dex --autostart --environment i3
# start a script to setup displays
# uncomment the next line, use arandr to setup displays and save the file as monitor:
# exec --no-startup-id ~/.screenlayout/monitor.sh
exec --no-startup-id ~/.screenlayout/monitor.sh
# set wallpaper
# exec --no-startup-id sleep 2 && nitrogen --restore

View File

@@ -30,6 +30,9 @@
recursive = true;
};
# xrandr - set primary screen
home.file.".screenlayout/monitor.sh".source = ./dual-monitor-4k-600p.sh;
# allow fontconfig to discover fonts and configurations installed through home.packages
fonts.fontconfig.enable = true;

View File

@@ -0,0 +1,10 @@
#!/bin/sh
xrandr \
--output HDMI-0 --mode 1024x600 --pos 3840x0 --rotate normal \
--output DP-0 --off \
--output DP-1 --off \
--output DP-2 --primary --mode 3840x2160 --pos 0x0 --rotate normal \
--output DP-3 --off \
--output DP-4 --off \
--output DP-5 --off