1. Nikolaj Sjujskij
  2. scripties


Nikolaj Sjujskij  committed cb5982d

Add Discworld fortune displayer

  • Participants
  • Parent commits 40f9af5
  • Branches default

Comments (0)

Files changed (1)

File discfortune.sh

View file
+# Get a fortune from `fortune`, format it, and display via D-Bus notification
+# system. Time for quote to hang on the screen is calculated by the word number
+# (one second per word)
+fortext="$(fortune $WHAT | fmt -stuw 110)"
+length=$(echo "$fortext" | wc -w)
+let "time=length*1000"
+sw-notify-send "Discworld" "$fortext" -t $time