Xfce Forum

Sub domains
 

You are not logged in.

#1 2020-11-23 07:47:51

h.wurst
Member
Registered: 2020-11-20
Posts: 24

xfce4-timer-plugin, how to get a alarmsound and a notify-send message?

hello there,

i want the "xfce4-timer-plugin" to inform me with a sound and a notification when the time is up.
Unfortunately, this is not working.

I get either a sound OR a notification, but not both together.
I have "libnotifyd" and "xfce4-notifyd" installed (Arch linux with Xfce4.14).

This is what i have configured as standard command:
Bildschirmfoto-2020-11-23-07-39-55.png

When i try to edit the "standard command" to:

paplay /usr/share/sounds/freedesktop/stereo/complete.oga && notify-send foo

I get neither a sound or a notification, when the time is up.


My 2 questions are:

1. What is the right "standard command" to get informed with a sound and a notification?

2. Is it feasible to change the "Biiing!" textmessage of the little window on the left?


Thank you in advance smile

Last edited by h.wurst (2020-11-23 12:59:29)

Offline

#2 2020-11-23 09:37:19

h.wurst
Member
Registered: 2020-11-20
Posts: 24

Re: xfce4-timer-plugin, how to get a alarmsound and a notify-send message?

To solve question 1,
i have written a tiny script named "meal-ready.sh" to execute a configurable notify-send message and a configurable sound alert.

#!/bin/bash
notify-send 'The time for the configured alarm is up' && paplay /usr/share/sounds/freedesktop/stereo/complete.oga

Made it executable and placed it in:

/home/USERNAME/scripts/meal-ready.sh

Changed the "standard command" in the xfce4-timer-plugin settings to:

/home/USERNAME/scripts/meal-ready.sh

Now i get informed by my chosen notify-send message and by my chosen soundfile.


btw:
To play sound alert formats like ogg, flac, mp3 or mp4 you can use this (mpv needs to be installed):

#!/bin/bash
notify-send 'The time for the configured alarm is up' && mpv /path/to/your/sounds/alarmsound.mp3

If you want a scalable volume sound alert:

#!/bin/bash
notify-send 'The time for the configured alarm is up' && pactl -- set-sink-volume 0 +25% && paplay /usr/share/sounds/freedesktop/stereo/complete.oga && pactl -- set-sink-volume 0 -25%

This plays (only) the sound alert with 25% increased volume (Pulseaudio needs to be installed).



So what about question 2...

Does anybody has a hint for me?

Last edited by h.wurst (2020-11-23 13:36:19)

Offline

#3 2020-11-23 11:42:58

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,488

Re: xfce4-timer-plugin, how to get a alarmsound and a notify-send message?

h.wurst wrote:

2. Is it feasible to change the "Biiing!" textmessage of the little window on the left?

It is hard-coded (see: https://git.xfce.org/panel-plugins/xfce … mer.c#n211) and cannot be changed unless you change the code. You can create an enhancement request here.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#4 2020-11-23 12:40:52

h.wurst
Member
Registered: 2020-11-20
Posts: 24

Re: xfce4-timer-plugin, how to get a alarmsound and a notify-send message?

Thank you for the informations ToZ,

dialog_message = g_strdup_printf(_("Beeep! :) \nTime is up for the alarm %s."), alrm->name);
dialog_title = g_strdup_printf("Xfce4 Timer Plugin: %s", alrm->name);

(alrm->name) is this a typo or intention?

Last edited by h.wurst (2020-11-23 13:11:53)

Offline

#5 2020-11-24 00:12:05

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,488

Re: xfce4-timer-plugin, how to get a alarmsound and a notify-send message?

Looks like its intentional: https://git.xfce.org/panel-plugins/xfce … mer.c#n153:

alarm_t *alrm;

Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#6 2020-11-24 09:28:44

h.wurst
Member
Registered: 2020-11-20
Posts: 24

Re: xfce4-timer-plugin, how to get a alarmsound and a notify-send message?

yepp, seems so.

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.011 seconds, 8 queries executed - Memory usage: 539.8 KiB (Peak: 541.08 KiB) ]