Ingo Bürk [Tue, 31 Mar 2015 18:47:22 +0000 (20:47 +0200)]
Only mark a window if only one window is matched
We only support unique marks, so looping over all matched windows must be prevented.
If more than one window is matched, we reject it with an error message.
Ingo Bürk [Sat, 28 Mar 2015 23:26:49 +0000 (00:26 +0100)]
Make show_marks configurable
Introduce a config directive "show_marks [yes|no]" to en- or disable drawing marks on window decorations.
To not change the look & feel of existing configurations, the default is "no".
Ingo Bürk [Sat, 28 Mar 2015 23:13:44 +0000 (00:13 +0100)]
Introduce a cached boolean for changes to the mark of a window.
This is necessary to correctly redraw window decorations when the mark of
a window is added or removed.
Ingo Bürk [Sat, 28 Mar 2015 23:09:10 +0000 (00:09 +0100)]
Draw marks in window decoration
If a window has a mark set, e.g., "example", it will be printed on the right side of the window decorations.
The format is "[example]" and the name of the window is truncated if necessary.
Marks starting with an underscore ("_") will be ignored.
Ingo Bürk [Mon, 30 Mar 2015 20:07:48 +0000 (22:07 +0200)]
Added 'focus_on_window_activation' directive
When a window receives a _NET_ACTIVE_WINDOW message, it can steal the focus. This may not be preferable to all users.
With this directive, the user can choose from one of the following:
1) 'smart' - focus the container if its workspace is visible, otherwise set the urgency flag (default)
2) 'urgent' - always set the urgency flag, do not steal focus
3) 'focus' - always switch focus, never set the urgency hint
4) 'none' - ignore the request entirely (do not switch focus, nor set the urgency hint)
Ingo Bürk [Sat, 28 Mar 2015 18:12:25 +0000 (19:12 +0100)]
Added a --toggle switch to "mark [--toggle] <mark>"
This option allows toggling marks on a window without knowing whether the mark is already set or not.
It behaves as follows:
1) If the matched window has no mark, the new mark is set.
2) If the matched window has another mark, the old mark is removed and the new mark is set.
3) If the matched window already has the mark, the mark is removed.
The behavior that all non-matched windows have this mark removed is kept.
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 [Fri, 27 Mar 2015 08:20:03 +0000 (09:20 +0100)]
Open i3-nagbar on the primary screen
If a primary screen is set and the CRTC information can be retrieved,
i3-nagbar will now open on the primary screen. Otherwise, the old (fixed)
position will be used as a fallback.
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.