Solved Clock program for KDE?

Solved issue

CaffeineAddict

Well-Known Member
Joined
Jan 21, 2024
Messages
782
Reaction score
541
Credits
6,411
I'm looking for a clock program on KDE desktop that will have a function of a timer I could set to remind me.
playing some online game and need to be reminded in time to do stuff.

This app on the link below sadly doesn't install in KDE discover due to an error shown below

Please suggest something with a timer that is good for KDE, more fucntions the better but at least a timer.

clock.png
 
Last edited:


1717788004076.png


1717788124043.png
 
In Fedora...

dnf install -y kclock

dnf info kclock


Installed Packages
Name : kclock
Version : 24.02.1
Release : 1.fc40
Architecture : x86_64
Size : 955 k
Source : kclock-24.02.1-1.fc40.src.rpm
Repository : @System
From repo : fedora
Summary : Clock app for Plasma Mobile
URL : https://apps.kde.org/kclock/
License : GPLv2+ and LGPLv2.1+ and CC-BY and GPLv3+
Description : A convergent clock application for Plasma.

I assume it's named similar in other Linux distro's.
 
At this link there is a link to download from Flathub





 
I actually wrote a bash script to serve as an alarm clock because my actual alarm clock by my bedside went crazy.

Code:
#!/bin/bash
#
# This script works like an alarm clock.
#
# You must start the script at the beginning of a minute
# if you want the alarm to sound at the start of a minute.

# This must be specified in 24 hour time.

if [ -z "$2" ] || [ ! -z "$3" ]; then
     echo "Usage: alarm <hour> <minute>"
     echo "The alarm will sound when the current time reaches hour:minute."
     exit 1
fi

ALARMSTRING="T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T"

HOUR=$(/usr/bin/date +%H)
MINUTE=$(/usr/bin/date +%M)

WAKEUPHOUR="$1"
WAKEUPMINUTE="$2"

if [ -z $HOUR ]; then
     echo "Hour unknown."
     exit 1
fi

if [ -z $MINUTE ]; then
     echo "Minute unknown."
     exit 1
fi

echo -n "Current time: "
echo -n $HOUR
echo -n ":"
echo -n $MINUTE
echo "."

echo -n "Waiting for: "
echo -n $WAKEUPHOUR
echo -n ":"
echo -n $WAKEUPMINUTE
echo "."

let LOOP=1

#echo -n "LOOP: "
#echo -n $LOOP
#echo "."

while [ $LOOP == 1 ]; do

     /usr/bin/sleep 10

     HOUR=$(/usr/bin/date +%H)
     MINUTE=$(/usr/bin/date +%M)

     if [ -z $HOUR ]; then
          echo "Hour unknown."
          exit 1
     fi

     if [ -z $MINUTE ]; then
          echo "Minute unknown."
          exit 1
     fi

     if [ $HOUR == $WAKEUPHOUR ] && [ $MINUTE == $WAKEUPMINUTE ]; then
          let LOOP=0
     fi

#     echo -n "In while loop.  HOUR: "
#     echo -n $HOUR
#     echo -n ", MINUTE: "
#     echo -n $MINUTE
#     echo -n ", WAKEUPHOUR: "
#     echo -n $WAKEUPHOUR
#     echo -n ", WAKEUPMINUTE: "
#     echo -n $WAKEUPMINUTE
#     echo "."

done

#echo -n "Current hour: "
#echo $HOUR
#echo -n "Current minute: "
#echo $MINUTE
#echo -n "WakeUpHour: "
#echo $WAKEUPHOUR
#echo -n "WakeUpMinute: "
#echo $WAKEUPMINUTE
#echo

echo "Time to wake up.  Press ^C to stop."

# Start the alarm.

echo $ALARMSTRING | /usr/bin/cw -e -t 500 -v 20 -w 15

exit 0

# EOF

You will need to install the cw and cwdaemon packages to use this. I also wrote a quick script to let me set the audio volume first.

Code:
#!/bin/bash
#
# This allows testing the audio volume for the alarm script.

ALARMSTRING="T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T"

echo "This sample has been provided to help you set your audio volume.  Press ^C to stop."

# Start the alarm.

echo $ALARMSTRING | /usr/bin/cw -e -t 500 -v 20 -w 15

exit 0

# EOF

You will need to specify time like this: alarm 07 00 to wake up at 7:00 AM local time. You can modify the script to call another program to do whatever you need it to do.

Signed,

Matthew Campbell
 
a timer I could set to remind me.
playing some online game and need to be reminded in time to do stuff.

Is KOrganizer/Calendar available? It's not really a clock, or even a timer per se.
But you can schedule events, and enable desktop notifications.

You can set up a schedule like work from 8:00am to 12:00pm.
Then another event like play games from 12:00pm to 2:00pm. It can remind you 15 minutes ( or however long you set the reminder for )
that the next event is about to happen.
 
I appreciate all replies!
Ended up installing the Clock app from flathub as suggested by @Condobloke because it was the easiest to do.

Is KOrganizer/Calendar available?
Thanks it has some functions that are useful which the Clock doesn't have and will be useful for the game because there is in-game calendar for events.
 
If all else fails, you could consider creating your own backport version of kclock for debian. Details of the process are here with an example: https://wiki.debian.org/SimpleBackportCreation
Btw. I removed flatpak because not fan of it, and tested out this solution and it worked as well.

Thank you for sharing, I had no clue about the process of manually installing from unstable debian branch.
 

Staff online

Members online


Top