I have five resolution presets puppypins, and five corresponding scripts named 1366, 1440, 1650, 1920 and 2560. My question is how to put this into one script? Here is script for 1366, the other four scripts exactly the same exxcept for last cp and echo commands which change to the relevant resolution (custom puppypin) and corresponding string to be written to res.txt All help appreciated! But in fact this works fine for screen 0!
Code: Select all
#!/bin/sh
source ~/Choices/ROX-Filer/res.txt
#rm ~/Choices/ROX-Filer/res.txt
if [ $res = a ]; then
cp -f ~/Choices/ROX-Filer/PuppyPin ~/Choices/ROX-Filer/1366
if [ $res = b ]; then
cp -f ~/Choices/ROX-Filer/PuppyPin ~/Choices/ROX-Filer/1440
if [ $res = c ]; then
cp -f ~/Choices/ROX-Filer/PuppyPin ~/Choices/ROX-Filer/1650
if [ $res = d ]; then
cp -f ~/Choices/ROX-Filer/PuppyPin ~/Choices/ROX-Filer/1920
if [ $res = e ]; then
cp -f ~/Choices/ROX-Filer/PuppyPin ~/Choices/ROX-Filer/2560
fi
fi
fi
fi
fi
cp -f ~/Choices/ROX-Filer/1366 ~/Choices/ROX-Filer/PuppyPin
echo "res=a" > ~/Choices/ROX-Filer/res.txt
restartwm
#the end##