I use a script with parameters.


Code:
--------------------
    # triggerhappy.conf
  # values for key events are 1 (pressed), 0 (released) or 2 (held)
  # /dev/input/by-id/usb-Burr-Brown_from_TI_USB_Audio_DAC-event-if02
  KEY_MIN_INTERESTING     1       /mnt/mmcblk0p2/tce/lmscmd pause
  KEY_VOLUMEUP            1       /mnt/mmcblk0p2/tce/lmscmd "mixer volume +1.0"
  KEY_VOLUMEDOWN          1       /mnt/mmcblk0p2/tce/lmscmd "mixer volume -1.0"
  
--------------------



Code:
--------------------
    #!/bin/bash
  # lmscmd
  
  # Player MAC address
  SSMAC=01:02:03:04:05:06
  
  # Replace : with %3A in MAC address
  MAC=`echo -n ${SSMAC} | tr '[:upper:]' '[:lower:]' | sed 's/:/%3A/g'`
  
  # Exit if empty
  if [ -z ${MAC} ]; then
  echo "MAC Empty"
  exit
  fi
  
  SSHOST=localhost
  SSTCP="/dev/tcp/$SSHOST/9090"
  
  exec 8<>${SSTCP}
  echo -e "$MAC $1\r\nexit\r\n" >&8
  RESPONSE=`cat <&8`
  
--------------------



Ralphy

*1*-Touch, *5*-Classics, *3*-Booms, *1*-UE Radio
'Squeezebox client builds'
(https://sourceforge.net/projects/lmsclients/files/) 'donations'
(https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=LL5P6365KQEXN&lc=CA&item_name=Squeezebox%20client%20builds&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHosted)
always appreciated.
------------------------------------------------------------------------
ralphy's Profile: http://forums.slimdevices.com/member.php?userid=3484
View this thread: http://forums.slimdevices.com/showthread.php?t=108852

_______________________________________________
unix mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/unix

Reply via email to