Rename scripts
Signed-off-by: Severin Kaderli <severin.kaderli@gmail.com>
This commit is contained in:
parent
df6b44e541
commit
410d0b33c6
46 changed files with 566 additions and 249 deletions
19
system/.config/polybar/scripts/gmail/count.py
Executable file
19
system/.config/polybar/scripts/gmail/count.py
Executable file
|
@ -0,0 +1,19 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import os
|
||||
import pathlib
|
||||
import subprocess
|
||||
import time
|
||||
import argparse
|
||||
from apiclient import discovery, errors
|
||||
from oauth2client import client, file
|
||||
from httplib2 import ServerNotFoundError
|
||||
|
||||
DIR = os.path.dirname(os.path.realpath(__file__))
|
||||
CREDENTIALS_PATH = os.path.join(DIR, 'credentials.json')
|
||||
|
||||
|
||||
gmail = discovery.build(
|
||||
'gmail', 'v1', credentials=file.Storage(CREDENTIALS_PATH).get())
|
||||
labels = gmail.users().labels().get(userId='me', id='INBOX').execute()
|
||||
print(labels['messagesUnread'])
|
Loading…
Add table
Add a link
Reference in a new issue