You are not logged in.

#1 2015-10-30 07:29:37

tranjeeshan
Member
Registered: 2015-10-02
Posts: 69

[SOLVED] Battery percentage doesn't show up in tint2

Hi,
Laptop's battery level percentage doesn't show up in tint2 panel. This is happening for a specific tint2rc I copied from #! forum. I modified the battery section of this tint2rc similar to the one that works (read, shows battery percentage). But couldn't see any change though.
Here's the tint2 panel image file:
2015_10_30_132117_1363x38_scrot.jpg

Here's my tint2rc file:

#---------------------------------------------
# TINT2 CONFIG FILE
#---------------------------------------------
# For more information about tint2, see:
# http://code.google.com/p/tint2/wiki/Welcome

# Background definitions
# ID 1 - panel
rounded = 0
border_width = 0
background_color = #000000 0
border_color = #000000 0

# ID 2 - active task
rounded = 5
border_width = 2
background_color = #ffffff 30
border_color = #ffffff 0

# ID 3 - urgent task
rounded = 3
border_width = 2
background_color = #4285F4 30
border_color = #4285F4 100

# ID 4 - system tray
rounded = 2
border_width = 0
background_color = #000000 50
border_color = #000000 0

# ID 5 - tooltip
rounded = 3
border_width = 0
background_color = #000000 100
border_color = #000000 0

# Panel
panel_monitor = all
panel_position = bottom center horizontal
panel_items = LTCS
panel_size = 100% 40
panel_margin = 10 -2
panel_padding = 0 4 -2
panel_dock = 0
wm_menu = 1
panel_layer = top
panel_background_id = 1

# Panel Autohide
autohide = 0
autohide_show_timeout = 0.3
autohide_hide_timeout = 1.5
autohide_height = 6
strut_policy = follow_size

# Taskbar
taskbar_mode = single_desktop
taskbar_padding = 6 -4 6
taskbar_background_id = 1
taskbar_name = 0

# Tasks
urgent_nb_of_blink = 5
task_icon = 1
task_text = 0
task_centered = 1
task_maximum_size = 40 40
task_padding = 2 4
task_background_id = 1
task_active_background_id = 2
task_urgent_background_id = 3
task_iconified_background_id = 1

# Task Icons
task_icon_asb = 100 0 0
task_active_icon_asb = 100 0 0
task_urgent_icon_asb = 100 0 0
task_iconified_icon_asb = 100 0 0

# Fonts
task_font = Noto Sans 06_55 6
task_font_color = #828282 60
task_active_font_color = #828282 100
task_urgent_font_color = #FFFFFF 100
task_iconified_font_color = #d8d8d8 60
font_shadow = 0

# Launcher
launcher_padding = 4 0 0
launcher_background_id = 0
launcher_icon_theme = gnome-colors-statler
launcher_item_app = /usr/share/applications/menu.desktop

# System Tray
systray = 1
systray_padding = 8 0 2
systray_sort = right2left
systray_background_id = 4
systray_icon_size = 20
systray_icon_asb = 100 0 0

# Clock
time1_format = %a %d %b  %H:%M:%S 
time1_font = Noto Sans 10
clock_font_color = #ffffff 100
clock_padding = 8 4
clock_background_id = 4
clock_lclick_command = gsimplecal
clock_rclick_command = gsimplecal

# Tooltips
tooltip = 1
tooltip_padding = 2 2
tooltip_show_timeout = 0.0
tooltip_hide_timeout = 0.0
tooltip_background_id = 5
tooltip_font_color = #ffffff 100
tooltip_font = Noto Sans normal 10

# Mouse
mouse_middle = none
mouse_right = close
mouse_scroll_up = toggle
mouse_scroll_down = iconify

# Battery
battery = 1
battery_low_status = 10
battery_low_cmd = notify-send "battery low"
battery_hide = 98
bat1_font = sans 8
bat2_font = sans 8
battery_font_color = #ffffff 100
battery_padding = 1 0
battery_background_id = 0

# End of config

Could anyone point out the error? Thanks.

Last edited by tranjeeshan (2015-10-30 07:30:38)


"Unix is simple. It just takes a genius to understand its simplicity."  - Dennis Ritchie (1941-2011), Unix Co-Creator
Unix philosophy

Offline

#2 2015-10-30 10:37:31

phle
Member
From: Svedujo
Registered: 2015-09-19
Posts: 19

Re: [SOLVED] Battery percentage doesn't show up in tint2

tranjeeshan wrote:

Laptop's battery level percentage doesn't show up in tint2 panel.
/.../

panel_items = LTCS

You need to include the battery part, so just change

panel_items = LTCS

to

panel_items = LTBCS

