Commit Graph

5862 Commits

Author SHA1 Message Date
Adaephon-GH 76db8b73ae Make rendering of key bindings more consistent
- Render key names and key bindings verbatim if they could be used like
  that in the configuration (no special format for "colloquial" names:
  Alt, Windows, ...)
- Use only lower case letters for key bindings
2015-10-28 21:56:45 +01:00
Adaephon-GH 2e5cfdeea0 Improve placement of explicit IDs for headings
In some cases the IDs of section titles was placed after the section
title. With that in the rendered HTML the ID was placed on the paragraph
and not on the heading. This led to heading not being shown when the
corresponding link was clicked.
2015-10-28 21:56:43 +01:00
Adaephon-GH 2a22b5d561 Quote __focused__ to prevent parsing by asciidoc
Text between two "__" is rendered as italics by asciidoc. This affects
the display of the new __focused__ special value for criteria.
2015-10-28 21:56:41 +01:00
Michael Stapelberg 724cfebe5e fix a memory leak in handle_get_bar_config 2015-10-28 21:56:39 +01:00
Michael Stapelberg 5648221d06 Fix memleak in translate_keysyms 2015-10-28 21:56:34 +01:00
Ingo Bürk 27535398f5 Turn "char *" into "const char *" for all command parser functions. 2015-10-28 21:56:17 +01:00
Ingo Bürk 9978050d91 Migrate the move command to use typed numbers. 2015-10-28 21:56:16 +01:00
Ingo Bürk a271666fa7 Migrate the resize command to use typed numbers. 2015-10-28 21:56:14 +01:00
Ingo Bürk f5f5683fa7 Allow the commands parser to use "number" arguments by making the stack typed. 2015-10-28 21:56:11 +01:00
Adaephon-GH 5049990284 Fix erroneous headline for moving to mark
The headline indicated that it would be possible to move containers and *workspaces* to marks but the following text clearly shows that it should state containers and *windows*.
2015-10-28 21:55:07 +01:00
Ingo Bürk 0a16a4b5e5 Add proper documentation for binding modes.
fixes #1996
2015-10-28 21:55:05 +01:00
Ingo Bürk ab9d74b434 Fix moving windows to a marked workspace by mark.
When a window is moved to a mark and the marked container is a workspace,
we can skip any other logic and just call con_move_to_workspace directly.

fixes #2003
2015-10-28 21:55:03 +01:00
Ingo Bürk bfd9960df2 Suppress no_focus for first window on a workspace.
With this patch, the no_focus directive will be ignored if the
to-be-opened window is the first on its workspace as there's no
reason the user would not want to focus it in this case.
This improves usability when, for example, using a tabbed
workspace_layout.

fixes #1987
2015-10-28 21:55:00 +01:00
Michael Stapelberg 94bdf607bb Use sasprintf() 2015-10-28 21:54:58 +01:00
Michael Stapelberg 62bb7af5c3 Bugfix: add keymap fall back (_XKB_RULES_NAMES, then defaults)
fixes #1983
2015-10-28 21:54:55 +01:00
Michael Stapelberg 0e5180cae9 Bugfix: correctly compare modifier mask when identifying keybindings
fixes #2002
2015-10-28 21:42:37 +01:00
Michael Stapelberg b330050df7 Merge pull request #2043 from Airblader/bug-regex-mem-leak
Fix multiple memory leaks with regular expressions.
2015-10-28 18:55:26 +01:00
Ingo Bürk 27db61f504 Fix multiple memory leaks with regular expressions. 2015-10-28 14:40:10 +01:00
Michael Stapelberg 3295e05089 Merge pull request #2030 from DavidMikeSimon/focus-bar-color
Optionally change i3bar color on focused output, implements #2020
2015-10-27 19:57:15 +01:00
David Simon dc05d905c1 Optionally change i3bar color on focused output, implements #2020 2015-10-27 09:12:57 -04:00
Michael Stapelberg 2451551f63 Merge pull request #2040 from Airblader/bug-2034
Fix crash when trying to split and float a dock container.
2015-10-27 10:07:25 +01:00
Michael Stapelberg c1807163c7 Merge pull request #2041 from Airblader/feature-2028-2
Add --no-auto-back-and-forth for moving windows.
2015-10-27 08:50:48 +01:00
Ingo Bürk 57a7ff301f Add --no-auto-back-and-forth for moving windows.
This patch extends the previously introduced flag --no-auto-back-and-forth
to also apply to

    move window to workspace <name>
    move window to workspace number <number>

relates to #2028
2015-10-26 22:40:06 +01:00
Ingo Bürk 3d6c76eb93 Fix crash when trying to split and float a dock container.
Since splitting a docking container was allowed and successful, the check
to prevent floating it fails to work. This causes a crash because the
workspace of the container cannot be determined as the dockarea is higher
up in the tree than the workspace it belongs to.

This patch extends to sanity check to nested dock containers when trying to
float a container and also disallows manually splitting a docked container
or changing its layout.

