Basically, xclock is a great tool, and every basic X setup would have it "onboard". However, configuring xclock (analog) while keeping XRender active is definitely not for the faint of heart. In particular, beginners will not have any chance to configure the analog clock without delving deeply into the .Xresource realm, since everything you set at the command line will be for the non-rendered mode only (requires option -norender) and ignored by default (which means, that XRender is being used). Plus, the documentation about it is abysmal, and examples which actually deal with XRender are rare as hen's teeth. Hence, I decided to start my own approach.
I wish there was an easier way to do all this, but there apparently isn't.
For one, this question will probably help new users as a guide how to set things up for "their" xclock; on the other hand, I'd also like to ask you guys if there is any way to improve my "configuration file" (mind the quotes).
Oddly enough, .Xresources is widely deemed "obsolete" and "last century", but what if the application you use does rely on the old-fashioned way, using xrdb, .Xresources and the whole caboodle?
I personally fancied a "night design" because it fit perfectly to my desktop style. So this is what I did:
$ touch ~/.Xresources
$ vi ~/.Xresources
XClock*foreground: #fbfbfb
XClock*background: #000018
XClock*update: 1
XClock*geometry: 210x210+1020+12
XClock.Clock.majorColor: rgba:f0/f0/19/7b
XClock.Clock.minorColor: rgba:a0/c0/f0/c0
XClock.Clock.hourColor: rgba:c9/66/11/72
XClock.Clock.minuteColor: rgba:00/82/9f/72
XClock.Clock.secondColor: rgba:50/93/30/6f
rgba stands for "red, green, blue, alpha" - where the fourth parameter, alpha, will indicate the opacity level in hexadecimal notation: a 00 will make the clock hand or tick mark invisible; a ff will turn any opacity off.
So far, so good. Since we do not want to restart the X server for these things to come into effect, we will simply merge our settings into those that may (or, as usual, may not) be already there:
$ xrdb -merge ~/.Xresources && xclock &
Although I hate to brag, I honestly think it looks way better than the boring design which is default on my desktop.
But during my efforts in getting this to work the way I wanted to, there has also a question come up from my side:
I actually "stole" the syntax XClock.Clock.<parameter> from the following resource file:
/etc/X11/app-defaults/XClock-color
Interestingly enough, ALL of those parameters which end in ...Color require the same XClock.Clock.<parameter> syntax as in app-defaults; e. g. XClock*hourColor: rgba:ff/ff/ff/80 will NOT get the hour hand white, nor set the opacity to 0x80.
Why is that so?
Up to now, I thought the * was simply a wildcard meaning XClock<whatever><parameter>.