Skip to content

Instantly share code, notes, and snippets.

@danhab99
Forked from Lukewh/i3blocks config
Created April 1, 2020 17:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danhab99/03d6a99b45ca13f0ffdab78f606c63f3 to your computer and use it in GitHub Desktop.
Save danhab99/03d6a99b45ca13f0ffdab78f606c63f3 to your computer and use it in GitHub Desktop.
i3 bar for motivation in these times of working from home. Thanks https://gofuckingwork.com/
[motivation]
command=/path/to/motivation/script/motivation
interval=900
#!/bin/bash
MOTIVATIONS=$(curl -s 'https://gofuckingwork.com/quotes.json' | jq -c -r '[.language.en[] | if length == 2 then .[0] else . end] | join(":")')
IFS=':' read -ra QUOTES <<< "$MOTIVATIONS"
index=$(shuf -i 1-${#QUOTES[@]} -n 1)
echo "${QUOTES[$index-1]}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment