bar-protonmail


Namebar-protonmail JSON
Version 1.2.0 PyPI version JSON
download
home_pagehttps://github.com/crabvk/bar-protonmail
SummaryGet notifications and unread messages count from ProtonMail (Waybar/Polybar module)
upload_time2023-11-19 17:42:01
maintainer
docs_urlNone
authorVyacheslav Konovalov
requires_python>=3.10,<4.0
licenseMIT
keywords waybar polybar protonmail
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # New message notifications and unread messages count from ProtonMail (Waybar/Polybar module)

## Dependencies

* proton-client >= 0.7.1 ([not available on pypi.org](https://github.com/ProtonMail/proton-python-client/issues/36))
* ttf-font-awesome (default badge: )
* libnotify (new email notifications, can be disabled with `-dn` flag)
* libcanberra (optional, notification sound)

To display notifications you must have a [notification daemon](https://wiki.archlinux.org/title/Desktop_notifications#Notification_servers) running on your system.

## Install

### ArchLinux and derivatives

[AUR package](https://aur.archlinux.org/packages/bar-protonmail/)

### Other distros

```sh
git clone https://github.com/crabvk/bar-protonmail.git
# WARN: Checkout to the latest tag, don't use master branch.
pip install -e .
```

And now you can execute *~/.local/bin/bar-protonmail*

## Use

First, you need to authenticate the client:

```sh
bar-protonmail auth
```

then just run `bar-protonmail` or `bar-protonmail -f polybar`.
Session, cache and log are stored in ~/.cache/bar-protonmail.

## Waybar config example

~/.config/waybar/config
```json
"modules-right": {
    "custom/protonmail"
}

"custom/protonmail": {
    "exec": "bar-protonmail",
    "return-type": "json",
    "interval": 10,
    "tooltip": false,
    "on-click": "xdg-open https://mail.proton.me/u/0/inbox"
}
```
~/.config/waybar/style.css
```css
#custom-protonmail.unread {
    color: white;
}
#custom-protonmail.inaccurate {
    color: darkorange;
}
#custom-protonmail.error {
    color: darkred;
}
```

## Polybar config example

```ini
modules-right = protonmail
...
[module/protonmail]
type = custom/script
exec = bar-protonmail -f polybar
interval = 10
click-left = xdg-open https://mail.proton.me/u/0/inbox
```

## Script arguments

See `bar-protonmail -h` for the list of arguments with descriptions.  
Possible values for `-s`, `--sound` can be found with:
```shell
ls /usr/share/sounds/freedesktop/stereo/ | cut -d. -f1
```
for example `-s message-new-instant`.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/crabvk/bar-protonmail",
    "name": "bar-protonmail",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.10,<4.0",
    "maintainer_email": "",
    "keywords": "waybar,polybar,protonmail",
    "author": "Vyacheslav Konovalov",
    "author_email": "crabvk@protonmail.com",
    "download_url": "https://files.pythonhosted.org/packages/0f/52/b9b64b892baeeaf80495635ea47eb1aa2eee80e0f4787bec524a64ad9efa/bar_protonmail-1.2.0.tar.gz",
    "platform": null,
    "description": "# New message notifications and unread messages count from ProtonMail (Waybar/Polybar module)\n\n## Dependencies\n\n* proton-client >= 0.7.1 ([not available on pypi.org](https://github.com/ProtonMail/proton-python-client/issues/36))\n* ttf-font-awesome (default badge: \uf0e0)\n* libnotify (new email notifications, can be disabled with `-dn` flag)\n* libcanberra (optional, notification sound)\n\nTo display notifications you must have a [notification daemon](https://wiki.archlinux.org/title/Desktop_notifications#Notification_servers) running on your system.\n\n## Install\n\n### ArchLinux and derivatives\n\n[AUR package](https://aur.archlinux.org/packages/bar-protonmail/)\n\n### Other distros\n\n```sh\ngit clone https://github.com/crabvk/bar-protonmail.git\n# WARN: Checkout to the latest tag, don't use master branch.\npip install -e .\n```\n\nAnd now you can execute *~/.local/bin/bar-protonmail*\n\n## Use\n\nFirst, you need to authenticate the client:\n\n```sh\nbar-protonmail auth\n```\n\nthen just run `bar-protonmail` or `bar-protonmail -f polybar`.\nSession, cache and log are stored in ~/.cache/bar-protonmail.\n\n## Waybar config example\n\n~/.config/waybar/config\n```json\n\"modules-right\": {\n    \"custom/protonmail\"\n}\n\n\"custom/protonmail\": {\n    \"exec\": \"bar-protonmail\",\n    \"return-type\": \"json\",\n    \"interval\": 10,\n    \"tooltip\": false,\n    \"on-click\": \"xdg-open https://mail.proton.me/u/0/inbox\"\n}\n```\n~/.config/waybar/style.css\n```css\n#custom-protonmail.unread {\n    color: white;\n}\n#custom-protonmail.inaccurate {\n    color: darkorange;\n}\n#custom-protonmail.error {\n    color: darkred;\n}\n```\n\n## Polybar config example\n\n```ini\nmodules-right = protonmail\n...\n[module/protonmail]\ntype = custom/script\nexec = bar-protonmail -f polybar\ninterval = 10\nclick-left = xdg-open https://mail.proton.me/u/0/inbox\n```\n\n## Script arguments\n\nSee `bar-protonmail -h` for the list of arguments with descriptions.  \nPossible values for `-s`, `--sound` can be found with:\n```shell\nls /usr/share/sounds/freedesktop/stereo/ | cut -d. -f1\n```\nfor example `-s message-new-instant`.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Get notifications and unread messages count from ProtonMail (Waybar/Polybar module)",
    "version": "1.2.0",
    "project_urls": {
        "Homepage": "https://github.com/crabvk/bar-protonmail"
    },
    "split_keywords": [
        "waybar",
        "polybar",
        "protonmail"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "62856ec4a435e579ae01761ade45bbdc87ba425ad020ea2f3c6b2f182e2c15d8",
                "md5": "24fe6b9390edbaa655e102b96d8350bc",
                "sha256": "85d75dfb0f144396354c8b8331aedc642ed67a6bbd27b6163da5a3cf1b2c8a09"
            },
            "downloads": -1,
            "filename": "bar_protonmail-1.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "24fe6b9390edbaa655e102b96d8350bc",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10,<4.0",
            "size": 9796,
            "upload_time": "2023-11-19T17:41:59",
            "upload_time_iso_8601": "2023-11-19T17:41:59.031254Z",
            "url": "https://files.pythonhosted.org/packages/62/85/6ec4a435e579ae01761ade45bbdc87ba425ad020ea2f3c6b2f182e2c15d8/bar_protonmail-1.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0f52b9b64b892baeeaf80495635ea47eb1aa2eee80e0f4787bec524a64ad9efa",
                "md5": "7ce865fb57e0c44a5c5164230fd0a64d",
                "sha256": "2e9aff1193ca8486127a40392620f91f39b23617170b6e2754b15db316b3b2e5"
            },
            "downloads": -1,
            "filename": "bar_protonmail-1.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "7ce865fb57e0c44a5c5164230fd0a64d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10,<4.0",
            "size": 8365,
            "upload_time": "2023-11-19T17:42:01",
            "upload_time_iso_8601": "2023-11-19T17:42:01.397300Z",
            "url": "https://files.pythonhosted.org/packages/0f/52/b9b64b892baeeaf80495635ea47eb1aa2eee80e0f4787bec524a64ad9efa/bar_protonmail-1.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-19 17:42:01",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "crabvk",
    "github_project": "bar-protonmail",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "bar-protonmail"
}
        
Elapsed time: 0.15579s