From 7f070b4f459581638198f05a8ea7660836a68a2a Mon Sep 17 00:00:00 2001 From: Chris Lee <@klee93> Date: Sun, 3 Mar 2019 23:13:40 +0100 Subject: [PATCH] Battery percentage without % sign (#730) --- doc/manual.html | 73 ++-- doc/readme.html | 8 +- doc/tint2.1 | 2 + doc/tint2.md | 1 + src/battery/battery.c | 5 + src/tint2conf/po/bs.po | 745 ++++++++++++++++---------------- src/tint2conf/po/es.po | 745 ++++++++++++++++---------------- src/tint2conf/po/fr.po | 745 ++++++++++++++++---------------- src/tint2conf/po/hr.po | 745 ++++++++++++++++---------------- src/tint2conf/po/pl.po | 745 ++++++++++++++++---------------- src/tint2conf/po/ru.po | 745 ++++++++++++++++---------------- src/tint2conf/po/sr.po | 745 ++++++++++++++++---------------- src/tint2conf/po/tint2conf.pot | 746 +++++++++++++++++---------------- src/tint2conf/properties.c | 3 +- 14 files changed, 3082 insertions(+), 2971 deletions(-) diff --git a/doc/manual.html b/doc/manual.html index 54c5c30..1299dae 100644 --- a/doc/manual.html +++ b/doc/manual.html @@ -273,7 +273,7 @@ Try to respect as much as possible the order of the options as given below.

<
  • border_content_tint_weight = integer : Mixes the border color with the content color (for tasks, this is the average color of the window icon). Values must be between 0 (no mixing) and 100 (fully replaces the color). (since 16.0)

  • background_content_tint_weight = integer : Mixes the background color with the content color (for tasks, this is the average color of the window icon). Values must be between 0 (no mixing) and 100 (fully replaces the color). (since 16.0)

  • -

    You can define as many backgrounds as you want. For example, the following config defines two backgrounds:

    rounded = 1
    +

    You can define as many backgrounds as you want. For example, the following config defines two backgrounds:

    rounded = 1
     border_width = 0
     background_color = #282828 100
     border_color = #000000 0
    @@ -282,16 +282,14 @@ rounded = 1
     border_width = 0
     background_color = #f6b655 90
     border_color = #cccccc 40
    -
    -

    tint2 automatically identifies each background with a number starting from 1 (1, 2, ...). -Afterwards, you can apply a background to objects (panel, taskbar, task, clock, systray) using the background id, for example:

    panel_background_id = 1
    +

    tint2 automatically identifies each background with a number starting from 1 (1, 2, ...). +Afterwards, you can apply a background to objects (panel, taskbar, task, clock, systray) using the background id, for example:

    panel_background_id = 1
     taskbar_background_id = 0
     task_background_id = 0
     task_active_background_id = 2
     systray_background_id = 0
     clock_background_id = 0
    -
    -

    Identifier 0 refers to a special background which is fully transparent, identifier 1 applies the first background defined in the config file etc.

    Gradients

    (Available since 0.13.0)

    Backgrounds also allow specifying gradient layers +

    Identifier 0 refers to a special background which is fully transparent, identifier 1 applies the first background defined in the config file etc.

    Gradients

    (Available since 0.13.0)

    Backgrounds also allow specifying gradient layers that are drawn on top of the solid color background.

    First the user must define one or more gradients in the config file, each starting with gradient = TYPE. These must be added before backgrounds.

    Then gradients can be added by index to backgrounds, using the gradient_id = INDEX, gradient_id_hover = INDEX and @@ -300,21 +298,17 @@ the gradient index, starting from 1.

    Gradient types

    The user must specify the start and end colors, and can optionally add extra color stops in between -using the color_stop option, as explained below.

    Vertical gradient, with color varying from the top edge to the bottom edge, two colors
    gradient = vertical
    +using the color_stop option, as explained below.

    Vertical gradient, with color varying from the top edge to the bottom edge, two colors
    gradient = vertical
     start_color = #rrggbb opacity
     end_color = #rrggbb opacity
    -
    -
    Horizontal gradient, with color varying from the left edge to the right edge, two colors
    gradient = horizontal
    +
    Horizontal gradient, with color varying from the left edge to the right edge, two colors
    gradient = horizontal
     start_color = #rrggbb opacity
     end_color = #rrggbb opacity
    -
    -
    Radial gradient, with color varying from the center to the corner, two colors:
    gradient = radial
    +
    Radial gradient, with color varying from the center to the corner, two colors:
    gradient = radial
     start_color = #rrggbb opacity
     end_color = #rrggbb opacity
    -
    -
    Adding extra color stops (0% and 100% remain fixed, more colors at x% between the start and end control points)
    color_stop = percentage #rrggbb opacity
    -
    -

    Gradient examples

    # Gradient 1: thin film effect
    +
    Adding extra color stops (0% and 100% remain fixed, more colors at x% between the start and end control points)
    color_stop = percentage #rrggbb opacity
    +

    Gradient examples

    # Gradient 1: thin film effect
     gradient = horizontal
     start_color = #111122 30
     end_color = #112211 30
    @@ -350,8 +344,7 @@ gradient_id_hover = 4
     gradient_id_pressed = 2
     
     [...]
    -
    -

    Panel

    +

    Panel

    -

    Executor samples

    execp = new
    +

    Executor samples

    execp = new
     execp_command = hostname
     execp_interval = 0
    -
    -
    execp = new
    -execp_command = df -h | awk '/\/$/ { print $6 ": " $2 " " $5}'
    +
    execp = new
    +execp_command = df -h | awk '/\/$/ { print $6 ": " $2 " " $5}'
     execp_interval = 10
    -
    -
    Button with icon and rich text, executes command when clicked
    execp = new
    -execp_command = echo /usr/share/icons/elementary-xfce/emblems/24/emblem-colors-blue.png; echo '<span foreground="#7f7">Click</span> <span foreground="#77f">me</span> <span foreground="#f77">pls</span>'
    +
    Button with icon and rich text, executes command when clicked
    execp = new
    +execp_command = echo /usr/share/icons/elementary-xfce/emblems/24/emblem-colors-blue.png; echo '<span foreground="#7f7">Click</span> <span foreground="#77f">me</span> <span foreground="#f77">pls</span>'
     execp_has_icon = 1
     execp_interval = 0
     execp_centered = 1
    @@ -640,38 +631,32 @@ execp_markup = 1
     execp_font_color = #aaffaa 100
     execp_padding = 2 0
     execp_tooltip = I will tell you a secret...
    -execp_lclick_command = zenity --info "--text=$(uname -sr)"
    +execp_lclick_command = zenity --info "--text=$(uname -sr)"
     execp_background_id = 2
    -
    -
    Desktop pager with text
    execp = new
    -execp_command = xprop -root -spy | awk '/^_NET_CURRENT_DESKTOP/ { print "Workspace " ($3 + 1) ; fflush(); }'
    +
    Desktop pager with text
    execp = new
    +execp_command = xprop -root -spy | awk '/^_NET_CURRENT_DESKTOP/ { print "Workspace " ($3 + 1) ; fflush(); }'
     execp_interval = 1
     execp_continuous = 1
    -
    -
    Desktop pager with icon
    execp_command = xprop -root -spy | awk -v home="$HOME" '/^_NET_CURRENT_DESKTOP/ { print home "/.config/myPager/" ($3 + 1) ".png\n" ; fflush(); }'
    +
    Desktop pager with icon
    execp_command = xprop -root -spy | awk -v home="$HOME" '/^_NET_CURRENT_DESKTOP/ { print home "/.config/myPager/" ($3 + 1) ".png\n" ; fflush(); }'
     execp_interval = 1
     execp_has_icon = 1
     execp_cache_icon = 1
     execp_continuous = 2
    -
    -
    Round-trip time to the gateway, refreshed every second
    execp = new
    -execp_command = ping -i 1 -c 1 -W 1 -O -D -n $(ip route | grep default | grep via | grep -o '[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*') | awk '/no/ { print "<span foreground=\"#faa\">timeout</span>"; fflush(); }; /time=/ { gsub(/time=/, "", $8); printf "<span foreground=\"#7af\">%3.0f %s</span>\n", $8, $9; fflush(); } '
    +
    Round-trip time to the gateway, refreshed every second
    execp = new
    +execp_command = ping -i 1 -c 1 -W 1 -O -D -n $(ip route | grep default | grep via | grep -o '[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*') | awk '/no/ { print "<span foreground=\"#faa\">timeout</span>"; fflush(); }; /time=/ { gsub(/time=/, "", $8); printf "<span foreground=\"#7af\">%3.0f %s</span>\n", $8, $9; fflush(); } '
     execp_continuous = 0
     execp_interval = 1
     execp_markup = 1
    -
    -
    Memory usage
    execp = new
    -execp_command = free | awk '/^-/ { printf "Mem: '$(free -h | awk '/^Mem:/ { print $2 }')' %.0f%%\n", 100*$3/($3+$4); fflush(stdout) }'
    +
    Memory usage
    execp = new
    +execp_command = free | awk '/^-/ { printf "Mem: '$(free -h | awk '/^Mem:/ { print $2 }')' %.0f%%\n", 100*$3/($3+$4); fflush(stdout) }'
     execp_interval = 5
     execp_continuous = 0
    -
    -
    Network load
    # Note the use of "stdbuf -oL" to force the program to flush the output line by line.
    +
    Network load
    # Note the use of "stdbuf -oL" to force the program to flush the output line by line.
     execp = new
    -execp_command = stdbuf -oL bwm-ng -o csv -t 1000 | awk -F ';' '/total/ { printf "Net: %.0f Mb/s\n", ($5*8/1.0e6) }; fflush(stdout)'
    +execp_command = stdbuf -oL bwm-ng -o csv -t 1000 | awk -F ';' '/total/ { printf "Net: %.0f Mb/s\n", ($5*8/1.0e6) }; fflush(stdout)'
     execp_continuous = 1
     execp_interval = 1
    -
    -

    Button

    +

    Button