Commit Graph

951 Commits

Author SHA1 Message Date
Michael Stapelberg 44c4c9d5a6 Bugfix: Go to the target workspace before changing focus on goto command (Thanks yurifury) 2009-10-07 20:41:21 +02:00
Michael Stapelberg df58981b57 Bugfix: Correctly restore the focus to the root screen after unmapping the last client (Thanks Rasi)
Sometimes, it may happen that the focus is "nowhere" and thus the
user is stuck. This was often the case with opera, sometimes with
pcmanfm. See ticket #118.
2009-10-07 20:26:13 +02:00
Michael Stapelberg cf17e73293 Add a new test for moving clients to different workspaces (tiling and floating) 2009-10-01 17:18:11 +02:00
Michael Stapelberg f72161d0c2 Bugfix: parser: Correctly generate colorpixels from hex codes 2009-10-01 12:29:27 +02:00
Michael Stapelberg 6aa0f965d2 Fix warnings in lexer/parser 2009-09-29 22:47:37 +02:00
Michael Stapelberg c4df9f1d95 Bugfix: Correctly initialize workspaces when initializing > 1 workspace (Thanks Mirko) 2009-09-29 22:25:08 +02:00
Michael Stapelberg 2b70e05ee9 Refactor workspaces to be stored in a TAILQ instead of an array
This fixes many problems we were having with a dynamically growing
array because of the realloc (pointers inside the area which was
allocated were no longer valid as soon as the realloc moved the
memory to another address).

Again, this is a rather big change, so expect problems and enable
core-dumps.
2009-09-29 19:45:41 +02:00
Michael Stapelberg 5a77081c55 Bugfix: When rendering, skip containers which are not yet initialized
This is necessary now, because when creating a new row, several
containers have to be created. Since the implementation of the default
mode for containers, this also involves rendering the layout. However,
when rendering the layout, all of the containers are potentially
accessed…
2009-09-29 12:26:53 +02:00
Michael Stapelberg 9ec6ea61de Bugfix: Don’t crash when changing workspace when there is more than one column 2009-09-29 12:21:07 +02:00
Michael Stapelberg ff0e9bb954 Bugfix: Fix parsing symbols which contain numbers, like F1 or 1 for bindsym (Thanks Rasi) 2009-09-29 11:32:57 +02:00
Michael Stapelberg 095de9eaab Bugfix: partly revert f3880928, client->workspace was not updated (Thanks msi) 2009-09-29 01:07:51 +02:00
Michael Stapelberg bfd704c523 Fix syntax for resize command 2009-09-29 00:54:27 +02:00
Michael Stapelberg d230b2bb1a Bugfix: Create new workspace when there are no free existing ones to assign (Thanks msi)
As the workspaces are now created dynamically, we cannot rely on
the workspaces to be there when we need them without creating them.
On the other hand, this eliminates the case that there are no workspaces
to assign to a new screen, because now we can just create one.
2009-09-28 18:02:11 +02:00
Michael Stapelberg e101940c5e Implement options to change the default mode of containers
The following new directives have been implemented for the configuration
file:

	new_container <default|stacking|tabbed>
	new_container stack-limit <cols|rows> <value>

Note that they require using the new lexer/parser, which you can
do by passing -l to i3 when starting.
2009-09-27 23:08:27 +02:00
Michael Stapelberg fa868ed61c Bugfix: parser: limit of 10 workspaces is gone 2009-09-27 23:05:07 +02:00
Michael Stapelberg 226664d288 Remove debug message 2009-09-27 23:04:41 +02:00
Michael Stapelberg 058d9cc3a2 Handle ipc_socket like ipc-socket
We should use underscores to be consistent
2009-09-27 20:44:24 +02:00
Michael Stapelberg 8f67eba044 Implement modes. Modes allow you to use different keybindings and switch between them.
For example, you can create a mode which will let you resize windows
with some easy to use keys. So, instead of binding a combination
of your homerow and modifiers to resize, like this:

	bind Mod4+44 resize right +10
	bind Mod4+45 resize right -10
	...

You can instead define a new mode:

	mode "resize" {
		bind 44 resize right +10
		bind 45 resize right -10
		...
		bind 36 mode default
	}

	bindsym Mod4+r mode resize

So, if you press Mod4+r now, your keybindings will be set to the ones
defined in your resize mode above. You can then use your homerow
(without any other modifier) to resize the current column/row and
press enter to go back to the default mode when you are done.

