Dear Internet,
As I noted in an earlier post, Eclipse on Fedora 22 has some usability problems with the colors it uses. Eclipse uses GTK 3 for a lot of the theming of the interface. With the Gnome Adwaita theme, several of the drop-down dialogs (like Content Assist) have very little contrast between the background and foreground of a selected item. The result is the highlighted text is extremely difficult to read. Your only recourse is to mess with GTK settings.
I had managed to address an issue with the Content Assist drop-down only to run into another issue with the Quick Outline drop-down. Finally I gave up and said, “to heck with it, I’m going to redo the whole thing.” To check out the result I came up with, head over to the Eclipse Graphene repo.
Here’s an example:
When I write Java, I use Eclipse. It does what I need it to do, but there are a few things about it that bother me. One of them is that Eclipse allows very limited control over the color scheme. Most of the color settings are inherited from the desktop theme that you’re using. I recently upgraded to Fedora 22 and with the Adwaita theme under XFCE, this is what the Eclipse content assist dropdown looks like:
Notice how close the foreground and background colors are for the selected item. I find that intolerable. I’m not sure exactly why Eclipse is picking that color combination, because the content assist object is a GtkTreeView which has the selected item background color set to cerulean blue in Adwaita. In any case, to fix it create ~/.config/gtk-3.0/gtk.css
with the following contents:
GtkTreeView:selected {
background-color: @theme_selected_bg_color;
}
That snippet will override whatever weirdness is going on with the content assist dropdown and set the background color back to the theme’s default background color for selected items. You can also just set it to a hex value. Note that this setting will apply to any GTK3 application, but that should be all right since you’re just asking the theme to do what it is already doing.
bitmath-1.0.8-1 was published on 2014-08-14.
Added Functionality
Tests
Last week I wrote about bitmath, a Python module I made for working with (prefix) units commonly used to represent file sizes, e.g., kB, GiB, Byte, TB. I can now happily say that python-bitmath has passed the review process and has been officially accepted into Fedora!
Need more proof?
References:
Update: 2014-03-27 – python-bitmath is now in Fedora!
I’ve written a new Python module which I’m calling bitmath.
Given my day job as a System Administrator, and the content of my upcoming book on Linux virtual disks, I frequently find myself in situations requiring me to convert file sizes into various other formats. I recall far too many instances of having to do unit conversions mid-code in projects (does this look familiar to anyone else?):
Thus, out of necessity, bitmath was born.
I’m going to plagiarize myself here and rip the long description right from the project:
bitmath simplifies many facets of interacting with file sizes in various units. Examples include: converting between SI and NIST prefix units (GiB to kB), converting between units of the same type (SI to SI, or NIST to NIST), basic arithmetic operations (subtracting 42KiB from 50GiB), and rich comparison operations (1024 Bytes == 1KiB).
In addition to the conversion and math operations, bitmath provides human readable representations of values which are suitable for use in interactive shells as well as larger scripts and applications.
Anyone not deeply invested in the heartache that comes with converting base-2 and base-10 prefix units can stop reading now.
bitmath finally provides a uniform way to manipulate these units in a way which is natural to Python programmers. There’s nothing special or unusual required to work with bitmath objects. You can add them, subtract them, multiply and divide them — just like you’re already used to with the int and float objects. bitmath objects support all of the standard Rich Comparison Operators as well!
Converting bitmath objects is a first-class supported operation. Even more complex conversions, like converting from Mibibits to Kilobytes, is trivial. This functionality is supported in both directions: from the lowliest Bit() object through the grand EiB() object. That is to say, any bitmath object, whether it be base-2 (NIST ‘kibi’ and ‘gibi’ style) or base-10 (SI ‘kilo’ and ‘giga’ style), supports conversion (without loss of accuracy) to any other valid prefix unit.
As the previous two examples demonstrated, bitmath objects have useful console representations, as well as string representations. In a future release the format string for this may be configurable.
Fedora/RHEL6 users will need to wait a bit longer for a proper yum install command to be available, as the package is currently sitting in the package-review queue awaiting judgement. Update: 2014-03-27: python-bitmath is now in Fedora!
However, there are several other methods available for installation: installing from PyPi, building your own RPM, and from setup/distutils.