Skip to content

Instantly share code, notes, and snippets.

@BETLOG
Created January 12, 2021 01:27
Show Gist options
  • Save BETLOG/f4f14d4558f0c49d8b9e9263adad2079 to your computer and use it in GitHub Desktop.
Save BETLOG/f4f14d4558f0c49d8b9e9263adad2079 to your computer and use it in GitHub Desktop.
move discord to 2nd display
#!/bin/bash
# move discord to lower screen, assumes specific resolution
if [[ $(xrandr|grep -c ' connected ') -gt 1 ]];then
id=$(xdotool search --name "Discord"|tail -n 1)
if [[ -n $id ]];then
wmctrl -ir $id -b remove,maximized_vert,maximized_horz
xdotool windowmove $id 0 1080
wmctrl -ir $id -b add,maximized_vert,maximized_horz
fi
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment