Recently, I was forced to check whether application is in Dark/Light theme (status icon must be either white or black).
I have found two solutions. First one
boolean isDark = [NSAppearance currentAppearance] name]
and second one
boolean isDark = [[[NSUserDefaults standardUserDefaults]
stringForKey: @"AppleInterfaceStyle] isEqual: @"Dark"]
To my surprise, both can give different results.
First one, seems to fail when you open new window from the status bar icon. In that case, after closing the window you get the value @”NSAppearanceNameVibrantLight”, which is wrong. It seems that for some reason window thinks it is executed in Light mode instead of Dark.
If you are fan of Type-R, as I am, you will probably like this one :)
You probably know that feeling when you link randomly placed elements and, at some point, something unexpected emerge. This is exactly the case I had with Ann Cotten.
So, it started with Gh+ broadcast by Grzegorz Hoffmann. At 8-th of December he was playing Mr. Oizo and some other stuff that was pretty cool. As I couldn’t find this particular episode I started to browse a little bit on Gh+ pages and I have found this piece of music: Tarwater – Homology Myself (link). You can also find it on iTunes if you like (link). To be honest, at first, I was sure the poem that was used as a lyrics was written by William Blake. The reason here was that way of performing it and the way of the composition resembles parts of the music you can find on Dead Man OST composed by Neil Young. My mistake. It turned out that I was plain wrong. The author of the poem was Ann Cotten. Once I had this one, I had to find the book and it must have contained the poem translated into english – I don’t speak german. After few tries I have eventually found the book: Ditchten= 10. To my surprise it turned out to be quite good collection of modern, german, poets (you should try it for yourself as well).
So, in my case, getting Ann’s poetry was something like this:
And, that’s all for something completely different for today :)
I have intentionally used homology in the mathematical sense. I couldn’t find Ann’s logo :)
If you experience the issue with following error:
rxvtimg.C: error: ‘PictOpDifference’ was not declared in this scope
you can overcome it by commenting out following part in config.h
/* Define to enable xrender support */
/* #undef XRENDER */
Optionally, you can disable transparency by setting following settings in config.h
/* Define if you want your background to use the parent window background */
#error Blitz is configured with –enable-threadsafe,
but no compiler thread support is found.
Did you forget, e.g., "–pthread"?
This message might be quite confusing, as typically, you will blindly take “–pthread” and pass directly into g++. However, g++ have other option :)
DDD – compilation fails: strclass.C: In function ‘std::istream& operator>>(std::istream&, string&)’: error: ‘EOF’ was not declared in this scope
If you have an issue while compiling DDD
strclass.C: In function ‘std::istream& operator>>(std::istream&, string&)’:
strclass.C:1546:35: error: ‘EOF’ was not declared in this scope
Go ahead, and thanks this guy http://garricksblog.blogspot.com/2012/02/mid-terms-and-build-errors.html.
quote: “It turns out that the constant EOF was not probably declared by including stdio.h. So I went ahead and added that in:
homer@homer-desktop:~/MyPrograms/ProgramSourceCode/ddd-3.3.12$ diff ddd/strclass.C ddd/strclass.C.old
I owe you a beer ;)
Recently, while reading Getting started with tmux, I have read about really nice theme -“SOLARIZED”. You can find it here: http://ethanschoonover.com/solarized
There is a predefined profile for iTerm, so you are good to go straight after downloading it. Highly recomended.