I am monitoring my computer screen time usage and I often find myself running uptime --pretty and I would like to find out a better way. My goal is to to wrap my work up within 2 hours of sitting at the computer. My ideas are to have a program launch at first boot login, then at the 1.5 hr or 2 hr mark set off a notification on my notification tray so that I may save my work and logout/poweroff. I know how to set programs to launch at startup via startup applications however clueless how to fire notifications. I am using 20.04 on Gnome.
            Asked
            
        
        
            Active
            
        
            Viewed 1,853 times
        
    4
            
            
        1 Answers
6
            - Use the - sleepcommand with- h(hours) like so:- sleep 2h
- With the - notify-sendcommand like so:- notify-send "Please wrap up your work."
- Both in a - shcommand string- sh -c '...'like so:- sh -c 'sleep 2h; notify-send "Please wrap up your work."'
- Then, add a new startup application and paste the above - shcommand string in the command field like so:
- Then, save it. 
- Next time you login and thereafter, you will be notified after two hours of login. 
 
    
    
        Raffa
        
- 34,963
 
    