File: 1003-gnuplot-title.patch

package info (click to toggle)
battery-stats 0.5.6-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 336 kB
  • sloc: sh: 514; python: 166; makefile: 2
file content (28 lines) | stat: -rw-r--r-- 1,087 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Description: Avoid obsolete title argument to gnuplot
 The gnuplot program no longer accept the -title argument.
Author: Gregor Herrmann <gregoa@debian.org>
Bug-Debian: https://bugs.debian.org/1071187
Last-Update: 2025-12-25

--- battery-stats-0.5.6.orig/src/battery-graph.in
+++ battery-stats-0.5.6/src/battery-graph.in
@@ -184,6 +184,10 @@ ZERO_BIOS_ESTIMATE=`tail -n 1 $TMPFILENA
 
 
 (   
+    if [ -n "$title" ] ; then
+	echo "set title \"$title\""
+    fi
+
     if $text ; then
 	echo set terminal dumb ${COLUMNS:-$(tput cols)} ${LINES:-$(tput lines)}
     fi
@@ -218,7 +222,7 @@ ZERO_BIOS_ESTIMATE=`tail -n 1 $TMPFILENA
 		echo ", g(x -($TIME_LAST_DISCHARGE_BEGIN-$adjustment) ) title (B<0?sprintf(\"slope= (%.2f +/- %.2f) %/h\", B*3600, B_err*3600):\"\") lc rgb \"black\" lt 2 "
     fi
     
-)  | gnuplot -persist ${geometry:+-geometry} $geometry ${title:+-title} "${title}" ; rm -f $TMPFILENAME
+)  | gnuplot -persist ${geometry:+-geometry} $geometry ; rm -f $TMPFILENAME
 
 
 # TODO Have to decide if we want to clean up or leave the file for us to zoom in/out in the graph