Technoholic

Programming and Productivity tips and tricks

Inspirational Quotes ON the desktop

February 06, 2021 — Vinayak Gadkari

quotes-title

I try to keep my desktop clean so that I can display only the items that require my immediate attention. I also like to start my day with an inspirational quote. Since the desktop is the first thing one sees after booting up the system in the morning, here is a jugaad that uses Autohotkey and bginfo to put a random quote on your desktop.

I initially tried out Rainmeter and Samurize, but found them a bit too heavy for this simple application. Here is a way to do this without using any third part tools.


Desktop

quotes-desktop

Steps:

  1. Create a quotes text file which has one quote per line (myquotes.txt). The first line indicates the no. of quotes in the file.
  2. Use bginfo to show this text file on your desktop. Save the settings (BGInfoSetup.bgi). bginfo handles multi-monitor configurations which is a huge plus for me.
  3. Use Autohotkey functions to display a random quote every time the function is called. This can be called periodically using Autohotkey timers or as required. I call the function every time I add a to-do to be displayed on the screen.

1) Quotes file

3 Dwight Eisenhower – What counts is not necessarily the size of the dog in the fight; it’s the size of the fight in the dog. Peter Drucker – Management is doing things right; leadership is doing the right things. John Wooden – Don’t let what you cannot do interfere with what you can do.

2) BGInfo setup

quotes-with-bginfo

3) Autohotkey functions

; **************************************************
; Quotes displayed on desktop
; **************************************************
BGDisplay()
{
  Run, bginfo.exe e:\Vinayak\bin\BGInfoSetup.bgi /timer:0,,Hide
}

NextQuote()
{
  QuotesFile = E:\Vinayak\bin\todo\myquotes.txt
  FileReadLine, totallines, %QuotesFile%, 1
  Random lineno, 2, %totallines%+1
  FileReadLine, nextquote, %QuotesFile%, %lineno%
  FileDelete, %QuotesFile%.show
  FileAppend, %nextquote%, %QuotesFile%.show
}

Tags: productivity, inspiration