fixes #2034
2015-10-26 22:14:14 +01:00
Michael Stapelberg d187214562 Merge pull request #2039 from DavidMikeSimon/fix-1824
Use separate buffers for i3bar statusline for each workspace, track short and long renders separately, fixes #1824
2015-10-26 21:26:53 +01:00
David Simon 071f11f9b9 Use separate buffers for i3bar statusline for each workspace, track short and long renders separately, fixes #1824 2015-10-26 16:15:01 -04:00
Michael Stapelberg 30c3729a24 Merge pull request #2036 from Airblader/bug-2015
Make resize grow|shrink width|height work for a nested split in the s…
2015-10-26 09:14:28 +01:00
Michael Stapelberg d35ee4501b Merge pull request #2031 from Airblader/feature-2028
Added --no-auto-back-and-forth to workspace commands.
2015-10-25 16:51:32 +01:00
Michael Stapelberg b328d2423e Merge pull request #2037 from Airblader/bug-run-assignments
Fix assignments bug and a small logging bug
2015-10-25 16:48:32 +01:00
Ingo Bürk ad10a366d6 Mark assignment as run before executing it.
We need to store the information that an assignment was run for a window
before actually executing the command. Otherwise, if the command causes
a change that causes assignments to be run again, the window might be
matched again, causing an infinite loop and hence i3 to freeze or crash.
2015-10-25 14:27:08 +01:00
Ingo Bürk ac4ac94181 Fixed logging statement.
Assignments don't necessarily represent workspace assignments, but could
also be used, e.g., for no_focus. Hence, there's no point in logging
dest.workspace for all assignments.
2015-10-25 14:25:55 +01:00
Ingo Bürk 10b1b39478 Make resize grow|shrink width|height work for a nested split in the same direction.
Suppose a horizontally oriented workspace has two windows open. Issuing "split h" on
the right window creates a nested horizontal container. If we now resize in "width"
direction, the resize doesn't work because it will only operate on the current parent,
which is a container with only one child, so the resize command exits.

This is unexpected behavior from a user point of view. Hence, with this patch, we
ensure that we don't just go up the tree until we find a parent with the correct
orientation, but also keep going if that parent has only a single child.

fixes #2015
2015-10-25 13:03:56 +01:00
Ingo Bürk 7270206e24 Added --no-auto-back-and-forth to workspace commands.
This patch introduces the --no-auto-back-and-forth flag to both of

    workspace --no-auto-back-and-forth <name>
    workspace --no-auto-back-and-forth number <number>

This flag will only have an effect if the back_and_forth feature is
enabled. If passed, the feature will be ignored for this particular
call only.

fixes #2028
2015-10-24 00:12:03 +02:00
Michael Stapelberg 185a2f24ba Merge pull request #2027 from Airblader/feature-cleanup-1
Remove broken and unused debug borders.
2015-10-23 08:34:55 +02:00
Ingo Bürk f676781576 Remove broken and unused debug borders. 2015-10-23 00:38:11 +02:00
Michael Stapelberg 35b05ccd2f Merge pull request #2025 from Airblader/feature-2022
Added background and border keys to the i3bar protocol.
2015-10-22 20:36:02 +02:00
Michael Stapelberg 5333d15180 Merge pull request #2018 from Airblader/feature-2014
Allow multiple marks on a window
2015-10-22 20:32:05 +02:00
Ingo Bürk a0add1ba73 Added background and border keys to the i3bar protocol.
This patch adds two new status block keys, background and border, which
define the respective colors for the status block. If not specified, the
current behavior is kept, e.g., no background / border will be drawn.

If the status block is marked urgent, the urgent color is prioritized.

fixes #2022
2015-10-22 16:11:08 +02:00
Ingo Bürk 60158d31a2 Introduce special value __focused__ for criterion con_id.
This allows matching with

    [con_id=__focused__] unmark

for commands that do not default to operating on the focused window
if no criteria have been specified (such as unmark).

relates to #2014
2015-10-22 15:46:55 +02:00
Ingo Bürk 9537ada5ad Make 'unmark' aware of matched windows.
This patch allows using 'unmark' on matched windows. The old behavior
of applying it to all windows if no criteria were specified is kept.

relates to #2014
2015-10-22 15:32:18 +02:00
Ingo Bürk 7a77c5f0bb Introduce "--add" for marking windows.
In order to keep compatibility to before allowing multiple marks on a window,
we introduce a flag "--add" that must be set to put more than one mark on a
window. The default, which is also available as "--replace", keeps the old
behavior of overwriting a mark when setting a new one.

fixes #2014
2015-10-22 15:32:15 +02:00
Ingo Bürk 9bb2f038ab Allow multiple marks on windows.
This patch allows multiple marks to be set on a single window. The restriction that a mark may
only be on one window at a time is still upheld as this is necessary for commands like
"move window to mark" to make sense.

relates to #2014
2015-10-22 15:29:42 +02:00
Michael Stapelberg 0425f48835 Merge pull request #2017 from Airblader/bug-2011
Activate root output if RandR request fails.
2015-10-22 09:19:07 +02:00
Michael Stapelberg f25e9a7872 Merge pull request #2023 from Adaephon-GH/next
Fix documentation for __focused__  + some small fixes
2015-10-22 09:08:39 +02:00
Ingo Bürk 41db909522 Activate root output if RandR request fails.
fixes #2011
2015-10-21 19:09:47 +02:00
Adaephon-GH 68c10f7257 Make rendering of key bindings more consistent
- Render key names and key bindings verbatim if they could be used like
  that in the configuration (no special format for "colloquial" names:
  Alt, Windows, ...)
- Use only lower case letters for key bindings
2015-10-21 13:58:45 +02:00
Adaephon-GH 103cef7b2b Improve placement of explicit IDs for headings
In some cases the IDs of section titles was placed after the section
title. With that in the rendered HTML the ID was placed on the paragraph
and not on the heading. This led to heading not being shown when the
corresponding link was clicked.
2015-10-21 13:35:52 +02:00
Adaephon-GH 29490c2336 Quote __focused__ to prevent parsing by asciidoc
Text between two "__" is rendered as italics by asciidoc. This affects
the display of the new __focused__ special value for criteria.
2015-10-21 13:08:21 +02:00
Michael Stapelberg 8125b54e09 fix a memory leak in handle_get_bar_config 2015-10-19 19:13:15 +02:00
Michael Stapelberg 7b502cf44c Fix memleak in translate_keysyms 2015-10-19 18:53:59 +02:00