SHARE
TWEET

Untitled

a guest Jun 19th, 2017 50 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. WindowTitle {Media Player}
  2. WindowSize 500 115
  3. WindowPosition 1021 253
  4. ForeColor {White}
  5. BackColor {Black}
  6.  
  7. Init
  8.  Begin
  9.   Set $MusicDir=/home/matt/mp3/
  10.   Set $getfiles={/home/muser/.fvwm/Scripts/listsongs.sh}
  11.   Set $SongList=(GetOutput $getfiles 1 -1)
  12.  End
  13. PeriodicTasks
  14.  Begin
  15.   If (RemainderOfDiv (GetTime) 200)==0 Then
  16.    Set $I=2
  17.    Set $SongList
  18.    While (GetOutput $getfiles $I -1) <> {} Do
  19.     Begin
  20.     Set $SongList=$SongList {|} (GetOutput $getfiles $I -1)
  21.     Set $I=(Add $I 1)
  22.     End
  23.    ChangeTitle 1 $SongList
  24.  End
  25.  
  26. Widget 1
  27. Property
  28.  Position 4 3
  29.  Flags NoReliefString
  30.  Font 10x20
  31.  Size 380 90
  32.  HilightColor {SkyBlue}
  33.  Type List
  34.  Title {}
  35. Main
  36.  Case message of
  37.   ScrollUp :
  38.    Begin
  39.      ChangeValue 1 (Add (GetValue 1) 1)
  40.    End
  41.   ScrollDown:
  42.    Begin
  43.    End
  44. End
  45.  
  46. Widget 2
  47. Property
  48.  Type PushButton
  49.  Title {Play}
  50.  Flags NoReliefString
  51.  Size 20 20
  52.  Position 400 40
  53. Main
  54.  Case message of
  55.   SingleClic :
  56.    Begin
  57.    Set $SELECTION=(GetOutput $getfiles (GetValue 1) -1)
  58.    Set $play={Exec exec xterm -e /usr/local/bin/mplayer.sh /home/matt/muser/} $SELECTION
  59.    Do $play
  60.    End
  61.  End
RAW Paste Data
Top