Skip to content

Instantly share code, notes, and snippets.

@oservieres
Created May 14, 2014 09:47
Show Gist options
  • Save oservieres/79e28e91aab293c5fb4d to your computer and use it in GitHub Desktop.
Save oservieres/79e28e91aab293c5fb4d to your computer and use it in GitHub Desktop.
handle dual screen
#!/bin/bash
xrandr --auto
sleep 2
xrandr --output HDMI1 --right-of eDP1 --primary
sleep 2
xfconf-query -c xfce4-panel -p /panels/panel-1/output-name -s HDMI1
xfconf-query -c xfce4-panel -p /panels/panel-1/size -s 26
function move_window {
WID=`xdotool search --name "$1"`
for id in $WID
do
wmctrl -ir $id -b remove,maximized_vert,maximized_horz
xdotool windowmove $id 1366 0
wmctrl -ir $id -b add,maximized_vert,maximized_horz
done
}
move_window "Chromium"
move_window "icedove"
move_window "terminal"
#!/bin/bash
xrandr --auto
sleep 3
xfconf-query -c xfce4-panel -p /panels/panel-1/output-name -s eDP1
xfconf-query -c xfce4-panel -p /panels/panel-1/size -s 20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment