deven96 / excuses

Send an excuse to slack when away

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Excuses

Send an excuse to your "I will be away" Channel on slack after x seconds away from your computer

Setup

#Configure the following env variables for slack
#- APP_SLACK_WEBHOOK
#- APP_SLACK_CHANNEL (optional)
#- APP_SLACK_USERNAME (optional)
#- APP_SLACK_ICON_EMOJI (optional)

# Make sure to add chat:write access to your app to enablethe application post as your user and not as Bot
# Read https://api.slack.com/scopes

Make sure excuses is executable

chmod +x ./excuses.sh
# Run the tests
./excuses.sh -t

Use nohup to run in background

# I considered using crontab but cronjobs have no access to GUI sessions (Quarz dictionary on MacOS) used to tell 
# if a system is locked or not, 
# enter the following to run excuses
`./excuses.sh &>/tmp/excuses.log`

This sets up a slack shell script that helps in sending messages to channels

About

Send an excuse to slack when away

License:MIT License


Languages

Language:Shell 100.0%