Skip to content

rizukirr/muslimtify

Muslimtify

Muslimtify Banner

Muslimtify is a minimalist prayer time notification daemon for muslim designed specifically for Linux desktops. Built in modern C, it provides a seamless way to receive accurate prayer alerts directly through native system notifications and a clean command-line interface.

All prayer times are calculated locally using pure astronomical formulas — please refer to docs for more information. Muslimtify currently supports the Kemenag (Indonesian Ministry of Religious Affairs) calculation method, more methods may be added in the future.

Muslimtify Built on top of libmuslim.

Features

  • Automatic Location Detection - Uses ipinfo.io to detect your location
  • Multiple Prayer Reminders - Set custom reminders (e.g., 30, 15, 5 minutes before)
  • Beautiful CLI - Unicode table output with colored status
  • JSON Configuration - Easy to read and edit config file
  • Systemd Ready - Designed to run as a systemd timer
  • Lightweight - Written in C, minimal dependencies

Muslimtify Screenshot

Installation

Arch Linux (AUR)

yay -S muslimtify
muslimtify daemon install    # Install and start the systemd timer

Fedora (COPR)

sudo dnf copr enable rizukirr/muslimtify
sudo dnf install muslimtify
muslimtify daemon install    # Install and start the systemd timer

Debian/Ubuntu (PPA)

sudo add-apt-repository ppa:rizukirr/muslimtify
sudo apt update
sudo apt install muslimtify
muslimtify daemon install    # Install and start the systemd timer

Build from Source

1. Install Dependencies

# Ubuntu/Debian
sudo apt install git build-essential cmake pkg-config libnotify-dev libcurl4-openssl-dev

# Fedora/RHEL
sudo dnf install git gcc cmake pkgconfig libnotify-devel libcurl-devel

# Arch Linux
sudo pacman -S git base-devel cmake pkgconfig libnotify curl

2. Clone and Install

git clone https://github.com/rizukirr/muslimtify.git
cd muslimtify
sudo ./install.sh

3. Development Build (Optional)

mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Debug ..
make -j$(nproc)
./bin/muslimtify

Quick Start

Note: If you didn't install system-wide, use ./build/bin/muslimtify instead of muslimtify in all commands below.

# Show today's prayer times (default command)
muslimtify

# Auto-detect your location (first time)
muslimtify location auto

# Show next prayer
muslimtify next

# Set reminders for all prayers
muslimtify reminder all 30,15,5

# Enable Dhuha prayer notifications
muslimtify enable dhuha

CLI Commands

Prayer Times

muslimtify                  # Show today's prayer times (default)
muslimtify show             # Same as above
muslimtify show --format json  # Output in JSON format
muslimtify next             # Show next prayer and countdown

Example Output:

Prayer Times for Monday, February 23, 2026
Location: Jakarta, ID (-6.2146, 106.8451)

┌────────────┬──────────┬──────────┬───────────────────────┐
│ Prayer     │ Time     │ Status   │ Reminders             │
├────────────┼──────────┼──────────┼───────────────────────┤
│ Fajr       │ 04:42    │ Enabled  │ 30, 15, 5 min before  │
│ Sunrise    │ 05:57    │ Disabled │ -                     │
│ Dhuha      │ 06:25    │ Disabled │ -                     │
│ Dhuhr      │ 12:09    │ Enabled  │ 30, 15, 5 min before  │
│▶Asr        │ 15:17    │ Enabled  │ 30, 15, 5 min before  │
│ Maghrib    │ 18:16    │ Enabled  │ 30, 15, 5 min before  │
│ Isha       │ 19:27    │ Enabled  │ 30, 15, 5 min before  │
└────────────┴──────────┴──────────┴───────────────────────┘

(Colors shown in terminal: bold yellow for next prayer, green for enabled, dim for disabled)

Location Management

muslimtify location auto    # Auto-detect location via ipinfo.io
muslimtify location show    # Display current location
muslimtify location set <lat> <lon>  # Set manual coordinates
muslimtify location clear   # Clear location (will auto-detect next time)
muslimtify location refresh # Re-fetch location from ipinfo.io

Prayer Notifications

muslimtify enable <prayer>   # Enable prayer notification
muslimtify disable <prayer>  # Disable prayer notification
muslimtify enable all        # Enable all prayers
muslimtify disable all       # Disable all prayers
muslimtify list              # Show enabled/disabled prayers

Prayer names: fajr, sunrise, dhuha, dhuhr, asr, maghrib, isha

Default: Fajr, Dhuhr, Asr, Maghrib, Isha are enabled. Sunrise and Dhuha are disabled.

Reminder Management

muslimtify reminder <prayer> <times>  # Set reminders (e.g., 30,15,5)
muslimtify reminder <prayer> clear    # Clear reminders
muslimtify reminder all 30,15,5       # Set reminders for all enabled prayers
muslimtify reminder show              # Show all reminder configurations

Examples:

muslimtify reminder fajr 45,30,10     # Notify 45, 30, 10 min before Fajr
muslimtify reminder maghrib 15,5      # Notify 15, 5 min before Maghrib
muslimtify reminder isha clear        # Only notify at exact Isha time

Configuration

muslimtify config show       # Display full configuration
muslimtify config reset      # Reset to default configuration
muslimtify config validate   # Validate configuration file

Daemon Mode

muslimtify check   # Check prayer time and send notification if matched
                   # (Used by systemd timer - runs every minute)

Daemon Management

muslimtify daemon install    # Install and start the systemd timer
muslimtify daemon uninstall  # Stop, disable, and remove systemd unit files
muslimtify daemon status     # Show timer state and next trigger time

Other Commands

muslimtify version   # Show version information
muslimtify help      # Show help message

Configuration File

Config file location: ~/.config/muslimtify/config.json

Example:

{
  "location": {
    "latitude": -6.2146,
    "longitude": 106.8451,
    "timezone": "Asia/Jakarta",
    "timezone_offset": 7.0,
    "auto_detect": true,
    "city": "Jakarta",
    "country": "ID"
  },
  "prayers": {
    "fajr": {
      "enabled": true,
      "reminders": [30, 15, 5]
    },
    "sunrise": {
      "enabled": false,
      "reminders": []
    },
    "dhuha": {
      "enabled": false,
      "reminders": []
    },
    "dhuhr": {
      "enabled": true,
      "reminders": [30, 15, 5]
    },
    "asr": {
      "enabled": true,
      "reminders": [30, 15, 5]
    },
    "maghrib": {
      "enabled": true,
      "reminders": [30, 15, 5]
    },
    "isha": {
      "enabled": true,
      "reminders": [30, 15, 5]
    }
  },
  "notification": {
    "timeout": 5000,
    "urgency": "normal",
    "sound": true
  }
}

Systemd Integration

Automatic Setup (Recommended)

Use the provided installation script (builds, installs binary, and sets up systemd timer):

sudo ./install.sh

To uninstall:

sudo ./uninstall.sh           # remove everything except config
sudo ./uninstall.sh --purge   # also remove ~/.config/muslimtify

Alternatively, manage the daemon from within the app:

muslimtify daemon install    # install and start the systemd timer
muslimtify daemon uninstall  # stop and remove the systemd timer
muslimtify daemon status     # show timer state

Manual Setup (Alternative)

If you prefer manual setup, create the following files:

~/.config/systemd/user/muslimtify.service:

[Unit]
Description=Prayer Time Notification Check
After=network-online.target

[Service]
Type=oneshot
# Use full path to binary
ExecStart=/usr/local/bin/muslimtify check
# OR if running from source:
# ExecStart=/home/yourusername/muslimtify/build/bin/muslimtify check
StandardOutput=journal
StandardError=journal

~/.config/systemd/user/muslimtify.timer:

[Unit]
Description=Check prayer times every minute
After=network-online.target

[Timer]
OnCalendar=*:*:00
Persistent=true
AccuracySec=1s

[Install]
WantedBy=timers.target

Enable and start:

systemctl --user daemon-reload
systemctl --user enable muslimtify.timer
systemctl --user start muslimtify.timer

Check Status

systemctl --user status muslimtify.timer
systemctl --user list-timers muslimtify
journalctl --user -u muslimtify -f

How It Works

  1. Timer runs every minute - Systemd timer triggers muslimtify check every minute
  2. Checks current time - Compares current time with prayer times and configured reminders
  3. Sends notification - If match found (exact minute match), sends desktop notification
  4. Exits - Process exits immediately (no background daemon)

Notification Behavior

  • Exact prayer time - Shows "Prayer Time: Fajr" with CRITICAL urgency
  • Reminder - Shows "Prayer Reminder: Fajr in 30 minutes" with NORMAL urgency
  • Multiple reminders - Each reminder triggers separately (e.g., 30 min, 15 min, 5 min before)

Troubleshooting

Running without system-wide installation

If you built from source but didn't install system-wide:

# Use the binary directly
cd /path/to/muslimtify
./build/bin/muslimtify

# OR create an alias in your shell config (~/.bashrc, ~/.zshrc, etc.)
alias muslimtify='/path/to/muslimtify/build/bin/muslimtify'

# OR create a symlink
sudo ln -s /path/to/muslimtify/build/bin/muslimtify /usr/local/bin/muslimtify

For systemd integration without installation:

# Edit the service file to use full path
vim ~/.config/systemd/user/muslimtify.service
# Change ExecStart to: /full/path/to/muslimtify/build/bin/muslimtify check

Notifications not showing

  1. Check if timer is running:

    systemctl --user status muslimtify.timer
  2. Check logs:

    journalctl --user -u muslimtify -n 50
  3. Test notification manually:

    muslimtify check
  4. Verify notification daemon is running:

    # Test system notifications
    notify-send "Test" "If you see this, notifications work"
    
    # Test with custom icon
    ./test_notification.sh

Location not detected

# Test location detection
curl ipinfo.io

# Set manual location
muslimtify location set <latitude> <longitude>

Config file errors

# Validate config
muslimtify config validate

# Reset to defaults
muslimtify config reset

Development

Building for Development

mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Debug ..
make -j$(nproc)

License

MIT License - See source files for details

Contributing

Contributions are welcome! See CONTRIBUTING.md for guidelines.

Credits

  • Prayer calculation based on Kemenag Indonesia standards
  • Uses libnotify for desktop notifications
  • Location detection via ipinfo.io

Support

If you find this library useful, consider supporting its development:

ko-fi

About

A lightweight islamic prayer time notification daemon for Linux

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors