Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #
- WindowTitle {FvwmInfo}
- WindowSize 76 120
- WindowPosition 0 0
- Font "xft:liberation sans:pixelsize=18:lang=ru"
- Colorset 0
- # init
- Init
- Begin
- Set $date0 = ( GetOutput { exec date '+%H:%M' } 1 -1 )
- Set $date1 = ( GetOutput { exec date '+%w %d.%m' } 1 -1 )
- Set $batt0 = ( GetOutput { exec cat /sys/class/power_supply/BAT1/capacity } 1 -1 )
- Set $batt1 = ( GetOutput { exec cat /sys/class/power_supply/BAT1/status|sed 's/Charging/+/;s/Discharging/-/;s/Full/=/;s/Unknown/~/' } 1 -1 )
- Set $batt = $batt0{%}$batt1
- #Set $mus = ( GetOutput { exec mpc current -f "[%artist% - ]%title%|%file%" | tr '()-' '??:' | cut -c1-69 } 1 -1 )
- Set $snd0 = ( GetOutput { exec amixer sget Master | sed -n '5p' | sed 's/\].*//;s/.*\[//' } 1 -1 )
- Set $snd1 = ( GetOutput { exec amixer sget Master | sed -n '5p' | sed 's/.*\ \[//;s/\]//;s/on/l/;s/off/m/' } 1 -1 )
- Set $snd = $snd0{}$snd1
- Set $stat = ( GetOutput { exec xkb-switch|cut -c 1-2 } 1 -1 )
- Set $bkl = ( GetOutput { exec xbacklight | cut -d '.' -f 1 } 1 -1 )
- ChangeTitle 1 $date0
- ChangeTitle 2 $date1
- ChangeTitle 3 $batt
- ChangeTitle 5 $snd
- ChangeTitle 6 $stat
- ChangeTitle 4 $bkl
- Set $old_date0 = $date0
- Set $old_date1 = $date1
- Set $old_batt = $batt
- Set $old_snd = $snd
- Set $old_stat = $stat
- Set $old_bkl = $bkl
- End
- # periodic
- PeriodicTasks
- Begin
- If (RemainderOfDiv (GetTime) 1)==0 Then
- Begin
- Set $date0 = ( GetOutput { exec date '+%H:%M' } 1 -1 )
- Set $date1 = ( GetOutput { exec date '+%w %d.%m' } 1 -1 )
- Set $batt0 = ( GetOutput { exec cat /sys/class/power_supply/BAT1/capacity } 1 -1 )
- Set $batt1 = ( GetOutput { exec cat /sys/class/power_supply/BAT1/status|sed 's/Charging/+/;s/Discharging/-/;s/Full/=/;s/Unknown/~/'} 1 -1 )
- Set $batt = $batt0{%}$batt1
- #Set $mus = ( GetOutput { exec mpc current -f "[%artist% - ]%title%|%file%" | tr '()-' '??:' | cut -c1-69 } 1 -1 )
- Set $snd0 = ( GetOutput { exec amixer sget Master | sed -n '5p' | sed 's/\].*//;s/.*\[//' } 1 -1 )
- Set $snd1 = ( GetOutput { exec amixer sget Master | sed -n '5p' | sed 's/.*\ \[//;s/\]//;s/on/l/;s/off/m/' } 1 -1 )
- Set $snd = $snd0{}$snd1
- Set $stat = ( GetOutput { exec xkb-switch|cut -c 1-2 } 1 -1 )
- Set $bkl = ( GetOutput { exec xbacklight | cut -d '.' -f 1 } 1 -1 )
- If $date0 <> $old_date0 Then
- Begin
- ChangeTitle 1 $date0
- Set $old_date0 = $date0
- End
- If $date1 <> $old_date1 Then
- Begin
- ChangeTitle 2 $date1
- Set $old_date1 = $date1
- End
- If $batt <> $old_batt Then
- Begin
- ChangeTitle 3 $batt
- Set $old_batt = $batt
- End
- If $snd <> $old_snd Then
- Begin
- ChangeTitle 5 $snd
- Set $old_snd = $snd
- End
- If $stat <> $old_stat Then
- Begin
- ChangeTitle 6 $stat
- Set $old_stat = $stat
- End
- If $bkl <> $old_bkl Then
- Begin
- ChangeTitle 4 $bkl
- Set $old_bkl = $bkl
- End
- End
- End
- # widget
- Widget 1
- Property
- Type ItemDraw
- Size 76 20
- Position 0 0
- Flags Center NoReliefString
- Title {}
- End
- Widget 2
- Property
- Type ItemDraw
- Size 76 20
- Position 0 20
- Flags Center NoReliefString
- Title {}
- End
- Widget 3
- Property
- Type ItemDraw
- Size 76 20
- Position 0 40
- Flags Center NoReliefString
- Title {}
- End
- Widget 4
- Property
- Type ItemDraw
- Size 76 20
- Position 0 60
- Flags Center NoReliefString
- Title {}
- End
- Widget 5
- Property
- Type ItemDraw
- Size 76 20
- Position 0 80
- Flags Center NoReliefString
- Title {}
- End
- Widget 6
- Property
- Type ItemDraw
- Size 76 20
- Position 0 100
- Flags Center NoReliefString
- Title {}
- End
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement