Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #/usr/local/bin/rot
- #!/bin/bash
- orientation=$(xrandr --query --verbose | grep "eDP-1" | cut -d ' ' -f 6)
- echo "$1"
- if [[ "$1" == "toggle" ]]; then
- if [[ "$orientation" == "normal" ]]; then
- rotate left
- else
- rotate normal
- fi
- exit 0
- elif [[ "$1" == "invert" ]]; then
- if [[ "$orientation" == "normal" ]]; then
- rotate invert
- else
- rotate normal
- fi
- exit 0
- else
- echo "Invalid command"
- exit 2
- fi
Advertisement
Add Comment
Please, Sign In to add comment