Commit Graph

400 Commits

Author SHA1 Message Date
Michael Stapelberg af71d3a2f1 Merge pull request #1590 from acrisci/bug/i3bar-no-markup-default
i3bar: don't parse markup on statusline by default
2015-03-28 10:08:41 +01:00
Tony Crisci beaf904943 i3bar: don't parse markup on statusline by default
fixes #1565
2015-03-27 19:00:32 -04:00
Michael Stapelberg 856e1f9772 Merge pull request #1591 from Airblader/feature-child-cleanup
Return in child parsing as soon as the match was made.
2015-03-27 09:51:00 +01:00
Michael Stapelberg fb0573e183 Merge pull request #1582 from shdown/allow-escaping-backslashes
Allow escaping backslashes
2015-03-27 09:40:09 +01:00
Ingo Bürk 6adc7e8bfb Return in child parsing as soon as the match was made.
As soon as we found the current key for which the value should be handled we can return
from the function to save some string comparisons.
2015-03-27 09:26:29 +01:00
Tony Crisci 3f3b2d9a3f i3bar: reconfigure strut partial on reload
Strut partial tells i3 where to reserve space for i3bar. It is affected
by the `position` bar config directive.
2015-03-25 19:17:06 -04:00
Michael Stapelberg 037cb317cb Merge pull request #1578 from Airblader/feature-custom-separator
Add support for a custom separator symbol
2015-03-25 22:49:09 +01:00
Ingo Bürk 80da100ac8 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.

fixes #1472
2015-03-25 21:38:55 +01:00
Michael Stapelberg bbb035d975 Merge pull request #1583 from shdown/next
i3bar: spelling fixes (2)
2015-03-25 20:16:00 +01:00
shdown 6d8891894e Allow escaping backslashes
Fixes #1577.
2015-03-25 21:32:46 +03:00
shdown 6922a820a6 i3bar: spelling fixes (2) 2015-03-24 15:41:16 +03:00
Tony Crisci 177c03debd i3bar: check `short_text` for NULL on dump
Check `short_text` for NULL on statusline dump, since this value can be
NULL when not given. Fixes a segfault in that case.
2015-03-24 06:00:26 -04:00
Tony Crisci 0962c7f011 i3bar: check block text for NULL
Add a null check to `full_text` and `short_text` for a block before
setting the markup property to avoid a segfault.
2015-03-24 05:45:20 -04:00
Tony Crisci e681f34ec1 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.
2015-03-24 02:27:38 -04:00
Michael Stapelberg ff62a68c1e Merge pull request #1570 from shdown/next
i3bar: spelling fixes
2015-03-23 22:10:17 +01:00
shdown e8704bb33b i3bar: spelling fixes 2015-03-23 22:56:49 +03:00
Ingo Bürk c9019ada4e Add support for short_text
When the statusline is too long, try to use the short_text property of each status block before falling back to truncating it.
fixes #1092
2015-03-23 11:24:30 +01:00
Ingo Bürk dd488818a9 Introduce the short_text property on blocks and parse it according to the documentation. 2015-03-23 11:03:45 +01:00
Michael Stapelberg 8d0fb482d9 clang-format and rearrange comments in i3bar/src/xcb.c 2015-03-23 09:23:01 +01:00
Michael Stapelberg 33fa3284db Merge pull request #1560 from shdown/refactoring
i3bar: refactoring
2015-03-22 21:29:03 +01:00
shdown f19fa0e3c9 i3bar: introduce get_tray_width() function to reduce duplication 2015-03-22 13:28:00 +03:00
shdown 62e4caa06c i3bar: refactor magic numbers to *_px constants 2015-03-22 13:28:00 +03:00
Michael Stapelberg 9493b61bb4 i3bar: set correct initial position when reconfiguring
fixes #1542
2015-03-21 22:50:48 +01:00
shdown b2309b8681 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.
2015-03-21 19:41:38 +03:00
shdown b1c7c7eea4 i3bar: fix spelling is messages 2015-03-21 19:22:31 +03:00
shdown 4d3867f178 i3bar: rename a variable
Give it a more meaningful name.
2015-03-21 19:17:05 +03:00
shdown b28bb20caa i3bar: add binding indicator width to workspace buttons width
Just to prevent the indicator from being overlapped by the statusline.
2015-03-21 19:12:29 +03:00
shdown ccd6ae8eaf 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.
2015-03-21 19:08:40 +03:00
shdown 5efcfda2ed 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.
2015-03-21 19:00:11 +03:00
Michael Stapelberg 1124041648 clang-format 2015-03-01 17:19:42 +01:00
Michael Stapelberg 91476e2c11 Merge branch 'defect-1480' of https://github.com/Airblader/i3-original into Airblader-defect-1480 2015-03-01 17:19:22 +01:00
Michael Stapelberg 091f1db39a run clang-format (3.5.0)
Not quite sure why there are so many differences. Perhaps we’ve gotten
out of the habit of running clang-format after every change.

