Skip to main content

Application indicator which displays fortunes.

Project description

Calls the 'fortune' program displaying the result in the on-screen notification.

Requirements

Ubuntu 20.04 or equivalent: Using GNOME Tweaks, enable the Ubuntu appIndicators extension.

Debian 11 / 12: Install the GNOME Shell extension AppIndicator and KStatusNotifierItem Support

Installation

Ubuntu / Debian: Open a terminal and...

  1. Install operating system packages:
sudo apt-get -y install gir1.2-ayatanaappindicator3-0.1 libcairo2-dev libgirepository1.0-dev pkg-config python3-dev python3-gi python3-venv python3-notify2 fortune-mod fortunes python3-notify2
  1. Create a Python virtual environment, activate and install the indicator package:
python3 -m venv $HOME/.local/venv_indicatorfortune && \
. $HOME/.local/venv_indicatorfortune/bin/activate && \
python3 -m pip install --upgrade indicatorfortune && \
deactivate
  1. Copy icon, run script and desktop file to $HOME/.local:
mkdir -p $HOME/.local/share/icons/hicolor/scalable/apps && \
cp $(ls -d $HOME/.local/venv_indicatorfortune/lib/python3.* | head -1)/site-packages/indicatorfortune/icons/hicolor/indicatorfortune.svg $HOME/.local/share/icons/hicolor/scalable/apps && \
mkdir -p $HOME/.local/bin && \
cp $(ls -d $HOME/.local/venv_indicatorfortune/lib/python3.* | head -1)/site-packages/indicatorfortune/packaging/linux/indicatorfortune.sh $HOME/.local/bin && \
cp $(ls -d $HOME/.local/venv_indicatorfortune/lib/python3.* | head -1)/site-packages/indicatorfortune/packaging/linux/indicatorfortune.py.desktop $HOME/.local/share/applications

Usage

To run indicatorfortune, press the Super/Windows key to open the Show Applications overlay, type fortune into the search bar and the icon should be present for you to click. If the icon does not appear, or appears as generic, you may have to log out and log back in (or restart).

Under the Preferences there is an autostart option to run indicatorfortune on start up.

Limitations

Distributions/versions with full functionality:

  • Debian 11 / 12
  • Ubuntu 20.04 / 22.04
  • Ubuntu Budgie 22.04
  • Ubuntu Unity 20.04 / 22.04

Distributions/versions with limited functionality:

  • Kubuntu 20.04 / 22.04 No mouse wheel scroll; tooltip in lieu of label.
  • Lubuntu 20.04 / 22.04 No label; tooltip is not dynamic; icon is not dynamic.
  • Ubuntu Budgie 20.04 No mouse middle click.
  • Ubuntu MATE 20.04 Dynamic icon is truncated, but fine whilst being clicked.
  • Ubuntu MATE 22.04 Default icon with colour change does not show up; dynamic icon for NEW MOON does not display.
  • Xubuntu 20.04 / 22.04 No mouse wheel scroll; tooltip in lieu of label.

Removal

Ubuntu / Debian: Open a terminal and...

  1. Remove operating system packages:
sudo apt-get -y remove gir1.2-ayatanaappindicator3-0.1 libcairo2-dev libgirepository1.0-dev pkg-config python3-dev python3-venv python3-notify2
  1. Remove Python virtual environment and files from $HOME/.local:
rm -r $HOME/.local/venv_indicatorfortune && \
rm $HOME/.local/share/icons/hicolor/scalable/apps/indicatorfortune.svg && \
rm $HOME/.local/bin/indicatorfortune.sh && \
rm $HOME/.local/share/applications/indicatorfortune.py.desktop

License

This project in its entirety is licensed under the terms of the GNU General Public License v3.0 license.

Copyright 2013-2023 Bernard Giannetti.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

indicatorfortune-1.0.43.tar.gz (34.4 kB view details)

Uploaded Source

Built Distribution

indicatorfortune-1.0.43-py3-none-any.whl (57.3 kB view details)

Uploaded Python 3

File details

Details for the file indicatorfortune-1.0.43.tar.gz.

File metadata

  • Download URL: indicatorfortune-1.0.43.tar.gz
  • Upload date:
  • Size: 34.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.10

File hashes

Hashes for indicatorfortune-1.0.43.tar.gz
Algorithm Hash digest
SHA256 ee098d3e9f4220a196b4e6bdf61be6f9cd5a89ef0c31c1e017172d320d530867
MD5 a1cb09adbb681bd77f1b200adb18507b
BLAKE2b-256 dbf158366e35b7a5cc27fdf9bc3b7b0bc0a62f5c31a7e2f6562053d15944f6f0

See more details on using hashes here.

File details

Details for the file indicatorfortune-1.0.43-py3-none-any.whl.

File metadata

File hashes

Hashes for indicatorfortune-1.0.43-py3-none-any.whl
Algorithm Hash digest
SHA256 710030828597995a3ccfb5a92f0cc3abcbbc1cbe45cb6547af53b9a614d6dad9
MD5 cb9f03d78d3a2d6159ea08b4928c1bfe
BLAKE2b-256 d1dd52df3f2b517053ac331d843e9bba3c42980c96972df167c0daa89e5be579

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page