make-gnome-panel 4.82 KB
Newer Older
1 2
#!/bin/sh
#
3
#    Copyright (C) 2008-2014  Rubén Rodríguez <ruben@trisquel.info>
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
#
#    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
#

Frank committed
20
VERSION=12
21 22 23

. ./config

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

27 28 29 30 31 32
# Disable patches related to the gnome sessions
for patch in 41_classic_layout.patch 01_gnome-wm.patch 50_ubuntu_sessions.patch 49_no_screensaver.patch; do
  rm debian/patches/$patch
  sed /$patch/d -i debian/patches/series
done

33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
# Profile handling
cat << EOF > data/trisquel-panel-profile.desktop
[Desktop Entry]
Type=Application
Name=Trisquel panel profile updater
Exec=trisquel-panel-profile
NoDisplay=true
X-GNOME-AutoRestart=false
X-GNOME-Autostart-Phase=Initialization
OnlyShowIn=GNOME;
EOF

cat << EOF > data/trisquel-panel-profile
#!/bin/sh
VERSION=\$(lsb_release -rs)
if ! grep "^\$VERSION$" \$HOME/.config/profilemigrated -q 2>/dev/null; then
  GS=\$(gsettings get org.gnome.gnome-panel.layout object-id-list | sed "s/, 'clock'//")
  gsettings set org.gnome.gnome-panel.layout object-id-list "\$GS"
  echo \$VERSION > \$HOME/.config/profilemigrated
fi
EOF

chmod 755 data/trisquel-panel-profile

57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
# Custom xsession
cat << EOF > data/trisquel-session.desktop
[Desktop Entry]
Name=Trisquel
Comment=This session logs you into GNOME with the traditional panel
Exec=gnome-session --session=gnome-flashback
TryExec=gnome-session
Icon=
Type=Application
X-LightDM-DesktopName=GNOME
EOF

cat << EOF > data/50-trisquel-session.conf
[SeatDefaults]
user-session=trisquel-session
EOF
73

74 75 76 77 78 79 80
cat <<EOF > debian/trisquel-session.install
data/50-trisquel-session.conf /usr/share/lightdm/lightdm.conf.d/
data/trisquel-session.desktop /usr/share/xsessions
debian/gnome-wm.desktop /usr/share/applications
debian/gnome-flashback-services.desktop /usr/share/applications
debian/scripts/gnome-wm /usr/bin
usr/share/gnome-session/sessions
81 82
data/trisquel-panel-profile.desktop /etc/xdg/autostart
data/trisquel-panel-profile /usr/sbin
83
EOF
84

85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110
# Custom package
sed '/Package: gnome-session/,/^$/d' -i debian/control.in
cat << EOF >> debian/control.in

Package: trisquel-session
Architecture: all
Depends: ${misc:Depends},
         gnome-panel (>= 3.0),
         gnome-session-bin,
         gnome-session-common,
         metacity (>= 2.30),
         nautilus (>= 3.8),
         policykit-1-gnome,
Provides: x-session-manager, gnome-session-flashback
Replaces: gnome-session-flashback
Conflicts: gnome-session-flashback
Description: GNOME Session Manager - Trisquel session
 The GNOME Session Manager is in charge of starting the core components
 of the GNOME desktop, and applications that should be launched at
 login time. It also features a way to save and restore currently
 running applications.
 .
 This package contains the required components for the Trisquel session.
EOF

# Custom layout
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143
cat << EOF > data/panel-default-layout.layout
[Toplevel panel]
expand=true
orientation=bottom
size=44
y-bottom=0

[Object menu-bar]
object-iid=PanelInternalFactory::MenuButton
toplevel-id=panel
pack-type=start
pack-index=0

[Object home]
object-iid=PanelInternalFactory::Launcher
@instance-config/location="file:///usr/share/applications/home.desktop"
pack-index=10
pack-type=start
toplevel-id=panel

[Object abrowser]
object-iid=PanelInternalFactory::Launcher
@instance-config/location="file:///usr/share/applications/browser.desktop"
pack-index=20
pack-type=start  
toplevel-id=panel

[Object window-list]
object-iid=WnckletFactory::WindowListApplet
pack-index=30
pack-type=start
toplevel-id=panel

Frank committed
144 145
[Object notification-area]
object-iid=NotificationAreaAppletFactory::NotificationArea
Frank committed
146
pack-index=11
Frank committed
147 148 149
pack-type=end
toplevel-id=panel

150
[Object indicators]
151
object-iid=IndicatorAppletFactory::IndicatorApplet
152
toplevel-id=panel
153
pack-type=end
154 155 156 157 158 159 160 161 162 163 164 165 166
pack-index=10

[Object show-desktop]
object-iid=WnckletFactory::ShowDesktopApplet
pack-index=0
pack-type=end
toplevel-id=panel

EOF

# We don't want to show the gnome-online-accounts stuff yet
patch -p1 < $DATA/hide-online-accounts-menu.patch

167 168 169
# Do not require alt or alt+supr key modifiers for showing menus on right click
patch -p1 < $DATA/no-mouse-modifier.patch

170 171 172 173
changelog "Changed default layout"

compile