You are not logged in.
The devs have been having some discussion about providing an alarm/alert script, and this is one that I have found in the YAD Wiki. I've tweaked some of the paths (icon, sound file, use mpv etc) and added the current time to the layout - it looks promising.
CONS: Even though it adds a notification to the systray, I can't see a way of cancelling the alarm as it stands. Perhaps the PID can be captured and used to kill the process?

#!/bin/bash
#
# Alarm clock for PCLinuxOS
#
# Don't miss important times and events. Turn your computer
# into the perfect wake up system. Set the alarm and get the
# Pizza out of the oven in perfect time.
#
# Author: D.M-Wilhelm (Leiche)
# Email: meisssw01 at gmail.com
# Licence: GPL
# First build: May Wed 11 2011
# Last build: Jul Sun 10 2011
# fixed icon display in systray, move zenity,
# based now on yad.
#
Encoding=UTF-8
#
# i18n - Internationalization - Internationalisierung
#
export TEXTDOMAIN=alert_clock
export TEXTDOMAINDIR="/usr/share/locale"
#
# define some variables - Definierung einiger Variablen
#
TITLE="Alarm Clock"
ICON="/usr/share/icons/Paper/48x48/apps/alarm-clock.png"
#
#question - Frage
#
function menu {
COUNTDOWN=$(yad --entry --text "Time now is $(date +"%H:%m")" --entry-label "Enter minutes until alarm..." --numeric --title="$TITLE" --window-icon=$ICON \
--image=$ICON \
--button=$"Change alarm sound:2" \
--button=$"Test:3" \
--button="gtk-ok:0" \
--button="gtk-close:1" \
)
ret=$?
[[ $ret -eq 1 ]] && exit 0
#
#change sound - Sound ändern
#
if [[ $ret -eq 2 ]]; then
CHANGE=$(yad --title="$TITLE" --window-icon=$ICON \
--file --width=600 --height=500 \
--text=$"<b>Choose your own audio file as alert!</b>
________________________________________________")
if [ -z "$CHANGE" ];then
exec alert_clock
exit 0
else
mkdir $HOME/.config/alert-clock
rm -rf $HOME/.config/alert-clock/alert sleep 1
ln -s "$CHANGE" $HOME/.config/alert-clock/alert
yad --title $"$TITLE" \
--button="gtk-ok:0" \
--width 300 \
--window-icon=$ICON \
--text=$"Your own sound is set!!"
fi
menu
fi
#
#Test sound - Klang testen
#
if [[ $ret -eq 3 ]]; then
if [ -f $HOME/.config/alert-clock/alert ]; then
SOUND="$HOME/.config/alert-clock/alert"
else
SOUND='/usr/share/alert_clock/alarm.ogg'
fi
mpv "$SOUND" | yad --title $"$TITLE" \
--button="gtk-ok:0" \
--width 300 \
--window-icon=$ICON \
--text=$"Exit sound test!!"
killall mpv
menu
fi
}
menu
#
#progress - Prozess
#
if [ "$COUNTDOWN" = "" ];then
exit
else
echo you enter "$COUNTDOWN" minutes
TIMER=$(echo $(($COUNTDOWN*60)))
TASK1=$(date -s "+$TIMER seconds" 2>/dev/null | cut -d " " -f4)
exec 3> >(yad --notification --command=CMD --image=$ICON --listen)
echo tooltip: $"Alarm clock was set to $COUNTDOWN minutes and notifiers at $TASK1!" >&3
sleep $TIMER
exec 3>&-
#
#check wich sound - auf Audio prüfen
#
if [ -f $HOME/.config/alert-clock/alert ]; then
SOUND="$HOME/.config/alert-clock/alert"
else
SOUND='/usr/share/alert_clock/alarm.ogg'
fi
#
#alert output - Alarm Ausgabe
#
(mpv "$SOUND") | yad --title $"$TITLE" \
--button="gtk-ok:0" \
--width 300 --image=$ICON \
--window-icon=$ICON \
--text=$"<b>Time is over!!</b>"
exit;
fi
exitIf anyone would like to polish this, or suggest alternatives, then please do so! ![]()
Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt «» BunsenLabs on DeviantArt
Offline
I do like the gui.
I did notice that there seems to be no way to cancel the sound test without ctrl+c in term, guessing that 'killall mpv' never gets executed.
Anything against using 'at' as back thingy? (It does survive the reboot) and once the timer is set the gui can be closed and forgotten. Also one can set many timers using variety of time formats.
I guess there is no easy way to stop sounds unless premaking player enviroment (pids?, pipe controled mpv?).
Last edited by brontosaurusrex (2019-11-16 00:31:44)
Offline
No objection to at, except it isn't installed in a default BL. It is only 157kb though, but make sure to use --no-install-recommends or a vast amount of libs and mail bloat comes in with it.
Why not post the at script you found here?
Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt «» BunsenLabs on DeviantArt
Offline
beepmein
A cli experiment at how could a simple reminder/alarm thing work (using linux 'at' command).
Usage example:
beepmein 15 # minutes
beepmein --alarm 7:30 # hh:mm
beepmein --help # for moreAnd will ask for reason, which you can provide or skip by pressing return.
edit, test playback and notifications, kill playback
beepmein --reaction "woot"
beepmein --reaction --alarm "alarm" & sleep 12 && killall beepmein
killall beepmein # to stop playbackCons: 'at' doesn't use seconds, it will round to full minute, so your 'beepmein 1' may happen sooner than you think.
Last edited by brontosaurusrex (2019-11-17 09:04:58)
Offline
In the yad script, the tray icon can be dismissed by middle-clicking, but the child process for the timer keeps on going ![]()
I don't know enough about exec redirects to kill the zombie! 8o
Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt «» BunsenLabs on DeviantArt
Offline
@misko_2083
Clever stuff! Couple of issues though:
The tooltips text isn't displaying (I had the same problem when experimenting with pipes);
Killing the yad systray notification causes the alarm to sound immediately. The script should exit before mpv "$SOUND" runs.
Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt «» BunsenLabs on DeviantArt
Offline
I've added the tweaks, and the script shuts down gracefully ![]()
Since a middle mouse button isn't universal, and needs to be set up for a trackpad, I've found a way to use the left button to achieve the same thing (which is probably more natural anyway).
This is the relevant section:
# add handler for tray icon left click
function on_click() {
xdotool click 2
}
export -f on_click
if [ "$COUNTDOWN" = "" ];then
exit
else
echo You entered "${COUNTDOWN%"|"*}" minutes
TIMER=$(echo $((${COUNTDOWN%"|"*}*60)))
TASK1=$(date -s "+$TIMER seconds" 2>/dev/null | cut -d " " -f4)
temp=$(mktemp -u --tmpdir alarm.XXXXXXXX)
mkfifo $temp
exec 3<> $temp
timeout --preserve-status $TIMER yad --notification --command="bash -c on_click" --image=$ICON --listen <&3 & _pid=$!
echo "tooltip:Alarm clock is set to sound at $TASK1\n\nLeft click to cancel alarm" >&3
wait $_pid
[ $? -eq 252 ] && rm -f $temp && exit
rm $temp
exec 3>&-
#Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt «» BunsenLabs on DeviantArt
Offline
misko_2083: Nice, will fix it.
Last edited by brontosaurusrex (2019-11-16 12:50:47)
Offline
And I 'fixed' my versions internal beep and added --alarm switch (getting somehow messy code). Also removed 'flite' experiments.
So now one can:
beepmein 1 # to get internal beep (reminder)
beepmein --alarm 1 # to get mpv playing preconfigured sample and internal beep (alarm)test-s:
beepmein --reaction "Reminder test"
beepmein --reaction --alarm "Alarm test" Last edited by brontosaurusrex (2019-11-16 12:52:13)
Offline
for ((i=1; i<=10; i++)); do for ((c=1;c<=3;c++)); do timeout -s HUP 0.2 speaker-test -t sine -f 3000 > /dev/null 2>&1 sleep 0.2 done sleep 1 done
Nice and annoying at the same time ![]()
Offline
...
There is a special command "quit".quit Exit the program. Middle click on icon also send quit command.Return status is 0 when it's called, even with the right click menu.
timeout --preserve-status $TIMER yad --notification --listen <&3 & _pid=$! echo tooltip: $"Alarm clock was set to ${COUNTDOWN%"|"*} minutes \nand notifiers at $TASK1!" >&3 echo "action:quit" >&3 echo "menu:About!yad --about!gtk-info|Quit!quit!gtk-exit" >&3 echo "icon:${ICON}" >&3 wait $_pid [[ $? -eq 0 || $? -eq 252 ]] && rm $temp && exit
I had tried the quit command, but it seems that the return codes test is the secret sauce! You are a yad ninja {) ![]()
Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt «» BunsenLabs on DeviantArt
Offline
^ I'd vote for the first one. Can you tell me (us) how you set this window-title ?
naik --greetz
"Kaum macht [Mensch]* es richtig, funktioniert es sofort!"
BL-Kitchen Codeberg
Offline
...
@damo The time is incorrect"Time now is $(date +"%H:%m")""m" is for month, "M" for minutes.
...
Yes I caught that, and I'm now using
%R 24-hour hour and minute; same as %H:%MI was thinking about displaying the current time in the dialog.
One way is to use wmctrl to change the title and the other one in to use the paned dialog.
https://i.imgur.com/NcnvZxH.gif
Which one is better?
The first is nicer ![]()
----------------------------------------------------
I've done some tidying and polishing, and included a notify-send option for the notification as well. There is a minimum value of 1 sec for the entry box, since a val of zero makes no sense.


#!/bin/bash
#
# Alarm clock script using YAD dialog
#
# Author: D.M-Wilhelm (Leiche)
# Email: meisssw01 at gmail.com
# Licence: GPL
#
# Updated and tweaked by @misko_2083 and @damo, of the Bunsenlabs community
# November 2019
#
########################################################################
Encoding=UTF-8
#
# i18n - Internationalization
export TEXTDOMAIN=alert_clock
export TEXTDOMAINDIR="/usr/share/locale"
#
# define some variables
#
TITLE="Alarm Clock"
ICON="/usr/share/icons/Paper/48x48/apps/alarm-clock.png"
SOUNDFILE="/usr/share/sounds/freedesktop/stereo/alarm-clock-elapsed.oga"
### main dialog ###
function menu {
COUNTDOWN=$(yad --form --align=right \
--text "\n\t\t\tTime now is <span><big><b>$(date +"%R")</b></big></span>" \
--field "\t\t\tEnter minutes until alarm...":NUM 1!1..12000!1 \
--title="$TITLE" --window-icon=$ICON \
--image=$ICON \
--button="Change alarm sound:2" \
--button="Test:3" \
--button="gtk-ok:0" \
--button="gtk-cancel:1" \
)
ret=$?
COUNTDOWN="${COUNTDOWN%"|"*}"
[[ $ret -eq 1 ]] && exit 0
#
### Change sound dialog ###
#
if [[ $ret -eq 2 ]]; then
CHANGE=$(yad --title="$TITLE" --window-icon=$ICON \
--file --width=600 --height=500 \
--filename="/usr/share/sounds/" \
--text="\n\t<b>Choose an audio file for the alert</b>\n") 2>/dev/null
if [ -z "$CHANGE" ];then
exec alert_clock 2>/dev/null
exit 0
else
mkdir -p "$HOME/.config/alert-clock"
rm -rf "$HOME/.config/alert-clock/alert"
sleep 1
ln -s "$CHANGE" "$HOME/.config/alert-clock/alert"
yad --title "$TITLE" \
--button="gtk-ok:0" \
--width 300 \
--window-icon=$ICON \
--text="Your own sound is set"
fi
menu
fi
#
### Test sound dialog ###
#
if [[ $ret -eq 3 ]]; then
if [ -f $HOME/.config/alert-clock/alert ]; then
SOUND="$HOME/.config/alert-clock/alert"
else
SOUND='/usr/share/alert_clock/alarm.ogg'
fi
mpv "$SOUND" | yad --title "$TITLE" \
--button="gtk-ok:0" \
--width 300 \
--window-icon=$ICON \
--text="...Exit sound test"
killall mpv
menu
fi
}
menu
[[ "$COUNTDOWN" == 1 ]] && MINS="minute" || MINS="minutes"
if [ -z "$COUNTDOWN" ];then
exit
else
echo You entered "$COUNTDOWN $MINS"
TIMER=$(echo $((COUNTDOWN*60)))
TASK1=$(date -s "+$TIMER seconds" 2>/dev/null | cut -d " " -f4)
temp=$(mktemp -u --tmpdir alarm.XXXXXXXX)
mkfifo $temp
exec 3<> $temp
timeout --preserve-status $TIMER yad --notification --listen <&3 & _pid=$!
echo tooltip: "\nAlarm clock was set to <span><big><b>$COUNTDOWN</b></big></span> $MINS \
\n\nAlarm will be at <span><big><b>$TASK1</b></big></span> \
\n\nLMB or MMB to quit, RMB for menu" >&3
echo "action:quit" >&3
echo "menu:About!yad --about!gtk-info|Quit!quit!gtk-exit" >&3
echo "icon:${ICON}" >&3
wait $_pid
[[ $? -eq 0 || $? -eq 252 ]] && rm $temp && exit
rm $temp
exec 3>&-
#check which sound
#
if [ -f $HOME/.config/alert-clock/alert ]; then
SOUND="$HOME/.config/alert-clock/alert"
else
SOUND="$SOUNDFILE"
fi
#
#alert output Comment/Uncomment choice below...
#
### Using YAD ###
#(mpv "$SOUND") | yad --title "$TITLE" --undecorated \
#--no-buttons --sticky --escape-ok \
#--width 300 --image=$ICON \
#--window-icon="$ICON" \
#--timeout=10 \
#--text="\n\t<span><big><b>Time is up!</b></big></span>"
#exit;
### Using notify-send ###
mpv "$SOUND" &
notify-send -t 10000 -i "$ICON" "Time is up! "
exit
###
fi
exitLast edited by damo (2019-11-16 23:39:14)
Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt «» BunsenLabs on DeviantArt
Offline
@Damo check out my avatar
Ninjaaaa ![]()
Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt «» BunsenLabs on DeviantArt
Offline
The more annoying the easier to get up.
I added it as --alarm fail-safe if you don't mind?
Loud thinkering
Not sure if its the correct fail-safe behavior thought.
if [[ -f "$alarmSample" ]] && command -v mpv >/dev/null 2>&1 ; then
mpv --no-resume-playback --no-video "$alarmSample"
else
alarmfailsafe
fibecause it appears I don't want
mpv --no-resume-playback --no-video "$alarmSample" || alarmfailsafesince that will jump to alarmfailsafe in case of users 'killall mpv'. Unless I invent some sort of trap
trap 'kill $(jobs -p) >/dev/null 2>&1' EXITand user may now 'killall beepmein' to stop mpv playback and/or internal beep-ing.
end loud thinkering, and uploaded the latest version with 'trap' inside.
Sox experiment, example from man
/usr/bin/play -n synth pl G2 pl B2 pl D3 pl G3 pl D4 pl G4 \
delay 0 .05 .1 .15 .2 .25 remix - fade 0 4 .1 norm -1 > /dev/null 2>&1Last edited by brontosaurusrex (2019-11-17 03:30:36)
Offline
This all looks very promising!
One request: can we drop the mpv dependency? It's not in BL by default. Just to play a sound file, any media player would work, no? So substitute bl-media-player?
OTOH if you don't want a big bloated GUI coming up just to play a sound, then I think aplay should be on every system, and can play a wav file. If the sound's not too long - or can be repeated - then the file won't be that big.
...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )
Offline
@johnraff,
From what I gathered so far (and i can only talk about my script)
- 'at' event seems to fail when x stuff (gui) is supposed to launch (hopefully alarmfailsafe fixes that to some amount), so if bl-media-player presents a gui, i guess that will fail as well
- aplay will happily play mp3 file as well (as some sort of white noise)
- I guess the chain could be mpv || cvlc || someFailSafe internal beep
Last edited by brontosaurusrex (2019-11-17 03:39:44)
Offline
This all looks very promising!
One request: can we drop the mpv dependency? It's not in BL by default. Just to play a sound file, any media player would work, no? So substitute bl-media-player?
OTOH if you don't want a big bloated GUI coming up just to play a sound, then I think aplay should be on every system, and can play a wav file. If the sound's not too long - or can be repeated - then the file won't be that big.
I've just tried, and the script as-is doesn't show a gui with mpv - the sound just plays.
No gui with...
mpv "$SOUND"But using bl-media-player (which for me links to bl-mpv) it does. Is that because it has --profile= bl-pseudo-gui?
And aplay doesn't play all formats ![]()
EDIT: The YAD file dialog can have filters to only display certain filetypes. Maybe that can be used so that only aplay-compatible soundfiles are used?
Last edited by damo (2019-11-17 04:07:17)
Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt «» BunsenLabs on DeviantArt
Offline
No gui with...
mpv "$SOUND"
Tricky, it will gui if the file has some sort of cover art embedded. mpv --no-video seems to work.
Last edited by brontosaurusrex (2019-11-17 04:06:54)
Offline
This is where I've got to so far:
I incorporated misko's titlebar timer into the script - nice one ![]()
I also added some tests, and the option to use YAD or notify-send for the desktop alert.

