# Config file for ePlus
# This one is by Rob "CmdrTaco" Malda
# Designed for Obsidian.
#
# <-- ePlus ignores all lines that start with a pound sign.
# Last modified to work with DR8

# THIS SECTION IS REQUIRED!
begin eplus
  # image background color... masked out for shapes 
  maskrgb 255 0 255
  # This is used for anything that needs to be drawn.
  foregroundrgb 37 116 115 
  # napTime is in 100ths of a second.  It defines
  # how long eplus sleeps inbetween redraws.
  # 7=~15Frames per second which is fairly smooth for animation
  napTime 7 

  # This is the first place ePlus looks for each image.
  # This is overrided if you start an image with a '/'
  imageDir /usr/local/enlightenment/lib/eplus
  ontop f

  # Help's background
  helpbg help_bar.ppm
  # Color for text in help-popups
  helprgb 255 255 255
  # Font fot help-popups
  helpfont -*-new century schoolbook-bold-r-*-*-16-*-*-*-*-*-*-*
  # position, where text starts within a help-bubble
  helpxy 10 18
end


# I have Wave first so that when the CD Player
# initializes, it can activate it if you are
# using it.  NOTE:USING WAVE CAUSES EPLUS TO
# FORK!  BIGGER MEMORY CONSUMPTION!
begin wave
  # This isn't fully supported yet.
  # If you click on a wave window, it frees /dev/dsp so
  # you can pipe to device 
  device /dev/raw
  # Location fields define where on screen it appears
  location1 -583 -1
  location2 -342 -1
  background wavebg.ppm
  wavegrid wavegrid.ppm

  # location within the wave windows of the grid
  leftxy 9 8 
  rightxy 9 8 
  wavewh 56 49 
end

# If you comment out any of the following sections,
# it will not be displayed.
begin clock
  # Location of the clock
  location -1 -1
  background eclockbg.ppm

  # military or standard?(15:00 vs. 3:00 p.m.) 
  # Booleans can be T/F, Y/N, Case is irrelevant,
  # and only the first charachter is looked at.
  militarytime false
  # colons between the digits to blink?
  blinkydiv F 

  # each loc is the location of that object inside the clock window
  div1Loc 73 15 
  # div2Loc 87 20 

  monthPic months.ppm
  monthLoc 6 27 

  daysPic dayofweek.ppm
  daysLoc 6 7 

  digitPic digits.ppm
  h1Loc 35 15
  h2Loc 60 15

  m1Loc 100 15
  m2Loc 130 15

  # Comment out any Loc to disable it
  # s1Loc 92 15 
  # s2Loc 106 15 

  # These digits are used for the date.
  smallPic smalldigits.ppm
  daynum1Loc 6 47 
  daynum2Loc 16 47 

  exec rxvt &
end clock
#


# I don't intend to support POP or IMAP, but
# if someone wants to code it...
begin biff
  Location -1 -132
  # Check every 30 seconds.
  napTime 3000
  background sideiconbg.ppm
  biffxy 8 8 
  NewMailPic havemail.ppm
  OldMailPic nomail.ppm
  NoMailPic nomail.ppm
  exec rxvt -name right -e pine &
# MailFile /somewhere/somewhere/bob  

  UsePop f
#-->If you want to use pop, you probably need to edit the Makefile & recompile.
#  Pop_Host your.house.com
#  Pop_UserName me
## If you put a PW here, its a security issue 
#  Pop_Password plaintext 
## time in minutes between checks
#  Pop_Time 5                       

   UseImap f
#-->If you want to use image,you probably need to edit the Makefile & recompile.
#   Imap_Host imap.host.com
#   Imap_UserName myname
## If you put a PW here, its a risk.  At least hide it.
#   Imap_Password mypassword
## time in minutes between checks
#   Imap_Time 5          

end biff

# The Net Device Module has officially consumed the modem
# Module.  Use it instead...
begin netdev 
  Location -162 -1
  # redraw every 2 seconds
  napTime 200
  netdevxy 64 12 
  netdevpic modemoff.ppm
  netdevOHpic modem001.ppm 
  netdevTRpic modem011.ppm
  netdevRXpic modem101.ppm
  netdevTRRXpic modemon.ppm

  # Some systems require these to be run as root.
  Dialexec ppp-on &
  hangupexec ppp-off &

  # This only applies if you want to use ppp* monitoring.
  Lockfile /var/lock/LCK..modem

  # SET THIS to anything other than ppp* to monitor an
  # Ethernet device.  ippp devices should theoretically
  # Function
  netdevdevice ppp0

  background modembg.ppm
  netdevgrid modemgrid.ppm
  trline loadline.ppm
  rxline trline.ppm
  gridtrloc 5 8 
  gridrxloc 123 8 

  # Each time the graph gets updated, what
  # is the max?  I defined this so you can
  # be picky- It should be detectable if anyone
  # wants to write code that'll do it.
  maxbytespernap 7000 
