File: pbbcmd.1

package info (click to toggle)
pbbuttonsd 0.7.9-5
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 2,416 kB
  • ctags: 2,350
  • sloc: ansic: 17,517; sh: 4,626; makefile: 552; yacc: 288; cpp: 203; sed: 16
file content (639 lines) | stat: -rw-r--r-- 20,418 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
.\"                              hey, Emacs:   -*- nroff -*-
.\" pbbuttons is free software; you can redistribute it and/or modify
.\" it under the terms of the GNU General Public License as published by
.\" the Free Software Foundation; either version 2 of the License, or
.\" (at your option) any later version.
.\"
.\" This program is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
.\" GNU General Public License for more details.
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with this program; see the file COPYING.  If not, write to
.\" the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
.\"
.TH PBBCMD 1 "September 28, 2006"
.\" Please update the above date whenever this man page is modified.
.\"
.\" Some roff macros, for reference:
.\" .nh        disable hyphenation
.\" .hy        enable hyphenation
.\" .ad l      left justify
.\" .ad b      justify to both left and right margins (default)
.\" .nf        disable filling
.\" .fi        enable filling
.\" .br        insert line break
.\" .sp <n>    insert n+1 empty lines
.\" for manpage-specific macros, see man(7)
.SH NAME
pbbcmd \- command line tool to communicate with pbbuttonsd.
.SH SYNOPSIS
.B pbbcmd
.RI [\-hvi]\ <command>
.br
.B pbbcmd
.RI [\-hvi]\ query\ <tag>
.br
.B pbbcmd
.RI [\-hvi]\ config\ <tag>\ <data>
.SH DESCRIPTION
\fBpbbcmd\fP is a tool to communicate with pbbuttonsd. It is possible to send
single commands to the daemon or ask it for certain information. It is useful
for scripts or for debugging and therefore the results of queries and arguments
for config operations are very basic and raw. Pbbcmd won't interpret the
results for you.
.SH OPTIONS
\fBpbbcmd\fP accepts the following options:
.TP
.B \-h, \-\-help
Show summary of options.
.TP
.B \-v, \-\-version
Show version of \fBpbbcmd\fP.
.TP
.B \-i, \-\-ignore
With this option given pbbcmd will not wait for answers from the server after
a config command has been sent. It returns immediately.
.PP
The command tells pbbcmd what should be done. Only the commands \'query\'
and \'config\' needs additional arguments. All other stand for themselves.
Pbbcmd supports following commands:
.TP
.B query
.br
Reads parameters from the server and print them to terminal. This
command needs the name of the desired parameter as argument. Multiple names
are possible. See chapter TAGS for possible parameter names.
.TP
.B config
.br
Change server options on the fly. This command needs the parameter name and
the new value as command. Multiple parameters can be changed at once. See
chapter TAGS for possible parameter names.
.TP
.B listclients
.br
Receiving this command pbbuttonsd will return a list of currently attached clients.
Pbbcmd will print a table containg useful information of these clients.
.TP
.B saveconfig
.br
Save current configuration to disc. This works only if all security
conditions were fulfilled and pbbuttond has config writing enabled.
.TP
.B reinit
.br
This command triggers reinitialization setting of hardware components under 
control of pbbuttonsd (for example the trackpad and keyboard on PowerBooks).
The PMCS script to set the power policy will also be lauched after this
command.
.TP
.B ejectcd
.br
Eject the CDROM.
.TP
.B sleep
.br
Suspend the machine to RAM.
.TP
.B hibernate
.br
Suspend the machine to Disk. This will trigger the kernel to write the memory
and all necessary process data to swap space on disk and shut the machine down.
After next reboot, the system should be restored in state the system had at
the time this command was triggered. This might not work on all machines. Please
read the kernel documentation for more details.

