#!/bin/sh # test we are root if [ "$USER" != "root" ] ; then echo "Run as root please, exiting." exit 1 fi export CFLAGS="-mtune=generic -Os -pipe" export CXXFLAGS="-mtune=generic -Os -pipe -fno-exceptions -fno-rtti" P=arandr V=0.1.11 SRC=$P-$V USER=`cat /etc/sysconfig/tcuser` LIST="compiletc submitqc gettext py3.9cairo-dev python3.9-docutils adwaita-icon-theme imagemagick" for Z in $LIST do su -c "tce-load -i $Z" $USER done cd /tmp su -c "/usr/local/bin/wget -nc --no-check-certificate \ http://christian.amsuess.com/tools/$P/files/$SRC.tar.gz " $USER tar xvf $SRC*gz cd $SRC python3.9 setup.py install --prefix=/usr/local --root=/tmp/$P cd /tmp # locale ######### mkdir -p $P-locale/usr/local/share mv $P/usr/local/share/locale $P-locale/usr/local/share/ # doc ##### mkdir -p $P-doc/usr/local/share mv $P/usr/local/share/man $P-doc/usr/local/share # main ###### # desktop ######### mkdir -p $P/usr/local/share/pixmaps cp /usr/local/share/icons/Adwaita/symbolic/legacy/preferences-desktop-display-symbolic.svg $P/usr/local/share/pixmaps/arandr.svg cd $P/usr/local/share/pixmaps convert *.svg -resize 48x48 $P.png rm -rf *.svg cd /tmp DESK=$P/usr/local/share/applications/$P.desktop sed 's|display|arandr|' -i $DESK sed 's|HardwareSettings;|System;Utility;|' -i $DESK echo 'X-FullPathIcon=/usr/local/share/pixmaps/arandr.png' >> $DESK mkdir -p $P/usr/local/share/doc/$P echo 'GPL v3' > $P/usr/local/share/doc/$P/COPYING # submit finds some perms chmod 644 $DESK chmod 755 $P/usr/local/lib/python3.9/site-packages/screenlayout/*.py # but this leads to one new error chmod 644 $P/usr/local/lib/python3.9/site-packages/screenlayout/__init__.py # TCZ them ####### LIST="$P $P-doc $P-locale" for Z in $LIST do mksquashfs $Z $Z.tcz md5sum $Z.tcz > $Z.tcz.md5.txt cd $Z find . -not -type d | cut -c 2- | sort > /tmp/$Z.tcz.list cd /tmp done ls -hal echo 'Title: arandr-doc.tcz Description: man pages Version: 0.1.11 Author: chrysn Original-site: https://gitlab.com/arandr/arandr Copying-policy: GPL v3 Size: 4.0K Extension_by: aus9 @ linuxquestions.org Tags: monitor resolution Comments: man pages Change-log: 2018/04/05 v 0.1.9 on 9x 2020/08/01 v 0.1.10 on 11x Current: 2024/01/13 v 0.1.11 on 15x ' > arandr-doc.tcz.info echo 'man-db.tcz' > arandr-doc.tcz.dep echo 'Title: arandr-locale.tcz Description: locales Version: 0.1.11 Author: chrysn Original-site: https://gitlab.com/arandr/arandr Copying-policy: GPL v3 Size: 76K Extension_by: aus9 @ linuxquestions.org Tags: monitor resolution Comments: untested by me Change-log: 2018/04/05 v 0.1.9 on 9x used python2.7 2020/08/01 v 0.1.10 on 11x used python3.6 2023/04/27 v 0.1.11 on 14x Current: 2024/01/13 used python3.9 ' > $P-locale.tcz.info echo 'arandr.tcz' > $P-locale.tcz.dep echo 'Title: arandr.tcz Description: Front end to libXrandr Version: 0.1.11 Author: chrysn Original-site: https://gitlab.com/arandr/arandr Copying-policy: GPL v3 Size: 72K Extension_by: aus9 @ linuxquestions.org Tags: monitor resolution Comments: monitor resolution app You need to be on either Xorg (2d or 3d). Click Outputs for your active HDMI* DVI* etc -> Resolution -> Choose your preference -> Click the Tick button I am unable to test 2 monitors. If you wish to save new setting -> Click the download icon and choose a filename (example) 1920 .sh is added and creates $HOME/.screenlayout/1920.sh after you press the save button or press enter To automate it -> (change below to your filename please) echo "$HOME/.screenlayout/1920.sh & " > $HOME/.X.d/monitor To test without reboot, exit to prompt and run $ startx If unhappy, delete $HOME/.X.d/monitor It is safe to ignore any terminal output of "Gdk-CRITICAL...gdk_atom_intern: assertion" Change-log: 2018/04/05 v 0.1.9 on 9x used python2.7 2020/08/01 v 0.1.10 on 11x used python3.6 2023/04/27 v 0.1.11 on 14x Current: 2024/10/13 on 15x used python3.9 - move from adwaita svg to png ' > $P.tcz.info echo 'python3.9.tcz py3.9gobject.tcz gtk3-gir.tcz ' > $P.tcz.dep submitqc --libs rm -rf *.zsync