Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,28 @@ encode-x265 <path to video>
encode-x265 <path to video> <path to encoded video>
```



### Clock timer with notifications
Script: [q3.sh](q3.sh)
Syntax: q3.sh {Number of breaks required.}

```sh
A popular time management technique uses a timer to break down work into intervals (usually
25 mins) followed by a small break.
The task is to create a BASH script to aid this process. Take a command line argument for the
number of iterations (work + break). Print notifications about the breaks (5 mins) or time to work
(25 mins) in the terminal. Every 4 iterations, include a long break (15 mins). Print notification
when all the cycles are complete.
Example usage:
bash timer.sh 2
Output structure:
#1 work
#1 break time
#2 work
#2 break time
Finished
```
### 🎥 Convert video to gif

Script: [gif-convert](gif-convert)
Expand Down
24 changes: 24 additions & 0 deletions q3.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash
read -p "Enter the number of iterations " n
flag=0

for (( i=0; i<n; i++ ))
do
if [[ flag -ne 3 ]]
then
let flag++
echo "Work time started"
sleep 25m
echo "Yipee break time !!!"
sleep 5m
else
flag=0
echo "Work time started"
sleep 25m
echo "Yipee long break time !!!"
sleep 15m
fi
done
echo "finished"
chmod 777 q3.sh