Coder Social home page Coder Social logo

bar-protonmail's People

Contributors

crabvk avatar

Stargazers

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

Watchers

 avatar  avatar

bar-protonmail's Issues

Message sound repeats itself for almost everything

Every time I write a message, delete a message, move a message Etc. the sound I am using for messages goes off. Including (since I have the interval set to 10) going off every 10 seconds while I am writing a new message. Is there a way (other than changing the interval) to make it only sound when you receive a new message to your inbox? I am sure it is something simple that I just haven't figured out yet, but wanted to make sure I wasn't just missing something. In case this part matters, I am using polybar with the module looking like this:

[module/protonmail]
type = custom/script
exec = bar-protonmail -f polybar -b "%{F#8A2BFF}%{T2}๏›ญ%{T-}%{F-} %{T1}" -s message-new-instant
interval = 10
click-left = xdg-open https://mail.protonmail.com/u/0/inbox

Not sure if it was just me, or something else is wrong...

I just did a reinstall of my linux laptop and when I was grabbing this the changes here:

8e280f6

did not show up, it still had the old values, and I had to go in and manually edit the file to make it work. Like I said I'm not sure if it is something I did wrong or, if it isn't actually showing up when you do the pip install bar-protonmail command. Just wanted to let ya know in case there is an issue so you can fix it. :)

Provide a `auth.json` example

auth.json is expected to be json and in my case it was not.
It might be useful for others to realise auth.json should be formatted as such:

{
    "UID": "your-uid",
    "AccessToken": "valid access token"
}

updated protonmail module for waybar/i3blocks/polybar/yabar

Hi! I stumbled across this today since I recently switched to waybar and was wondering if there was a ProtonMail module for it, and found your repository. I tinkered around with it for a while, but ultimately wasn't able to find the AUTH token and refresh token mentioned in the README so I decided to make my own since it appeared that this method had been deprecated.

I did some research and found an official ProtonMail library, and used it to make mine. It works with waybar, i3blocks, polybar, and yabar, and, given your email and password, checks the amount of unread emails in your ProtonMail inbox. I just thought I'd let you know, since your work inspired me and without seeing it I wouldn't have gotten the impetus to go and look into making my own. Thank you ๐Ÿ˜ƒ

Pip installation fails due to proton-client version requirements

Pip installation currently fails due to proton-client version requirements.

pip install bar-protonmail 
Defaulting to user installation because normal site-packages is not writeable
Collecting bar-protonmail
  Using cached bar_protonmail-1.0.0-py3-none-any.whl (8.7 kB)
ERROR: Could not find a version that satisfies the requirement proton-client>=0.7.1 (from bar-protonmail) (from versions: 0.0.4.linux-x86_64, 0.5.1.linux-x86_64, 0.0.1, 0.0.2, 0.0.3, 0.0.4, 0.0.5, 0.0.6, 0.0.7, 0.0.8, 0.0.9, 0.4.0, 0.4.1, 0.5.1)
ERROR: No matching distribution found for proton-client>=0.7.1

Weird Error when receiving new mail

2022-12-09_08-53

Everytime I get a new email I get the following error on polybar, it goes away with the next interval (10 seconds) and returns to the icon and number format. But it happens with every new email. I have not changed the scripts and the following is the module setup I am using in Polybar:

[module/protonmail]
type = custom/script
exec = bar-protonmail -f polybar -b "%{F#8A2BFF}%{T2}๏›ญ%{T-}%{F-} %{T1}" -s message-new-instant
interval = 10
click-left = xdg-open https://mail.protonmail.com/u/0/inbox

I have tried without the font and color modifiers and it still happens, so I am not sure what else to try.

JSONDecodeError

Getting the following error. On arch with sway, this had been working until a few days ago, not sure what changed yet, but guessing maybe an api change.

I'll have a look at what's going on in the next day or two, I'm assuming you would take a PR if it's something simple?

bar-protonmail auth

Username: [username]
Password:
Traceback (most recent call last):
  File "/usr/bin/bar-protonmail", line 8, in <module>
    sys.exit(cli())
  File "/usr/lib/python3.10/site-packages/bar_protonmail/__init__.py", line 34, in cli
    auth.authenticate(CACHE_DIR, SESSION_PATH)
  File "/usr/lib/python3.10/site-packages/bar_protonmail/auth.py", line 17, in authenticate
    scope = session.authenticate(username, password)
  File "/usr/lib/python3.10/site-packages/proton/api.py", line 387, in authenticate
    info_response = self.api_request("/auth/info", payload)
  File "/usr/lib/python3.10/site-packages/proton/api.py", line 219, in api_request
    if not self.__metadata.try_original_url(
  File "/usr/lib/python3.10/site-packages/proton/metadata/textfile_metadata.py", line 37, in try_original_url
    self.__get_metadata_from_file()["last_api_call_time"]
  File "/usr/lib/python3.10/site-packages/proton/metadata/textfile_metadata.py", line 82, in __get_metadata_from_file
    metadata = json.load(f)
  File "/usr/lib/python3.10/json/__init__.py", line 293, in load
    return loads(fp.read(),
  File "/usr/lib/python3.10/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.10/json/decoder.py", line 340, in decode
    raise JSONDecodeError("Extra data", s, end)
json.decoder.JSONDecodeError: Extra data: line 1 column 106 (char 105)

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.