Commit Graph

567 Commits (4add185025612103a599f1d6f8a0f55675b245b2)

Author SHA1 Message Date
Michael Stapelberg 373b4ad74a Implement 'rename workspace <old_name> to <new_name>' 2012-04-08 20:40:00 +02:00
Michael Stapelberg ad513b4799 Implement 'move [container|window] to workspace number <number>' 2012-04-08 20:33:46 +02:00
Michael Stapelberg 72078c704e Implement 'workspace number <number>' to switch to named workspaces 2012-04-08 19:17:46 +02:00
Michael Stapelberg 206b96202c Use (void) instead of () for functions without args (Thanks fernandotcl)
See also:
http://article.gmane.org/gmane.linux.kernel/1268792

The C compiler will handle (void) as "no arguments" and () as "variadic
function" (equivalent to (...)) which might lead to subtle errors, such
as the one which was fixed with commit 0ea64ae4.
2012-03-31 10:53:04 +02:00
Michael Stapelberg e19c7b7bae A few style fixes for the previous commit 2012-03-26 17:00:35 +02:00
darkraven 9d68d780e2 Use 32bit visual only when needed. Thus we could drop the --enable-32bit-visual option. 2012-03-26 16:50:44 +02:00
Fernando Tarlá Cardoso Lemos 484c2a697b Document text_len in the draw_text description. 2012-03-26 16:47:23 +02:00
Pavel Löbl f78f137ed0 Extends move command for floating windows 2012-03-25 11:06:49 +02:00
Michael Stapelberg ab9ba6fcf9 Use gettimeofday() and struct timevals instead of time()
Initially I thought using the second precision time() function is good enough,
but to make t/113-urgent.t considerably faster (>2s vs. 0.08s), we put in a
little more effort and use gettimeofday. Otherwise, this test blocks the whole
testsuite from completing much faster on modern machines :).
2012-02-21 13:38:49 +01:00
Michael Stapelberg 62a1ee7c45 use signed integer types for the floating size constraints 2012-02-16 18:41:54 +00:00
D Thompson 82146fcebf Implement support for user configuration of constraints on floating window dimensions. 2012-02-16 18:31:28 +00:00
Michael Stapelberg e114b3dba2 Refactor the interface of commands.c
This change has two implications:

1) tree_render() will now be called precisely once for input which consists of
   multiple commands (like "focus left; focus right"). Also, the caller of
   parse_command() has to call it. This makes us able to fix tickets such as
   ticket #608 (where multiple tree_render() calls are noticable).

2) The output of a command is now a JSON array of return values of the
   individual subcommands. In the case of "focus left; focus right", this is:

   [{"success":true}, {"success":true}]

   While this is incompatible with what i3 returned before, the return value of
   commands was undocumented and therefore not subject to our API stability.
2012-02-15 20:57:25 +00:00
Michael Stapelberg 58ecd14900 Implement support for chosing a 32 bit visual (necessary for pseudo-transparency) (Thanks darkraven)
You need to specify the --enable-32bit-visual flag when starting i3. This is
done because everything feels sluggish on my system when using a 32 bit visual
instead of a 24 bit visual. Fast > fancy.
2012-02-15 18:56:07 +00:00
Fernando Tarlá Cardoso Lemos a22f161ab5 If moving the last ws, create a new one in its place.
This seems better than refusing to move the last workspace.
2012-02-15 17:59:33 +00:00
Jeremy O'Brien 53541817ef Implement urgency flag matcher
Currently it supports the following options:
"oldest": match the first window that triggered an urgent event
"latest": match the last window that triggered an urgent event
2012-02-14 22:47:10 +00:00
Michael Stapelberg 7cdddc6524 add comments to src/commands.c 2012-01-27 22:32:40 +00:00
Michael Stapelberg 3229f7677f Rip out the old command parser, remove migration code 2012-01-27 22:11:03 +00:00
Michael Stapelberg f9bc434e2a Implement highlighting right/bottom borders of splitted windows
Fixes #299
2012-01-22 11:22:15 +00:00
Michael Stapelberg 318d4fdeef make in-place restarts use socket activation, too (for faster/less flaky tests) 2012-01-21 23:03:09 +00:00
Michael Stapelberg 3b7f4d428e Correctly restore focus after in-place restarts
Note: This change requires two in-place restarts when you are upgrading
in-place from an old version.

Fixes #611
2012-01-21 18:35:15 +00:00
Michael Stapelberg fabcd7d911 Merge branch 'master' into next 2012-01-21 15:08:36 +00:00
Michael Stapelberg 077d2433a7 Bugfix: Fix coordinates when the rect of an output changes (Thanks Paul)
Fixes #623
2012-01-21 15:07:53 +00:00
Michael Stapelberg 31b7ec29fd Re-implement bar borders (by Angelo Haller)
This re-introduces borders around the workspace buttons in i3bar.
No additional pixels will be consumed (you will not lose any space for your
windows).
2012-01-20 21:36:50 +00:00
Michael Stapelberg 57bf93ebaf Merge branch 'master' into next 2012-01-20 18:14:34 +00:00
Michael Stapelberg 07e495d2d0 Fix xcb_compat.h to make i3 compile with older xcb versions (Thanks David Coppa) 2012-01-20 18:13:52 +00:00
Michael Stapelberg 759ed0b6e3 Merge branch 'master' into next 2012-01-20 18:10:52 +00:00
Michael Stapelberg 4f26d6f2a1 Bugfix: Setup the _NET_SUPPORTING_WM_CHECK atom in a standards-compliant way
This makes chrome (and probably other apps, too) receive changes of the
_NET_ACTIVE_WINDOW and thus show its bookmark dialog properly.

Fixes: #544
2012-01-20 18:09:53 +00:00
Michael Stapelberg fd8e1c98c9 Merge branch 'master' into next
Conflicts:
	src/handlers.c
2012-01-18 19:18:22 +00:00
Michael Stapelberg 2d14ced024 Bugfix: Respect WM_HINTS.input for WM_TAKE_FOCUS clients
This fixes problems with Qt apps (like Quassel) and apparently Eclipse since
the last commit.
2012-01-18 19:16:57 +00:00
Michael Stapelberg a532f5ac39 Implement a new parser for commands. (+test)
On the rationale of using a custom parser instead of a lex/yacc one, see this
quote from src/commands_parser.c:
     We use a hand-written parser instead of lex/yacc because our commands are
     easy for humans, not for computers. Thus, it’s quite hard to specify a
     context-free grammar for the commands. A PEG grammar would be easier, but
     there’s downsides to every PEG parser generator I have come accross so far.

     This parser is basically a state machine which looks for literals or strings
     and can push either on a stack. After identifying a literal or string, it
     will either transition to the current state, to a different state, or call a
     function (like cmd_move()).

     Special care has been taken that error messages are useful and the code is
     well testable (when compiled with -DTEST_PARSER it will output to stdout
     instead of actually calling any function).

During the migration phase (I plan to completely switch to this parser before
4.2 will be released), the new parser will parse every command you send to
i3 and save the resulting call stack. Then, the old parser will parse your
input and actually execute the commands. Afterwards, both call stacks will be
compared and any differences will be logged.

