hanzala123 / world-clock-xfce-plugin

A World Clock Plugin for XFCE Written in Python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool


World Clock Plugin For XFCE

A World Clock Plugin for XFCE Written in Python
Explore the docs »

Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgments

About The Project

World-Clock-Plugin

GTK Theme: Orchis-dark, Icon Theme: Colloid

After switching to XFCE I was amazed at the speed of everything. But one thing that I really miss from KDE or GNOME is the World Clock. I have never worked with GTK or any such Toolkit ever. So with my very very minimal knowledge of GTK I made a fix for it using the AppIndicator. But That was taking up precious space in my vertical panel. So I decided to make a plugin from it. But making an XFCE Planel Plugin using Python (My Speciality) is very poorly if not at all documented. But finally I found a project on gitlab and used that as a Base. Much thanks to the creator of that project.

(back to top)

Built With

(back to top)

Getting Started

To get a local copy up and running follow these simple example steps.

Prerequisites

I am on EndeavourOS and most of the required libraries were preinstalled. I had to install pip, meson and ninja

sudo pacman -Sy python-pip meson ninja

If you are on Ubuntu or an Ubuntu Based Distro then you can install the dependencies with this

sudo apt-get libxfce4panel-2.0
sudo apt-get install python-gi-dev
sudo apt-get install libgtk-3-dev
sudo apt-get install meson ninja

Then install the required the Python Packages.

pip3 install -r requirements.txt

Then You can test it by running this command from the project directory.

python3 run.py

Installation

If you see it working when you run python3 run.py then you can install it by doing

bash install.sh

(back to top)

Updating

Updating is pretty simple. You just need to go to the project directory and do

git pull

This will sync the changes from the github repo to your local machine. It is recommended that you run

python3 run.py

Just to make sure everything is working. Then you run the install script

bash install.sh

This will update the plugin. Sometimes it might require restarting the panel (xfce4-panel -r) to see the changes take effect.

(back to top)

Configuration

Running it first time will automatically create the config files at ~/.config/world_clock_plugin@hanzala123/

You can open the configuration window for this the same way as other plugins.

Main Time Format

This is the format in which the time will be shown in the panel. The convention is the one used for formating string in Python's DateTime Module. More about that here.

Date Format For World Clocks

This the the format in which the date will be displayed on the world clocks. The same convention is used here as well.

Calendar Window Allocation

This is the place where the calendar/world clock window will appear. By default it set to auto. Which shows the Calendar next to the plugin when clicked. It can also be set to show at a specific location on the screen. The value should be comma separated X and Y coordinates of the place the calendar will appear. Something like this 0, 0 will show the calendar in the top left corner of the screen (or as close as possible to that).

Existing Timezone(s) / Delete a Timezone

Here all the currently configured timezones will appear. To delete a timezone click on the timezone and once it is selected click on the 'Delete' button.

Add New Timezone

You can use this section to add new timezones. To do so first select the area from the left most dropdown selector. Then select the region from the second left most dropdown selector. Finally click on the 'Add' button to add the selected timezone.

PS: YOU MUST CLICK ON THE 'Apply' BUTTON FOR THE CHANGES TO BE APPLIED AND SAVED.

(back to top)

Usage

After Following the previous steps it's pretty simple to use it like any other panel plugin.

(back to top)

Roadmap

  • Make GUI for Configuration.

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the GPLv3 License. See LICENSE for more information.

(back to top)

Contact

Project Link: https://github.com/hanzala123/world-clock-xfce-plugin

(back to top)

Acknowledgments

(back to top)

About

A World Clock Plugin for XFCE Written in Python

License:GNU General Public License v3.0


Languages

Language:Python 70.7%Language:C 23.5%Language:Meson 4.3%Language:Shell 1.5%