aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorben <ben@nagy.contact>2025-05-12 15:06:41 -0700
committerben <ben@nagy.contact>2025-05-12 15:06:41 -0700
commitf076cfafbae7f055dab71cbe3221a56314ee80a1 (patch)
tree14631b2c537a273f0b13cc7d39485ce82d9726d5
parent0649aa7409f92817cce984c34e5125489533eff0 (diff)
README usage
-rw-r--r--README.md39
1 files changed, 37 insertions, 2 deletions
diff --git a/README.md b/README.md
index 57d148c..0f656b5 100644
--- a/README.md
+++ b/README.md
@@ -1,14 +1,49 @@
[![Built with matrix-nio](https://img.shields.io/badge/built%20with-matrix--nio-brightgreen)](https://github.com/poljar/matrix-nio)
# Matrix-mcnt
-Matrix message count outputs the number of unread messages of all or of specified rooms to stdout.
+Matrix message count outputs the number of unread messages of all or of specified rooms to stdout. This can be useful to place in your status bar to see if you have new messages without explicitly checking in the app.
# Usage
+python3 matrix-mcnt.py --username USERNAME [options]
+```
+Required arguments:
+ --username USERNAME Your Matrix username without the @username:matrix.org format
+
+Optional arguments:
+ --access-token TOKEN Use access token instead of password authentication
+ --passwd PASSWORD Supply password in command line (otherwise will prompt)
+ --homeserver SERVER Matrix homeserver (default: matrix.org)
+ --rooms ROOM_IDS List of room IDs to include (all non-specified rooms will be excluded)
+ --exclude-rooms IDS List of room IDs to exclude
+ --print-rooms Print all available rooms and their unread counts
+```
+
+**Examples:**
+
+- get unread count for all rooms
+
+```
+$: python3 matrix-mcnt.py --username 'alice' --passwd 'alicespassword123'
+23 # 23 unread messages
+```
+
+- Get unread count for specific rooms
+```
+$: python3 matrix-mcnt.py --username 'alice' --passwd 'alicespassword123' --rooms '!Abcdefghijklmnopq' '!Bbcdefghijklmnopq'
+4
+```
+
+- Using `pass` to supply user password
+```
+$: python3 matrix-mcnt.py --username 'alice' --passwd $(pass Element/alice)
+12
+```
+
# Install
-1. Clone the repo and satisfy dependencies
+1. Clone the repo and satisfy its dependencies
```
git clone https://github.com/arachnida82/matrix-mcnt
cd matrix-mcnt