summaryrefslogtreecommitdiff
path: root/.config
diff options
context:
space:
mode:
authorMike Crute <mike@crute.us>2020-11-25 11:05:04 -0800
committerMike Crute <mike@crute.us>2020-11-25 11:05:04 -0800
commit544696cafd4a904c76d8b528f43097928e8a2388 (patch)
tree9d3703d7c95d980845990078f2ce16ab7ec83201 /.config
parentb95fe58226e36dadd0602b0ddd35194b4ba02169 (diff)
downloaddotfiles-544696cafd4a904c76d8b528f43097928e8a2388.tar.bz2
dotfiles-544696cafd4a904c76d8b528f43097928e8a2388.tar.xz
dotfiles-544696cafd4a904c76d8b528f43097928e8a2388.zip
Rewrite display enumeration logic
Eliminates parsing xrandr and the need for parse-edid (which is no longer in most distro repos). Also fixes a bunch of bugs with parse-edid name handling.
Diffstat (limited to '.config')
-rw-r--r--.config/awesome/mcrute.lua8
1 files changed, 5 insertions, 3 deletions
diff --git a/.config/awesome/mcrute.lua b/.config/awesome/mcrute.lua
index fb03d9a..c6092a4 100644
--- a/.config/awesome/mcrute.lua
+++ b/.config/awesome/mcrute.lua
@@ -555,8 +555,8 @@ end
555function configure_displays() 555function configure_displays()
556 local displays = get_displays() 556 local displays = get_displays()
557 557
558 -- Only built-in display is connected 558 -- Only built-in (XPS 13) display is connected
559 if #displays == 1 and displays[1].edid == "DELL_XPS_13" then 559 if #displays == 1 and displays[1].edid == "AUO_11048" then
560 awful.spawn.spawn("xrandr " .. 560 awful.spawn.spawn("xrandr " ..
561 "--output eDP-1 --mode " .. default_edp_mode .. " " .. 561 "--output eDP-1 --mode " .. default_edp_mode .. " " ..
562 "--output DP-1 --off " .. 562 "--output DP-1 --off " ..
@@ -588,8 +588,10 @@ function configure_displays()
588 awful.spawn.spawn("xrandr --output " .. s.card .. " --auto --output eDP-1 --off") 588 awful.spawn.spawn("xrandr --output " .. s.card .. " --auto --output eDP-1 --off")
589 --split_screen_vertical() 589 --split_screen_vertical()
590 return 590 return
591 elseif s.edid == "DELL_XPS_13" then -- Built-in display 591 elseif s.edid == "AUO_11048" then -- XPS 13 Built-in display
592 -- continue 592 -- continue
593 elseif s.edid == "LG TV" then -- Home TV
594 awful.spawn.spawn("xrandr --output eDP-1 --mode " .. default_edp_mode .. " --output " .. s.card .. " --mode 1920x1080 --right-of eDP-1")
593 else 595 else
594 default_display_handler(s.card, default_edp_mode) 596 default_display_handler(s.card, default_edp_mode)
595 return 597 return