Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #get screen resolution
- res="$(xrandr|grep '*'|head -n 1|awk '{print $1}')"
- #get width and height
- width="$(xrandr|grep '*'|head -n 1|awk '{print $1}'|cut -d\x -f1)"
- height="$(xrandr|grep '*'|head -n 1|awk '{print $1}'|cut -d\x -f2)"
- #output
- echo "Your screen Resolution is $res"
- echo "The width is $width and the height is $height"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement