Skip to content

HenokB/selamta

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Selamta

A delightful macOS utility that displays random Amharic proverbs from a collection of 1,440+ traditional Ethiopian sayings. Perfect for staying connected to Ethiopian culture while you work.

image

macOS License Bash

✨ Features

πŸ–₯️ Terminal Display - Beautiful colored proverb output
πŸ”” macOS Notifications - Pop-up notifications with Ethiopian proverbs
πŸ”’ Lock Screen Messages - See wisdom when you lock your Mac
⏰ Automatic Updates - New proverb every 15 minutes (customizable)
🎯 1,440+ Proverbs - Rich collection of traditional Ethiopian sayings
βš™οΈ Highly Configurable - Sound, frequency, and display options

🎬 Quick Demo

# Display a random proverb
$ selamta
α‹¨αˆšα‹«αˆαˆα‹ αŒŠα‹œ αŠ α‹­αˆ˜αˆˆαˆ΅αˆα’

πŸ“¦ Installation

Prerequisites

  • macOS 10.15 (Catalina) or later
  • Admin/sudo access

Install Steps

  1. Clone the repository
git clone https://github.com/HenokB/selamta.git
cd selamta
  1. Run the installer
sudo ./install.sh
  1. Done! The proverb daemon is now running. πŸŽ‰

What Gets Installed

  • /usr/local/bin/selamta - Main script
  • /usr/local/share/selamta/amharic_cleaned.csv - Proverb database
  • /Library/LaunchDaemons/com.ethiopia.selamta.plist - Auto-run configuration

πŸš€ Usage

Basic Commands

# Display a random proverb
selamta

# Show help and all options
selamta --help

# Terminal-only mode (no notifications)
selamta -t

# Enable sound notification
selamta -s

# Disable lock screen message
selamta --no-lock

Notification Setup

To receive notification pop-ups:

  1. Run the script once to trigger macOS permission prompt:

    selamta
  2. Allow notifications when prompted

  3. Or manually enable in System Settings:

    • Open System Settings (or System Preferences)
    • Go to Notifications
    • Find "Terminal" or "Script Editor" in the list
    • Enable "Allow Notifications"

On Linux, the script falls back to notify-send. Make sure libnotify is installed and desktop notifications are enabled for your session.

Lock Screen Setup

To display proverbs on your lock screen:

  1. Grant Full Disk Access (macOS Catalina+):

    • Open System Preferences β†’ Security & Privacy β†’ Privacy
    • Select Full Disk Access from the sidebar
    • Click the πŸ”’ lock and authenticate
    • Click + and add /usr/local/bin/selamta
  2. Test it: Lock your screen (⌘ + ^ + Q)

  3. See the proverb displayed above the login field! ✨

βš™οΈ Configuration

Change Update Frequency

Edit the daemon configuration:

sudo nano /Library/LaunchDaemons/com.ethiopia.selamta.plist

Change the interval (in seconds):

<key>StartInterval</key>
<integer>900</integer>  <!-- 900 = 15 minutes -->

Reload the daemon:

sudo launchctl unload /Library/LaunchDaemons/com.ethiopia.selamta.plist
sudo launchctl load /Library/LaunchDaemons/com.ethiopia.selamta.plist

Enable/Disable Features

Edit environment variables in the plist file:

<key>ENABLE_NOTIFICATION</key>
<string>1</string>  <!-- 1 = on, 0 = off -->

<key>ENABLE_LOCK_SCREEN</key>
<string>1</string>  <!-- 1 = on, 0 = off -->

<key>ENABLE_SOUND</key>
<string>0</string>  <!-- 1 = on, 0 = off -->

πŸ“Š Monitoring

View Logs

# See proverb output (daemon logs)
tail -f /var/log/selamta_output.log

# See any errors (daemon logs)
tail -f /var/log/selamta_error.log

# View activity log (user logs)
tail -f ~/Library/Logs/selamta.log

Check Daemon Status

# Check if running
sudo launchctl list | grep selamta

# Should show: com.ethiopia.selamta

View Current Lock Screen Message

sudo defaults read /Library/Preferences/com.apple.loginwindow LoginwindowText

πŸ—‘οΈ Uninstall

cd /path/to/selamta
sudo ./uninstall.sh

This will remove all installed files, stop the daemon, and clear the lock screen message.

πŸ› οΈ Troubleshooting

Lock screen message not showing?
  • Ensure Full Disk Access is granted (see Lock Screen Setup above)
  • Try running manually: sudo selamta
  • Check error log: tail -f /var/log/selamta_error.log
  • Restart your Mac if needed
Notifications not appearing?

Check notification permissions:

  1. Go to System Settings β†’ Notifications
  2. Look for "Terminal", "Script Editor", or "osascript"
  3. Enable "Allow Notifications" for each

Test manually:

# This should show a notification
osascript -e 'display notification "Test notification" with title "Testing"'
# Linux fallback
notify-send "Testing" "Test notification"

If daemon notifications don't work:

  • Wait for the next scheduled run (every 15 min)
  • Check /var/log/selamta_error.log for errors
  • Make sure the daemon is running: sudo launchctl list | grep selamta

Still not working?

  • Run: selamta and approve any permission prompts
  • Restart your Mac to refresh notification permissions
Daemon not running?
# Check if loaded
sudo launchctl list | grep selamta

# Reload daemon
sudo launchctl unload /Library/LaunchDaemons/com.ethiopia.selamta.plist
sudo launchctl load /Library/LaunchDaemons/com.ethiopia.selamta.plist

# Check logs
tail -f /var/log/selamta_error.log
Getting "CSV file not found" error?

Make sure the installation completed successfully:

ls -la /usr/local/share/selamta/amharic_cleaned.csv

If missing, reinstall:

sudo ./install.sh

πŸ“ Project Structure

selamta/
β”œβ”€β”€ selamta                    # Main script
β”œβ”€β”€ amharic_cleaned.csv        # Database of 1,440+ proverbs
β”œβ”€β”€ com.ethiopia.selamta.plist # LaunchDaemon configuration
β”œβ”€β”€ install.sh                 # Installation script
β”œβ”€β”€ uninstall.sh               # Uninstallation script
β”œβ”€β”€ README.md                  # This file
└── LICENSE                    # MIT License

πŸ“ Proverb Format

The amharic_cleaned.csv file contains one proverb per line in UTF-8 format:

αŠ₯αˆ…αˆ α‹«αˆˆ α‹αˆ€ αŠ•αŒ‰αˆ΅ α‹«αˆˆα‹΅αˆ€ ፒ
ከሰነፍ αŒˆα‰ αˆ¬ αˆ›αˆ³α₯ ሞፈር α‹­α‰†αˆ¨αŒ£αˆα’
...

To add your own proverbs, simply add new lines to this file!

πŸ“œ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • Thanks to dyacob for providing additional proverb data, sourced from GeezOrg.
  • Some dataset entries are also from ProverbEval.
  • Shout-out to nebiyuelias1 for highlighting the notify-send fallback for Arch/Linux.

About

Display proverbs on macOS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages