Skip to content

Simple command line toy to randomly get /r/showerthoughts

License

Notifications You must be signed in to change notification settings

wporter82/showerthoughts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

showerthoughts

C/C++ CI Current Release

Prints out a random entry from /r/showerthoughts.

Building

Dependencies

The following libraries are required to compile and run showerthoughts:

Before invoking make, install them as follows:

Debian

$ sudo apt install libcurl3-dev libjson-c-dev

Fedora

$ sudo dnf install libcurl-devel json-c-devel

Compile

$ ./autogen.sh
$ ./configure
$ make && make install

Usage

To get a showerthought displayed at the start of each interactive login shell, add this to your .bash_profile:

# $HOME/.bash_profile
if [[ -n $PS1 ]]; then
	if hash cowsay 2>/dev/null; then
		cowsay "$(showerthoughts)"
	else
		showerthoughts
	fi
fi