mirror of
https://github.com/amiwm/amiwm.git
synced 2026-04-14 11:04:18 +00:00
[amiwm] Add the basic battery info printing bits
* add a batteryinfo config option to enable whether or not to display the current battery info string * populate that battery info string whenever we receive a battery update from the module * document it all This is very specific to a battery thing rather than a generic menu widget thing, but I think I'll go and twiddle with this stuff a bit more first and then work on a more generic "menu widget" thing later. It'd be nice to have "menu bar things" like battery and the date/time field on a linked list of "things". There's also some bugs - notably, rendering artifacts when the string length shrinks, and it only updating on the 'current' menu bar (when you have multiple desktops visible at once.) Those also should be fixed for completeness. :-)
This commit is contained in:
2
gram.y
2
gram.y
@@ -66,6 +66,7 @@ static int ti_level=0;
|
||||
%token <num> INTERSCREENGAP AUTORAISE FOCUS FOLLOWMOUSE CLICKTOTYPE SLOPPY
|
||||
%token <num> CUSTOMICONSONLY
|
||||
%token <num> TITLEBARCLOCK TITLECLOCKFORMAT
|
||||
%token <num> BATTERYINFO
|
||||
%token <num> OPAQUEMOVE OPAQUERESIZE SCREENMENU STYLE CLASS TITLE ICONTITLE ICON
|
||||
%token <num> SHORTLABELICONS
|
||||
%token <ptr> STRING
|
||||
@@ -118,6 +119,7 @@ stmt : error
|
||||
prefs.titleclockinterval=$2;
|
||||
prefs.titleclockformat=$3; }
|
||||
| SCREENMENU truth { prefs.screenmenu=$2; }
|
||||
| BATTERYINFO truth { prefs.battery_info = $2; }
|
||||
| stylespec styleitems RIGHTBRACE
|
||||
;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user