My KWOC 22 Journey

Introduction

So hi guys my name is Rohan Chatterjee passionate about learning tech stuff a lot especially Open Source and this is my very first blog hope reading this will be worth your time.

My open source journey brings me to KWoC which is organized by KOSS which is an open-source society of one of the most prestigious colleges in our country IIT Kharagpur.

I love open source because it gives me exposure to learning new tech which was my aim during this KWOC event too.

MY INTERESTS & MY KWoC JOURNEY

I was very fond of Linux OS and was curious to learn about it. So I picked up a repository that was very intriguing to me it was about how to run a Pomodoro timer to focus during studies or any hobby that requires a focus that will be running on your computer terminal. Sounds cool right!! But the code was written in Bash Script and I had no experience with writing code in bashscript so which was quite a big challenge for me to learn bash script. So I reached out to the project admin of the project who was very supportive. I shared my problem that I have no experience in coding in bash script can I contribute to this project?. He guided me and said why not and suggested me some beginner-friendly issues that needed to be resolved in the project.

My issue

:- https://github.com/proffapt/pomodoro-cli/issues/2

So I took the issue it was regarding sending notifications on taking inputs from the user and change the notification icon for the notification that was would be displayed after taking inputs from the user about the amount of time he/she wants to focus during an interval.

The issue that i worked on!!

MY APPROACH AND HOW I GOT THE SOLUTION

So I started with learning the basics of the bash script language and I was very much happy to see how I can automate things on the computer by some lines of code.

Then after learning of basics, I started researching the issue of which package to be used which has to be installed in the machine and I came up with the package which is installed in most Linux systems which is "notify-send". I could create my notifications using it so after more research, I got to know that by using -i (icon) tag after notify-send I could change the notification icon of the notification.

notify-send -i ~/pomodoro-cli/svg/timer.svg -t 0 -a pomodoro-cli "${header:?}" "${body:?}

So here ~/pomodoro-cli/svg/timer.svg is the path of the image of the notification and the test is the text of the notification.

If you want to learn more about notify-send check out their docs Click Here!!

So I crossed the first hurdle of my issue now for the second part which was to level up then this one was the alert function for that I contacted my project admin a lot I guess he was a bit irritated after some point.

Then I finally figured out how to resolve this issue after researching I got to know about zenity which is also preinstalled in most Linux OS systems. So here you can see the changes that were made creating a box containing the title and the text and 2 buttons Accept and Dont_Accept.

If you want to learn more about zenity check out its docs Click Here!!

 zenity --error --title 'Review your break!!' \
      --text " $focus_minutes minutes to last a focus period and $break_minutes minutes to last a break period $long_break_minutes  minutes to last a long break period
      $breaks_until_long  breaks until a long break period starts"\
      --ok-label Accept  \
      --extra-button  Dont_Accept

AFTERMATH OF PUSHING THE CHANGES

So this code I found out this after 2 days of continuous googling and finally, i resolved both of my issues I was very happy after this and i learned a lot about automating stuff in my computer.

So after making changes in the README section of the repository i pushed the changes and MY PR GOT MERGED!!

My PR:https://github.com/proffapt/pomodoro-cli/pull/5

I was really happy after that but I did not get any more time to contribute to another repository due to my college exams and other stuff but learned a lot during this journey.

Thanks to my mentor Arpit Bhardwaj

That's a wrap hope you linked my Blog I hope I did not get too technical.

HAPPY OPEN-SOURCING!!

Plz feel free to contact me and provide any suggestions or queries you have for me Would be happy to answer them all.

My Mail :

LinkedIn: Click here

GitHub: https://github.com/CS50X-RGB