Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- [ -z "$1" -o -z "$2" -o -z "$3" ] && echo "display1 action display2 side" && exit 0
- if [[ "$2" == "duplicate" ]]; then
- xrandr --output "$1" --output "$3" --same-as "$1"
- echo "awesome.restart()" | awesome-client
- fi
- if [[ "$2" == "switch" ]]; then
- xrandr --output "$3" --auto --output "$1" --off
- echo "awesome.restart()" | awesome-client
- fi
- side=""
- if [[ "$2" == "extend" ]]; then
- case "$4" in
- left)
- side='--left-of'
- ;;
- right)
- side='--right-of'
- ;;
- above)
- side='--above'
- ;;
- below)
- side='--below'
- ;;
- *)
- side='--left-of'
- ;;
- esac
- xrandr --output "$1" --auto --output "$3" --auto $side "$1"
- echo "awesome.restart()" | awesome-client
- fi
- exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement