Undead Blog
ex·an·i·mate | no longer living, post-life
Blog | Mastodon
Sat, 2019 Sep 14

Multi-timezone digital xclock

Here is how to get an xclock display that would show multiple color coded timezones for each hour, but otherwise was small and out of the way. Timezone has to be set for each xclock element. The individual color coded hour elements are spaced so that they fall in the blank space(s) of the larger UTC clock.

The code below lives in my ~/.xsession file. It is important to put the individual color coded hours first, and the larger UTC time clock last, as the .xsession file is processed "front to back" for displaying the xclocks in a layer.

(export TZ=US/Pacific ; xclock -d -fg purple1 -padding 1 -font "-urw-urw chancery l-medium-i-normal--24-0-0-0-p-0-iso8859-13" -g -36+0 -strftime "%H ") &

(export TZ=UTC ; xclock -d -fg darkgray -padding 1 -font "-urw-urw chancery l-medium-i-normal--24-0-0-0-p-0-iso8859-13" -g -1+0 -strftime "%F [ %H / ]:%M ") &

[/openbsd] permanent link

Taking a screenshot from the CLI on OpenBSD

First, the one you will probably never use because you don't get the output in a easily usable format. xwd -screen -out shot.xwd and xwud -in shot.xwd get and display screenshots. Unfortunately, it doesn't display them in a format other than xwd, the "X Windows Dump" image format.

I'm going to assume you want to get a screenshot with an image that you can actually use later on, in a blog post or the like. This would mean converting the image, which means installing ImageMagick. Chances are, it was already installed as a dependency, but if not using doas pkg_add ImageMagick will fix that. One of the tools is import. Simply import shot.png. The file can be used immediately.

Old xwd files can be converted to any format by the Image Magick convert tool, as simple as requesting the file be renamed from one format extension to another- convert shot.xwd shot.png.

[/openbsd] permanent link