Create a Vachana GNOME Extension Using Argos
I like to read a stanza of Vachana every day, and I generally visit Vachana Sanchaya to do that. They have a widget ಇಂದಿನ ವಚನ aka Today's Vachana. Which picks a random(?) Vachana and shows it to you on their home page. Today's, for example, is a Vachana by ಜಗಳಗಂಟ ಕಾಮಣ್ಣ.
ಅಯ್ಯಾ, ತನ್ನ ತಾನರಿದಡೆ ತನ್ನರುಹೆ ಗುರು;ಜಗಳಗಂಟ ಕಾಮಣ್ಣ
ಆ ಅರಿದ ನಿಶ್ಚಯವೆ ಲಿಂಗ;
ಆ ಅರುಹಿನ ನಿಶ್ಚಯ ನಿಷ್ಟತ್ತಿಯೆ ಜಂಗಮ;
ಇಂತೀ ತ್ರಿವಿಧವು ಒಂದಾದಡೆ ಕಾಮೇಶ್ವರಲಿಂಗವು ತಾನೆ!
ಇಂತು ಪ್ರಮಥರ ಸಚ್ಚಿದಾನಂದಲೀಲೆಯ
ಅರಿದಾನಂದಿಸ! ಸಂಗನ ಬಸವೇಶ್ವರ!
But really, I wanted a simple way to do it every day. Initially, I thought of writing a script that would scrape (they have an API, too) and send me an email or create an RSS feed that I could subscribe to read.
But then I already had Argos installed and running some scripts for me.
Argos lets you write GNOME Shell extensions in a language that every Linux user is already intimately familiar with: Bash scripts.
Anything you want to keep an eye on, you can script it and add it to a folder. It will magically appear on your GNOME desktop panel as a menu, and all it needs is a script that needs to output text. That seemed easy.
So here is the script. Its called
Vachana.r.1d+sh and needs to be placed inside
~/.config/argos. File name format is
#!/usr/bin/env bash echo "Vachana" echo "---" TOP_OUTPUT=$(curl https://vachana.sanchaya.net/api/today_vachana | jq .vachana.vachana) echo $TOP_OUTPUT
So in my case file is called Vachana. It is placed on the right (r) and refreshes (or runs the shell file) once a day (1d). Additionally, + indicates that it is rerun every time I open the menu.
Now it's there every time I want to read it.
Note: Vachana Sanchaya and Sanchaya have been a grantee of NMG.