Help systemd-sleep script!

view story

https://bbs.archlinux.org – Hi!I'm trying to make a script that put my pidgin state on offline, before suspending/hibernating, then available, after resume. I have purple-remote installed, so i was guessing something like this *should* work:#!/bin/bash # if(pidof pidgin) then case $1 in pre) su federico -c "purple-remote setstatus?status=offline" ;; post) su federico -c "purple-remote setstatus?status=available" ;; esac fiJournalctl returns:Sep 11 12:37:10 arch systemd-sleep[5100]: Suspending system... Sep 11 12:37:15 arch systemd-sleep[5100]: System resumed. Sep 11 12:37:15 arch (HowTos)