(these are the available panel items:

# panel_items = LTSBC : defines the items tint2 will show and the order of those items, from left to right.
#  L: Launcher
#  T: Taskbar
#  S: Systray (also called notification area)
#  B: Battery status
#  C: Clock

just re-order if you prefer the battery status elsewhere than between the Taskbar and the Clock smile

and in case you're curious, this is what the battery part of my .tint2rc looks like:

# Battery

# battery = boolean (0 or 1) : Whether to enable the battery item.
battery = 1

# battery_hide = never/integer (0 to 100) : At what battery percentage the battery item is hidden.
battery_hide = never

# battery_low_status = integer: At what battery percentage the low command is executed.
battery_low_status = 15

# battery_low_cmd = notify-send "battery low" : Command to execute when the battery is low.
battery_low_cmd = notify-send "battery low"

# bat1_font = [FAMILY-LIST] [STYLE-OPTIONS] [SIZE]
bat1_font = sans 8

# bat2_font = [FAMILY-LIST] [STYLE-OPTIONS] [SIZE]
bat2_font = sans 6

# battery_font_color = color opacity (0 to 100)
battery_font_color = #cccccc 100

# battery_padding = horizontal_padding vertical_padding
battery_padding = 2 0

# battery_background_id = integer : Which background to use for the battery.
battery_background_id = 0

Hope this helped. smile )


as of 2020-Jun-08:  Bunsenlabs 10 "Lithium" (RC3)  (and BunsenLabs 9.8 "Helium", and Windows 8.1) on mainly-at-home  (64-bit UEFI; defunct battery)  |  64-bit Windows 10 on carry-around  || TypeMatrix 2030 USB (blank) + "skin",  Logitech Marble Mouse USB,  Logitech B105
¤  Se vi scivolas: Mi estas ina.  ¤  (Mi provas lerni E-on, sed ankoraŭ ne majstri ĝin.) ¤

Offline

#3 2015-10-30 17:17:00

tranjeeshan
Member
Registered: 2015-10-02
Posts: 69

Re: [SOLVED] Battery percentage doesn't show up in tint2

phle wrote:

You need to include the battery part, so just change

panel_items = LTCS

to

panel_items = LTBCS

Thank you! Problem solved!
I like your approach of configuration file. With everything commented out, it's a self-explanatory configuration file that makes customization easier. Thanks, again smile

-mod edit- truncated the quote, hhh


"Unix is simple. It just takes a genius to understand its simplicity."  - Dennis Ritchie (1941-2011), Unix Co-Creator
Unix philosophy

Offline

#4 2015-10-30 17:24:50

hhh
Gaucho
From: High in the Custerdome
Registered: 2015-09-17
Posts: 16,032
Website

Re: [SOLVED] Battery percentage doesn't show up in tint2

I'll add [SOLVED] to the subject title, you can do this yourself in the future by editing your OP. smile


No, he can't sleep on the floor. What do you think I'm yelling for?!!!

Offline

#5 2015-10-30 17:25:29

PackRat
jgmenu user Numero Uno
Registered: 2015-10-02
Posts: 2,611

Re: [SOLVED] Battery percentage doesn't show up in tint2

Good you got it fixed.

Please mark your thread as solved.

edit - hhh beat me to it

Last edited by PackRat (2015-10-30 19:06:02)


You must unlearn what you have learned.
    -- yoda

Offline

#6 2015-10-30 17:28:24

hhh
Gaucho
From: High in the Custerdome
Registered: 2015-09-17
Posts: 16,032
Website

Re: [SOLVED] Battery percentage doesn't show up in tint2

tranjeeshan wrote:

I like your approach of configuration file. With everything commented out, it's a self-explanatory configuration file that makes customization easier. Thanks, again smile

+1, cleaning up our tint2 configuration is on the ToDo list.


No, he can't sleep on the floor. What do you think I'm yelling for?!!!

Offline

#7 2015-10-30 18:29:46

tranjeeshan
Member
Registered: 2015-10-02
Posts: 69

Re: [SOLVED] Battery percentage doesn't show up in tint2

hhh wrote:

I'll add [SOLVED] to the subject title, you can do this yourself in the future by editing your OP. smile

Oops! Forgot that part. Wouldn't miss the next time.


"Unix is simple. It just takes a genius to understand its simplicity."  - Dennis Ritchie (1941-2011), Unix Co-Creator
Unix philosophy

Offline

#8 2015-10-31 01:28:13

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,550
Website

Re: [SOLVED] Battery percentage doesn't show up in tint2

hhh wrote:

cleaning up our tint2 configuration is on the ToDo list.

Noted. smile


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

#9 2015-10-31 18:33:04

phle
Member
From: Svedujo
Registered: 2015-09-19
Posts: 19

Re: [SOLVED] Battery percentage doesn't show up in tint2

hhh wrote:
tranjeeshan wrote:

I like your approach of configuration file. With everything commented out, it's a self-explanatory configuration file that makes customization easier. Thanks, again smile

+1, cleaning up our tint2 configuration is on the ToDo list.

I finally[1] got myself together and included the CrunchBang 11 Waldorf and BunsenLabs 8 Hydrogen (RC1) default values in my commented tint2rc file.
You can find it in a separate post here in the BunsenLabs Forums.


It isn't really a "cleaned up" tint2rc, but rather a restructured heavily commented one.


as of 2020-Jun-08:  Bunsenlabs 10 "Lithium" (RC3)  (and BunsenLabs 9.8 "Helium", and Windows 8.1) on mainly-at-home  (64-bit UEFI; defunct battery)  |  64-bit Windows 10 on carry-around  || TypeMatrix 2030 USB (blank) + "skin",  Logitech Marble Mouse USB,  Logitech B105
¤  Se vi scivolas: Mi estas ina.  ¤  (Mi provas lerni E-on, sed ankoraŭ ne majstri ĝin.) ¤

Offline

Board footer

Powered by FluxBB