Tony Crisci [Sun, 26 Apr 2015 00:05:55 +0000 (20:05 -0400)]
Bugfix: serialize con_id with %p in run_binding()
%p is equivalent to either %x or %lx, depending on the pointer size of the
platform. Before this commit, we always used %d, which has the same behavior
on Linux, but is not automatically expanded to %ld on e.g. FreeBSD.
This will ensure that our code stays free of warnings, at least for the
warnings that we have enabled. (Using _FORTIFY_SOURCE > 0 leads to more
warnings, some of them are harder to address.)
hwangcc [Tue, 24 Mar 2015 12:57:06 +0000 (20:57 +0800)]
Add a safe wrapper for write and fix some warnings
1. Add a function writeall and make swrite wrap that function. Use either writeall or swrite, depending on whether we want to exit on errors or not.
2. Fix warnings when compiling with a higher optimisation level.
(CFLAGS ?= -pipe -O3 -march=native -mtune=native -freorder-blocks-and-partition)
Deiz [Thu, 26 Mar 2015 19:34:37 +0000 (15:34 -0400)]
Make wizard window size and click coordinates dependent on font
This guarantees the whole visible area of the pixmap is reinitialized,
and ensures that the click bounding boxes are properly aligned with
the displayed text.
Ingo Bürk [Tue, 24 Mar 2015 22:07:25 +0000 (23:07 +0100)]
Add support for a custom separator symbol
This introduces a "separator_symbol" property for the i3bar configuration.
If set, the specified string will be used as a separator instead of a vertical line. Since it is an optional configuration, complete backwards compatibility is given.
Otherwise, placeholder windows would accumulate these over restarts. The
worst part is that they don’t get dumped properly, meaning an empty
swallows specification ends up in the state, which matches any window,
so other random windows would be matched into the placeholder (e.g.
i3bar).
If you’ve started using this feature, I’m very sorry, but I think it’s
better to revert it entirely, as it will only cause more problems in the
future as more and more people upgrade and get bitten by this if we
didn’t revert it…
Tony Crisci [Tue, 24 Mar 2015 06:27:38 +0000 (02:27 -0400)]
i3bar: set markup per block
Add `markup` to the i3bar protocol as a block member.
This is a string that determines how the block should be parsed as
markup. "pango" indicates the block should be parsed as Pango markup.
"none" indicates the block should not be parsed as markup.
shdown [Sat, 21 Mar 2015 16:41:38 +0000 (19:41 +0300)]
i3bar: fix click events for workspace buttons with long statusline
This combines detecting of current and clicked workspaces into one cycle
and then checks if the x coordinate of the clicked point is greater than
the workspace buttons width.
Ingo Bürk [Sat, 21 Mar 2015 16:10:20 +0000 (17:10 +0100)]
Allow referencing the workspace by number.
This allows "--workspace 3" for numbered workspaces, e.g., if the name is actually
"3:foo". This introduces the same functionality the IPC already offers in many places.
shdown [Sat, 21 Mar 2015 16:08:40 +0000 (19:08 +0300)]
i3bar: cut long statuslines from the left
This draws the statusline after drawing (and calculating width of) the
workspace buttons and fixes calculation of its maximum visible width.
This (hopefully) guarantees that these two will never overlap.
shdown [Sat, 21 Mar 2015 16:00:11 +0000 (19:00 +0300)]
i3bar: fix clearing of the statusline pixmap
This fixes the bug when statusline pixmap wasn't entirely cleared that
caused random artifacts to appear when the statusline width is greater
than the screen width.
Ingo Bürk [Wed, 18 Mar 2015 20:37:37 +0000 (21:37 +0100)]
Make the --workspace optional by defaulting to the focused workspace.
If no option is given, i3-save-tree should default to the currently focused workspace.
Specifying both --workspace and --output will still yield an error.
Tony Crisci [Mon, 16 Mar 2015 03:30:00 +0000 (23:30 -0400)]
bugfix: workspace rename focus mismatch
When renaming a workspace on another output that moves the workspace to
the current output, the renamed workspace would be shown even though it
does not contain the focused container.
Explicitly show the focused workspace after the move. This is necessary
because `workspace_move_to_output` will show the workspace that is
moved.
shdown [Sun, 15 Mar 2015 07:32:17 +0000 (10:32 +0300)]
Fix incorrect y-offset for text in i3bar (2)
014aa7ff7441a8a2bb53bd0956aff61faaf6f37f fixed incorrect align of small
symbols, but also introduced a problem with texts with mixed large and
normal symbols. Fix it by centering the text vertically only if its
height is smaller that the saved font height.
Fixes #1543.