Update todo list, make small updates to display-manage script

This commit is contained in:
2026-01-17 01:34:44 -06:00
parent 85a6a138b7
commit 95f90cd50e
3 changed files with 16 additions and 12 deletions

View File

@@ -1,12 +1,5 @@
#!/bin/sh
# NOTE: just use this for recurring cases; if i'm doing a one-off case such presenting at
# an event or temporarily using more than one external monitor, then i probably
# would be better off just writing a one-time script in prep for that case;
# example where one external is DisplayPort-1, another is HDMI-1, and laptop is eDP:
# xrandr --query # to get devices and status
# xrandr --output DisplayPort-1 --primary --auto --output HDMI-1 --auto --output eDP --auto
DISPMANAGE_EXT_PORT_ID_PREFIX="DisplayPort"
DISPMANAGE_LAPTOP_ID="eDP"
DISPMANAGE_LAPTOP_MODE='"1920x1280_60.00"'
@@ -33,10 +26,10 @@ solo_monitor_mode() {
primary_mon_id=""
case "$1" in
(laptop | laptop-only)
(l | laptop)
primary_mon_id="$DISPMANAGE_LAPTOP_ID"
;;
(ext | external)
(e | external)
primary_mon_id=$(
xrandr |
grep "^$DISPMANAGE_EXT_PORT_ID_PREFIX.*\sconnected" |
@@ -44,6 +37,13 @@ case "$1" in
sed -E "s/^([^ ]+).*$/\1/g"
)
;;
# for one-off/special cases; just set things explicitly here and exit
# (c1 | case1)
# xrandr --output DisplayPort-1 --primary --auto \
# --output HDMI-1 --auto \
# --output eDP --auto --same-as DisplayPort-1
# exit 0
# ;;
esac
[ -z "$primary_mon_id" ] &&