aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatteo Bernardini <ponce@slackbuilds.org>2016-12-09 11:03:16 +0100
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2016-12-17 06:55:59 +0700
commit64ca933a33d788aa708112812037047dfd7b582a (patch)
tree984ef0d57a7a426ece2be59013ded957555ea9be
parent66b27a286d70cfe58c22ae4e9699b55ca3e87bf7 (diff)
desktop/lxpanel: Updated for version 0.9.1.
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
-rw-r--r--desktop/lxpanel/config/panel292
-rw-r--r--desktop/lxpanel/lxpanel.SlackBuild11
-rw-r--r--desktop/lxpanel/lxpanel.info8
-rw-r--r--desktop/lxpanel/patches/0001-Fix-battery-selection-it-appears-incompatible-with-0.patch115
-rw-r--r--desktop/lxpanel/patches/0002-Fix-battery-percentage-calculations-if-charge-isn-t-.patch65
-rw-r--r--desktop/lxpanel/slack-desc2
6 files changed, 312 insertions, 181 deletions
diff --git a/desktop/lxpanel/config/panel b/desktop/lxpanel/config/panel
index 65417dabf941..f5387757143c 100644
--- a/desktop/lxpanel/config/panel
+++ b/desktop/lxpanel/config/panel
@@ -2,219 +2,167 @@
# Use preference dialog in lxpanel to adjust config when you can.
Global {
- edge=bottom
- allign=center
- margin=0
- widthtype=percent
- width=95
- height=26
- transparent=0
- tintcolor=#000000
- alpha=0
- setdocktype=1
- setpartialstrut=1
- usefontcolor=1
- fontcolor=#ffffff
- background=1
- backgroundfile=/usr/share/lxpanel/images/background.png
+ edge=bottom
+ allign=left
+ margin=0
+ widthtype=percent
+ width=95
+ height=26
+ transparent=0
+ tintcolor=#000000
+ alpha=0
+ setdocktype=1
+ setpartialstrut=1
+ usefontcolor=1
+ fontcolor=#ffffff
+ usefontsize=0
+ fontsize=10
+ background=1
+ backgroundfile=/usr/share/lxpanel/images/background.png
+ align=center
}
-
Plugin {
- type = space
- Config {
- Size=2
- }
+ type=space
+ Config {
+ Size=2
+ }
}
-
Plugin {
- type = menu
- Config {
- image=/usr/share/lxpanel/images/my-computer.png
- system {
- }
- separator {
- }
- item {
- command=run
- }
- separator {
- }
- item {
- image=gnome-logout
- command=logout
- }
+ type=menu
+ Config {
+ image=/usr/share/lxpanel/images/my-computer.png
+ system {
}
-}
-
-Plugin {
- type = launchbar
- Config {
- Button {
- id=pcmanfm.desktop
- }
- Button {
- id=menu://applications/Internet/mozilla-firefox.desktop
- }
- Button {
- id=menu://applications/Internet/mozilla-thunderbird.desktop
- }
- Button {
- id=menu://applications/System/lxterminal.desktop
- }
+ separator {
}
-}
-
-Plugin {
- type = space
- Config {
- Size=4
+ item {
+ command=run
}
-}
-
-Plugin {
- type = wincmd
- Config {
- Button1=iconify
- Button2=shade
+ separator {
}
-}
-
-Plugin {
- type = space
- Config {
- Size=4
+ item {
+ image=gnome-logout
+ command=logout
}
+ }
}
-
-Plugin {
- type = wnckpager
-}
-
Plugin {
- type = space
- Config {
- Size=4
+ type=launchbar
+ Config {
+ Button {
+ id=pcmanfm.desktop
}
+ Button {
+ id=menu://applications/Internet/mozilla-firefox.desktop
+ }
+ Button {
+ id=menu://applications/Internet/mozilla-thunderbird.desktop
+ }
+ Button {
+ id=menu://applications/System/lxterminal.desktop
+ }
+ }
}
-
Plugin {
- type = taskbar
- expand=1
- Config {
- tooltips=1
- IconsOnly=0
- AcceptSkipPager=1
- ShowIconified=1
- ShowMapped=1
- ShowAllDesks=0
- UseMouseWheel=1
- UseUrgencyHint=1
- FlatButton=0
- MaxTaskWidth=150
- spacing=1
- }
+ type=space
+ Config {
+ Size=2
+ }
}
-
Plugin {
- type = volumealsa
+ type=wincmd
+ Config {
+ Button1=iconify
+ Button2=shade
+ }
}
-
Plugin {
- type = space
- Config {
- Size=4
- }
+ type=space
+ Config {
+ Size=2
+ }
}
-
Plugin {
- type = tray
- Config {
- }
+ type=pager
+ Config {
+ }
}
-
Plugin {
- type = space
- Config {
- Size=4
- }
+ type=space
+ Config {
+ Size=4
+ }
}
-
Plugin {
- type = netstatus
- Config {
- iface=eth0
- configtool=netconfig
- }
+ type=taskbar
+ expand=1
+ Config {
+ tooltips=1
+ IconsOnly=0
+ AcceptSkipPager=1
+ ShowIconified=1
+ ShowMapped=1
+ ShowAllDesks=0
+ UseMouseWheel=1
+ UseUrgencyHint=1
+ FlatButton=0
+ MaxTaskWidth=150
+ spacing=1
+ }
}
-
Plugin {
- type = space
- Config {
- Size=4
- }
+ type=batt
+ Config {
+ }
}
-
Plugin {
- type = batt
- Config {
- HideIfNoBattery=0
- AlarmCommand=xmessage Battery low
- AlarmTime=5
- BackgroundColor=black
- BorderWidth=1
- ChargingColor1=#28f200
- ChargingColor2=#22cc00
- DischargingColor1=#ffee00
- DischargingColor2=#d9ca00
- Size=8
- }
+ type=space
+ Config {
+ Size=2
+ }
}
-
Plugin {
- type = space
- Config {
- Size=4
- }
+ type=cpu
+ Config {
+ }
}
-
Plugin {
- type = cpu
+ type=space
+ Config {
+ Size=2
+ }
}
-
Plugin {
- type = space
- Config {
- Size=4
- }
+ type=tray
+ Config {
+ }
}
-
Plugin {
- type = cpufreq
+ type=volume
+ Config {
+ }
}
-
Plugin {
- type = dclock
- Config {
- ClockFmt=%R
- TooltipFmt=%A %x
- BoldFont=0
- IconOnly=0
- }
+ type=dclock
+ Config {
+ ClockFmt=%R
+ TooltipFmt=%A %x
+ BoldFont=0
+ IconOnly=0
+ CenterText=0
+ }
}
-
Plugin {
- type = space
- Config {
- Size=4
- }
+ type=space
+ Config {
+ Size=2
+ }
}
-
Plugin {
- type = launchbar
- Config {
- Button {
- id=lxde-logout.desktop
- }
+ type=launchbar
+ Config {
+ Button {
+ id=lxde-logout.desktop
}
+ }
}
-
diff --git a/desktop/lxpanel/lxpanel.SlackBuild b/desktop/lxpanel/lxpanel.SlackBuild
index 905cf5641f6b..fbafac868f1f 100644
--- a/desktop/lxpanel/lxpanel.SlackBuild
+++ b/desktop/lxpanel/lxpanel.SlackBuild
@@ -25,13 +25,13 @@
# Modified by Matteo Bernardini <ponce@slackbuilds.org>
PRGNAM=lxpanel
-VERSION=${VERSION:-0.8.2}
+VERSION=${VERSION:-0.9.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
@@ -44,8 +44,8 @@ OUTPUT=${OUTPUT:-/tmp}
DOCS="AUTHORS COPYING ChangeLog README"
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -73,6 +73,9 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
+# apply patches from upstream
+for i in $CWD/patches/* ; do patch -p1 < $i ; done
+
sh autogen.sh || true
CFLAGS="$SLKCFLAGS" \
diff --git a/desktop/lxpanel/lxpanel.info b/desktop/lxpanel/lxpanel.info
index 91a66d79c82f..2f064184c4de 100644
--- a/desktop/lxpanel/lxpanel.info
+++ b/desktop/lxpanel/lxpanel.info
@@ -1,10 +1,10 @@
PRGNAM="lxpanel"
-VERSION="0.8.2"
+VERSION="0.9.1"
HOMEPAGE="http://wiki.lxde.org/en/LXPanel"
-DOWNLOAD="http://downloads.sf.net/lxde/lxpanel-0.8.2.tar.xz"
-MD5SUM="8d7c93c4ebb4af8bf436ef6d3aee4ea9"
+DOWNLOAD="http://downloads.sf.net/lxde/lxpanel-0.9.1.tar.xz"
+MD5SUM="66500a36b905a7a5c14c0a4fcce9d8da"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="lxmenu-data libfm"
+REQUIRES="libfm"
MAINTAINER="Matteo Bernardini"
EMAIL="ponce@slackbuilds.org"
diff --git a/desktop/lxpanel/patches/0001-Fix-battery-selection-it-appears-incompatible-with-0.patch b/desktop/lxpanel/patches/0001-Fix-battery-selection-it-appears-incompatible-with-0.patch
new file mode 100644
index 000000000000..6210cf8d8bf6
--- /dev/null
+++ b/desktop/lxpanel/patches/0001-Fix-battery-selection-it-appears-incompatible-with-0.patch
@@ -0,0 +1,115 @@
+From ad0022eb8b1524b18d2b512d7dd8d2920c0f8dab Mon Sep 17 00:00:00 2001
+From: Andriy Grytsenko <andrej@rep.kiev.ua>
+Date: Fri, 25 Nov 2016 01:18:47 +0200
+Subject: [PATCH 1/2] Fix battery selection, it appears incompatible with 0.7.2
+ behavior.
+
+See https://bugs.debian.org/845555
+---
+ ChangeLog | 2 ++
+ TODO | 2 +-
+ plugins/batt/batt_sys.c | 30 +++++++++++++++---------------
+ 3 files changed, 18 insertions(+), 16 deletions(-)
+
+diff --git a/ChangeLog b/ChangeLog
+index a21a14e..0abe16b 100644
+--- a/ChangeLog
++++ b/ChangeLog
+@@ -1,3 +1,5 @@
++* Fixed battery selection, it appears incompatible with 0.7.2 behavior.
++
+ 0.9.1
+ -------------------------------------------------------------------------
+ * Fixed build failure without ALSA.
+diff --git a/TODO b/TODO
+index 965b17c..8d9f91f 100644
+--- a/TODO
++++ b/TODO
+@@ -17,7 +17,7 @@
+ * decide 'netstat' vs 'netstatus'
+ * optional libnotify support (useful for battery and volume plugins)
+ * pull improvements from Raspbian
+-* add Most Recent support into 'menu' plugin
++* add Most Recent support into 'menu' plugin (option: ones not by Run too)
+ * check and use weather-* standard themed icons for weather plugin
+ * "Remove this Launch Button" option in launchbar context menu
+ * 'usb-unmount' plugin
+diff --git a/plugins/batt/batt_sys.c b/plugins/batt/batt_sys.c
+index 154bd3d..2482c6f 100644
+--- a/plugins/batt/batt_sys.c
++++ b/plugins/batt/batt_sys.c
+@@ -4,6 +4,7 @@
+ * Copyright 2009 Juergen Hötzel <juergen@archlinux.org>
+ * 2015 Henry Gebhardt <hsggebhardt@googlemail.com>
+ * 2015 Stanislav Kozina, Ersin <xersin@users.sf.net>
++ * 2016 Andriy Grytsenko <andrej@rep.kiev.ua>
+ *
+ * Parts shameless stolen and glibified from acpi package
+ * Copyright (C) 2001 Grahame Bowland <grahame@angrygoats.net>
+@@ -295,15 +296,8 @@ battery *battery_get(int battery_number) {
+ const gchar *entry;
+ gchar *batt_name = NULL;
+ gchar *batt_path = NULL;
+- GDir * dir = g_dir_open( ACPI_PATH_SYS_POWER_SUPPLY, 0, &error );
++ GDir * dir;
+ battery *b = NULL;
+- int i;
+-
+- if ( dir == NULL )
+- {
+- g_warning( "NO ACPI/sysfs support in kernel: %s", error->message );
+- return NULL;
+- }
+
+ /* Try the expected path in sysfs first */
+ batt_name = g_strdup_printf(ACPI_BATTERY_DEVICE_NAME "%d", battery_number);
+@@ -324,13 +318,20 @@ battery *battery_get(int battery_number) {
+ g_free(batt_path);
+
+ if (b != NULL)
+- goto done;
++ return b;
+
+ /*
+ * We didn't find the expected path in sysfs.
+- * Walk the dir and blindly return n-th entry.
++ * Walk the dir and return any battery.
+ */
+- i = 0;
++ dir = g_dir_open( ACPI_PATH_SYS_POWER_SUPPLY, 0, &error );
++ if ( dir == NULL )
++ {
++ g_warning( "NO ACPI/sysfs support in kernel: %s", error->message );
++ g_error_free(error);
++ return NULL;
++ }
++
+ while ( ( entry = g_dir_read_name (dir) ) != NULL )
+ {
+ b = battery_new();
+@@ -339,9 +340,7 @@ battery *battery_get(int battery_number) {
+
+ /* We're looking for a battery with the selected ID */
+ if (b->type_battery == TRUE) {
+- if (i == battery_number)
+- break;
+- i++;
++ break;
+ }
+ battery_free(b);
+ b = NULL;
+@@ -349,9 +348,10 @@ battery *battery_get(int battery_number) {
+ if (b != NULL)
+ g_warning( "Battery entry " ACPI_BATTERY_DEVICE_NAME "%d not found, using %s",
+ battery_number, b->path);
++ // FIXME: update config?
+ else
+ g_warning( "Battery %d not found", battery_number );
+-done:
++
+ g_dir_close( dir );
+ return b;
+ }
+--
+2.11.0
+
diff --git a/desktop/lxpanel/patches/0002-Fix-battery-percentage-calculations-if-charge-isn-t-.patch b/desktop/lxpanel/patches/0002-Fix-battery-percentage-calculations-if-charge-isn-t-.patch
new file mode 100644
index 000000000000..3d3bf993c08f
--- /dev/null
+++ b/desktop/lxpanel/patches/0002-Fix-battery-percentage-calculations-if-charge-isn-t-.patch
@@ -0,0 +1,65 @@
+From 138ff9b22b45192a3b020ebbbed04e9060470a66 Mon Sep 17 00:00:00 2001
+From: Andriy Grytsenko <andrej@rep.kiev.ua>
+Date: Fri, 25 Nov 2016 02:06:39 +0200
+Subject: [PATCH 2/2] Fix battery percentage calculations if charge isn't
+ available but energy is.
+
+Should fix https://bugs.debian.org/845555 bug.
+---
+ ChangeLog | 4 +++-
+ plugins/batt/batt_sys.c | 17 ++++++++++-------
+ 2 files changed, 13 insertions(+), 8 deletions(-)
+
+diff --git a/ChangeLog b/ChangeLog
+index 0abe16b..f4e4f61 100644
+--- a/ChangeLog
++++ b/ChangeLog
+@@ -1,4 +1,6 @@
+-* Fixed battery selection, it appears incompatible with 0.7.2 behavior.
++* Fixed battery selection if battery detached but another is available.
++* Fixed battery percentage calculations if charge isn't available but
++ energy is, it appears broken in 0.9.0.
+
+ 0.9.1
+ -------------------------------------------------------------------------
+diff --git a/plugins/batt/batt_sys.c b/plugins/batt/batt_sys.c
+index 2482c6f..bd01e08 100644
+--- a/plugins/batt/batt_sys.c
++++ b/plugins/batt/batt_sys.c
+@@ -167,6 +167,7 @@ static gboolean battery_inserted(gchar* path)
+ battery* battery_update(battery *b)
+ {
+ gchar *gctmp;
++ int promille;
+
+ if (b == NULL)
+ return NULL;
+@@ -253,16 +254,18 @@ battery* battery_update(battery *b)
+ }
+ #endif
+
+- if (b->charge_full < MIN_CAPACITY)
+- b->percentage = 0;
+- else {
+- int promille = (b->charge_now * 1000) / b->charge_full;
+- b->percentage = (promille + 5) / 10; /* round properly */
+- }
++ if (b->charge_now != -1 && b->charge_full != -1)
++ promille = (b->charge_now * 1000) / b->charge_full;
++ else if (b->energy_full != -1 && b->energy_now != -1)
++ /* no charge data, let try energy instead */
++ promille = (b->energy_now * 1000) / b->energy_full;
++ else
++ promille = 0;
++
++ b->percentage = (promille + 5) / 10; /* round properly */
+ if (b->percentage > 100)
+ b->percentage = 100;
+
+-
+ if (b->current_now == -1) {
+ //b->poststr = "rate information unavailable";
+ b->seconds = -1;
+--
+2.11.0
+
diff --git a/desktop/lxpanel/slack-desc b/desktop/lxpanel/slack-desc
index d6c2e3d1a8f4..3ba45d011689 100644
--- a/desktop/lxpanel/slack-desc
+++ b/desktop/lxpanel/slack-desc
@@ -6,7 +6,7 @@
# customary to leave one space after the ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
-lxpanel: lxpanel (NETWM/EWMH compliant lightweight x11 desktop panel)
+lxpanel: LXpanel (NETWM/EWMH compliant lightweight x11 desktop panel)
lxpanel:
lxpanel: Based on fbpanel, lxpanel provides an application menu generated from
lxpanel: desktop files as well as a launchbar, taskbar and various plugins.