Created
January 12, 2021 01:27
-
-
Save BETLOG/f4f14d4558f0c49d8b9e9263adad2079 to your computer and use it in GitHub Desktop.
move discord to 2nd display
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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