end

begin mixer
  background sideiconbg.ppm
  knobPic knob.ppm
  mixerPic mixer2.ppm
  device /dev/mixer

 # The mixer window
  Location -1 -68

 # Mixer Defines stolen from linux/soundcard.h
 # THESE ARE COMMENTS!  THEY DO NOTHING!
 # define SOUND_MIXER_NRDEVICES   17
 # define SOUND_MIXER_VOLUME      0
 # define SOUND_MIXER_BASS        1
 # define SOUND_MIXER_TREBLE      2
 # define SOUND_MIXER_SYNTH       3
 # define SOUND_MIXER_PCM         4
 # define SOUND_MIXER_SPEAKER     5
 # define SOUND_MIXER_LINE        6
 # define SOUND_MIXER_MIC         7
 # define SOUND_MIXER_CD          8
 # define SOUND_MIXER_IMIX        9
 # define SOUND_MIXER_ALTPCM      10
 # define SOUND_MIXER_RECLEV      11
 # define SOUND_MIXER_IGAIN       12 
 # define SOUND_MIXER_OGAIN       13      

 # A mixer needs 4 paraemters... the Channel (See above,)
 # InitialPercentage and the X Y coords (inside the mixer window)
 # Setting InitialPercentage to -1 causes eplus to just leave it alone,
 # and set to the current value
  mixer 0 70 5 0
  mixer 8 70 25 0
  mixer 4 80 45 0
 # You can define up to MAXMIXERS from emixer.c (Defaults to 3)
end

# The code for load was stole from asload... very
# quickly I might add...
begin load
  background loadbg.ppm
  meterbg loadgrid.ppm
  location -1 -374
  graphxy 7 8 
  linepic loadline.ppm
  syspic trline.ppm
  nicepic blueline.ppm

  # 200 ms=2 seconds
  naptime 200
end

begin cdplayer
  device /dev/cdrom

  background window.ppm
  Location -403 -1
  digits digits.ppm
  
  m1Loc 35 5 
  m2Loc 65 5 

  divLoc 82 5
  s1Loc 110 5
  s2Loc 140 5

  trackDigits smalldigits.ppm
  t1Loc 95 47 
  t2Loc 104 47 

  nextPic next.ppm
  nextLoc 155 47
  
  prevPic prev.ppm
  prevLoc 35 47

  pausePic pause.ppm
  stopPic stop.ppm
  stopLoc 65 47 
  playPic play.ppm
  playLoc 125 47 
  ejectPic eject.ppm

  statusloc 5 6
  statuspic mixer.ppm
  statusknobpic knob.ppm

  # Replay the CD when you hit the end
  autorepeat t

  # Take a guess
  # Remember that booleans can be
  # t/f, True, False, y/n, Yes, No, YES, NO or whatever.
  autoplay yes 
  
  # 0=Current Position in Track 
  # 1=Current Position from end of track
  # 2=Absolute time into the CD
  # 3=Absolute time from the end of the CD. 
  timermode 0
end


# OK, a brief word on efsm: naptime and exec are self-expalinig and as
# used above.
# statfstime specifies the amount of naps between rechecking the fs (1=each 
# redraw is acurate, but that's not necesarry)
begin efsm
  naptime 100
  statfstime 2
  exec mfsm -geometry -90+0 -width 300 -a &

# layouts supported are individual, common_vertical and common_horizontical
# Use individual, I'll write something about the commons in the next realease.
  layout individual

# generate a new fs meter.
# valid parameter for each meter are:
#   orientation          vertical, horizontical        MAND (one)
#   graphxy              int int
#   location             int int                       MAND
#   background           img-file                      MAND
#   meterbg              img-file                      MAND
#   meterbg_inc          img-file
#   meterbg_dec          img-file
#   meterbg_notmounted   img-file
#   green line           img-file                      MAND
#   green limit          int (... ignored, but usefull with other colors)
#   green bar            img-file
#   green option flash
#   green option bell
#   yellow, red, warn  ( ... same as green )
#   addfs                mount-point in filesystem     MUTEX
#   addmem                                             MUTEX
#   addswap                                            MUTEX
#   addcustom          ( see below and /proc/meminfo ) MUTEX
#   help                 text
#
# A word on mem-waste. The first meter must be created with all mandatory
# parameters and ONE of the mutal exclude parameters. After the difinition,
# optional parameters are filled up (if not specified) with the mandatory
# ones. The next meter will acquire all data the previous had, but these
# may of course be overwritten by new resources.
# <COLOR> option bell  is quite unnerving...

  # The Memory Meter
  add meter
    orientation h 
    graphxy 8 6 
    location -1 -291
    background efsm_whole_bg.ppm
    meterbg fsbg_red.ppm
    addmem
    green line efsm_line_warn.ppm
  done

  # The Swap Meter
  add meter
    location -1 -272
    meterbg fsbg_purple.ppm
    addswap
  done

  # And Example Custom Meter
  add meter
    location -1 -253
    meterbg fsbg_blue.ppm
    addcustom 01+34567+ +12345+78
