Skip to content

Instantly share code, notes, and snippets.

Last active Jul 6, 2021
What would you like to do?
Since ruby 3.0.0 teh hackersays gem has failed to work, so i cobbled this together, show quotes in dunst/libnotify desktop notifications.
#export DISPLAY=":0"
export XDG_RUNTIME_DIR=/run/user/$(id -u)
#export XAUTHORITY=/home/cirrus/.Xauthority
BOOT=$( wget -O - 2>/dev/null | sed -e '/<span>/b' -e d | head -n1 |cut -c7- | grep -Po '.*(?=.......$)' && wget -O - 2>/dev/null | sed -e '/<cite>/b' -e d | head -n1 |cut -c7- | grep -Po '.*(?=.......$)'
dunstify -i "$icon" -r 100 "Hackersays" "$BOOT"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment