aboutsummaryrefslogtreecommitdiff
path: root/fvwm/.fvwm/fvwmscript/FvwmScript-ACPIStatus
blob: a9daa8b80c4ed6741d8cc2b554a09a5c151e2334 (plain)
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
WindowTitle {ACPIStatus}
WindowSize  120 35
Font "xft:Iosevka Comfy:size=14"

Init
 Begin
  Set $Battery = (GetOutput {exec acpi | sed -e 's/^.*, \([0-9]*\)%.*$/\1%/g'} 1 -1)

  ChangeTitle 1 $Battery
End

PeriodicTasks
 Begin
  If (RemainderOfDiv (GetTime) 60)==0 Then
  Begin
   Set $Battery = (GetOutput {exec acpi | sed -e 's/^.*, \([0-9]*\)%.*$/\1%/g'} 1 -1)

   ChangeTitle 1 $Battery
  End
End

Widget 1
Property
 Position 0 0
 Size 120 20
 Font "xft:Iosevka Comfy:size=14"
 Type ItemDraw
 Flags NoReliefString
 Title {}
Main
 Case message of
  SingleClic :
  Begin
  End
End