Git Product home page Git Product logo

nextmeeting's Introduction

nextmeeting - Show your calendar next meeting in your waybar or polybar

What is it?

nextmeeting is a simple CLI leveraging gcalcli to show the next meetings.

It has a few features compared to just gcalcli :

  • bar integration (i.e: waybar/polybar and probably others)
  • smart date in English (not just the date, tomorrow or others)
  • show the time to go for current meeting
  • change colors if there is 5 minutes to go to the meeting
  • hyperlink in default view to click on terminal
  • notification via notify-send 5 minutes before meeting
  • title ellipsis
  • Exclude next day meetings.

Screenshot

192647099-ccfa2002-0db3-4738-a54b-176a03474483

How to use it?

You need to install gcalcli and setup the google Oauth integration with google calendar.

By default you can start nextmeeting and it will show the list of meetings you have with "human date".

There is a few options to customize things, see nextmeeting --help for more options.

Waybar

A more interesting use of nextmeeting is the integration with waybar, to output nicely on your desktop, for example my configuration look like this:

    "custom/agenda": {
        "format": "{}",
        "exec": "nextmeeting --max-title-length 30 --waybar",
        "on-click": "nextmeeting --open-meet-url",
        "on-click-right": "kitty -- /bin/bash -c \"batz;echo;cal -3;echo;nextmeeting;read;\";",
        "interval": 59,
        "return-type": "json",
        "tooltip": "true"
    },

This will show how long i have until the next meeting. If I click on the item it will open the meet URL attached to the event. If I hit via a right click it will launch a kitty terminal to show the time zones with batz and my next meeting. I can click on the title in the terminal and it will open the meet URL.

Styling

You can style some of the waybar item with the following CSS:

#custom-agenda {
  color: #696969;
}

If you enable the option "--notify-min-before-events it will output a class soon if the events is coming soon, you can style it with:

#custom-agenda.soon {
  color: #eb4d4b;
}

Installation

Use pip with:

pip install -U nextmeeting

or Checkout the source of this repo and use poetry :

poetry run nextmeeting

If you don't want to use poetry you can install the depndences packages from PyPi or from your operating system package manager if available:

And the you can run the nextmeeting script:

python3 ./nextmeeting/cli.py

alternatively you can even just copy the ./nextmeeting/cli.py script to your path and run it to make it more convenient.

yay -S nextmeeting

Related

Copyright

Apache-2.0

Authors

nextmeeting's People

Contributors

bryntet avatar chmouel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

bryntet

nextmeeting's Issues

Regex parsing issue using gcalcli

My version of gcalcli outputs table headers and messes up the regex parser in cli.py

โฏ gcalcli --nocolor agenda today --nodeclined  --details=end --details=url --tsv
start_date	start_time	end_date	end_time	html_link	hangout_link	title
Traceback (most recent call last):
  File "/home/gblanchard/.local/bin/nextmeeting", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/gblanchard/.local/share/pipx/venvs/nextmeeting/lib/python3.11/site-packages/nextmeeting/cli.py", line 396, in main
    matches = gcalcli_output(args)
              ^^^^^^^^^^^^^^^^^^^^
  File "/home/gblanchard/.local/share/pipx/venvs/nextmeeting/lib/python3.11/site-packages/nextmeeting/cli.py", line 157, in gcalcli_output
    return process_file(cmd.stdout)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/gblanchard/.local/share/pipx/venvs/nextmeeting/lib/python3.11/site-packages/nextmeeting/cli.py", line 138, in process_file
    f"{match.group('end_date')} {match.group('end_time')}"  # type: ignore

I added a few lines of code to process_file to skip the first line of the stdout of gcalcli and appears to fix the issue.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.