You are not logged in.

#1 2017-10-24 21:09:04

Batou
Member
Registered: 2017-01-03
Posts: 262

Reliable timer/alarm application? (GTK preferred)

Hi all,

I've been looking for a while for a reliable timer or alarm clock application. Basically, I'd like something that can pop a window/notification dialog and play a sound at specified date & time. I've tried alarm-clock but it's an incredibly buggy and unreliable application that has lost me 2 alarms so far.

Anyone know of something that works well? I'm using Cinnamon if it matters...

Thanks so much!

Last edited by Batou (2017-10-24 21:09:19)


Please vote for all the AUR packages you're using. You can mass-vote for all of them by doing: "pacman -Qqm | xargs aurvote -v" (make sure to run "aurvote --configure"  first)

Offline

#2 2017-10-25 12:41:49

emak
Member
Registered: 2012-03-20
Posts: 32

Re: Reliable timer/alarm application? (GTK preferred)

Hi

Maybe not fully what you want but I have a shell function added in my ~/.bashrc which allows me to run "teatimer <countdown-time-with-unit>" e.g.

$ teatimer 5m

which then plays a song after countdown reached and pop up a notify window. Add the text below to your .bashrc and reload it by

$ source ~/.bashrc:

teatimer() {
         sleep $1;
         mplayer "$HOME/music/<sound-to-play.mp3>"  & notify-send '!! Coffee Time - wake up !!';
         exit
}

Offline

#3 2017-10-25 18:20:10

Batou
Member
Registered: 2017-01-03
Posts: 262

Re: Reliable timer/alarm application? (GTK preferred)

emak, neat! I still need something that has a way to list/edit all the timers/alarms and set them based on date and time together. But your solution is perfect as a quick timer! I'll use it for that. Thank you!


Please vote for all the AUR packages you're using. You can mass-vote for all of them by doing: "pacman -Qqm | xargs aurvote -v" (make sure to run "aurvote --configure"  first)

Offline

#4 2017-10-25 18:46:02

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: Reliable timer/alarm application? (GTK preferred)

systemd timers can play alerts based on a variety of datetime descriptions, and listed with systemctl. Although it isn't a GUI, I think it works pretty well. wink


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#5 2017-10-25 22:10:09

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,129

Re: Reliable timer/alarm application? (GTK preferred)

And there's always atd and crond.
systemd timers feel clumsy for on-the-fly jobs. You've to generate two files, reload the entire user systemd and cleanup files afterwards. (I've not researched ways to improve this, though - maybe this can be done better)

Offline

#6 2017-10-26 00:08:40

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: Reliable timer/alarm application? (GTK preferred)

Not as clumsy as all that, you can have a single standard alarm.service that is started by on-the-fly timers (which can be created in /run/systemd/system/ if you so desire, as that is transient and cleaned up on reboot anyway).


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#7 2017-10-26 11:11:01

Omar007
Member
Registered: 2015-04-09
Posts: 368

Re: Reliable timer/alarm application? (GTK preferred)

You can just let systemd create the required units for transient timers by using the systemd-run command.
https://www.freedesktop.org/software/sy … d-run.html

These will be gone after reboot or when they are done (e.g. when not repeating).

Offline

#8 2017-10-26 20:48:39

Batou
Member
Registered: 2017-01-03
Posts: 262

Re: Reliable timer/alarm application? (GTK preferred)

Systemd is an overkill and a huge inconvenience to me for this usage. I do use it for one of the scripts I wrote (to monitor and record mem usage of a process) since crond is now "obsolete" but this is not what I'm after.

I want something that I can input quickly and get a reminder... like a Pomodoro timer.


Please vote for all the AUR packages you're using. You can mass-vote for all of them by doing: "pacman -Qqm | xargs aurvote -v" (make sure to run "aurvote --configure"  first)

Offline

#9 2017-10-26 20:55:58

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,129

Re: Reliable timer/alarm application? (GTK preferred)

echo 'notify-send "Remember" "...the milk"' | at midnight

Offline

#10 2017-10-26 21:10:39

Morn
Member
Registered: 2012-09-02
Posts: 886

Re: Reliable timer/alarm application? (GTK preferred)

One of my projects, PyTimer: https://github.com/mdoege/PyTimer You can use it both as a timer and an alarm clock. It has not failed me so far. smile

Offline

#11 2017-10-26 23:28:09

bernarcher
Forum Fellow
From: Germany
Registered: 2009-02-17
Posts: 2,281

Re: Reliable timer/alarm application? (GTK preferred)

Long time ago I wrote a bash only timer/alarm script "AL" using the at and Xdialog packages.

#!/bin/bash
#
# Issue an alarm using at and xmessage
# Usage:
# 	AL [@] delay [message timeout]]
#	where @ denotes absolute time
#	If not absolute time:
#	   delay is in minutes
#       timeout is in seconds
#
# Defaults to 5 minutes delay: "ALARM"
# Message defaults to "ALARM"

PREFIX="now + "
SUFFIX=" minutes"
DELAY=15
MSG='ALARM'
TO=60
# Which display to use:
MYDSP=':0'

if [ "$1" == "-h" ] || [ "$1" == "--help" ]
then
  echo "AL - Issue an alarm"
  echo "     AL [delay (in minutes) [message [timeout (in seconds)]]]"
  echo "   or"
  echo "     AL @ time [message [timeout (in seconds)]]"
  echo "   defaults: delay=15 message=\"ALARM\" timeout=60"
  exit
fi

if [ "$1" == "@" ]
then
  PREFIX=""
  SUFFIX=""
  shift
fi

if [ "$1"x != "x" ]
then
  DELAY=$1
  if [ "$2"x != "x" ]
  then
    MSG="$2"
    if [ "$3"x != "x" ]
    then
      TO=$3
    fi
  fi
fi

# Xdialog Version
echo "BELL;DISPLAY=$MYDSP Xdialog --timeout $TO --msgbox "\"$MSG\"" 0 0" | at $PREFIX$DELAY$SUFFIX

# xmessage version
# echo "BELL;DISPLAY=$MYDSP xmessage -button OK -default OK -timeout $TO ""$MSG""" | at $PREFIX$DELAY$SUFFIX

if [ "$PREFIX"x != "x" ]
then
    echo "Alarm \""$MSG"\" in $PREFIX$DELAY$SUFFIX using timeout $TO seconds"
else
    echo "Alarm \""$MSG"\" at $DELAY using timeout $TO seconds"
fi

The BELL is a simple script to play some sound:

#!/bin/bash
# Sound a bell
( play /usr/share/sounds/au/beep_sound_02.au &> /dev/null ) & 

To know or not to know ...
... the questions remain forever.

Offline

Board footer

Powered by FluxBB