[NB If you use a different name for the script, then there are several places in the code where it needs to match]
#!/bin/bash
#
# alert_clock: an Alarm Clock script using YAD dialog
#
# Author: D.M-Wilhelm (Leiche)
# Email: meisssw01 at gmail.com
# Licence: GPL
#
# Updated and enhanced by @misko_2083 and @damo, of the Bunsenlabs community
# November 2019
#
########################################################################
Encoding=UTF-8
#
# i18n - Internationalization
export TEXTDOMAIN=alert_clock
export TEXTDOMAINDIR="/usr/share/locale"
#
# define some variables
#
TITLE="Alarm Clock"
ICON="/usr/share/icons/Papirus/64x64/apps/alarm-clock.svg"
#ICON="/usr/share/icons/Paper/48x48/apps/alarm-clock.png"
SOUNDFILE="/usr/share/sounds/freedesktop/stereo/alarm-clock-elapsed.oga"
# Choose whether to use YAD dialog or system notification for Alarm alert
ALERT="YAD_ALERT"
#ALERT="SYSTEM_ALERT"
win_class="timer_class"
### Check default icon and sound file ###
[[ ! -f "$ICON" ]] && echo "$ICON not found"
[[ ! -f "$SOUNDFILE" ]] && echo "Default soundfile, $SOUNDFILE, not found"
### Test for mpv player
if ! hash mpv; then
echo "$0: mpv binary is missing. Please issue 'sudo apt-get install mpv'." >&2
exit 1
fi
#--------------------
# change title to current time
#--------------------
function change_title {
declare yad_xid
# need some time to register window class with X
while [[ ${yad_xid} == "" ]]; do
# get Xwindow id
yad_xid="$(wmctrl -lx | grep -e "yad.${win_class}" | grep -oE "[0-9a-z]{10}")"
done
# convert to decimal number
yad_xid="$(echo $((${yad_xid})))"
while true
do
wmctrl -i -r "${yad_xid}" -N "$TITLE : $(date '+%T')" 2>/dev/null || break
sleep 1
done
}
### main dialog ###
function menu {
change_title &
MAX_MINUTES=12000
COUNTDOWN=$(yad --class="${win_class}" --title="$TITLE : $(date '+%T')" \
--window-icon="$ICON" \
--image="$ICON" \
--borders=15 \
--button="Change alarm sound:2" \
--button="Test:3" \
--button="gtk-ok:0" \
--button="gtk-cancel:1" \
--height=180 \
--form --align=right --center \
--field "\tEnter minutes until alarm...\t\n \
\t(1-$MAX_MINUTES)":NUM "1!1..$MAX_MINUTES")
ret=$?
COUNTDOWN="${COUNTDOWN%"|"*}"
[[ $ret -eq 1 ]] && exit 0
#
### Change sound dialog ###
#
if [[ $ret -eq 2 ]]; then
CHANGE=$(yad --title="$TITLE" --window-icon=$ICON \
--file --width=600 --height=500 --center \
--button="gtk-ok:0" --button="gtk-cancel:1" \
--filename="/usr/share/sounds/" \
--text="\n\t<b>Choose an audio file for the alert</b>\n")
if [ -z "$CHANGE" ];then
exec alert_clock
exit 0
else
# check soundfile exists
if [ -f "$CHANGE" ];then
mkdir -p "$HOME/.config/alert-clock"
rm -rf "$HOME/.config/alert-clock/alert"
sleep 1
ln -s "$CHANGE" "$HOME/.config/alert-clock/alert"
yad --title "$TITLE" \
--button="gtk-ok:0" \
--width 300 --borders=15 --center \
--window-icon="$ICON" \
--text="\nAlarm sound now in use is:\n\n<i>$CHANGE</i>"
else
yad --title "$TITLE" \
--button="gtk-ok:0" \
--width 350 --borders=15 --center \
--window-icon="$ICON" --image-on-top \
--image="gtk-dialog-warning" \
--text="\t<big>You need to choose a\n\tsound file!</big>"
exec alert_clock
exit
fi
fi
menu
fi
#
### Test sound dialog ###
#
if [[ $ret -eq 3 ]]; then
if [ -f $HOME/.config/alert-clock/alert ]; then
SOUND="$HOME/.config/alert-clock/alert"
else
SOUND="$SOUNDFILE"
fi
mpv --no-video "$SOUND" | yad --title "$TITLE" \
--button="gtk-ok:0" \
--width 300 --center --borders=15 \
--window-icon="$ICON" \
--text="\n\t...Exit sound test"
# killall mpv
pkill -xf "mpv --no-video $SOUND"
menu
fi
}
menu
[[ "$COUNTDOWN" == 1 ]] && MINS="minute" || MINS="minutes"
if [ -z "$COUNTDOWN" ];then
exit
else
echo You entered "$COUNTDOWN $MINS"
TIMER=$(echo $((COUNTDOWN*60)))
TASK1=$(date -s "+$TIMER seconds" 2>/dev/null | cut -d " " -f4)
temp=$(mktemp -u --tmpdir alarm.XXXXXXXX)
mkfifo $temp
exec 3<> $temp
timeout --preserve-status $TIMER yad --notification --listen <&3 & _pid=$!
echo tooltip: "\nAlarm clock was set to <big><b>$COUNTDOWN</b></big> $MINS \
\n\nAlarm will be at <big><b>$TASK1</b></big> \
\n\nLMB or MMB to quit, RMB for menu" >&3
echo "action:quit" >&3
echo "menu:About!yad --about!gtk-info|Quit!quit!gtk-exit" >&3
echo "icon:${ICON}" >&3
wait $_pid
[[ $? -eq 0 || $? -eq 252 ]] && rm $temp && exit
rm $temp
exec 3>&-
#check which sound
#
if [ -f "$HOME/.config/alert-clock/alert" ]; then
SOUND="$HOME/.config/alert-clock/alert"
else
SOUND="$SOUNDFILE" # use default soundfile
fi
if [ "$ALERT" == "YAD_ALERT" ];then
### Using YAD ##########
(mpv --no-video "$SOUND") | yad --title "$TITLE" --undecorated --center \
--no-buttons --sticky --escape-ok --on-top \
--width 300 --image="$ICON" \
--window-icon="$ICON" \
--borders=15 \
--timeout=10 \
--text="\n\t<big><b>Time is up!</b></big>"
exit
else
### Using notify-send ###
mpv --no-video "$SOUND" &
notify-send -i "$ICON" "Time is up! "
exit
fi
fi
exitI don't like the killall mpv command though - it would be a bummer if something else was playing at the same time. Maybe use pkill -xf instead?
EDIT: now using instead...
pkill -xf "mpv --no-video $SOUND"EDIT2: If aplay is used, we can have --file-filter="sounds|*.wav" in the file chooser, to only display wav files ![]()
Last edited by damo (2019-11-17 04:49:04)
Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt «» BunsenLabs on DeviantArt
Offline