Initial commit
tz-dmenu is a program that displays the current time in various time zones via dmenu.
Three versions of this program exist.
Python: this was the first version and Python was chosen due to my familiarity with the language.
Rust: I decided to try and write this in Rust as a learning exercise. This version is missing nice error handling which would be good to add as I learn more.
Racket: I've been playing with Racket in recent times and am always looking for an excuse to write more Racket code. This small program was a good opportunity to do this.
Clojure: Similar to Racket, Clojure has piqued my interest and this small program is not too ambitious to write in a new language.
~/.config/tz_dmenu/config.ini
and populate it with the time zones you want to view. Here is an example:[timezones]
Tokyo = Asia/Tokyo
python/tz_dmenu
to a location on your PATH
and execute it or bind it to a keystroke combination.~/.config/tz_dmenu/config.toml
and populate it with the time zones you want to view. Here is an example:[timezones]
Tokyo = Asia/Tokyo
$ cd rust
$ cargo build --release
rust/target/release/tz_dmenu
to a location on your PATH
and execute it or bind it to a keystroke combination.~/.config/tz_dmenu/config.rkt
and populate it with the time zones you want to view. Here is an example:(("Tokyo" . "Asia/Tokyo"))
$ cd racket
$ raco exe tz_dmenu.rkt
racket/tz_dmenu to a location on your
PATH` and execute it or bind it to a keystroke combination.~/.config/tz_dmenu/config.edn
and populate it with the time zones you want to view. Here is an example:[{:name "Tokyo" :tz "Asia/Tokyo"}]
clj
.$ clj -m tz-dmenu.core
I intended on creating a pre-built binary with GraalVM however I ran into issues with the date libraries that I tried using. Writing some Java interop might solve this problem however I will wait to see if either of these issues are fixed.
java_time.graph.Types cannot be cast to java.lang.Comparable
Exception in thread "main" java.lang.IllegalArgumentException: No matching method withZoneSameInstant found taking 1 args for class java.time.ZonedDateTime
Inspired by networkmanager-dmenu