You are not logged in.

#1 2011-11-28 04:00:58

engelus
Member
From: Salta - Argentina
Registered: 2011-06-11
Posts: 46

[Help] Notifications in OpenBox with notify-osd-customizable for acpid

Hi people, i am trying to set some notifications when i conect and disconect the AC adapter of my laptop, i created the events like posted in the wiki article for acpid, the problem is that events are taken 3 times.

The Config files are:

#/etc/acpi/events/battery
event=battery.*
action=/etc/acpi/actions/battery.sh "%e"
#!/bin/sh
#/etc/acpi/actions/battery.sh
sleep 5
status=`cat /sys/class/power_supply/BAT0/status`
#notify-send $status
if [[ $status == "Discharging" ]]
        then
                killall cairo-compmgr
                notify-send "Batería Descargandose" -i /home/engelus/.icons/Faenza/status/48/gpm-primary-100.png
else
        cairo-compmgr &
        notify-send "Bateria Cargandose" -i /home/engelus/.icons/Faenza/status/48/gpm-primary-charged.png
fi

The Result are 3 times notification and 3 times cairo-compmgr launched when battery is on AC.

Any Ideas?

Offline

#2 2011-11-28 04:21:21

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: [Help] Notifications in OpenBox with notify-osd-customizable for acpid

Maybe you should check what the actual events being sent are. It sounds like your filter is too broad. If you put "$1" somewhere in the notify-send msg, you'll be able to see what's being passed.

Offline

#3 2011-11-28 04:33:44

engelus
Member
From: Salta - Argentina
Registered: 2011-06-11
Posts: 46

Re: [Help] Notifications in OpenBox with notify-osd-customizable for acpid

if cairo-compmgr is not running $1 show

No summary specified

and with cairo running:

No summary specified.
0,000006: 
0,000078: 
Screen 0 already has a composite manager running, 
try to stop it before run cairo-compmgr
0,004441: ??:0	ccm_log_print_backtrace()
0,004550: ??:0	g_logv()
0,004625: ??:0	g_log()
0,004661: ??:0	ccm_screen_new()
0,004693: ??:0	ccm_display_new()
0,004721: ??:0	ccm_tray_menu_new()
0,004748: ??:0	ccm_tray_icon_new()
0,004775: ??:0	main()
0,004802: ??:0	__libc_start_main()
0,004829: ??:0	_start()

Have same thing no summary specified and the other things i suppose is for another instace of cairo-compmgr

Offline

Board footer

Powered by FluxBB