Skip to content

Commit

Permalink
Update sleep reminder settings
Browse files Browse the repository at this point in the history
  • Loading branch information
OrBin committed Oct 24, 2024
1 parent 8587eb8 commit 4142359
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
4 changes: 2 additions & 2 deletions configuration/notify_sleep.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ if [[ "$(gnome-screensaver-command --query)" = "The screensaver is active" ]]; t
exit
fi

notify-send -t 300000 'Go to sleep!' 'Screen will be locked in 2 minutes'
sleep 120
notify-send -t 30000 'Go to sleep!' 'Screen will be locked in 30 seconds'
sleep 30
gnome-screensaver-command --activate
12 changes: 10 additions & 2 deletions tasks/configuration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,17 @@

- name: Add notify_sleep.sh to cron
ansible.builtin.cron:
name: notify_sleep
name: notify_sleep 12 AM
minute: "*/15"
hour: "0-4"
hour: "0"
job: "{{ notify_sleep_script.dest }}"
when: computer_type == "personal"

- name: Add notify_sleep.sh to cron
ansible.builtin.cron:
name: notify_sleep 1-4 AM
minute: "*/5"
hour: "1-4"
job: "{{ notify_sleep_script.dest }}"
when: computer_type == "personal"

Expand Down

0 comments on commit 4142359

Please sign in to comment.