valr / cbatticon

A lightweight and fast battery icon that sits in your system tray
GNU General Public License v2.0
168 stars 40 forks source link

cbatticon --version shouldn't need X display #17

Closed l0b0 closed 9 years ago

l0b0 commented 9 years ago

With the latest version of cbatticon I can no longer query for the version without an X display:

[vagrant@archlinux ~]$ cbatticon --version
Unable to init server: Could not connect: Connection refused
Cannot parse command line arguments: Cannot open display: 
[vagrant@archlinux ~]$ pacman --query cbatticon
cbatticon 1.4.2-1
valr commented 9 years ago

Well, it seems to have never worked (I tried 1.4.2, 1.4.0 and 1.3.0). Reason is that I use gtk_get_option_group and g_option_context_parse that both process the options and initialise gtk using the display. It's done that way since the beginning and has not changed in 1.4.2.

In other words, I see this 'issue' as a feature request but not as a bug. I might look at it later, if I find time, to provide the below options without an X running: --version --list-icon-types --list-power-supplies

valr commented 9 years ago

@l0b0 : I've just fixed this issue. It will be released soon in 1.5.0

The options that don't require X are: --version --list-power-supplies

l0b0 commented 9 years ago

Thank you!