Skip to content

enfyna/xfce-prayer-times

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

xfce-prayer-times



Islamic prayer times panel plugin for XFCE.


Installation

  1. Clone the repo.

     git clone https://github.com/enfyna/xfce-prayer-times
     cd xfce-prayer-times
    
  2. Build the project.

Note

If you have missing dependencies try to install them.

    make
  1. Install system-wide.

    To make XFCE see the plugin you need to symlink the build files to these directories:

     sudo ln -s `dir`/xfce-prayer-times/prayer-times-plugin.desktop /usr/share/xfce4/panel/plugins/prayer-times-plugin.desktop 
     sudo ln -s `dir`/xfce-prayer-times/build/libprayer-times-plugin.so /usr/lib/xfce4/panel/plugins/libprayer-times-plugin.so 
    

    dir is the directory you cloned the repo in. For example:

    sudo ln -s /home/user/xfce-prayer-times/prayer-times-plugin.desktop /usr/share/xfce4/panel/plugins/prayer-times-plugin.desktop
    sudo ln -s /home/user/xfce-prayer-times/build/libprayer-times-plugin.so /usr/lib/xfce4/panel/plugins/libprayer-times-plugin.so 
    
  2. Restart xfce4-panel.

    xfce4-panel -r
    
  3. Add the plugin to your panel.

    1. Go to Settings>Panel>Items.
    2. Click the + Add button.
    3. Double click Prayer Times.

Usage

Note

Prayer times are calculated with the formula taken from here https://radhifadlillah.com/blog/2020-09-06-calculating-prayer-times/

Caution

Calculated prayer times probably will not be exact. In some locations the local scholar usually will adjust the schedule forward or backward for a few minutes.

Note

Screenshots are taken with Chicago95 XFCE theme.

Plugin label will show the time left to the next calculated prayer time. If the plugin checkbox is not checked the plugin will send a notification each notification interval. After the checkbox is checked notifications will stop until the next prayer time.

Tip

You can set the notification interval from the properties dialog.

Properties

Prayer times are calculated with the formula taken from this page. You can read the requirements section there to learn how to setup the parameters.

Translate

Translation files are stored in the panel-po directory.

Adding a new language

To add a new language run the following command:

make po-init LANG=<language-code>

This will generate a xpt.po file under the panel-po/<language-code> directory. In this file you can add your translations by providing the translated text in the msgstr fields corresponding to the msgid entries.

Testing Translations

To test your translations, change the LANG environment variable to your target language and restart the XFCE panel. For example to test the english translations use:

LANG=en_US.utf8
make && xfce4-panel -r

Develop

Clangd

generate compile_commands.json:

bear -- make

Debugging

PANEL_DEBUG=xfce-prayer-times
xfce4-panel -q && make && xfce4-panel 

About

Islamic prayer times panel plugin for XFCE.

Resources

License

Stars

Watchers

Forks