#!/bin/bash # changeres # reset wallpaper if screen-resolution change is detected and we are running # under virtualbox, else just exit. # var=$(command-name-here) old=$(xrandr) if dmesg | grep -i Virtualbox ; then while true ; do # diff <(echo "$foo") <(echo "$bar") diff <(echo "$old") <(xrandr) || ( nitrogen --restore && wbarRestart && killall conky ; sleep 2 && conky & ) # in bunsen labs one could use a line like # diff <(echo "$old") <(xrandr) || ( nitrogen --restore && killall conky && sleep 2 && bl-conky-session & ) old=$(xrandr) sleep 5; done else exit fi