Skip to main content

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..

code:
resolution = getresolution()  if [ $resolution = "1024x600"]     xrandr --fb 1024x768 --output lvds1 --panning 1024x768     else xrandr --fb 1024x600 --output lvds1 --panning 1024x600  fi
i think it's possible i'm not familiar scripting in linux, i'd help.

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

Popular posts from this blog

Joomal 3.6.3 update error - PHP temporary folder is not set - Joomla! Forum - community, help and support

Background Colour in Template Corporate-Green - Joomla! Forum - community, help and support

Warnings after upgrading to Joomla 3.6.4 ??? - Joomla! Forum - community, help and support