Thread: Shell script to get resolution
hi all
i'd have script, following.
- checks current resolution
- if it's x, set y xrandr
- if it's y, set x xrandr
2 files first change x , second change y want locate in task bar can change resolution on fly 1 click.
this..
i think it's possible i'm not familiar scripting in linux, i'd help.code:resolution = getresolution() if [ $resolution = "1024x600"] xrandr --fb 1024x768 --output lvds1 --panning 1024x768 else xrandr --fb 1024x600 --output lvds1 --panning 1024x600 fi
![]()
one way be,
code:#!/bin/bash resolution="$(xdpyinfo | awk '/[ \t]*dimensions:/{ print $2 }')" if [ "$resolution" = "1024x600"] xrandr --fb 1024x768 --output lvds1 --panning 1024x768 else xrandr --fb 1024x600 --output lvds1 --panning 1024x600 fi
Forum The Ubuntu Forum Community Ubuntu Official Flavours Support General Help [ubuntu] Shell script to get resolution
Ubuntu
Comments
Post a Comment