package-helpers-cmxsl/helpers/make-mate-tweak
2022-07-13 13:16:47 -04:00

64 lines
2 KiB
Bash

#!/bin/sh
#
# Copyright (C) 2019 Mason Hock <mason@masonhock.com>
# Copyright (C) 2021,2022 Ruben Rodriguez <ruben@trisquel.info>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
VERSION=10
. ./config
sed -i 's/manjaro/trisquel/g' mate-tweak
sed -i 's/Manjaro/Trisquel/g' mate-tweak
# Set icon
sed 's/Icon=.*/Icon=mate-desktop-symbolic/' -i data/mate-tweak.desktop
# Disable composition on llvm
sed 's/Software Rasterizer/Accelerated: no/' -i mate-tweak
# Corrects rendering delay on Pluma, possibly others
sed '/--backend/s/\\/--xrender-sync-fence \\/' -i marco-picom
# Shadow config
sed -i '/shadow-radius/s|12|6|' marco-picom
sed -i '/shadow-opacity/s|0.125|0.6|' marco-picom
sed -i '/shadow-offset-x/s|-12|-9|' marco-picom
sed -i '/shadow-offset-y/s|-12|-9|' marco-picom
# Transitional dummy marco-compton
cat << EOF > marco-compton
#!/bin/sh
# Compton has been replaced by picom, and should be handled by mate-wm
WINDOW_MANAGER=\`gsettings get org.mate.session.required-components windowmanager 2> /dev/null | sed s/\'//g\`
if [ "\$WINDOW_MANAGER = "marco-compton" ]; then
gsettings set org.mate.session.required-components windowmanager mate-wm
fi
exec /usr/bin/mate-wm
EOF
# Add Trisquel to layout list
sed 's/fedora/trisquel/g; s/Fedora/Trisquel/' -i mate-tweak
changelog "Add Trisquel as panel layout option"
compile