# OK, explanation required for this one. Take a look at the file /proc/meminfo
# and you see nine numbers in the beginning, repesenting Mem (total, used,
# free, shared, buffers, cached) and swap (total, used, free). The first
# field of nine characters represents the actual amount or free space on that
# meter (+ means the number corrosponding to the position will be added to
# the free amount, - substracted), Thus ..+.....+ means: add free mem and free
# swap space.
# The next sequence of nine didgets repesents the 100% limit (total amount),
# thus +.....+.. reads add total mem and total swap space. The meter would
# display free mem (real+swap) in relation to max. avail. space (real+swap)
  done

  add meter
    orientation h 
    location -1 -234
    background efsm_whole_bg.ppm
    meterbg fsbg_aqua.ppm
    meterbg_inc fsbg_aqua_inc.ppm
    meterbg_dec fsbg_aqua_dec.ppm
    meterbg_notmounted fsbg_grey.ppm
    addfs /
    help Yeah, it's root
    green line efsm_line_green.ppm
    yellow line efsm_line_yellow.ppm
    red line efsm_line_red.ppm
    warn line efsm_line_warn.ppm
    warn option flash
  done

  add meter
    location -1 -215
    addfs /usr
  done

  add meter
    location -1 -196
    addfs /home
  done
end




begin eim
  location -1 -310
  background sideiconbg.ppm
  naptime 5
  exec xosview &
  meter_zero irq_grey.ppm
  meter_on irq_blue.ppm
  meter_off irq_purple.ppm
end



# The modules below this line are all by default NOT ACTIVE in
# a default ePlus compile.  YOu need to edit the Imakefile,
# make clean ; make  to get these active!



# This works with my Nec IDE 4x4 IDE CD Changer...
# Should work with all IDE Changers that confirm
# to ATAPI... so the 3 of us who have them can be
# happy...
#begin changer
#  location -1 -439
#  background sideiconbg.ppm
#  # device /dev/cdrom
#  ondisc cdon.ppm
#  offdisc cdoff.ppm
# Just keep adding as many 'disc' entries as you have slots
#  disc 6 8 
#  disc 29 8 
#  disc 6 29 
#  disc 29 29 
#end

# begin section for cmap
# ColorMap is only useful for 8bit displays!
# it will crash higher displays.
#begin cmap
#  background iconbg.ppm
#  Location -1 -301
#  naptime 100
#  # if mapLoc and mapSize are not specified then the module
#  # will build the largest colormap that it can, centered within
#  # the background image
#  # mapLoc specifies the upper lefthand corner of the cmap
#  # within the background image
#  mapLoc 1 1
#  # mapSize specifies the size of the colormap
#  mapSize 64 64
#end

#The following is a list of directives that are valid for use with the eapm
#module (these should look familiar, as it borrows heavily from the efsm code):
#begin eapm
#naptime <value>
#stattime <value> -- like statfstime, indicates how many cycles to wait between
#  queries to /proc/apm... unless you have a really small battery, you can
#  probably set this fairly high :)
#exec <command>
#orientation <horizontal|vertical>
#graphxy <coord> <coord> -- relative position of the battery charge %age meter
#location <coord> <coord>
#background <image>
#meterbg <image> -- background image for the meter proper
#meterbg_inc <image>
#meterbg_dec <image>
#green <line|bar> <image> -- all the same options are available here as with
#  efsm.
#apmbatpic <image> -- default image to use for battery status indication (e.g.,
#  unknown status)
#batcritpic <image> -- image indicating battery power is at critical
#batlowpic <image> -- battery power is low
#bathighpic <image> -- battery power is high
#batchargpic <image> -- battery is currently charging
#  ...yes, this last one is mutex with the rest of them. /proc/apm does let you
#  read simultaneously whether it's charging and the current qualitative state
#  of battery charge, but I figured that'd be a few too many options to choose
#  from. :)
#batloc <coord> <coord>
#apmacpic <image> -- default/unknown indicator for presence of ac power
#apmaconpic <image> -- yes, we have AC power
#apmacoffpic <image> -- no, we don't.
#acloc <coord> <coord>

