# this file complements /etc/fdpowermon/theme.cfg

sub suspend {
       system("sudo pm-suspend");
}

# we extend the default theme in /etc/fdpowermon/theme.cfg
my $theme = fdpowermon::theme::get_theme("default");

# on the first discharge event (0 = first in the index, "d" for discharge), call the suspend function defined above
$theme->set_event(0, \&suspend, 'd');
