Skip to content
Snippets Groups Projects
make-mate-panel 3.04 KiB
Newer Older
#    Copyright (C) 2016-2020  Ruben Rodriguez <ruben@trisquel.info>
Mason Hock's avatar
Mason Hock committed
#    Copyright (C)      2017  Mason Hock <mason@masonhock.com>
#
#    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
#


. ./config

# Remove the arrow in the main menu button
sed 's/"tooltip", tooltip,/"tooltip", "Trisquel",/; s/"has-arrow", TRUE,/"has-arrow", FALSE,/' -i mate-panel/panel-menu-button.c

# Custom layout
cat << EOF > data/panel-default-layout.layout
Mason Hock's avatar
Mason Hock committed
[Toplevel top]
orientation=bottom
Mason Hock's avatar
Mason Hock committed
expand=true
size=44
Mason Hock's avatar
Mason Hock committed
[Object menu]
locked=true
position=0
Mason Hock's avatar
Mason Hock committed
panel-right-stick=false
toplevel-id=top
Mason Hock's avatar
Mason Hock committed
object-type=menu

[Object files]
locked=true
position=20
Mason Hock's avatar
Mason Hock committed
launcher-location=caja.desktop
panel-right-stick=false
toplevel-id=top
object-type=launcher
menu-path=applications:/

[Object browser]
locked=true
position=30
launcher-location=/usr/share/applications/browser.desktop
Mason Hock's avatar
Mason Hock committed
panel-right-stick=false
toplevel-id=top
object-type=launcher
menu-path=applications:/
Mason Hock's avatar
Mason Hock committed
[Object windowlistapplet]
locked=true
Mason Hock's avatar
Mason Hock committed
position=40
panel-right-stick=false
toplevel-id=top
applet-iid=WnckletFactory::WindowListApplet
object-type=applet

[Object indicatorappletcomplete]
Mason Hock's avatar
Mason Hock committed
locked=true
position=20
panel-right-stick=true
Mason Hock's avatar
Mason Hock committed
toplevel-id=top
applet-iid=IndicatorAppletCompleteFactory::IndicatorAppletComplete
object-type=applet

[Object showdesktopapplet]
locked=true
position=0
panel-right-stick=true
Mason Hock's avatar
Mason Hock committed
toplevel-id=top
applet-iid=WnckletFactory::ShowDesktopApplet
object-type=applet
cp data/panel-default-layout.layout data/ubuntu.layout
mv data/ubuntu.layout data/trisquel.layout
sed 's/ubuntu/trisquel/' -i data/Makefile.am

cat << EOF > debian/mate-panel-layout-update.desktop
[Desktop Entry]
Name=Update MATE panel layout
Comment=Resets the MATE panel layout after a Trisquel release upgrade
Exec=/usr/share/mate-panel/layout-reset
Terminal=false
Type=Application
NoDisplay=true
OnlyShowIn=MATE;
Keywords=MATE;panel;
EOF

cat << EOF > debian/layout-reset
#!/bin/sh

RELEASE=\$(lsb_release -rs)

if ! [ -f \$HOME/.config/mate/panel2.d/trisquel\$RELEASE ]; then
  gsettings reset-recursively org.mate.panel
  [ -d \$HOME/.config/mate/panel2.d ] || mkdir -p \$HOME/.config/mate/panel2.d
  touch \$HOME/.config/mate/panel2.d/trisquel\$RELEASE
fi
EOF
chmod 755 debian/layout-reset

cat << EOF >> debian/mate-panel.install
debian/mate-panel-layout-update.desktop etc/xdg/autostart
debian/layout-reset usr/share/mate-panel
EOF

changelog "Changed default layout"

compile