![]() |
|
|||||||
| OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
|||
|
Hello,
Anybody knows how to view battery status and loading % in conky? Thanks |
|
|||
|
Have you checked the man page or the examples on their official page, such as this one?
__________________
May the source be with you! |
|
|||
|
Yes, I tried the following:
${color grey}Battery:$color ${apm_battery_time} ${battery} ${acpiacadapter} All I get in output is Battery: ${apm_battery_time} ${battery} ${acpiacadapter} |
|
|||
|
It works here. You must be missing something. Post your .conkyrc file (inside code tags).
__________________
May the source be with you! |
|
|||
|
Code:
double_buffer yes
alignment bottom_right
background no
border_width 1
cpu_avg_samples 2
default_color white
default_outline_color white
default_shade_color white
draw_borders no
draw_graph_borders yes
draw_outline no
draw_shades no
use_xft yes
xftfont DejaVu Sans Mono:size=9
gap_x 5
gap_y 60
minimum_size 5 5
net_avg_samples 2
no_buffers yes
out_to_console no
out_to_stderr no
extra_newline no
own_window no
own_window_class Conky
own_window_type desktop
stippled_borders 0
update_interval 1.0
uppercase no
use_spacer none
show_graph_scale no
show_graph_range no
TEXT
SYSTEM $hr
$sysname $kernel on $machine
${color grey}Uptime:$color $uptime
${color grey}Frequency (in MHz):$color $freq
${color grey}Frequency (in GHz):$color $freq_g
${color grey}RAM Usage:$color $mem/$memmax - $memperc%
${color grey}Swap Usage:$color $swap/$swapmax - $swapperc%
${color grey}CPU Usage:$color $cpu%
${color grey}Processes:$color $processes ${color grey}Running:$color $running_processes
${color grey}Battery:$color ${apm_battery_time} ${battery} ${acpiacadapter}
File systems $hr
${color grey}Usage: / $color${fs_used /}/${fs_size /} ${fs_bar 6 /}
Networking $hr
${color grey}Up:$color ${upspeed eth0} ${color grey} - Down:$color ${downspeed eth0}
|
|
|||
|
Oh I am using OpenBSD 4.8 amd64.
Perhaps this changes something? |
|
|||
|
How does conky determine the battery usage? does this system use apm(4) or acpi(4)? do you use apmd(8)? what's the output of apm?
If you're using ACPI, look in your dmesg and see if acpibat* attaches.. if so, the sysctl members hw.sensors.acpibat0.* should exist. It's difficult to get battery usage information portability across operating systems, but with a little scripting you can probably pull something off that can display battery usage. |
|
|||
|
I don't realy know what conky uses... depends on the variables you use I think. If I run the following I can see battery usage (I had to start apmd manually for it to work).
Code:
apm -l I am sure it once worked on 4.7. |
|
|||
|
I can see the entries correctly in sysctl and dmesg. So ACPI is used I guess.
|
|
|||
|
For those who want to know it, I think I found the cause. I went and checked the source code of conky (version 1.7.2).
Among other things I found the following: Code:
#if defined(i386) || defined(__i386__) typedef struct apm_power_info *apm_info_t; #endif |
![]() |
| Thread Tools | |
| Display Modes | |
|
|