When sorting workspaces in ascending order, put numerical
workspaces *after* non-numerical ones.
When sorting in descending order, put numerical workspaces *before*
non-numerical.
In both cases, sort numerical workspaces using a numerical comparison,
rather that doing a lexicographical sorting.
Closes#30
96d2d057e0
added a new tag, ‘volume’, but didn’t bump the tag count.
This meant the last tag in the set, ‘elapsed’ was never seen by
anybody, and not free:d when the tag set was free:d.
We use pre-multiplied alpha color channels, but were having bad
rounding errors due to the alpha divider being truncated to an
integer.
The algorithm for pre-multiplying a color channel is:
alpha_divider = 0xffff / alpha
pre_mult_color = color / alpha_divider
In order to fix the rounding errors, we could turn ‘alpha_divider’
into a double.
That however would introduce a performance penalty since now we’d need
to do floating point math for each cell.
The algorithm can be trivially converted to:
pre_mult_color = color * alpha / 0xffff
Since both color and alpa values are < 65536, the multiplication is
“safe”; it will not overflow an uint32_t.
When sorting workspaces in ascending order, put numerical
workspaces *after* non-numerical ones.
When sorting in descending order, put numerical workspaces *before*
non-numerical.
In both cases, sort numerical workspaces using a numerical comparison,
rather that doing a lexicographical sorting.
Closes#30
96d2d057e0
added a new tag, ‘volume’, but didn’t bump the tag count.
This meant the last tag in the set, ‘elapsed’ was never seen by
anybody, and not free:d when the tag set was free:d.
We use pre-multiplied alpha color channels, but were having bad
rounding errors due to the alpha divider being truncated to an
integer.
The algorithm for pre-multiplying a color channel is:
alpha_divider = 0xffff / alpha
pre_mult_color = color / alpha_divider
In order to fix the rounding errors, we could turn ‘alpha_divider’
into a double.
That however would introduce a performance penalty since now we’d need
to do floating point math for each cell.
The algorithm can be trivially converted to:
pre_mult_color = color * alpha / 0xffff
Since both color and alpa values are < 65536, the multiplication is
“safe”; it will not overflow an uint32_t.
If the user did *not* configured a specific monitor, we prefer the
primary monitor. However, if that monitor is disconnected, yambar
would exit with:
no matching monitor
This patch changes this, to use the *last* connected monitor. It also
improves the error message.
Note: if the user did specify a monitor in the configuration, but
perhaps misspelled it, we will *not* fallback to another monitor, but
instead log an error saying that specific monitor could not be found.