The new parser works with 100% of the test suite and produces identical call
stacks.
2012-01-14 21:29:57 +00:00
Michael Stapelberg f81c89ac28 Refactor the code out of src/cmdparse.y to src/commands.c
This is the first step towards our new parser.
2012-01-14 16:59:52 +00:00
Max Alexander Busse fba2582b2e Switch and Move to next workspace on the same Output. As requested in \#554 2012-01-08 16:24:21 +00:00
dbp a3081c488a Allow different modifier keys for showing hidden i3bar. 2012-01-08 12:47:41 +00:00
Michael Stapelberg 89dded044b forgot include/shmlog.h 2012-01-07 14:59:58 +00:00
Michael Stapelberg dee7c07ad2 shmlog: store meta information in the buffer itself, store path as X11 atom
This makes i3-dump-log completely independent of a running i3 instance.
2012-01-06 23:40:07 +00:00
Michael Stapelberg 019347b14c update comment in include/data.h 2011-12-30 11:23:15 +01:00
Michael Stapelberg 8a67f15ef4 add missing scratchpad.{c,h} 2011-12-21 23:17:52 +00:00
Michael Stapelberg 08986a1798 Implement scratchpad functionality (see userguide) 2011-12-21 23:15:32 +00:00
Michael Stapelberg c4298b9311 Merge branch 'master' into next 2011-12-18 17:25:15 +00:00
Michael Stapelberg 4fba2d5f91 Bugfix: Correctly check boundaries and reassign floating windows when moving (Thanks xpt)
Fixes: #592
2011-12-18 17:24:27 +00:00
Michael Stapelberg 6f8b284586 Merge branch 'master' into next 2011-12-17 18:48:14 +00:00
Michael Stapelberg 664e30903c Bugfix: Don’t change focus after (graphical) resizing 2011-12-17 18:47:29 +00:00
Michael Stapelberg 966c654112 implement the GET_LOG_MARKERS IPC request/reply 2011-12-10 11:16:32 +00:00
Michael Stapelberg aa82adb5c0 Introduce --shmlog-size flag, unlink SHM log when exiting 2011-12-10 10:51:55 +00:00
Michael Stapelberg e65ee63763 Implement logging to a SHM ringbuffer
This feature is automatically enabled when running a debug version of i3.
The logfile will use 1% of your physical RAM size, but at max 25 MiB.
2011-12-10 10:50:33 +00:00
Michael Stapelberg 6c112f2a9a Merge branch 'master' into next 2011-11-30 20:34:54 +00:00
Michael Stapelberg d25e77ce75 Don’t set the _NET_WM_WORKAREA hint at all (Thanks cg)
Fixes: #539
2011-11-30 20:33:07 +00:00
Jan-Erik Rediger f23d675de9 Implement new "i3bar_command" option for bar.
This allows you to specify an alternate path to the i3bar binary.
The userguide docu is included.
2011-11-27 21:40:57 +00:00
Fernando Tarlá Cardoso Lemos 340592a532 Invalidate cached pixmaps on reload and redraw.
After a reload, the drawing parameters for the decorations might
have changed, so we need to invalidate the cache and force a redraw
of the currently visible decorations. Also, don't leak the previous
font when reloading by freeing it before parsing the config.
2011-11-26 21:51:49 +00:00
Michael Stapelberg 555dd48f09 Merge branch 'master' into next 2011-11-26 21:19:30 +00:00
Michael Stapelberg 970d11709e Bugfix: Retain absolute window position and size when changing floating borders (Thanks binzter)
Fixes: #561
2011-11-26 21:18:23 +00:00
Michael Stapelberg f7f1ec5dab Merge branch 'master' into next 2011-11-22 22:08:43 +00:00
Michael Stapelberg 0ea64ae404 Fix prototype in include/xcursor.h (Thanks Greg Kroah-Hartman) 2011-11-22 22:08:22 +00:00
Michael Stapelberg 561cf3719f little style fixes 2011-11-21 21:48:24 +00:00
Fernando Tarlá Cardoso Lemos 344c04af12 Implement set_font_colors.
This paves the way for other font rendering backends. Fonts and
colors shouldn't be specified manually from now on.
2011-11-21 20:52:32 +00:00
Fernando Tarlá Cardoso Lemos 5c2088c87e Enhance libi3 and use it in i3bar.
Abstracted draw_text and predict_text_width into libi3. Use
predict_text_width from libi3 in i3 too. This required tracking
xcb_connection in a xcb_connection_t *conn variable that libi3
expects to be available in i3bar.
2011-11-21 20:52:26 +00:00
Fernando Tarlá Cardoso Lemos fb11cc2d14 Consolidate all convert_* functions into libi3.
Some minor fixes along the way as well. Very minor stuff, unlikely
to ever be visible to the user.
2011-11-16 20:54:30 +00:00
Michael Stapelberg ed66a30410 mark parameters const 2011-11-10 19:17:36 +00:00
Michael Stapelberg 332dbfe9c1 Enable (unlimited) core dumps when running i3 development versions
Also prints out useful stuff:

    CORE DUMPS: You are running a development version of i3, so coredumps were
    automatically enabled (ulimit -c unlimited).
    CORE DUMPS: Your current working directory is "/home/michael/i3".
    CORE DUMPS: Your core_pattern is: /tmp/%e.core.%p
    i3 (tree) version 4.0.2-479-g26ab2ac (2011-11-08, branch "next") starting

This does not affect child processes of i3.

The intention of this change is to make debugging easier – it’s one less thing
users of the development version have to worry about when trying to help with
debugging.
2011-11-08 22:49:25 +00:00
Michael Stapelberg bbfbd28dfa Add a --no-startup-id flag for exec (command), exec (config), exec_always (config) 2011-10-25 22:18:17 +01:00
Michael Stapelberg 726f2a1e5a normalize file headers across **/*.{h,c} 2011-10-25 21:19:38 +01:00
Michael Stapelberg a58018cf66 Add libi3/load_font, use it everywhere
…except for i3bar, which needs slightly more information about the font
2011-10-23 22:37:11 +01:00
Michael Stapelberg 91134f75c0 Move get_mod_mask to libi3, use it in i3 and i3-config-wizard
Also, the API changed a bit. There are two functions now, both assume you
already got the keysyms (which is the case for i3 and i3-config-wizard),
one gets the modifier mapping for you (aio_get_mod_mask_for) while the other
assumes you also got that. No roundtrips are required for the latter.
2011-10-23 21:26:15 +01:00
Michael Stapelberg 6dc6ba11fc Eliminate xcb_change_gc_single everywhere with C99 2011-10-23 18:06:25 +01:00
Michael Stapelberg 9eda7fb6fb move strndup to libi3 2011-10-23 18:02:01 +01:00
Michael Stapelberg cb9bbcfccf Move get_colorpixel to libi3, use it everywhere else 2011-10-23 17:38:21 +01:00
Michael Stapelberg 4f57d49318 add libi3/ipc_connect, use it in i3-config-wizard, i3-input, i3bar 2011-10-23 17:18:14 +01:00
Michael Stapelberg 9d15a00ba8 introduce sasprintf() in libi3, use it everywhere 2011-10-23 13:16:56 +01:00
Michael Stapelberg 753d67fb64 migration from exec i3bar to bar config: i3 substitutes exec with a bar block, shows nagbar 2011-10-22 16:33:00 +01:00
Michael Stapelberg 2647f47ec5 bar config: make dock mode the default 2011-10-20 23:38:55 +01:00
Michael Stapelberg 12d866e4f6 Don’t start i3-nagbar when using -C to validate the config 2011-10-20 22:25:59 +01:00
Michael Stapelberg c2c6ca25d5 Make the barconfig list a TAILQ 2011-10-18 22:11:27 +01:00
Michael Stapelberg 24ede1c834 add an IPC request to get the bar configuration (by ID) 2011-10-18 19:05:49 +01:00
Michael Stapelberg 4898f78e5e add a data structure for 'bar' configuration 2011-10-18 19:05:49 +01:00
Michael Stapelberg f26a344dfa reformat include/config.h 2011-10-18 19:05:49 +01:00
Michael Stapelberg 178be03fa6 Implement 'workspace back_and_forth' (Patch by Michael Walle) 2011-10-17 23:17:56 +01:00
Michael Stapelberg 5f52c78aa0 Change the root window cursor to 'watch' during startups 2011-10-10 15:54:18 +01:00
Michael Stapelberg 2ad4fbb34a startup: delete the startup sequence upon completion, make the timeout complete it 2011-10-10 15:54:18 +01:00
Michael Stapelberg ae7dec2774 Move the includes after the include guard, no need to include these files more than once 2011-10-10 15:54:17 +01:00
Michael Stapelberg 4204b8e2b0 Get the _NET_STARTUP_ID in manage_window, get the corresponding workspace 2011-10-10 15:54:17 +01:00
Michael Stapelberg 499d89bdb0 Keep track of startup notifications in a TAILQ, save workspace 2011-10-10 15:54:17 +01:00
Michael Stapelberg f4f4d782bb implement a startup monitor, move code to src/startup.c 2011-10-10 15:54:17 +01:00
Michael Stapelberg b9db72dc8a Implement support for startup notifications
This only sets up startup notifications for the 'exec' commands and directives.

Monitoring startups follows later.
2011-10-10 15:54:17 +01:00
Michael Stapelberg 2a29d9c2c1 Make conn_screen available outside of main()
Will be used in other parts of the code for startup notification
2011-10-10 15:54:17 +01:00
Michael Stapelberg 29c185dd0b Move fake_configure_notify to libi3 2011-10-09 13:40:15 +01:00
Michael Stapelberg b2ad9a77c8 rename the internal function to _workspace_show, add a comment to workspace_show_by_name 2011-10-02 22:03:16 +01:00
Noe Rubinstein 92cc4494aa refactor workspace_show and friends 2011-10-02 21:57:00 +01:00
Michael Stapelberg 046cf99585 Move ipc_send_message and ipc_recv_message to libi3
Make i3-msg and src/ipc.c use it
2011-10-02 18:33:36 +01:00
Michael Stapelberg 501dc36b98 move sstrdup, scalloc, smalloc, srealloc to libi3, improve error messages 2011-10-02 18:09:30 +01:00
Michael Stapelberg 8f5dd749c3 Include libi3.h (Thanks fernandotcl) 2011-10-02 16:41:26 +01:00
Michael Stapelberg 23796ea900 Implement i3 --get-socketpath, useful for IPC scripts
In order to not depend on X11 just for getting the socket paths, scripts or
other programs can now use i3 --get-socketpath. Since i3 must be present on the
computer anyways, this saves one dependency :).
2011-10-02 16:12:10 +01:00
Michael Stapelberg 1481cd95c9 Implement the I3_SYNC client protocol
This is mainly useful for the testsuite. The tests can wait until i3 processed
all X11 events and then continue. This eliminates sleep() calls which leads to
a more robust and faster testsuite.
2011-09-22 23:13:12 +01:00
Michael Stapelberg 1717b88174 Merge branch 'master' into next 2011-09-22 20:11:44 +01:00
Michael Stapelberg 4dbda73114 Bugfix: Correctly revert focus to other floating windows when closing a floating window
Uncovered by the testsuite \o/
2011-09-22 20:10:51 +01:00
Michael Walle 5aa43d61f8 Add force_xinerama configuration option
The configuration option does the same as the commandline parameter, except
it can be easily set by the user (e.g. you are using KDM and can't start a
session through ~/.xsession).

Signed-off-by: Michael Walle <michael@walle.cc>
2011-09-19 23:10:38 +01:00
Michael Stapelberg b3adaa2983 Implement the window_role criterion (checks WM_WINDOW_ROLE)
Closes: #446

This is handy for matching specific windows of a multi-window application, for
example only Pidgin’s buddy list window.
2011-09-18 16:05:10 +01:00
Michael Stapelberg 7a38d8ac56 Merge branch 'master' into next 2011-09-17 14:13:05 +01:00
Michael Stapelberg deab3ac338 Send the correct X11 border_width in faked ConfigureNotifys 2011-09-17 14:11:55 +01:00
Michael Stapelberg ad568aa8c1 Merge branch 'master' into next 2011-09-14 23:00:02 +01:00
Michael Stapelberg 6b541d382b Bugfix: Don’t fix floating coordinates when reassigning (fixes flickering)
This fixes flickering when moving floating windows between different monitors.
2011-09-14 22:58:51 +01:00
Michael Stapelberg dc790cfa32 Bugfix: Correctly free old assignments when reloading
Fixes #516
2011-09-11 23:41:46 +01:00
Michael Stapelberg 2fc54aadf1 Implement support for PCRE regular expressions for all criteria (for_window, commands, assignments) 2011-09-10 23:53:11 +01:00
Michael Stapelberg 8114ecda47 Merge branch 'master' into next 2011-08-27 13:47:57 +02:00
Michael Stapelberg e97a7e34f7 Bugfix: Re-implement reconfiguring height of dock windows (+test) (Thanks thomasba) 2011-08-27 13:47:10 +02:00
Michael Stapelberg 53a9ace3a6 Merge branch 'master' into next 2011-08-26 03:24:14 +02:00
Michael Stapelberg 7bf465af9f Fix prototype of con_inside_focused 2011-08-26 03:23:57 +02:00
Michael Stapelberg a57a2b9ccb Merge branch 'master' into next 2011-08-26 03:18:16 +02:00
Michael Stapelberg 7fca7f029f Correctly render containers when a split container is focused 2011-08-26 03:17:41 +02:00
Michael Stapelberg 75c11cb894 Merge branch 'master' into next 2011-08-24 23:00:12 +02:00
Michael Stapelberg 698d97cd02 Bugfix: Correctly warp floating windows when using the 'move' command 2011-08-24 22:59:46 +02:00
Michael Stapelberg 7a22bd1cf3 Merge branch 'master' into next 2011-08-17 12:14:17 +02:00
Peter Bui 36224f86d1 Only warp pointer once during x_push_changes()
- Introduce warp_to static variable in x.c that stores the coordinates
  to warp to as a Rect.

- Add x_set_warp_to function to set this variable.  Use in _tree_next,
  workspace_show, and con_move_to_workspace.

- In x_push_chanages, if warp_to is set, then call xcb_warp_pointer_rect
  and then reset it to NULL.

This fixes all know bugs for pointer warping for me.
2011-08-17 12:12:40 +02:00
Michael Stapelberg 2abe23d6ff Merge branch 'master' into next 2011-08-17 01:52:45 +02:00
Michael Stapelberg 7951445849 xcb: use predefined XCB_ATOM_ atoms, don’t request them 2011-08-17 01:41:19 +02:00
Michael Stapelberg d3efa73dd7 Merge branch 'master' into next 2011-08-11 22:22:44 +02:00
Valentin Voigt bf0c67b2af Warp cursor when changing workspace. 2011-08-11 22:13:50 +02:00
Michael Stapelberg 3af7692a92 Merge branch 'tests-optimize' into next 2011-08-10 15:57:28 +02:00
Michael Stapelberg 10f871b57b implement "socket activation": passing IPC sockets to i3 2011-08-10 15:55:27 +02:00
Mateusz Poszwa 42db9de7ec Add new_float config option.
This option sets the default border style for containers automatically put into floating mode.

Fixes #264
2011-08-09 09:29:53 +02:00
Helgi Kristvin Sigurbjarnarson 35d7ef0ddd Feature: implement GET_MARKS 2011-08-09 08:04:33 +02:00
Peter Bui a547365a88 Implement switching focus across screens.
Modify _tree_next() so that when we reach the workspace container:

1. Find the next corresponding output (screen) using the added
get_output_next().

2. If there is another output, find the visible workspace.

3. Call workspace_show on found workspace.

4. Find the appropriate window to focus (leftmost/rightmost, etc.) using
con_descend_direction, and then focus it.

I've only tested on horizontal monitors (left/right).
2011-08-07 14:33:07 +02:00
Peter Bui 1750192f63 Modify workspace next/prev to account for workspaces on all outputs.
Generally, the traversal goes: numbered workspaces in order, and then
named workspaces in the order in which they appear in the tree.

Example:
    Output 1:       Output 2:
	1 3 D C         2 4 B A

Traversal: 1, 2, 3, 4, D, C, B, A, 1, ...

Note, after the numbered workspaces, we traverse the named workspaces
from output 1, and then output 2, etc.
2011-08-04 00:12:09 +02:00
Michael Stapelberg c883e7050a Include <limits.h> in all.h 2011-08-04 00:10:04 +02:00
Michael Stapelberg 192dbdabd6 Bugfix: Correctly set the _NET_CLIENT_LIST_STACKING hint (fixes chromium tabbar)
Fixes #287
2011-08-03 20:07:03 +02:00
Michael Stapelberg 3a41aea75b add xcb_icccm_get_wm_protocols to xcb_compat.h (Thanks Merovius) 2011-07-31 18:32:28 +02:00
Michael Stapelberg 1b0d6ab202 remove unnecessary 'extern' keyword from function prototypes in include/xcursor.h 2011-07-29 13:16:26 +02:00
Michael Stapelberg 3721c598bd Bugfix: Set the cursor via the Xlib connection if XCursor is supported
This fixes a race where we created cursors on the Xlib connection, flushed,
then used the cursor on the XCB connection. Even though we flushed, the X
server did not process the requests yet and therefore returned a BadCursor
error.

This bugfix uses the Xlib connection for setting the root window cursor which
will ensure that the requests are properly serialized.

An easy test for this (on my machine) is the following ~/.xsession:
    xsetroot -cursor_name cross
    exec i3
If you see a cross cursor instead of the pointer, the race happens. You’ll see
a error_code=6 error in your ~/.xsession-errors.
2011-07-29 13:13:51 +02:00
Michael Stapelberg a05a9f8dae Set some more atoms for _NET_SUPPORTED (Thanks lexszero) 2011-07-23 22:40:47 +02:00
Michael Stapelberg ffe297f5e5 Bugfix: use the global root variable, don’t get the first one (Thanks quaec) 2011-07-23 22:29:01 +02:00
Michael Stapelberg b87742172b Add missing function prototype for strndup on Darwin (Thanks Marcus) 2011-07-17 22:18:00 +02:00
Michael Stapelberg 02dfb8e891 use memmem and strndup from FreeBSD on Darwin (Thanks Marcus) 2011-07-17 15:18:45 +02:00
Claudio Marforio cc24a96e96 patch to allow exec_always in configure file
fixed indentation, updated docs
2011-07-12 18:23:14 +02:00
Michael Stapelberg 05e39c1c48 Ignore X11 errors caused by ReparentWindow / ChangeProperty on already destroyed windows
These errors can happen because a DestroyWindow request by a client will
trigger an UnmapNotify, then a DestroyNotify. We cannot distinguish this
UnmapNotify from an UnmapNotify not followed by a DestroyNotify, so we just try
to send the ReparentWindow / ChangeProperty and ignore the errors, if any.
2011-07-10 23:44:13 +02:00
Michael Stapelberg 78d25c4cd9 expose event handler: use x_deco_recurse 2011-07-10 22:06:16 +02:00
Michael Stapelberg c55abca115 add i3-nagbar. tells you about config file errors (for example) 2011-07-10 14:33:19 +02:00
Michael Stapelberg d641e1da3b Don’t force wrapping when focusing in a direction would work (+test)
Think of the following layout:

 -------------
 | tab |     |
 | con | win |
 |     |     |
 -------------

The tabbed container on the left has two children. Assume you have focused the
second/right child in the tabbed container. i3 used to focus the first/left
container of the tabbed container when using 'focus right' (it wrapped focus).

With this commit, the default behaviour is to instead focus the window on the
right of the screen.

The intention is to make focus switching more intuitive, especially with tabbed
containers supporting 'focus left'/'focus right' in tree. You should end up
using less 'focus parent' :).

You can force the old behaviour with 'force_focus_wrapping true' in your
config.

Code coverage is 62.5% with this commit.
2011-06-12 12:56:50 +02:00
Michael Stapelberg fb9d77305e Implement 'fullscreen global' 2011-06-10 18:27:20 +02:00
Michael Stapelberg 60ae26c19d Implement 'workspace next/prev' (+test) 2011-06-10 16:03:59 +02:00
Michael Stapelberg 39b1c1bf75 Re-implement the 'mode' command 2011-06-10 02:38:07 +02:00
Michael Stapelberg 1585d942ea Make workspace_layout handle all cons at workspace level, not only the first one (+test)
This makes opening new windows on workspace level and moving windows to the
right/left more like in the old i3.
2011-06-02 17:21:38 +02:00
Michael Stapelberg 2c68c234ea Implement assignments for (named) workspaces, with '~' compatibility (floating) 2011-05-23 18:41:17 +02:00
Michael Stapelberg 5ae4620a24 Time Lord technology: for_window config directive to run arbitrary cmds
An example to set all XTerms floating:
    for_window [class="XTerm"] mode floating

To make all urxvts use a 1-pixel border:
    for_window [class="urxvt"] border 1pixel

A less useful, but rather funny example:
    for_window [title="x200: ~/work"] mode floating

The commands are not completely arbitrary. The commands above were tested,
others may need some fixing. Internally, windows are compared against your
criteria (class, title, …) when they are initially managed and whenever one of
the relevant values change. Then, the specified command is run *once* (per
window). It gets prefixed with a criteria to make it match only the specific
window that triggered it. So, if you configure "mode floating", i3 runs
something like '[id="8393923"] mode floating'.
2011-05-15 20:10:25 +02:00
Michael Stapelberg 5db97dc473 Bugfix: Fix initialization / assignments when RandR is missing 2011-05-14 22:34:34 +02:00
Michael Stapelberg 3f45d3c447 re-implement assignments of workspace to specific outputs 2011-05-14 22:19:58 +02:00
Michael Stapelberg 0e2d58347c introduce the NODES_FOREACH and GREP_FIRST macros 2011-05-14 22:11:09 +02:00
Michael Stapelberg 167bdd26b7 Argument for 'kill' for killing a specific window (now default) or the whole client (+test)
Use 'kill window' to kill a specific window (for example only one specific
popup), use 'kill client' to kill the whole application (or X11 connection to
be specific).
2011-05-13 20:41:03 +02:00
Michael Stapelberg eb8ad348b2 Bugfix: Don’t run into an endless loop when killing con with children (Thanks mseed)
When a tabbed container had more than one child and at least the first one
supported WM_DELETE, i3 entered an endless loop when killing that tabbed
container. This was due to tree_close only sending WM_DELETE without actually
removing the child, while the loop in tree_close assumed that with every call
of tree_close one child would be removed.
2011-05-11 20:22:47 +02:00
Michael Stapelberg 3d1acd6c2f re-implement assigning windows to workspaces 2011-05-02 23:29:26 +02:00
Michael Stapelberg d28008aa63 Bugfix: Correctly render decorations in tabbed containers (don’t overlap)
This fixes a regression introduced in b644fb5f26.
2011-05-01 18:48:30 +02:00
Michael Stapelberg 3dd5552390 fix warning by removing 'const' from ipc_socket_path 2011-04-26 19:28:33 +02:00