Update your mattermost status at ease
I work in a pretty big team of engineers (> 60 people) inside a very large office and we use self-hosted mattermost server. Sometimes I am too far away from my colleagues to be called shouting or sometimes they are too lazy to walk for ~ 10 seconds to my desk and check if I am away or not. They keep me asking 'hey, update your mattermost status to let everyone know when you are absent', then I am like 'should I make 4 mouse clicks and type ~ 20 characters for every bathroom breaks or a stretch? no way'. Maybe I am too lazy as well or it isn't too much compared to my habit to wander all across the office too much very often (I normally sit up/down my office chair nearly 40~50 times a day and that's why my nickname is pendulum).
So I have decided to make an automation to help me reduce the fingertips when I am updating my mattermost status. It had
to be simple as enough by pressing a few hotkeys, it had to override my screenlock hotkey (Super + L
) because there's
a strict company policy reads You must lock your screen when you are away
. That's the great, historical demand of this
small utility.
⚠️ WARNING: Before you dive deeper, I need to warn you this little program was not meant to be production-ready, it was only for my personal use (or my colleagues who loves Ubuntu). It is not well-tested, only tried manual and insufficient testing infocal
. It might break in other distros, other environemnts, or it doesn't even run on macOS or Windows. It might be also buggy, and I am not 100% sure about its reliability. Use it at your own risk.
-
Override
Super + L
hotkey, show app window instead -
Pressing a button updates your mattermost status
-
Each status button has a hotkey, so that you can accelerate the screenlock process (e.g
Super + L, z
to setSleeping...
) -
Timeout in 5 seconds fallback to general away status
BRB soon.
-
Unlock monitor (which needs be started at login and be kept running), which listens to screen unlock event and update the status as
Working...
⚠️ WARNING: This project can only be run on Ubuntu Desktop and its subdistros (e.g Pop!_OS). Tested only onfocal
.
- GNOME shell
>=3
- gjs
>=1.64
- Node.js
>=16
(might be able to run on lower versions as well, not tested) - Mattermost server
>=6
(with APIv4
) and an account in it ofc
# clone from github
git clone git@github.com:cednore/pendulum.git
# cd into repo directory
cd pendulum
# generate a new dotenv file
cp .env.example .env # customize with your own settings after this
# install npm dependencies
npm install
# start main window
npm start
# start unlock monitor
npm run unlock-monitor
- Git clone this repo somewhere you like it
- Prepare
.env
file inside the directory and customize your mattermost server url, username and password npm install
inside the directory- Override
Super + L
hotkey with start.sh script - Add unlockmonitor.sh to startup application
- More status presets
- Set expiration of custom status (not found in mattermost api doc, is it possible?)
- Darken rest of the screen except the main screen
- Single JS bundle file by webpack
- Easy installation script, available directly from github
- GitHub action powered release pipeline
- Customizable status presets via json file
- Extend to Slack
- Add markdown badges for Mattermost, GNOME, GJS
This project is licensed under the MIT License.
- Credit to @mattermost Team for building such a powerful team collaboration app (also made it self-hostable) 🤗
- Special thanks to those behind gjs, you made my life easier 💪
- Thanks to my colleagues, who were too lazy to call me shouting and prefered checking mattermost status for my absence 🦥