1 # This plugin provides a wrapper around the "wakeonlan" tool available from most
 
   2 # distributions' package repositories, or from the following website:
 
   4 # http://gsd.di.uminho.pt/jpo/software/wakeonlan/
 
   6 # In order to use this wrapper, create the ~/.wakeonlan directory, and place in
 
   7 # that directory one file for each device you would like to be able to wake. Give
 
   8 # the file a name that describes the device, such as its hostname. Each file
 
   9 # should contain a line with the mac address of the target device and the network
 
  12 # For instance, there might be a file ~/.wakeonlan/leto with the following
 
  15 # 00:11:22:33:44:55:66 192.168.0.255
 
  17 # To wake that device, use the following command:
 
  21 # The available device names will be autocompleted, so:
 
  25 # ...will suggest "leto", along with any other configuration files that were
 
  26 # placed in the ~/.wakeonlan directory.
 
  28 # For more information regarding the configuration file format, check the
 
  32   local config_file="$XDG_CONFIG_HOME/wakeonlan/$1"
 
  33   if [[ ! -f "$config_file" ]]; then
 
  34     echo "ERROR: There is no configuration file at \"$config_file\"."
 
  38   if (( ! $+commands[wol] )); then
 
  39     echo "ERROR: Can't find \"wol\".  Are you sure it's installed?"