selectively disable one display

This commit is contained in:
randomuser 2024-01-20 08:30:31 -06:00
parent 13d35c76b2
commit a7a7e090d7
3 changed files with 37 additions and 19 deletions

View File

@ -16,8 +16,14 @@
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
xscreensaver xscreensaver
thunderbird thunderbird
hue-cli
bluetuith
]; ];
hardware.bluetooth = {
enable = true;
};
services.udev.extraRules = '' services.udev.extraRules = ''
ACTION=="add", SUBSYSTEM=="input", KERNEL=="event[0-20]*", ENV{ID_INPUT_TOUCHSCREEN}=="1", MODE:="0666" GROUP="usr", SYMLINK+="input/touchscreen" ACTION=="add", SUBSYSTEM=="input", KERNEL=="event[0-20]*", ENV{ID_INPUT_TOUCHSCREEN}=="1", MODE:="0666" GROUP="usr", SYMLINK+="input/touchscreen"
''; '';

View File

@ -29,22 +29,34 @@ case "$(hostname)" in
;; ;;
"x230t") "x230t")
echo "x230t" echo "x230t"
if case "$1" in
assert_edid "VGA-1" "35737dc483d2c3b1b20ea2343ce13c6c42d115febdc9634f8437e1b9f7fd3f5c" && "dockedtwo")
assert_edid "HDMI-A-1" "01887cbd23d74201e489a6334656f7db73a7b7f732a738a9f1ee2d53389f7817"; # assume we're connected to the two external displays
then xrandr --output VGA-1 --primary --mode 1920x1080 --rotate normal \
echo "docked" --output HDMI-1 --mode 1920x1080 --rotate normal --right-of VGA-1 \
xrandr --output LVDS-1 --primary --mode 1366x768 --pos 1194x1080 --rotate normal \ --output LVDS-1 --off
--output VGA-1 --mode 1920x1080 --pos 0x0 --rotate normal \ bspc monitor VGA-1 -d 1 3 5 7 9
--output HDMI-1 --mode 1920x1080 --pos 1920x0 --rotate normal \ bspc monitor HDMI-1 -d 2 4 6 8
--output DP-1 --off \ ;;
--output HDMI-2 --off \ *)
--output DP-2 --off if
bspc monitor LVDS-1 -d 1 4 7 assert_edid "VGA-1" "35737dc483d2c3b1b20ea2343ce13c6c42d115febdc9634f8437e1b9f7fd3f5c" &&
bspc monitor VGA-1 -d 2 5 8 assert_edid "HDMI-A-1" "01887cbd23d74201e489a6334656f7db73a7b7f732a738a9f1ee2d53389f7817";
bspc monitor HDMI-1 -d 3 6 9 then
else echo "docked"
bspc monitor LVDS-1 -d 1 2 3 4 5 6 7 8 9 xrandr --output LVDS-1 --primary --mode 1366x768 --pos 1194x1080 --rotate normal \
fi --output VGA-1 --mode 1920x1080 --pos 0x0 --rotate normal \
--output HDMI-1 --mode 1920x1080 --pos 1920x0 --rotate normal \
--output DP-1 --off \
--output HDMI-2 --off \
--output DP-2 --off
bspc monitor LVDS-1 -d 1 4 7
bspc monitor VGA-1 -d 2 5 8
bspc monitor HDMI-1 -d 3 6 9
else
bspc monitor LVDS-1 -d 1 2 3 4 5 6 7 8 9
fi
;;
esac
;; ;;
esac esac

View File

@ -210,11 +210,11 @@
"locked": { "locked": {
"lastModified": 1, "lastModified": 1,
"narHash": "sha256-wGl3ZnqjhpAEpTkzgjWxgsbmGX9c7TPCM4I0okuOYFE=", "narHash": "sha256-wGl3ZnqjhpAEpTkzgjWxgsbmGX9c7TPCM4I0okuOYFE=",
"path": "/nix/store/z62lv62z8yn2vfgxk06aqdr7i6wmk2v0-source/builds", "path": "/nix/store/6nljlgsf56x9pglryla3l480awympq84-source/builds",
"type": "path" "type": "path"
}, },
"original": { "original": {
"path": "/nix/store/z62lv62z8yn2vfgxk06aqdr7i6wmk2v0-source/builds", "path": "/nix/store/6nljlgsf56x9pglryla3l480awympq84-source/builds",
"type": "path" "type": "path"
} }
}, },