summaryrefslogtreecommitdiff
path: root/ar
diff options
context:
space:
mode:
authorTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2026-06-10 09:58:25 +0900
committerTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2026-06-10 09:58:25 +0900
commit585126b6b8e32a2fd2597b5e9c4bcf62d72542c7 (patch)
tree41faef9a57600d4813fa6bcfcf677bf564545789 /ar
parentfc5165c1be93c695023d79942d907c8227140a62 (diff)
modified bin/dmenudisplay, modified bin/remapsHEADmaster
Diffstat (limited to 'ar')
-rwxr-xr-xar/.local/bin/dmenudisplay7
-rwxr-xr-xar/.local/bin/remaps2
2 files changed, 7 insertions, 2 deletions
diff --git a/ar/.local/bin/dmenudisplay b/ar/.local/bin/dmenudisplay
index 4673599..8c4e411 100755
--- a/ar/.local/bin/dmenudisplay
+++ b/ar/.local/bin/dmenudisplay
@@ -25,7 +25,12 @@ get_resolution() {
chosen_res=$(echo "$resolutions" | dmenu -i -p "Resolution for $display:")
[ -n "$chosen_res" ] && echo "--mode $chosen_res" || echo "--auto"
else
- echo "--auto"
+ # No EDID-preferred mode on some displays makes --auto fall back to a tiny
+ # mode (e.g. 640x480). Default to the highest available mode instead.
+ best=$(xrandr --query | sed -n "/^$display/,/^[^ ]/p" |
+ grep -v "^$display" | grep -E "^[[:space:]]+[0-9]+x[0-9]+" |
+ awk '{print $1}' | sort -t x -k1,1n -k2,2n | tail -n1)
+ [ -n "$best" ] && echo "--mode $best" || echo "--auto"
fi
}
diff --git a/ar/.local/bin/remaps b/ar/.local/bin/remaps
index 9295c8c..495b617 100755
--- a/ar/.local/bin/remaps
+++ b/ar/.local/bin/remaps
@@ -12,7 +12,7 @@ xinput list | grep 'id=' | while read -r line; do
case "$(echo "$line" | grep -oE '.*id=' | sed 's/ id=.*//')" in
*"BYCX Gaming Keyboard"*)
setxkbmap -device "$keyboard" -option
- setxkbmap -device "$keyboard" -option caps:ctrl_modifier,altwin:menu_win,altwin:swap_lalt_lwin
+ setxkbmap -device "$keyboard" -option caps:ctrl_modifier,altwin:menu_win,altwin:swap_ralt_rwin
;;
*"Lenovo TrackPoint Keyboard II"*)
setxkbmap -device "$keyboard" -option