.SH "TAGS to use with \'config\' or \'query\'"
Not every tag could be used with \fIconfig\fP and \fIquery\fP operations.
The 'List of Tags' below shows how each tag could be used. The structure of
this list is described as follows:
.TP
<TAGNAME>             <datatype>  <usable with>
.br
<description> 
.PP
The <datatype> field shows what sort of data is returned or expected.
Following datatypes are defined:
.TP
.B command
This tag is a command and the argument wouldn't be evaluated.
Nevertheless the config operation expected one and 0 would be ok in this cases.
.TP
.B string
String of characters. The string must be quoted if it contains white spaces.
.TP
.B integer
32-bit integer values. The description would say if the value range was restricted.
.TP
.B bool
A boolean value. A '0' means false and a '1' means true. Any other values are
invalid.
.TP
.B keycode
A keycode is an 8-bit integer. Each keycode has it's equivalent key on the keyboard.
Don't confuse this with ASCII code. You could get keycodes with the program
\fIshowkey\fP.
.TP
.B modifier
A modifier is an bit-field with one bit for each modifier key: Bit 0 = 1 = shift,
bit 1 = 2 = alt and bit 2 = 4 = ctrl. The three modifiers cold be combined through
adding their single values. In result we get an value between 0 and 7.

.SH "LIST OF TAGS" for query and config
.TP
TAG_AUTORESCAN         bool        config/query
.br
Enable or disable periodically scan of event devices to detect
new or lost keyboards automatically.
.TP
TAG_VERSION            string      query
.br
Get version string of the server
.TP
TAG_TIMEFORCMD         integer     config/query
.br
Get or set the timeout for launched scripts or helper programs.
.TP
TAG_TIMEREMAINING      integer     query
.br
Get the current time in seconds the battery will last.
.TP
TAG_CHARGETIME         integer     query
.br
Get the time until the batteries are fully charged.
.br
This option would only be available, if pbbuttonsd
was compiled with IBaM support.
.TP
TAG_POWERSOURCE        bool        query
.br
Get the current power source the machine is running on. '0'
represents battery and '1' stands for AC.
.TP
TAG_SLEEPSUPPORTED     bool        query
.br
Check if the machine supports sleep mode. The result is '0' if not.
.TP
TAG_PMUDEVICE          string      config/query
.br
Get or set the pmu device. This is only useful on Apple PowerBooks
and compatible.
.TP
TAG_ADBDEVICE          string      config/query
.br
Get or Set the ADB device. This is only useful on Apple PowerBooks
and compatible.
.TP
TAG_TPMODEUPKEY        keycode     config/query
.br
Get or set keycode used for trackpad mode up.
.TP
TAG_TPMODEUPMOD        modifier    config/query
.br
Get or Set modifier used with TPMODEUPKEY.
.TP
TAG_TPMODEDOWNKEY      keycode     config/query
.br
Get or set keycode used for trackpad mode down.
.TP
TAG_TPMODEDOWNMOD      modifier    config/query
.br
Get or set modifier used with TPMODEDOWNKEY.
.TP
TAG_TPMODE             integer     config/query
.br
Get or set trackpad mode. Supported modes are: 0=notap, 1=tap, 2=drag.
All other values are invalid.
.TP
TAG_NOTAPTYPING        bool        config/query
.br
Enable or disable trackpad configuration while typing. Normally the
trackpad would stay in it's current mode if key on the keyboard were
hit. With this option enabled the trackpad will be configured to
\'notap\' while the keyboard is used.
.TP
TAG_KBDMODE            integer     config/query
.br
Get or set the keyboard mode. Supported values are 0=disabled, 1=fkeyslast
and 2=fkeysfirst. All other values are invalid.
.PP
.in +7
Fn can only be disabled on PowerBooks with an USB keyboard. If you own a
machine with a ADB keyboard you have to choose 'fkeyslast' or 'fkeysfirst'.
\fBPBButtonsd\fP will force this setting to 'fkeyslast' if necessary.
.TP
TAG_BATLOG             integer     config/query
.br
Get or set the battery logging mode. Supported values are 0=none, 1=cycle and
2=log. See pbbuttonsd.conf (5) man-page for detailed description.
.TP
TAG_BATCYCLE           integer     query
.br
Get the current battery cycle. A return value of \-1 shows that the battery cycle
is not available. This happens if batlog has been disabled.
.TP
TAG_BATTERYPRESENT     integer     query
.br
Get the batteries currently present. The return value is bit-oriented. Bit 0 
shows left battery and bit 1 shows the right battery. A value of 1 means only
the left battery is plugged in, a value of 3 means both batteries are available.
.TP
TAG_LCDILLUMUPKEY      keycode     config/query
.br
Get or set keycode used for increasing display brightness.
.TP
TAG_LCDILLUMUPMOD      modifier    config/query
.br
Get or set modifier used with LCDILLUMUPKEY.
.TP
TAG_LCDILLUMDOWNKEY    keycode     config/query
.br
Get or set keycode used for decreasing display brightness.
.TP
TAG_LCDILLUMDOWNMOD    modifier    config/query
.br
Get or set modifier used with LCDILLUMDOWNKEY.
.TP
TAG_LCDBRIGHTNESS      integer     config/query
.br
Get or set current brightness level as percentage.
.TP
TAG_LCDAUTOADJUST      bool        config/query
.br
Enable or disable automatic brightness control for the display.
.TP
TAG_LCDAUTOADJMINBAT   integer     config/query
.br
Set minimum brightness limit for automatic adjustment, if running
on battery.
.TP
TAG_LCDAUTOADJMAXBAT   integer     config/query
.br
Set maximum brightness limit for automatic adjustment, if running
on battery.
.TP
TAG_LCDAUTOADJMINAC    integer     config/query
.br
Set minimum brightness limit for automatic adjustment, if running on AC.
.TP
TAG_LCDAUTOADJMAXAC    integer     config/query
.br
Set maximum brightness limit for automatic adjustment, if running on AC.
.TP
TAG_KBDILLUMUPKEY      keycode     config/query
.br
Get or set keycode used for increasing keyboard brightness.
.TP
TAG_KBDILLUMUPMOD      modifier    config/query
.br
Get or set modifier used with KBDILLUMUPKEY.
.TP
TAG_KBDILLUMDOWNKEY    keycode     config/query
.br
Get or set keycode used for decreasing keyboard brightness.
.TP
TAG_KBDILLUMDOWNMOD    modifier    config/query
.br
Get or set modifier used with KBDILLUMDOWNKEY.
.TP
TAG_KBDILLUMONKEY      keycode     config/query
.br
Get or set keycode used to switch keyboard illumination on or off.
.TP
TAG_KBDILLUMONMOD      modifier    config/query
.br
Get or set modifier used with KBDILLUMONKEY.
.TP
TAG_KBDBRIGHTNESS      integer     config/query
.br
Get or set current brightness level as percentage.
.TP
TAG_KBDONBRIGHTNESS    integer     config/query
.br
Get or set default ON status brightness level as percentage.
.TP
TAG_KBDAUTOADJUST      bool        config/query
.br
Enable or disable automatic brightness control for the keyboard
illumination.
.TP
TAG_FRAMEBUFFERDEVICE  string      config/query
.br
Get or set the framebuffer device.
.TP
TAG_BLANKFRAMEBUFFER   bool        config/query
.br
Disable or enable framebuffer display blanking. If this option
was enabled the framebuffer would be switched off when the 
backlight goes invisibly dark.
.TP
TAG_DIMFULLYDARK       bool        config/query
.br
Normally the display is dimmed down to minimum level. With this
option set dimming goes down to complete darkness.
.TP
TAG_AMBIENTLIGHT       integer     query
.br
Get the value from the ambient light sensor in percent. This
works only on machines that have an ambient light sensor.
.TP
TAG_AMBIENTTHRESHOLD   integer  config/query
.br
Get or set the threshold for ambient light to activate the 
keyboard illumination.
.TP
TAG_LCDFADINGSPEED     integer     config/query
.br
Set the time in miliseconds a full LCD backlight dim (from lowest
to highest brightness level) should last. Pbbuttonsd will adjust
its internal timing accordingly. A value of '0' disables smooth
brightness changes. 
.PP
.in +7
If this option is queried, pbbuttonsd will return the current
setting of the internal timing. This value may differ from the
originally set value because the timer could only be programmed
with limited precision.
.TP
TAG_KBDFADINGSPEED     integer     config/query
.br
Set the time in miliseconds a full keyboard backlight dim (from
lowest to highest brightness level) should last. Pbbuttonsd will
adjust its internal timing accordingly. A value of '0' disables
smooth brightness changes. 
.PP
.in +7
If this option is queried, pbbuttonsd will return the current
setting of the internal timing. This value may differ from the
originally set value because the timer could only be programmed
with limited precision.
.TP
TAG_MIXERDEVICE        string      config/query
.br
Get or set OSS sound mixer device.
.TP
TAG_MIXERCHANNELS      string      config/query
.br
Get or set a comma separated list of OSS mixer channels
pbbuttonsd should control. Every channel combination is
valid nevertheless the setting makes sense.
.TP
TAG_MIXERCARD          string      config/query
.br
Get or set ALSA sound card
.TP
TAG_MIXERELEMENTS      string      config/query
.br
Get or set a comma separated list of ALSA elements
pbbuttonsd should control. For possible names ask amixer.
.TP
TAG_VOLUMEUPKEY        keycode     config/query
.br
Get or set keycode used for sound volume up.
.TP
TAG_VOLUMEUPMOD        modifier    config/query
.br
Get or set modifier used with VOLUMEUPKEY.
.TP
TAG_VOLUMEDOWNKEY      keycode     config/query
.br
Get or set keycode used for sound volume down.
.TP
TAG_VOLUMEDOWNMOD      modifier    config/query
.br
Get or set modifier used with VOLUMEDOWNKEY.
.TP
TAG_MUTEKEY            keycode     config/query
.br
Get or set keycode used for mute sound volume.
.TP
TAG_MUTEMOD            modifier    config/query
.br
Get or set modifier used with MUTEKEY.
.TP
TAG_MIXERINITDELAY     bool        config/query
.br
Disable or enable the soft start of the mixer. If this option
was enabled the mixer device would be initialized with it's first
use and not immediately after daemon's startup.
.TP
TAG_VOLUME             integer     config/query
.br
Get or set sound volume. The valid value range is from
0 (silent) to 100 (loud). Higher values will be clipped.
.TP
TAG_MUTE               command     config
.br
Mute/unmute the speakers.
.TP
TAG_CDROMDEVICE        string      config/query
.br
Get or set the CDROM device.
.TP
TAG_EJECTCDKEY         keycode     config/query
.br
Get or set keycode used for ejecting the CDROM.
.TP
TAG_EJECTCDMOD         modifier    config/query
.br
Get or set modifier used with EJECTCDKEY.
.TP
TAG_EJECTCDKEYDELAY    bool        config/query
.br
Disable or enable the eject key response delay.
.TP
TAG_SCRIPTPMCS         string      config/query
.br
Get or set the template for the script which would
be called at certain events. This events are change
of power policy, change of power source, change of
suspend state and at emergency condition if battery
is critically low. But the emergency call is only
done, if configured. Up to two '%s' are allowed in
the template and will be replaced by the action and
the power source.
.TP
TAG_IBAMDATADIR        string      config/query
.br
Get or set the IBAM data directory where statistics
about battery charge and discharge cycles are stored.
.br
This option would only be available, if pbbuttonsd
was compiled with IBaM support.
.TP
TAG_SLEEPKEY           keycode     config/query
.br
Get or set the keycode used for triggering sleep mode.
.TP
TAG_SLEEPMOD           modifier    config/query
.br
Get or set the modifier used with SLEEPKEY   
.TP
TAG_SLEEPKEYDELAY      bool        config/query
.br
Disable or enable the sleep key response delay.
.TP
TAG_BWLFIRST           integer     config/query
.br
Get or set time in seconds for the first battery warn
level.
.TP
TAG_BWLSECOND          integer     config/query
.br
Get or set time in seconds for the second battery warn
level.
.TP
TAG_BWLLAST            integer     config/query
.br
Get or set time in seconds for the last battery warn
level.
.TP
TAG_CURRENTBWL         integer     query
.br
Get the current battery warn level.
.TP
TAG_CPULOADSLEEPLOCK   bool        config/query
.br
Disable or enable the CPU sleep lock.
.TP
TAG_CPULOADMIN         integer     config/query
.br
Get or set the minimum CPU load to activate the sleep
lock.
.TP
TAG_CPULOADPERIOD      integer     config/query
.br
Get or set the time in seconds how long the CPU load
have to be dropped below the minimum until the lock
will be released.
.TP
TAG_NETLOADSLEEPLOCK   bool        config/query
.br
Disable or enable the net sleep lock.
.TP
TAG_NETLOADMIN         integer     config/query   
.br
Get or set the minimum net load to activate the sleep
lock.
.TP
TAG_NETLOADPERIOD      integer     config/query
.br
Get or set the time in seconds how long the net load
have to be dropped below the minimum until the lock
will be released.
.TP
TAG_NETLOADDEV         string      config/query
.br
Get or set the network device to be supervised for the
net sleeplock.
.TP
TAG_EMERGENCYACTION    integer     config/query
.br
Get or set the emergency action that should be performed if
battery was running low. Three values are valid: 0=sleep,
1=signal to init and 2=command. All other values are invalid.
.TP
TAG_ONAC_POLICY        integer     config/query
.br
Get or set the power policy that should be activated if 
power source changes to AC. Following values are valid:
0=nochange, 1=powersave, 2=custom and 3=performance.
.TP
TAG_ONAC_TIMERACTION   integer     config/query
.br
Get or set the action that should be performed if a timer
event occurs with active AC profile. The timout value for
this timer event could be set with TAG_ONAC_TIMESUSPEND.
Following values are possible: 0=none, 1=suspend-to-ram,
2=suspend-to-disk, 3=blank screen
.TP
TAG_ONAC_COVERACTION   integer     config/query
.br
Get or set the action that should be performed if the
cover of the laptop was closed with active AC profile.
Following values are possible: 0=none, 1=suspend-to-ram,
2=suspend-to-disk, 3=blank screen
.TP
TAG_ONAC_KEYACTION     integer     config/query
.br
Get or set the action that should be performed if the
sleepkey was triggered with active AC profile. Following
values are possible: 0=none, 1=suspend-to-ram,
2=suspend-to-disk, 3=blank screen
.TP
TAG_ONAC_TIMESUSPEND   integer     config/query
.br
Get or set the time until suspend is triggered. This value
will only be used if AC power profile is active. Set
this value to 0 and suspend timeout is disabled.
.TP
TAG_ONAC_TIMEDIM       integer     config/query
.br
Get or set the time until the backlight would be dimmed.
This value will only be used if AC power profile is active.
Set this value to 0 and screen dimming is disabled.
.TP
TAG_ONBATT_POLICY      integer     config/query
.br
Get or set the power policy that should be activated if 
power source changes to BATTERY. Following values are
valid: 0=nochange, 1=powersave, 2=custom and 3=performance.
.TP
TAG_ONBATT_TIMERACTION integer     config/query
.br
Get or set the action that should be performed if a timer
event occurs with active BATTERY profile. The timout value
for this timer event could be set with TAG_ONBATTERY_TIMESUSPEND.
Following values are possible: 0=none, 1=suspend-to-ram,
2=suspend-to-disk, 3=blank screen
.TP
TAG_ONBATT_COVERACTION integer     config/query
.br
Get or set the action that should be performed if the
cover of the laptop was closed with active BATTERY profile.
Following values are possible: 0=none, 1=suspend-to-ram,
2=suspend-to-disk, 3=blank screen
.TP
TAG_ONBATT_KEYACTION   integer     config/query
.br
Get or set the action that should be performed if the
sleepkey was triggered with active BATTERY profile.
Following values are possible: 0=none, 1=suspend-to-ram,
2=suspend-to-disk, 3=blank screen
.TP
TAG_ONBATT_TIMESUSPEND integer     config/query
.br
Get or set the time until suspend is triggered. This value
will only be used if BATTERY power profile is active. Set
this value to 0 and suspend timeout is disabled.
.TP
TAG_ONBATT_TIMEDIM     integer     config/query
.br
Get or set the time until the backlight would be dimmed.
This value will only be used if BATTERY power profile is
active. Set this value to 0 and screen dimming is disabled.
.TP
TAG_HEARTBEATBEEP      boolean     config/query
.br
Enable or disable the heartbeat beep if the computer is running
with closed lid. 0=disable beep, 1=enable beep.
.TP
TAG_POLICY             integer     config/query
.br
Get or set the current power policy Following values are valid:
0=nochange, 1=powersave, 2=custom and 3=performance.
.TP
TAG_IDENTITY           string      query
.br
Get the machine's identity string.

.SH "SEE ALSO"
pbbuttons.conf (5), showkey (1)

.SH AUTHOR
Matthias Grimm <matthiasgrimm@users.sourceforge.net>.