Skip to content

Instantly share code, notes, and snippets.

@bootandy
Last active June 27, 2024 20:50
Show Gist options
  • Save bootandy/ecbba7241368f0dffa646ee12660345b to your computer and use it in GitHub Desktop.
Save bootandy/ecbba7241368f0dffa646ee12660345b to your computer and use it in GitHub Desktop.
display_plugin
# To be run when plugged into display:
# Reset to normal laptop:
# xrandr --output eDP-1 --scale .5x.5
xrandr --auto
xrandr --output eDP-1-1 --mode 1920x1080 --pos 2560x400 --scale 1x1
xrandr --output DVI-I-2-1 --scale 1x1 --mode 2560x1440 --left-of eDP-1-1
# curve screen:
DISP=$(xrandr | rg ' connected' | tail -n 1 | cut -f 1 -d ' ')
# if this fails swap $DISP with DP-2 or whatever number is assigned
xrandr --output eDP-1 --mode 1920x1080 --pos 3440x576 --rotate normal --output HDMI-1 --off --output $DISP --primary --mode 3440x1440 --pos 0x0 --rotate normal
xinput set-button-map `xinput list | grep 'Evoluent VerticalMouse 4' | grep -Eo 'id\=[0-9]+' | grep -oE '[0-9]+'` 3 1 8 4 5 6 7 8 2
# setxkbmap -layout gb -option ctrl:nocaps
setxkbmap -option caps:ctrl_modifier
# to swap alt and ctrl over
#dconf write "/org/gnome/desktop/input-sources/xkb-options" "['ctrl:swap_lalt_lctl']"
xmodmap ~/.Xmodmap
xmodmap ~/.Xmodmap
echo "Remember to restart VScode"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment