Commit Graph

719 Commits

Author SHA1 Message Date
Michael Stapelberg af0b33bcc3 Bugfix: if a font provides no per-char info for width, fall back to the default (Thanks Ciprian) 2010-01-07 14:38:00 +01:00
Michael Stapelberg 86b0dab7ea Bugfix: Use ev_loop_new instead of ev_default_loop because the latter one blocks SIGCHLD (Thanks Ciprian)
SIGCHLD was inherited to child processes started by i3 and not
all of them unblocked it (shells generally did, though), leading to
zombie processes.
2010-01-07 13:39:45 +01:00
Michael Stapelberg b6de565445 Bugfix: Use ev_loop_new instead of ev_default_loop because the latter one blocks SIGCHLD (Thanks Ciprian)
SIGCHLD was inherited to child processes started by i3 and not
all of them unblocked it (shells generally did, though), leading to
zombie processes.
2010-01-07 13:36:52 +01:00
Michael Stapelberg 44191d5ffc sighandler: last little style fixes 2010-01-03 22:07:39 +01:00
Michael Stapelberg 2b1a132c39 grab the pointer inside the signal handler popup 2010-01-03 22:02:07 +01:00
Michael Stapelberg be33c8e599 Check return code of sigaction() 2010-01-03 21:55:22 +01:00
Michael Stapelberg a69dfb3f06 Remove expose event mask, expose events will not be generated in any case 2010-01-03 21:55:02 +01:00
Michael Stapelberg 7b2363776a Use DLOG instead of LOG, remove unnecessary debug statement 2010-01-03 21:54:47 +01:00
Michael Stapelberg 0c35573e51 some little style changes 2010-01-03 21:54:26 +01:00
Michael Stapelberg 8afdf54078 Update copyright to 2010 2010-01-03 21:53:30 +01:00
Jan-Erik Rediger 614b360bd4 added popup for handling SIGSEGV or SIGFPE
the popup is placed on each of the virtual screens
the user can decide to restart or quit i3
in case of an exit a core-dump is generated
2010-01-03 21:32:50 +01:00
Michael Stapelberg 715983024d ewmh: Don’t push workspaces with width=0 and height=0 (Thanks Atsutane, badboy)
Even though i3 cannot know the width/height of some workspaces as
long as they are not initialized (say you used workspace 1 and 3,
but not workspace 2), some applications require this information.
In this case, it was Firefox which intersects the available workareas
(see mozilla/gfx/src/gtk/nsScreenGtk.cpp) and did not position some
windows correctly when being confronted with zero-width/height
workspaces.
2010-01-03 18:36:50 +01:00
Michael Stapelberg 7c130fb540 Obey the XDG Base Directory Specification for config file paths
This means you can now put your i3 config into
$XDG_CONFIG_HOME/i3/config, which probably is ~/.config/i3/config
if not set otherwise.
2010-01-03 16:58:41 +01:00
Michael Stapelberg 505eaaf349 Bugfix: Containers could lose their snap state (Thanks Atsutane)
When being on a different workspace than the one where the snapped
container is, the function to cleanup cols/rows would clean up too
much.
2010-01-01 22:43:02 +01:00
Michael Stapelberg ba2dd3a3eb Bugfix: Containers could lose their snap state (Thanks Atsutane)
When being on a different workspace than the one where the snapped
container is, the function to cleanup cols/rows would clean up too
much.
2010-01-01 22:40:50 +01:00
Michael Stapelberg 8adce413f5 Remove superfluous #include <assert.h> (Thanks badboy) 2010-01-01 17:30:44 +01:00
Michael Stapelberg 092f3139d8 Remove superfluous #include <assert.h> (Thanks badboy) 2010-01-01 17:30:27 +01:00
Michael Stapelberg 4c87170494 We don’t have DLOG yet in master branch (Thanks ccount) 2010-01-01 17:29:11 +01:00
Michael Stapelberg 9dce081837 Bugfix: Don’t put dock clients into floating mode (Thanks xeen) 2010-01-01 16:20:16 +01:00
Michael Stapelberg 65cae2cad1 Bugfix: Don’t put dock clients into floating mode (Thanks xeen) 2010-01-01 16:19:42 +01:00
Michael Stapelberg 75aac5bc02 ewmh: implement support for _NET_WORKAREA (rdesktop can use that)
Please note that rdesktop’s -g workarea option will not work on
64-bit systems at the moment because of a bug in rdesktop (see the
rdesktop-devel mailing list).
2009-12-31 17:48:41 +01:00
Michael Stapelberg e7e9e8e49d ewmh: correctly set _NET_ACTIVE_WINDOW 2009-12-25 15:19:39 +01:00
Michael Stapelberg 0641e6a1a3 ewmh: correctly set _NET_CURRENT_DESKTOP to the number of the active workspace 2009-12-25 15:05:17 +01:00
Michael Stapelberg ba82a3e63b Bugfix: Fix NULL pointer dereference in workspaces which have preferred screens but were not used yet (Thanks badboy) 2009-12-23 00:39:03 +01:00
Michael Stapelberg 3e53ecf69e retab! src/container.c 2009-12-22 23:43:05 +01:00
Michael Stapelberg 848d9c1b01 Make containers containing exactly one window behave like default containers
Starting from this commit, a borderless window will always be
borderless if it is the only window in a container. For example,
you can have Firefox borderless in a tabbed container and as soon
as the download manager or a viewer gets opened, the container
will be rendered like a normal tabbed container.

This solves the user-interface dilemma of borderless/1-px-border
windows inside stacked/tabbed containers, at least for this special
case. Thanks to Merovius for this suggestion.
2009-12-22 23:40:06 +01:00
Michael Stapelberg 9df64a8d0a Correctly exit when another window manager is already running
This is implemented by checking if setting the redirect mask returned
an error or not.
2009-12-22 11:29:24 +01:00
Michael Stapelberg e900a8d23d xinerama: correctly put windows which are assigned to a specific screen on that screen when it becomes available (Thanks badboy) 2009-12-21 22:30:08 +01:00
Michael Stapelberg 0b5554c762 xinerama: change some log messages to errors 2009-12-21 20:41:02 +01:00
Michael Stapelberg 6ef0d1fa79 Touch each log message and classify it as DLOG (debug), ELOG (error) or LOG (verbose) 2009-12-19 22:40:23 +01:00
Michael Stapelberg 37d795c81d Add new options -V for verbose mode and -d <loglevel> for debug log levels 2009-12-19 22:40:23 +01:00
Michael Stapelberg 4226cc61de add log.c/log.h which contain all the log related macros and functions 2009-12-19 22:40:23 +01:00
Michael Stapelberg 937048d47b Distribute rest space between windows as long as possible. (Thanks msi)
When having 8 windows in a container which has 766 px available,
you ended up losing 0,75 px per window which would quickly sum up.
Now, the rest space (6 px in this example) is distributed in units
of one pixel to as many windows as possible.
2009-12-13 17:02:22 +01:00
Michael Stapelberg f87b98e0a7 Take into account the window’s base_{width,height} when resizing (Thanks Mirko) 2009-12-12 22:27:57 +01:00
Michael Stapelberg 5287dce9cc Partly revert 4ba26659, it was just wrong. 2009-12-12 21:43:33 +01:00
Michael Stapelberg 8d8804221b Partly revert 4ba26659, it was just wrong. 2009-12-12 21:42:56 +01:00
Michael Stapelberg 29d64bd04e Bugfix: Correctly check for fullscreen windows when mapping new clients
CUR_CELL only works if you currently are in that container (not for
windows which are assigned to invisible workspaces, for example).
2009-12-12 21:32:47 +01:00
Michael Stapelberg 01f7250f6a Bugfix: Correctly place new windows below fullscreen windows (Thanks Moredread)
This bug could happen if you have floating and tiling windows (for
example Firefox in tiling mode and its Open dialog in autmatically
floating mode) and you opened a new tiling window while in fullscreen.

i3 would then place the window below the floating windows, but
floating clients are above fullscreen windows. Thus, the client
would be placed above the fullscreen window.
2009-12-12 21:32:42 +01:00
Michael Stapelberg c6c0862e24 Bugfix: Correctly check for fullscreen windows when mapping new clients
CUR_CELL only works if you currently are in that container (not for
windows which are assigned to invisible workspaces, for example).
2009-12-12 21:31:41 +01:00
Michael Stapelberg 4afe65eea2 Bugfix: Correctly place new windows below fullscreen windows (Thanks Moredread)
This bug could happen if you have floating and tiling windows (for
example Firefox in tiling mode and its Open dialog in autmatically
floating mode) and you opened a new tiling window while in fullscreen.

i3 would then place the window below the floating windows, but
floating clients are above fullscreen windows. Thus, the client
would be placed above the fullscreen window.
2009-12-12 21:29:07 +01:00
Michael Stapelberg 3e7ae4f7de Bugfix: Fix assignments to not yet visible workspaces
This was broken by commit 5a1668db3
2009-12-12 18:44:30 +01:00
Michael Stapelberg ffe925f733 Bugfix: Fix assignments to not yet visible workspaces
This was broken by commit 5a1668db3
2009-12-12 18:43:30 +01:00
Michael Stapelberg 17082ef5b7 Bugfix: close file handle after parsing 2009-12-11 17:57:42 +01:00
Michael Stapelberg e5c4fa6c1c Include unistd.h for usleep() 2009-12-08 20:55:17 +01:00
Michael Stapelberg 06ef55ff1f Bugfix: Don’t resize client after base_height changes if client is in fullscreen mode 2009-12-08 20:53:25 +01:00
Michael Stapelberg ddf3119552 Bugfix: Don’t resize client after base_height changes if client is in fullscreen mode 2009-12-08 20:52:19 +01:00
Michael Stapelberg 8622cf3917 Bugfix: Use more precise floating point arithmetic (Thanks helgiks)
This prevents errors in rounding leading to an unoccupied space of
-1 which in turn leads to infinity when calculating the new size
of a container after resizing.
2009-12-08 11:52:53 +01:00
Michael Stapelberg 3057a2ec65 Bugfix: Also fix horizontal resizing
The same problem as in the commit before this one was present. Additionally,
the dock_clients and internal bar were not taken into account everywhere.
2009-12-08 11:52:49 +01:00
Michael Stapelberg befd7f6f22 Bugfix: Use more precise floating point arithmetic (Thanks helgiks)
This prevents errors in rounding leading to an unoccupied space of
-1 which in turn leads to infinity when calculating the new size
of a container after resizing.
2009-12-08 11:48:25 +01:00
Michael Stapelberg 1a53cc067b When no screens are found, don’t hog the CPU. Also, wait longer for screens (10 seconds).
Instead of just going on, i3 will exit cleanly now, putting an
appropriate message into the logfile.
2009-12-07 16:31:49 +01:00
Michael Stapelberg 0f64737a56 Bugfix: Fix two problems in resizing floating windows with right mouse button (Thanks Mirko)
Minimum width/height was not consistent with the limit for grabbing
and resizing a window at its border.
If one of both was violated (width < min_width for example), none
of them were updated.
2009-11-26 22:21:16 +01:00
Michael Stapelberg ec2e5e8364 Bugfix: Fix two problems in resizing floating windows with right mouse button (Thanks Mirko)
Minimum width/height was not consistent with the limit for grabbing
and resizing a window at its border.
If one of both was violated (width < min_width for example), none
of them were updated.
2009-11-26 22:17:38 +01:00
Michael Stapelberg 5304e7188f Bugfix: Render containers after setting the client active (Thanks Mirko)
This lead to race conditions when the window did not change its title
after mapping and was displayed in a tabbed container.
2009-11-26 21:39:09 +01:00
Michael Stapelberg 5a1668db36 Bugfix: Render containers after setting the client active (Thanks Mirko)
This lead to race conditions when the window did not change its title
after mapping and was displayed in a tabbed container.
2009-11-26 21:32:53 +01:00
Michael Stapelberg 3e5d881316 Bugfix: Resize client after updating base_height/base_width (Thanks Merovius)
This fixes the problem that urxvt/xterm "lost" a line of space before
being resized the first time.
2009-11-23 09:43:22 +01:00
Michael Stapelberg 5329ed0158 Bugfix: Resize client after updating base_height/base_width (Thanks Merovius)
This fixes the problem that urxvt/xterm "lost" a line of space before
being resized the first time.
2009-11-23 09:42:38 +01:00
Michael Stapelberg 806a3d5e57 Bugfix: Don’t ignore urgency flag when the client wants to clean it (Thanks Syntropy) 2009-11-23 08:36:13 +01:00
Michael Stapelberg d2a88f7089 Bugfix: Don’t ignore urgency flag when the client wants to clean it (Thanks Syntropy) 2009-11-23 08:35:40 +01:00
Michael Stapelberg 9aa378aa2a Bugfix: Fix stack-limit cols, handle stack-limit cols on tabbed containers (Thanks jace) 2009-11-22 22:48:43 +01:00
Michael Stapelberg 4ba26659fd Bugfix: Fix stack-limit cols, handle stack-limit cols on tabbed containers (Thanks jace) 2009-11-22 22:48:08 +01:00
Michael Stapelberg 4ace0d2138 config: delete old parser, new lexer/parser is the default by now 2009-11-22 20:25:33 +01:00
Michael Stapelberg 52945486fd Bugfix: Also fix horizontal resizing
The same problem as in the commit before this one was present. Additionally,
the dock_clients and internal bar were not taken into account everywhere.
2009-11-22 14:32:40 +01:00
Michael Stapelberg 2c8b041500 Bugfix: Correctly calculate width when resizing (Thanks Merovius) 2009-11-22 14:05:35 +01:00
Michael Stapelberg 2d7f71ee13 Bugfix: Don’t set the urgency flag if the window is currently active 2009-11-20 15:56:38 +01:00
Michael Stapelberg 29464dc791 Bugfix: Don’t set the urgency flag if the window is currently active 2009-11-20 15:55:54 +01:00
Michael Stapelberg 4674fb7c0c Bugfix: Accept underscores in bindsym (Thanks jace) 2009-11-20 15:34:06 +01:00
Michael Stapelberg c0256edd2e Bugfix: Accept underscores in bindsym (Thanks jace) 2009-11-20 15:33:38 +01:00
Michael Stapelberg 2a966014a7 Bugfix: Fix resizing of floating windows in borderless/1-px-border mode (Thanks Grauwolf)
Calculations were wrong (they simply didn’t take into account that
there is more than one border style, the code was from before we
implemented that…). We cannot directly set child_rect to the coordinates
as resize_client takes rect and calculates the child_rect, so we need
the new lines of code for this bugfix in any case (rect needs to be
updated).
2009-11-18 22:55:04 +01:00
Michael Stapelberg c5da7bd266 Bugfix: Fix resizing of floating windows in borderless/1-px-border mode (Thanks Grauwolf)
Calculations were wrong (they simply didn’t take into account that
there is more than one border style, the code was from before we
implemented that…). We cannot directly set child_rect to the coordinates
as resize_client takes rect and calculates the child_rect, so we need
the new lines of code for this bugfix in any case (rect needs to be
updated).
2009-11-18 22:53:17 +01:00
Michael Stapelberg a74fdc64f9 Bugfix: Correctly clear the urgency hint if a window gets unmapped without clearing the hint 2009-11-18 20:21:24 +01:00
Michael Stapelberg 82c32616e1 Bugfix: Correctly clear the urgency hint if a window gets unmapped without clearing the hint 2009-11-18 20:20:54 +01:00
Michael Stapelberg 93d7ab43be Bugfix: Also allow WORDs as workspace names (Thanks Grauwolf) 2009-11-18 19:54:24 +01:00
Michael Stapelberg 6a5bdf6f8e Bugfix: Also allow WORDs as workspace names (Thanks Grauwolf) 2009-11-18 19:53:57 +01:00
Michael Stapelberg fb04388289 Bugfix: Don’t hide window titles in tabbing mode (Thanks badboy) 2009-11-15 17:35:15 +01:00
Michael Stapelberg d266474f97 Remove the terminal option from config.
The welcome message is displayed using xmessage(1), not using your
terminal. Thus, it makes no sense to have this option anymore. Also,
the new lex/yacc parser cannot correctly handle the situation:
normal variables are expanded before parsing the file. As a replacement,
you can use:
  set $terminal /usr/bin/urxvt
2009-11-13 20:36:59 +01:00
Michael Stapelberg c53e84e230 Bugfix: Correctly replay pointer if the click handler does not trigger (Thanks merovius) 2009-11-13 20:22:54 +01:00
Michael Stapelberg aa2e0d7d14 Bugfix: Correctly replay pointer if the click handler does not trigger (Thanks merovius) 2009-11-13 20:22:23 +01:00
Michael Stapelberg d52f80f9b6 Bugfix: Correctly switch border types for floating windows (Thanks msi) 2009-11-13 19:55:54 +01:00
Michael Stapelberg d48a515752 Bugfix: Correctly switch border types for floating windows (Thanks msi) 2009-11-13 19:55:34 +01:00
Michael Stapelberg 2ee097cf92 Bugfix: Don’t draw window title when titlebar is disabled (Thanks msi) 2009-11-13 19:46:36 +01:00
Michael Stapelberg 51b937741d Bugfix: Don’t draw window title when titlebar is disabled (Thanks msi) 2009-11-13 19:46:07 +01:00
Michael Stapelberg c0c4dd2978 Disable XKB instead of quitting with an error (Thanks sur5r)
This is necessary for running i3 in Xvnc for example.
2009-11-13 00:30:42 +01:00
Michael Stapelberg 4b1bb7d19a Add ctrl as synonym for control 2009-11-12 20:28:09 +01:00
Michael Stapelberg 47ebb9e1dd Fix compilation warning on OpenBSD (Thanks bapt) 2009-11-10 00:07:40 +01:00
Michael Stapelberg 50739cdd58 Merge branch 'next'
Conflicts:
	include/data.h
	src/config.c
	src/handlers.c
	src/layout.c
2009-11-09 22:55:24 +01:00
Michael Stapelberg bf728be09b parser: Use right parameter, suppress warning about expected shift/reduce conflict 2009-11-09 22:36:26 +01:00
Michael Stapelberg f2dcc36333 Bugfix: WHITESPACE was missing in front of the workspace name (Thanks Mirko) 2009-11-08 21:43:47 +01:00
Michael Stapelberg 316f62dfda Fix rendering of 1-px-border windows which require background filling 2009-11-08 13:04:14 +01:00
Michael Stapelberg f1ecf08df5 s/for(/for (/ 2009-11-08 12:45:33 +01:00
Michael Stapelberg 64c99cb235 Implement configuration setting to change the default border of windows 2009-11-08 12:43:01 +01:00
Michael Stapelberg 876417f49d Bugfix: Don’t access wrong parameter (Thanks atsutane) 2009-11-07 16:51:10 +01:00
Michael Stapelberg 037605e34c Use nicer colors for focused_inactive by default 2009-11-06 18:41:17 +01:00
Michael Stapelberg 5583dfa5e4 parser: Solve last shift/reduce conflicts 2009-11-06 17:26:17 +01:00
Michael Stapelberg 8e1945a990 parser: solve shift/reduce conflict by moving WHITESPACE token to the right place 2009-11-06 17:19:01 +01:00
Michael Stapelberg 6aab45e7a4 configfile: make whitespace optional for modes (Thanks tsdh) 2009-11-06 15:42:03 +01:00
Michael Stapelberg 3b05d9df60 Bugfix: Cleanup stack window also when in tabbing mode (Thanks litemotiv) 2009-11-04 22:37:43 +01:00
Michael Stapelberg dd086864ce Apply fix of the previous commit also for columns 2009-11-04 22:12:15 +01:00
Michael Stapelberg 2a0278b519 Bugfix: Switch layout mode after initializing all containers in a new row 2009-11-04 22:10:26 +01:00
Michael Stapelberg 2a0b1adab9 Also support xcb-keysyms < 0.3.4 when using bindsym (Thanks ch3ka) 2009-11-02 23:15:08 +01:00
Michael Stapelberg 0d327b7d17 Fix compilation warning 2009-11-02 23:14:21 +01:00
Michael Stapelberg de3ca5c600 Bugfix: Ignore trailing/leading whitespaces when defining a mode (Thanks badboy)
…and shame on you for trailing/leading whitespace :).
2009-11-02 23:13:22 +01:00
Michael Stapelberg a817519c0d Bugfix: Prevent a division through zero (Thanks xeen) 2009-10-29 00:33:20 +01:00
Michael Stapelberg 16d33ec9df Bugfix: Correctly re-assign dock_clients to the first screen when their screen disappears
This could lead to a null-pointer dereference when closing dock
clients that got lost.
2009-10-28 15:37:34 +01:00
Michael Stapelberg fe2e4991d8 Bugfix: Use the right pointer for bar.* colors (Thanks shatter) 2009-10-23 23:13:38 +02:00
Michael Stapelberg 15d83d472b Fix debug message in cfgparse.y (Thanks shatter) 2009-10-23 22:57:35 +02:00
Michael Stapelberg 80551834d2 Bugfix: Allow dock clients to reconfigure their height (Thanks Grauwolf) 2009-10-23 16:07:03 +02:00
Michael Stapelberg da97b89b31 Bugfix: Don’t allow moving/resizing of fullscreen windows (Thanks xeen) 2009-10-13 08:26:35 +02:00
Michael Stapelberg 8f9e87124a Bugfix: Fix NULL pointer dereference when reconfiguring screens
This did not happen all the time. It seems like you need to have a
container which is in stacking/tabbing mode on the screen which
is being reconfigured. (when doing xrandr --output VGA1 --off for
example)
2009-10-12 18:34:37 +02:00
Michael Stapelberg 04884ab8cd Bugfix: Fix NULL pointer dereference when reconfiguring screens
This did not happen all the time. It seems like you need to have a
container which is in stacking/tabbing mode on the screen which
is being reconfigured. (when doing xrandr --output VGA1 --off for
example)
2009-10-12 18:31:31 +02:00
Michael Stapelberg 3334e27710 Fix HEAD^ 2009-10-11 14:31:10 +02:00
Michael Stapelberg 2b679c6b9e Fix HEAD^ 2009-10-11 14:30:57 +02:00
Michael Stapelberg 904e254717 Bugfix: Also apply the fix of 74ccdb4 when re-querying xinerama screens (Thanks Scytale) 2009-10-11 14:29:01 +02:00
Michael Stapelberg d4ff702f19 Bugfix: Also apply the fix of 74ccdb4 when re-querying xinerama screens (Thanks Scytale) 2009-10-11 14:28:27 +02:00
Michael Stapelberg 3779f9292f Bugfix: IPC: Correctly handle the case when multiple messages get received at once via the socket
When the sending application was so fast (*cough*) that the messages
could get queued by the kernel, it may happen that we receive multiple
messages at once.
2009-10-07 21:49:24 +02:00
Michael Stapelberg 74ccdb4760 Bugfix: Correctly position bar window when using xrandr --below or --above (Thanks Mirko, dirkson) 2009-10-07 20:53:37 +02:00
Michael Stapelberg ad84c07c8a Bugfix: Correctly position bar window when using xrandr --below or --above (Thanks Mirko, dirkson) 2009-10-07 20:52:53 +02:00
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 a22550392d 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:27:20 +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 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 43ff034f0a 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:09:56 +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 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 a3a1ff9894 Compilation fix for the last commit 2009-09-12 18:50:38 +02:00
Michael Stapelberg 44111b7466 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:47: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
Michael Stapelberg 51cb9a2cf3 Bugfix: Correctly initialize workspaces for floating clients, too 2009-09-12 18:19:03 +02:00
Michael Stapelberg 3b59f5829f Bugfix: Correctly initialize workspaces for floating clients, too 2009-09-12 18:18:41 +02:00
Michael Stapelberg 98dbee72ac Bugfix: Correctly initialize workspace when moving clients (Thanks tsdh) 2009-09-12 18:16:04 +02:00
Michael Stapelberg 4d01a02dba Bugfix: Correctly initialize workspace when moving clients (Thanks tsdh) 2009-09-12 18:15:32 +02:00
Michael Stapelberg cef5778097 Bugfix: Fix clicking on stack windows in tabbed mode (Thanks Atsutane) 2009-09-10 21:05:29 +02:00
Michael Stapelberg bf043cd2bd Some little style adjustments for badboy’s patch 2009-09-10 18:48:16 +02:00
Jan-Erik Rediger 40bc7c93d0 Implement command to toggle border style
Use 'bt' to toggle from normal to 1-px, borderless and back.
2009-09-10 18:44:27 +02:00
Michael Stapelberg ff1ae52e6b Fix compilation warning because of missing braces 2009-09-10 16:29:23 +02:00
Michael Stapelberg 9f02fb7a3a Bugfix: Don’t handle WM_HINTS if it is not set (Thanks mxf) 2009-09-10 16:27:50 +02:00
Michael Stapelberg a4d3dbef19 Bugfix: Correctly handle unmap-notify events when resizing (Thanks Mirko) 2009-09-07 21:20:56 +02:00
Michael Stapelberg e4813d009a Bugfix: Correctly handle unmap-notify events when resizing (Thanks Mirko) 2009-09-07 21:18:44 +02:00
Michael Stapelberg 2ff2a6a315 Implement the urgency hint for windows/workspaces
Thanks to Mikael for bringing it to my mind. This change introduces
two new color classes, client.urgent and bar.urgent. By default,
urgent clients are drawn in red (colors by Atsutane).
2009-09-06 22:40:11 +02:00
Michael Stapelberg e893902585 Implement horizontal resize 2009-09-06 16:50:45 +02:00
Michael Stapelberg 14a07d8b03 Bugfix: Initialize screens correctly when not using Xinerama (Thanks Mikael) 2009-09-05 19:20:01 +02:00
Michael Stapelberg a81108c527 Bugfix: Initialize screens correctly when not using Xinerama (Thanks Mikael) 2009-09-05 19:17:59 +02:00
Michael Stapelberg ca8a194c56 Bugfix: Correctly grab the right mouse button for resizing windows (Thanks xeen) 2009-09-05 17:32:26 +02:00
Michael Stapelberg a8352a8988 Merge patches for OpenBSD compatibility 2009-09-02 22:25:50 +02:00
Michael Stapelberg ae2371ee58 Implement long options (--version, --no-autostart, --help, --config) 2009-09-02 22:14:09 +02:00
Michael Stapelberg 67dcd9df28 Bugfix: In stacked/tabbed mode we need the regular border color (Thanks badboy) 2009-09-02 21:59:31 +02:00
Michael Stapelberg 100cc6b717 Bugfix: If the pointer is outside of the screen when starting, fall back to the first screen (Thanks mxf) 2009-08-31 20:27:44 +02:00
Michael Stapelberg d089adc229 Bugfix: Don’t display unnamed workspaces with %d: (Thanks Mirko) 2009-08-29 11:09:23 +02:00
Michael Stapelberg 7aec1bd1ef Bugfix: Draw black border instead of background-color around clients with {width,height}_increment (Thanks xeen) 2009-08-29 11:09:18 +02:00
Michael Stapelberg 3fc63c69df Bugfix: Don’t crash if the numlock symbol cannot be found (Thanks xeen) 2009-08-29 11:09:13 +02:00
Michael Stapelberg 1e94dc19ed Bugfix: Don’t call resize_client if the width/height increment properties did not change
This avoids an endless loop, preventing clients to go to fullscreen
2009-08-29 11:09:08 +02:00
Michael Stapelberg 486d8d423c Bugfix: Correctly use base_width/base_height and size increment hints, correctly send fake configure notify events 2009-08-29 11:08:58 +02:00
Michael Stapelberg 2b49c6086d Bugfix: Don’t display unnamed workspaces with %d: (Thanks Mirko) 2009-08-29 11:06:34 +02:00
Michael Stapelberg d333b8534d Bugfix: Draw black border instead of background-color around clients with {width,height}_increment (Thanks xeen) 2009-08-29 11:03:14 +02:00
Michael Stapelberg 39457338e4 Bugfix: Don’t crash if the numlock symbol cannot be found (Thanks xeen) 2009-08-27 21:34:07 +02:00
Michael Stapelberg 39f002e0b1 Bugfix: Don’t call resize_client if the width/height increment properties did not change
This avoids an endless loop, preventing clients to go to fullscreen
2009-08-25 23:16:17 +02:00
Michael Stapelberg 55b1bf4582 Bugfix: Correctly use base_width/base_height and size increment hints, correctly send fake configure notify events 2009-08-23 21:49:38 +02:00
Michael Stapelberg 8c4e2e48f4 Don’t round up if the corrected height/width is the same as the old one 2009-08-23 20:30:17 +02:00
Michael Stapelberg d9d4d9fff1 Implement tabbing
Use command "T" to switch to tabbing
2009-08-22 09:07:23 +02:00
Michael Stapelberg c7ba95e79d Implement resizing floating clients with Mod1 + right mouse button 2009-08-22 07:49:28 +02:00
Michael Stapelberg 36a7f46c51 Bugfix: Map window when it got the fullscreen hint set 2009-08-21 12:19:46 +02:00