I guess it’d be best to have a travis hook that runs clang-format for us
and reports any problems on pull requests.
2015-03-01 17:16:03 +01:00
Ingo Bürk 801dd06c6d free block->instance when cleaning up statusline 2015-02-18 20:29:11 +01:00
Ingo Bürk 1fde82d584 removed forgotten declaration of unused variable 2015-02-18 20:23:26 +01:00
Ingo Bürk 296fbdde12 Introduce a statusline buffer.
A buffer is introduced for the statusline which will only be copied to the actual statusline
once an entire statusline is parsed. This avoids a race condition where incompletely parsed
statuslines were rendered, causing only some status blocks to be rendered which is visible to
the user as a flickering.

fixes #1480
2015-02-18 20:11:42 +01:00
Ingo Bürk 9ff230c375 remove unused statusline_buffer 2015-02-18 20:01:52 +01:00
Tony Crisci e18e2b9f98 i3bar: use Pango markup
Parse text within workspace buttons and the i3bar statusline as Pango
markup. This lets people specify things like font weight, text color,
background color, font size, and font family in the text of i3bar.

fixes #1468
2015-02-12 14:45:34 -05:00
Michael Stapelberg db62b5a4df Merge branch 'master' into next 2015-02-11 21:08:00 +01:00
Ingo Bürk 594b29f83d Make click events on status blocks work if 'workspace_buttons no' is set.
1. Always subscribe to click events for i3bar.
2. Exit the click event handler if no current workspace was found only after clicks on status blocks have been handled.

fixes #1430
2015-02-11 20:34:43 +01:00
Ingo Bürk bf0e8c2862 Remove one level of indentation #1465 2015-02-11 20:34:19 +01:00
Michael Stapelberg 83f369a91e Merge pull request #1460 from Airblader/bugfix-1458
Correctly calculate clicks on i3bar status blocks
2015-02-11 20:18:53 +01:00
Tony Crisci d38d2dc3e3 Update bar font config on reload
Dynamically update the font when the `reload` command is called by
reloading the font with `xcb_init_late` and adjusting the size of the
bar by updating the output dimensions with a call to the ipc.
2015-02-10 14:26:22 -05:00
Ingo Bürk d75f80402a Correctly calculate clicks on i3bar status blocks
fixes #1458
2015-02-10 14:52:53 +01:00
Alexander Monakov f28ce227e3 i3bar: suspend the child when bars are fully obscured 2015-01-25 20:31:38 +01:00
Ingo Bürk 13850a55b0 Inset the urgent background of a status block for consistency with workspace buttons.
fixes #1423
2015-01-17 18:28:14 +01:00
Ingo Bürk 8ea67d0488 i3bar: Respect the urgency flag on status blocks
…by drawing urgent blocks with the same settings as an urgent workspace.

(Also use logical_px() and bar_height.)

fixes #682
2014-12-09 11:23:46 +01:00
Ingo Bürk bfd60ec619 Improve error message when a full_text property is missing 2014-12-07 19:56:51 +01:00
Ingo Bürk bf1d0c9335 ensure align = left is the default and update documentation accordingly
fixes #1403
2014-12-03 08:12:04 +01:00
Michael Stapelberg cc09348414 Merge branch 'master' into next 2014-07-24 10:11:34 +02:00
Michael Stapelberg 4699c714b3 Bugfix: add a sync call to i3bar to confirm reparents before exiting
Without this call, sometimes the tray icon windows are reparented into
i3’s container around the i3bar window, i.e. into the next remaining
window in the window hierarchy. Since i3 then closes that container
(since the i3bar window itself was closed), the tray window will also
get closed. In general, this weird interaction (getting reparented and
then closed) is not well received by tray icon providers :).

closes: #1296
2014-07-24 10:09:53 +02:00