M HYPE SPLASH
// general

Message indicator after specific time?

By Emma Terry

Is there any tool this can indicate message after each 30 minutes of uptime ?

actually I spend too many time on computer so i want tool which indicate message after every 30 minutes.

like, when uptime is 30 minutes I want sound notification and message like :- "You have on laptop since 30 minutes turn off and study".

same for next 30 minutes till 2 hours. ie :

30 minutes

1 hour

1:30 hours

2:00 hours

Is this possible ? if yes how to do this ?

2 Answers

Create a script with following containt

#!/bin/bash
first_u=$(awk '{printf "%.0f" , $0/60;}' /proc/uptime)
while true
do uptime_m=$(awk '{printf "%.0f" , $0/60;}' /proc/uptime) (( time_dif=$uptime_m - $first_u )) if [ $time_dif -eq 30 ]; then notify-send "You have on laptop since 30 minutes" sleep 1800 notify-send "You have on laptop since 1 hour" sleep 1800 notify-send "You have on laptop since 1:30 hour" sleep 1800 notify-send "You have on laptop since 2 hour" break fi sleep 50
done

Save it and make it executable using

chmod a+x <script_name>

Now run it

 ./<script_name>

1 Try alarm-clock-applet

sudo apt-get install alarm-clock-applet

2 Also Gnome Clock has a countdown feature. But it has to be set manually every time.

 sudo apt-get install gnome-clocks 

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy