Git Product home page Git Product logo

salah-cli's Introduction

Salah-CLI

Description

A group of commands that add the prayer times to the cron scheduler (daily), and it should alarm you at the prayer times.

It's a CLI program it does not use the GUI, I think it should be light and won't use much resources from the computer, and the best part is that it will run at the background.


Building

You should also install xidel, parallel and anacron.

And you should edit the file /etc/anacrontab and add something like this line

1       3       salah.update    /home/ahmed/.salah/update

so that the scheduler will be updated daily.

after that you make a directory for the salah files and cd to it.

mkdir ~/.salah
cd ~/.salah

Add the commands that will run at each prayer to the files something like the following note also that you have to make them executable I have vlc installed and I have a file named S.m4a in ~/.salah directory

echo -e '#!/bin/bash\ncvlc ~/.salah/S.m4a' | tee Fajr Dhuhr Asr Maghrib > Ishaa
chmod +x Fajr Dhuhr Asr Maghrib Ishaa

Now you have to make the update file

Make the file ~/.salah/update which will have something like this:

#!/bin/bash

if ! cmp -s p d/$(date +%-j)
then
    cat <(grep -xvf p <(crontab -l)) <(cat d/$(date +%-j) | tee p) > my-crontab
fi

and make it executable:

chmod +x update

Thanks to

  • Thanks to the authors of xidel, parallel and anacrontab. this program was made fairly easily with these commands.

Author

  • written by Ahmed Elsawy

salah-cli's People

Contributors

ahmed1elsawy avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

ahsenbaig-forks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.