Note that using this option requires you to enable the new lexer/parser
by passing the -l flag to i3 when starting.
2009-09-27 18:45:39 +02:00
Michael Stapelberg 97d949d16c Bugfix: Correctly re-grab keys when using the new lexer 2009-09-27 18:45:17 +02:00
Michael Stapelberg d916e075c3 parser: Implement parsing mode sections
Wait for further commits before they are actually used.
2009-09-27 17:02:13 +02:00
Michael Stapelberg 051caf571d retab! cfgparse.y 2009-09-27 17:02:05 +02:00
Michael Stapelberg 55f4e5ab68 Add vim modeline to lexer/parser 2009-09-27 17:01:06 +02:00
Michael Stapelberg c2a42dd503 lexer: Allow whitespace before comments 2009-09-27 17:00:37 +02:00
Michael Stapelberg 9b1699f4c4 Add documentation for workspace_get() 2009-09-27 15:20:47 +02:00
Michael Stapelberg f38809288a Make number of workspaces dynamic (no longer limited by 10)
Warning: This is not yet thoroughly tested, so be prepared to
encounter some segfaults. Please enable logging and coredumps,
so we can fix bugs quickly.
2009-09-27 14:00:54 +02:00
Michael Stapelberg a55d0b77fe Implement resize command
Syntax: resize <left|right|up|down> [+|-]<pixels>
2009-09-26 17:18:50 +02:00
Michael Stapelberg 7be41492c6 Obey the client’s border_width setting (Thanks shatter)
xterm by default sets a border_width of 2. This was not taken into
account when determining the size of the window by i3. Still, you
probably want to set this to 0 in your .Xresources as the pixels
are just lost.
2009-09-26 13:47:48 +02:00
Michael Stapelberg b898058105 Fix some compilation warnings (Thanks mxf) 2009-09-26 13:30:32 +02:00
Michael Stapelberg aa02fda067 Explicitly call flex and bison instead of lex and yacc (Thanks mxf) 2009-09-26 12:47:23 +02:00
Michael Stapelberg 2493c4b232 Bugfix: Fix resizing on second monitor (Thanks litemotiv)
We now use the virtual screen’s size/position instead of the X root
window for the grabwin (grabwin = the area in which the pointer may
move when resizing).
2009-09-25 18:08:37 +02:00
Michael Stapelberg f4ec7fdfe9 Implement stack-limit for further defining how stack windows should look
Using this command, you can limit the amount of columns or rows for
a stacking container. This allows for better usage of screen estate
when using stacking containers with many clients.

Examples:
  i3-msg "stack-limit cols 2"
You will now have a stack window which has two columns of windows.
2009-09-22 18:07:59 +02:00
Michael Stapelberg d3752007ed Remove old code 2009-09-22 18:07:48 +02:00
Michael Stapelberg d9ca8e8d1a Move handler for clicking to its own file 2009-09-22 18:07:25 +02:00
Michael Stapelberg 3ada8f326c Implement vim-like marks
Commands are 'mark' and 'goto'. Both can be used either directly,
like 'mark a' and 'goto a', or interactively (just 'mark'). For
interactive mode, i3-input must be installed and in your PATH.
2009-09-20 16:54:29 +02:00
Michael Stapelberg 6510b0e14f i3-input: implement prefixes for commands 2009-09-20 16:01:41 +02:00
Michael Stapelberg ca9b52bfcc Add initial version of i3-input, an interactive tool for sending IPC commands 2009-09-20 15:44:14 +02:00
Michael Stapelberg 0e8b87e9da lexer: Implement workspace <number> "<name>" 2009-09-19 19:39:06 +02:00
Michael Stapelberg 0ed2d62263 lexer: return HEX instead of NUMBER when parsing colors 2009-09-19 19:34:02 +02:00
Michael Stapelberg b1ebbde153 Merge branch 'lex' into next 2009-09-19 19:06:57 +02:00
Michael Stapelberg ca472559b9 Finish configfile parsing with lexer, implement -l to use the lexer.
Every user is encouraged to use -l to switch to the new lexer and
see if there are any problems.
2009-09-19 19:05:15 +02:00
Michael Stapelberg 775d3a0d91 Make gcc happy about some possibly uninitialized variables (Thanks badboy)
This warning only showed up with CFLAGS=-O2.
The variables in question could never be uninitialized because
they were definitely set, have a look at the code. But anyways,
less warnings is always a good thing ;-).
2009-09-15 16:58:10 +02:00
Michael Stapelberg 207ad0a7df Implement most code to actually set the configuration settings 2009-09-13 22:13:28 +02:00
Michael Stapelberg 7fda4a2c32 Make variable expansion work with the new parsing 2009-09-13 21:32:58 +02:00
Michael Stapelberg 2986636e03 Fix some parsing problems, retab! 2009-09-13 18:40:35 +02:00
Michael Stapelberg 268bf71222 Implement option -p to test if the lexer/parser can parse your configfile (specify -c before) 2009-09-13 14:54:27 +02:00
Michael Stapelberg 9dd975e974 Add first version of lexer/parser to git, update Makefile 2009-09-13 14:16:39 +02:00
Michael Stapelberg 30ad7e93e7 Bugfix: Re-distribute free space when closing rows which were horizontally resized 2009-09-12 19:58:39 +02:00
Michael Stapelberg ce40f79c47 Implement right mouse button + dragging to resize tiling clients aswell 2009-09-12 19:51:50 +02:00
Michael Stapelberg 6f2638f526 Bugfix: Correctly warp pointer *after* rendering the layout
This is necessary because otherwise the window into which the
pointer is warped still is at its old position, so that the pointer
will effectively be warped onto the wrong screen in case of moving
a window to another screen.
2009-09-12 18:46:52 +02:00
Michael Stapelberg 739f4f35aa Compilation fix for the last commit 2009-09-12 18:34:03 +02:00