Git Product home page Git Product logo

msteams-notify-sound-python's Introduction

MS Teams Notify with Sound (Python porting)

Disclaimer

This script is a porting of the code written by Christian Foti in Rust (https://github.com/christianfosli/msteams-notify-with-sound). I wanted to modify some things (e.g., remove duplicate notifications and be able to select the sound myself), but I don't have a deep knowledge of the language. Hence, the porting from here.

Problem

Using the Microsoft Teams PWA on a Linux distribution with Gnome, it can be easy to miss notifications.

The built-in notifications (at least with PWA installed via Chrome) only appear for a short period of time, and there is no sound when they appear, so unless you are constantly looking at the screen, or constantly checking in MS Teams itself it's easy to miss something.

Solution

This python-based console app listens to the notification on dbus and republishes the notification with a notification sound and in a way that it doesn't dissapear from the notifications center right away.

โš ๏ธ Work-In-Progress

Usage

  1. Clone this repository
  2. Customize the configuration variable of the script (msteams-notify-sound-python.py) if you need to:
    1. For example if you installed the Teams PWA with Microsoft Edge instead of Google Chrome you'll want something like this
  # Selected Browser
  selected_browser = "Microsoft Edge"
  #selected_browser = "Google Chrome"
  1. Install python requirements if you need:
  sudo apt install python3-gi
  pip3 install dbus-python playsound xdg-base-dirs
  1. Copy the following files in your $HOME directory:
  cp msteams-notify-sound-python.py $HOME/.local/bin
  cp msteams-notification-tone.mp3 $HOME/.local/share/sounds/msteams-notify-sound-fix/
  cp msteams-notify-sound-python.service $HOME$/.config/systemd/user/
  1. Run it in the background automatically with systemd. E.g.
  systemctl --user enable ./msteams-notify-sound-python.service
  systemctl --user start msteams-notify-sound-python.service
  1. Troubleshooting the systemd service:
  systemctl --user status msteams-notify-sound-python
  journalctl SYSLOG_IDENTIFIER=msteams-notify-sound-python -f

msteams-notify-sound-python's People

Contributors

guidovicino avatar

Watchers

 avatar

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.