From 14a27a61a1f54f213086a5a68b9803e63017292c Mon Sep 17 00:00:00 2001 From: Julien Lavergne Date: Tue, 27 Nov 2012 22:00:19 +0100 Subject: [PATCH] Add a new Lubuntu-Nexus7 session. --- debian/changelog | 1 + debian/control | 7 + .../lubuntu-nexus7-default-session.postinst | 15 + debian/lubuntu-nexus7-default-session.postrm | 16 + etc/xdg/lxsession/Lubuntu-Nexus7/autostart | 5 + etc/xdg/lxsession/Lubuntu-Nexus7/desktop.conf | 25 + usr/bin/startlubuntu-nexus7 | 90 ++ .../lubuntu-nexus7-identica.desktop | 7 + .../lubuntu-nexus7-rotate.desktop | 5 + usr/share/lubuntu/openbox/nexus-rc.xml | 945 ++++++++++++++++++ .../lxpanel/profile/Lubuntu-Nexus7/config | 4 + .../profile/Lubuntu-Nexus7/panels/bottom | 68 ++ .../lxpanel/profile/Lubuntu-Nexus7/panels/top | 50 + usr/share/xsessions/lubuntu-nexus7.desktop | 6 + 14 files changed, 1244 insertions(+) create mode 100644 debian/lubuntu-nexus7-default-session.postinst create mode 100644 debian/lubuntu-nexus7-default-session.postrm create mode 100644 etc/xdg/lxsession/Lubuntu-Nexus7/autostart create mode 100644 etc/xdg/lxsession/Lubuntu-Nexus7/desktop.conf create mode 100644 usr/bin/startlubuntu-nexus7 create mode 100644 usr/share/applications/lubuntu-nexus7-identica.desktop create mode 100644 usr/share/applications/lubuntu-nexus7-rotate.desktop create mode 100644 usr/share/lubuntu/openbox/nexus-rc.xml create mode 100644 usr/share/lxpanel/profile/Lubuntu-Nexus7/config create mode 100644 usr/share/lxpanel/profile/Lubuntu-Nexus7/panels/bottom create mode 100644 usr/share/lxpanel/profile/Lubuntu-Nexus7/panels/top create mode 100644 usr/share/xsessions/lubuntu-nexus7.desktop diff --git a/debian/changelog b/debian/changelog index be6725b..7b962dc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,6 @@ lubuntu-default-settings (0.31) UNRELEASED; urgency=low + * Add a new Lubuntu-Nexus7 session. * debian/lubuntu-default-settings: - Exclude nexus7 specific items. diff --git a/debian/control b/debian/control index 3073298..fa8ac51 100644 --- a/debian/control +++ b/debian/control @@ -41,3 +41,10 @@ Depends: ${misc:Depends}, lubuntu-default-settings Description: Set default session to Lubuntu This package sets the default session to Lubuntu by default. + +Package: lubuntu-nexus7-default-session +Architecture: all +Depends: ${misc:Depends}, + lubuntu-default-settings +Description: Set default session to Lubuntu Nexus7 version + This package sets the default session to Lubuntu Nexus7 version by default. diff --git a/debian/lubuntu-nexus7-default-session.postinst b/debian/lubuntu-nexus7-default-session.postinst new file mode 100644 index 0000000..f724bf0 --- /dev/null +++ b/debian/lubuntu-nexus7-default-session.postinst @@ -0,0 +1,15 @@ +#!/bin/sh -e + +set -e + +case "$1" in + configure|upgrade) + if [ -x /usr/lib/lightdm/lightdm-set-defaults ] ; then + /usr/lib/lightdm/lightdm-set-defaults --keep-old --session=lubuntu-nexus7 || true + /usr/lib/lightdm/lightdm-set-defaults --keep-old --greeter=lightdm-gtk-greeter || true + fi + ;; +esac + +#DEBHELPER# +exit 0 diff --git a/debian/lubuntu-nexus7-default-session.postrm b/debian/lubuntu-nexus7-default-session.postrm new file mode 100644 index 0000000..d0b8878 --- /dev/null +++ b/debian/lubuntu-nexus7-default-session.postrm @@ -0,0 +1,16 @@ +#!/bin/sh -e + +set -e + +case "$1" in + remove|purge) + if [ -x /usr/lib/lightdm/lightdm-set-defaults ] ; then + /usr/lib/lightdm/lightdm-set-defaults --remove --session=lubuntu-nexus7 || true + /usr/lib/lightdm/lightdm-set-defaults --remove --greeter=lightdm-gtk-greeter || true + fi + ;; +esac + + +#DEBHELPER# +exit 0 diff --git a/etc/xdg/lxsession/Lubuntu-Nexus7/autostart b/etc/xdg/lxsession/Lubuntu-Nexus7/autostart new file mode 100644 index 0000000..8e3f3ab --- /dev/null +++ b/etc/xdg/lxsession/Lubuntu-Nexus7/autostart @@ -0,0 +1,5 @@ +xrotate +@lxlauncher +@lxpanel --profile lubuntu-nexus7 +@xfce4-power-manager +@/usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1 diff --git a/etc/xdg/lxsession/Lubuntu-Nexus7/desktop.conf b/etc/xdg/lxsession/Lubuntu-Nexus7/desktop.conf new file mode 100644 index 0000000..762fb8a --- /dev/null +++ b/etc/xdg/lxsession/Lubuntu-Nexus7/desktop.conf @@ -0,0 +1,25 @@ +[Session] +window_manager=openbox-lubuntu + +[GTK] +sNet/ThemeName=Lubuntu-default +sNet/IconThemeName=lubuntu +sGtk/FontName=Ubuntu 11 +iGtk/ToolbarStyle=3 +iGtk/ButtonImages=1 +iGtk/MenuImages=1 +iGtk/CursorThemeSize=18 +iXft/Antialias=1 +iXft/Hinting=1 +sXft/HintStyle=hintslight +sXft/RGBA=rgb +sGtk/CursorThemeName=DMZ-White + +[Mouse] +AccFactor=20 +AccThreshold=10 +LeftHanded=0 + +[Keyboard] +Delay=500 +Interval=30 diff --git a/usr/bin/startlubuntu-nexus7 b/usr/bin/startlubuntu-nexus7 new file mode 100644 index 0000000..fcfd079 --- /dev/null +++ b/usr/bin/startlubuntu-nexus7 @@ -0,0 +1,90 @@ +#!/bin/sh + +#Workaround to disable rgba, because lxpanel in Lubuntu doesn't support it +#(see bug #589763) +# +#export XLIB_SKIP_ARGB_VISUALS=1 + +if [ -z "$XDG_CONFIG_HOME" ]; then + export XDG_CONFIG_HOME="$HOME/.config" +fi + +#Allow custom configuration files in /etc/xdg/lubuntu +#Patch stolen from Xubuntu +if test "x$XDG_CONFIG_DIRS" = "x" +then + XDG_CONFIG_DIRS="/etc/xdg/lubuntu:/etc/xdg" +else + XDG_CONFIG_DIRS="/etc/xdg/lubuntu/:$XDG_CONFIG_DIRS" +fi +export XDG_CONFIG_DIRS + +if test "x$XDG_DATA_DIRS" = "x" +then + XDG_DATA_DIRS="/etc/xdg/lubuntu:/usr/local/share:/usr/share:/usr/share/gdm:/var/lib/menu-xdg" + else + XDG_DATA_DIRS="/etc/xdg/lubuntu:$XDG_DATA_DIRS:/usr/share:/usr/share/gdm:/var/lib/menu-xdg" +fi +export XDG_DATA_DIRS + +# Ensure the existance of openbox config file +# Specific configuration for Nexus7 session +OPENBOX_CONF_DIR="$XDG_CONFIG_HOME/openbox" +if [ ! -f "$OPENBOX_CONF_DIR/lubuntu-rc.xml" ]; then + mkdir -p "$OPENBOX_CONF_DIR" + cp /usr/share/lubuntu/openbox/nexus-rc.xml "$OPENBOX_CONF_DIR/lubuntu-rc.xml" +fi + +# Install custom QT configuration if no one is already installed +if [ ! -f "$XDG_CONFIG_HOME/Trolltech.conf" ]; then + cp /usr/share/lubuntu/qt/Trolltech.conf "$XDG_CONFIG_HOME/Trolltech.conf" +fi + +# Install custom configuration for leafpad +LEAFPAD_CONF_DIR="$XDG_CONFIG_HOME/leafpad" +if [ ! -f "$LEAFPAD_CONF_DIR/leafpadrc" ]; then + mkdir -p "$LEAFPAD_CONF_DIR" + cp /usr/share/lubuntu/leafpad/leafpadrc "$LEAFPAD_CONF_DIR/leafpadrc" +fi + +# Install custom configuration for xscreensaver +if [ ! -f "$HOME/.xscreensaver" ]; then + cp /usr/share/lubuntu/xscreensaver/xscreensaver "$HOME/.xscreensaver" +fi + +# Install custom lxterminal configuration if no one is already installed +if [ ! -f "$XDG_CONFIG_HOME/lxterminal/lxterminal.conf" ]; then + cp /etc/xdg/lubuntu/lxterminal/lxterminal.conf "$XDG_CONFIG_HOME/lxterminal/lxterminal.conf" +fi + +# Clean up after GDM (GDM sets the number of desktops to one) +xprop -root -remove _NET_NUMBER_OF_DESKTOPS -remove _NET_DESKTOP_NAMES -remove _NET_CURRENT_DESKTOP 2> /dev/null + +#Ensure the menu prefix +export XDG_MENU_PREFIX="lxde-" + +# Enable GTK+2 integration for OpenOffice.org, if available. +export SAL_USE_VCLPLUGIN=gtk + +# Launch DBus if needed +if which dbus-launch >/dev/null && test -z "$DBUS_SESSION_BUS_ADDRESS"; then + eval "$(dbus-launch --sh-syntax --exit-with-session)" +fi + +# Export Gnome-keyring variables if needed +# See bug #664206 +if which gnome-keyring-daemon >/dev/null; then + export $(/usr/bin/gnome-keyring-daemon --start --components=ssh) +fi + +# Start SSH agent, require since 3.5 +# (see https://wiki.archlinux.org/index.php/Openbox#SSH_agent_no_longer_starting) +SSHAGENT="/usr/bin/ssh-agent" +SSHAGENTARGS="-s" +if [ -z "$SSH_AUTH_SOCK" -a -x "$SSHAGENT" ]; then + eval `$SSHAGENT $SSHAGENTARGS` + trap "kill $SSH_AGENT_PID" 0 +fi + +# Start the LXDE session +exec /usr/bin/lxsession -s Lubuntu-Nexus7 -e LXDE diff --git a/usr/share/applications/lubuntu-nexus7-identica.desktop b/usr/share/applications/lubuntu-nexus7-identica.desktop new file mode 100644 index 0000000..64f0369 --- /dev/null +++ b/usr/share/applications/lubuntu-nexus7-identica.desktop @@ -0,0 +1,7 @@ +[Desktop Entry] +Name=identi.ca +Comment=identi.ca +Icon=internet-web-browser +Exec=chromium-browser --app=https://identi.ca/ +Categories=Network; +OnlyShowIn=LXDE diff --git a/usr/share/applications/lubuntu-nexus7-rotate.desktop b/usr/share/applications/lubuntu-nexus7-rotate.desktop new file mode 100644 index 0000000..010f892 --- /dev/null +++ b/usr/share/applications/lubuntu-nexus7-rotate.desktop @@ -0,0 +1,5 @@ +[Desktop Entry] +Name=Rotate your screen +Comment=Rotate your screen +Icon=object-rotate-left +Exec=xrotate diff --git a/usr/share/lubuntu/openbox/nexus-rc.xml b/usr/share/lubuntu/openbox/nexus-rc.xml new file mode 100644 index 0000000..7544147 --- /dev/null +++ b/usr/share/lubuntu/openbox/nexus-rc.xml @@ -0,0 +1,945 @@ + + + + + 10 + 20 + + + yes + + no + + yes + + no + + 200 + + no + + + + Smart + +
yes
+ + Mouse + + Mouse + +
+ + Lubuntu-default + NLC + + yes + yes + + Ubuntu Medium + 11 + + bold + + normal + + + + Ubuntu Medium + 11 + + bold + + normal + + + + Ubuntu + 11 + + normal + + normal + + + + Ubuntu + 11 + + normal + + normal + + + + Ubuntu Medium + 11 + + bold + + normal + + + + Ubuntu Medium + 11 + + bold + + normal + + + + + + 2 + 1 + + + + 875 + + + + no + Nonpixel + + Center + + + + 10 + + 10 + + + + + + 0 + 0 + 0 + 0 + + + TopLeft + + 0 + 0 + no + Above + + Vertical + + no + 300 + + 300 + + Middle + + + + C-g + + + + left + no + + + + + right + no + + + + + up + no + + + + + down + no + + + + + left + no + + + + + right + no + + + + + up + no + + + + + down + no + + + + + 1 + + + + + 2 + + + + + 3 + + + + + 4 + + + + + + + + + + + + + + + + + client-menu + + + + + + scrot -u -b + + + + + + icons + + + + + + + + + + + + + + + + + + + yes + yes + + + + + + + + + + + right + + + + + left + + + + + up + + + + + down + + + + # HalfLeftScreen + + + 0 + 0 + 97% + 50% + + + # HalfRightScreen + + + -0 + 0 + 97% + 50% + + + # HalfUpperScreen + + + 0 + 0 + 100% + 50% + + + # HalfLowerScreen + + + 0 + -0 + 100% + 50% + + + + + + + true + PCManFM + + pcmanfm + + + + + + lxpanelctl run + + + + + lxpanelctl run + + + + + + lxpanelctl menu + + + + + lxpanelctl menu + + + + + + + + + + lxtask + + + + + + x-terminal-emulator + + + + + + + true + PCManFM + + pcmanfm + + + + + + xscreensaver-command -lock + + + + + + amixer -q sset Master 3%+ unmute + + + + + amixer -q sset Master 3%- unmute + + + + + amixer -q sset Master toggle + + + + + + x-terminal-emulator + + + + + x-terminal-emulator + + + + + + galculator + + + + + + pcmanfm + + + + + + sleep 2;xset dpms force off + + + + + xbacklight -dec 10 + + + + + xbacklight -inc 10 + + + + + + scrot + + + + + + lubuntu-logout + + + + + 8 + + 200 + + 400 + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + previous + + + + + next + + + + + previous + + + + + next + + + + + previous + + + + + next + + + + + + + + + + + + + no + + + + + + + + + + + yes + + + + + + + + + + + + + + + + + + + + + + + client-menu + + + + + + + top + + + + + + + left + + + + + + + right + + + + + + + bottom + + + + + + + client-menu + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + client-menu + + + + + + + client-menu + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + vertical + + + + + horizontal + + + + + + + + + + + + + + + + + previous + + + + + next + + + + + previous + + + + + next + + + + + previous + + + + + next + + + + + + + + + + + + + + + + client-list-combined-menu + + + + + root-menu + + + + + + + previous + + + + + next + + + + + previous + + + + + next + + + + + + + + /usr/share/lubuntu/openbox/menu.xml + menu.xml + + 200 + + no + + 100 + + 400 + + yes + + yes + + yes + + + + + + + true + + + +
diff --git a/usr/share/lxpanel/profile/Lubuntu-Nexus7/config b/usr/share/lxpanel/profile/Lubuntu-Nexus7/config new file mode 100644 index 0000000..35ece0c --- /dev/null +++ b/usr/share/lxpanel/profile/Lubuntu-Nexus7/config @@ -0,0 +1,4 @@ +[Command] +FileManager=pcmanfm %s +Terminal=lxterminal -e +Logout=lubuntu-logout diff --git a/usr/share/lxpanel/profile/Lubuntu-Nexus7/panels/bottom b/usr/share/lxpanel/profile/Lubuntu-Nexus7/panels/bottom new file mode 100644 index 0000000..6896f4d --- /dev/null +++ b/usr/share/lxpanel/profile/Lubuntu-Nexus7/panels/bottom @@ -0,0 +1,68 @@ +# lxpanel config file. Manually editing is not recommended. +# Use preference dialog in lxpanel to adjust config when you can. + +Global { + edge=bottom + allign=left + margin=0 + widthtype=percent + width=100 + height=64 + transparent=0 + tintcolor=#000000 + alpha=0 + setdocktype=1 + setpartialstrut=1 + usefontcolor=1 + fontcolor=#000000 + background=1 + backgroundfile=/usr/share/lxpanel/images/lubuntu-background.png + iconsize=64 +} + +Plugin { + type = launchbar + Config { + Button { + id=pcmanfm.desktop + } + Button { + id=lubuntu-browser.desktop + } + } +} + +Plugin { + type = space + Config { + Size=4 + } +} + +Plugin { + type = wincmd + Config { + Button1=iconify + Button2=shade + } +} + +Plugin { + type = space + Config { + Size=4 + } +} + +Plugin { + type = pager +} + +Plugin { + type = launchbar + Config { + Button { + id=lubuntu-logout.desktop + } + } +} diff --git a/usr/share/lxpanel/profile/Lubuntu-Nexus7/panels/top b/usr/share/lxpanel/profile/Lubuntu-Nexus7/panels/top new file mode 100644 index 0000000..4162075 --- /dev/null +++ b/usr/share/lxpanel/profile/Lubuntu-Nexus7/panels/top @@ -0,0 +1,50 @@ +# lxpanel config file. Manually editing is not recommended. +# Use preference dialog in lxpanel to adjust config when you can. + +Global { + edge=top + allign=left + margin=0 + widthtype=percent + width=100 + height=24 + transparent=0 + tintcolor=#000000 + alpha=0 + setdocktype=1 + setpartialstrut=1 + usefontcolor=1 + fontcolor=#000000 + background=1 + backgroundfile=/usr/share/lxpanel/images/lubuntu-background.png + iconsize=24 +} + +Plugin { + type = volumealsa +} + +Plugin { + type = tray +} + +Plugin { + type = indicator + Config { + applications=1 + datetime=0 + messages=0 + network=0 + session=0 + sound=0 + } +} + +Plugin { + type = dclock + Config { + ClockFmt=%R + TooltipFmt=%A %x + BoldFont=0 + } +} diff --git a/usr/share/xsessions/lubuntu-nexus7.desktop b/usr/share/xsessions/lubuntu-nexus7.desktop new file mode 100644 index 0000000..b552f50 --- /dev/null +++ b/usr/share/xsessions/lubuntu-nexus7.desktop @@ -0,0 +1,6 @@ +[Desktop Entry] +Name=Lubuntu Nexus7 session +Comment=A specific Lubuntu session optimised for Nexus7 +Exec=/usr/bin/startlubuntu-nexus7 +# Icon= +Type=Application