Commit Graph

641 Commits (587273505c667b8955b207178c591755fdc9d5d5)

Author SHA1 Message Date
Sebastian Ullrich 431e98dc35 Respect workspace numbers when looking for a free workspace name
This prevents a ws '1' appearing on a new output when there's
already a ws '1: www' on an existing output
2013-08-18 17:47:53 +02:00
koebi 88671986f4 implement unmark command 2013-07-17 23:02:31 +02:00
Michael Stapelberg eec80838ab actively delete _NET_WORKAREA on startup
fixes #1038
2013-07-13 12:24:15 +02:00
Franck Michea 1f8a860744 bugfix: Resize and center a scratchpad even when a criteria is used. 2013-07-11 21:18:21 +02:00
Alexander Berntsen 023594909e Implement debuglog command
Add debuglog command that takes toggle|on|off. Add get_debug_logging()
to be able to toggle. Make t/187-commands-parser.t expect 'debuglog'.
Document the debuglog command in userguide.
2013-07-07 15:33:42 +02:00
Michael Stapelberg c4d4418745 Merge branch 'master' into next 2013-06-29 20:58:51 +02:00
Michael Stapelberg d055e70a89 tests: update t/172-start-on-named-ws.t to check the previous commit 2013-06-29 20:58:33 +02:00
Michael Stapelberg 78e99440f6 Merge branch 'master' into next 2013-06-29 20:28:07 +02:00
Michael Stapelberg b4f7142509 Bugfix: fix focus handling in 'floating disable' on non-visible windows (Thanks necoro)
fixes #1027
2013-06-29 20:27:33 +02:00
oblique 78fad71894 Update parent urgency hint if a child is removed. 2013-06-23 22:27:30 +02:00
Michael Stapelberg 3cf46ef4cc add a testcase for the shmlog command 2013-06-23 22:14:59 +02:00
Alexander Berntsen f9d93d75b3 Implement shmlog command
Add shmlog command that takes <size>|toggle|on|off. Separate logbuffer
management into open_logbuffer() and close_logbuffer(). Make
t/187-commands-parser.t expect 'shmlog'. Add update_shmlog_atom() to
update the SHMLOG_PATH. Document the shmlog command in userguide.
2013-06-23 21:48:02 +02:00
Michael Stapelberg 80e7d2d346 lib/i3test: clarify how to identify open_window() windows in i3 commands (Thanks vandannen) 2013-06-08 12:49:02 +02:00
haptix@web.de e3913093b6 introduced i3 command for changing the hidden state and the mode of i3bar
The hidden_state and mode of each i3bar instance can now be controlled from within i3.
Therefore, two new i3 command were introduced:
    _
    bar hidden_state show|hide|toggle [<bar_id>]

    show: always show the bar
    hide: normal hide mode
    toggle: toggle between show and hide (individually for each bar)
    _
    bar mode dock|hide|invisible|toggle [<bar_id>]

    hide,dock: like before
    invisible: always keep the bar hidden
    toggle: toggle between dock and hide (individually for each bar)

This patch introduces a hidden_state ("hidden_state hide|show") in the
barconfig, which indicates the current hidden_state of each i3bar
instance. It only affects the bar when in hide mode. Additionally, a new
invisible mode was introduced. In order to change the hidden_state or
mode of the bar from i3, a barconfig-update event was introduced, for
which a bar can subscribe and the bar then gets notified about the
currently set hidden_state and mode in its barconfig.

For convenience, an id field ("id <bar_id>") was added to the barconfig, where one can
set the desired id for the corresponding bar. If the id is not specified, i3 will
deterministically choose an id; otherwise, with the previous random approach for finding
a new id, which is actually not shared with i3bar, as it would determine its id on
startup, the event-subscription would be destroyed on reload. Still, this issue remains
when manually changing the bar_id in the config and then reloading.

fixes #833, #651
2013-05-25 23:00:36 +02:00
haptix@web.de f0eba6d15c Fix problem when moving fullscreen window to scratchpad
When moving a fullscreen window to scratchpad with 'move scratchpad', the
focused window would stay fullscreen.

Also, when having a container in fullscreen mode and then focusing a child of
this container and moving it to scratchpad, it would enable fullscreen for
the child window.

This patch fixes both problems, so the scratchpad window is always floating.
2013-05-25 22:59:27 +02:00
Michael Stapelberg 0b000b1464 Merge branch 'master' into next 2013-04-02 23:59:48 +02:00
Michael Stapelberg 0901720a24 Bugfix: fix floating window size with hide_edge_borders (+test)
fixes #998
2013-04-02 23:59:26 +02:00
haptix@web.de 43bf72fc5d add testcase for the workspace-focus ipc event 2013-04-02 22:27:04 +02:00
Michael Stapelberg bfc2cbc69a t/201-config-parser: add test for quotes in comments 2013-04-02 22:27:04 +02:00
Philippe Virouleau 0a3d42c21e Fix scratchpad_show
Test if window is in scratchpad
    Test if function is called without criteria
    Updated testcase
2013-03-27 21:51:13 +01:00
oblique 8a4a719093 Add support for _NET_WM_STATE_DEMANDS_ATTENTION.
_NET_WM_STATE_DEMANDS_ATTENTION indicates that some action in or with
the window happened. It's a weaker hint than urgency flag of WM_HINTS,
but some applications and almost all Qt applications use it instead of
WM_HINTS' urgency flag (one example is Skype).
2013-03-09 10:55:13 +01:00
Michael Stapelberg 7ecdcb61f8 config: accept “smart” as popup_during_fullscreen parameter (Thanks supplantr)
This was the default, so explicitly setting it is not really necessary,
but of course it should be possible.

fixes #967
2013-02-24 17:23:37 +01:00
Michael Stapelberg d5358a749e Merge branch 'master' into next 2013-02-19 00:28:05 +01:00
Michael Stapelberg 9bfe6a6236 Bugfix: Properly parse commands like “move workspace torrent” (Thanks rasi)
fixes #955
2013-02-19 00:27:55 +01:00
Michael Stapelberg 2922603cc4 tests: correctly close stdout with IPC::Run
while IPC::Run supports <&-, it does not support >&- apparently.
2013-02-19 00:26:00 +01:00
Michael Stapelberg 9cd2d1fb8a make t/205-ipc-windows require AnyEvent::I3 >= 0.15
Necessary due to the new event type
2013-02-18 10:59:32 +01:00
Piotr S. Staszewski 3facbbca5c Add a new IPC event for changes on windows.
Added new event id (I3_IPC_EVENT_WINDOW) so that a an IPC client can
subscribe to events on windows. Added a basic window event that gets
triggered when a window gets successfully reparented. This new event
also dumps the container data, so that IPC clients can get the initial
window name. IPC clients wishing to see window events should subscribe
to 'window'.
2013-02-18 10:55:11 +01:00
Sebastian Ullrich 49979c9d15 Always auto center on 'scratchpad show' if window hasn't been repositioned by the user
This change ensures a scratchpad window is still centered on the screen
if it has first been shown on another screen of a different
resolution. Moving or resizing the scratchpad manually disables this
behavior.
2013-02-18 10:38:28 +01:00
Michael Stapelberg 7f0065e1b1 tests: unset $ENV{SHELL} to avoid breakage with fish (Thanks dRbiG) 2013-02-15 16:41:28 +01:00
Mats fa4301e06d Split workspace instead of changing orientation
Move all children of the workspace into a new container if there is more
than one otherwise simply change the orientation.

fixes #922
2013-02-15 03:16:02 +01:00
Sebastian Rachuj b565bfca13 Bugfix: Do not move focus if a container is moved across outputs
fixes #809

This makes the moving behavior more consistent. If you want to focus the
workspace you are moving to, just chain the keybinding in your config
file:

    bindsym $mod+Shift+1 move workspace 1; workspace 1
2013-02-10 17:38:17 +01:00
Michael Stapelberg a1774e78fc i3test: fix get_focused() docs (Thanks knopwob) 2013-02-07 15:57:15 +01:00
Sascha Kruse 0a0d66dc8a put common part of error messages into variable
This makes future changes easier when new tokens are added to the
parser.
2013-02-01 11:50:52 +01:00
Sascha Kruse bbede97966 scratchpad_show focus unfocused scratchpad window
When there's an unfocused scratchpad window on the current workspace
scratchpad_show will focus that scratchpad window.
2013-01-30 13:33:55 +01:00
Michael Stapelberg 03693bf0cc add testcase for "move workspace <output>" 2013-01-30 13:31:20 +01:00
Vivien Didelot 1d22fe42f2 split main .gitignore and ignore more files
This patch splits the main .gitignore with a specific
testcases/.gitignore and also add 4 patterns to the ignore list:

  i3-command-parser.stamp
  i3-config-parser.stamp
  testcases/-
  testcases/i3-cfg-for-*
2013-01-26 19:30:10 +01:00
Michael Stapelberg 4796a61c31 add testcase for "move to output" wrapping 2013-01-26 19:28:11 +01:00
Francesco Mazzoli 3cd4b8c111 update tests to test the output wrapping 2013-01-26 19:08:41 +01:00
Adrien Schildknecht 76ef3a4ab8 remove the urgency indicator when a window is closed 2013-01-25 18:53:59 +01:00
Michael Stapelberg a32d2d5d61 scratchpad: fix crash when moving last window of an invisible workspace (+test) (Thanks bafain)
It looks like the code which was removed with this commit was not
necessary anyways since con_move_to_workspace() by now checks on its own
whether it moves to the scratchpad.

fixes #913
2013-01-25 15:28:58 +01:00
Michael Stapelberg c2061042e1 Merge branch 'master' into next 2013-01-25 13:56:26 +01:00
Michael Stapelberg 8bc771ac16 Bugfix: parse outputs as "word", not "string", to ignore trailing whitespace (Thanks leifarne)
fixes #921
2013-01-25 13:55:26 +01:00
Michael Stapelberg 2c249b6949 Merge branch 'master' into next 2013-01-01 16:31:27 +01:00
Michael Stapelberg 138e04fd4d Bugfix: Fix for_window moving of assigned windows (Thanks bafain)
fixes #909
2013-01-01 16:31:08 +01:00
Michael Stapelberg 6856b232d6 t/175-startup-notification: use the testcases X11 connection
This needs X11::XCB >= 0.07 and will be skipped if that is not
installed.

This fixes a race condition in the testsuite.
2012-12-27 18:02:23 +01:00
Michael Stapelberg 1b62feccac t/132-move-workspace: add missing sync_with_i3 2012-12-27 16:55:22 +01:00
Michael Stapelberg baae706b87 t/166-assign: sync after mapping the window 2012-12-26 22:04:35 +01:00
Michael Stapelberg c06d62887e t/173-regress-focus-assign: sync after mapping the window 2012-12-26 22:04:15 +01:00
Michael Stapelberg 4d65cfc67d t/189-floating-constraints: sync before getting window rects 2012-12-26 22:03:37 +01:00
Michael Stapelberg 27adbbff61 t/510-focus-across-outputs: fix sync order
syncing _after_ fresh_workspace makes no change, but we need to wait for
the WarpPointer request to be processed.
2012-12-26 22:03:02 +01:00
Michael Stapelberg 92e2190300 t/503-workspace: sync after switching focus to a different output 2012-12-26 22:02:43 +01:00
Simon Elsbrock 0045cfa637 move visible scratchpad window to focused workspace
If there is a visible scratchpad on another (non-internal) workspace,
bring it to the focused workspace instead of doing nothing.

closes #784
2012-12-24 19:20:47 +01:00
Michael Stapelberg 061d90f305 move scratchpad test to separate file, otherwise it is non-conclusive 2012-12-24 19:19:32 +01:00
Michael Stapelberg ff9c2f0c46 new-test: add launch_with_config to multi-monitor template 2012-12-22 14:08:25 +01:00
Michael Stapelberg a1ccca22e6 Merge branch 'master' into next 2012-12-22 14:08:14 +01:00
Michael Stapelberg 36b106a9d3 Bugfix: Ignore ConfigureRequests for scratchpad windows (Thanks MeanEYE)
fixes #898
2012-12-22 14:08:11 +01:00
Michael Stapelberg 3ca8299637 complete-run: clarify the message about missing ../i3 (Thanks Marcos) 2012-12-20 23:50:50 +01:00
Michael Stapelberg 6dfb08170c fix bind[code|sym] --release (Thanks paolo)
fixes #890
2012-12-14 21:41:56 +01:00
Michael Stapelberg 1ae08b196a Bugfix: Don’t move floating windows when their size constraints forbid resizing (Thanks aksr)
fixes #883
2012-11-27 09:26:31 +01:00
Adrien \"schischi\" Schildknecht f41fa1baa1 The command to resize a floating window now checks the minimum and maximum size. 2012-11-25 20:52:56 +01:00
Michael Stapelberg 3cb909fa62 config parser: recover after invalid input
This is done by ignoring the rest of the current line and jumping to the
nearest <error> token.

fixes #879
2012-11-20 17:10:29 +01:00
Michael Stapelberg 773654dbb8 complete-run: run 000-load-deps as early as possible 2012-11-13 21:04:13 +01:00
Michael Stapelberg 5fb9b8ffb8 tests: 000-load-deps: bail out when dependencies are not found, test more of them
This should be a better hint for people who forgot to install the
testsuite dependencies :).
2012-11-13 21:03:44 +01:00
Michael Stapelberg a3324a5e42 tests: 115-ipc-workspaces: ensure the i3 ipc socket is connected 2012-11-13 21:03:25 +01:00
Michael Stapelberg e809bff1ab t/115: make the test a little shorter by using helper functions 2012-11-13 09:40:29 +01:00
Francesco Mazzoli a6b6bb670a workspace events test 2012-11-13 09:40:29 +01:00
Michael Stapelberg dece12bf18 Merge branch 'master' into next 2012-11-10 09:01:24 +01:00
Michael Stapelberg 81393c93c2 bugfix: fix workspace back_and_forth after displaying a scratchpad window
fixes #868
2012-11-10 09:01:04 +01:00
Quentin Glidic 783fd66b58 complete-run: Unset I3SOCK 2012-11-07 13:40:51 +01:00
Michael Walle ae14fe9141 introduce new command to rename focused workspace
The corresponding command is 'rename workspace to <name>'. As a side-effect
this fixes the command 'rename workspace 1 to to'.

Signed-off-by: Michael Walle <michael@walle.cc>
2012-10-31 09:09:56 +01:00
Deiz aefcb0b668 Skip floating windows in the focus stack when moving through the tree
Includes a test for the new behaviour
2012-10-16 20:03:40 +02:00
Deiz c406b4c2fe Skip floating cons in focus (child|parent) and stop them from being split
Focusing child from a workspace should now skip over the floating con and
go directly to its child. Focusing parent from that grandchild should leave
the workspace focused again.
2012-10-16 20:01:36 +02:00
Deiz 47de7375dd Allow 'focus $dir' to move out of non-global fullscreen containers 2012-10-09 21:26:49 +02:00
Deiz ca77c12dde Allow workspace contents to be moved if there are only floating children 2012-10-09 21:25:13 +02:00
Deiz e07803999f Fix fullscreen focus bug and corresponding test flaw
As the workspace might be reached via recursion (e.g. moving from the edge
of a fullscreen split container), it's necessary to check for a fullscreen
container whenever a workspace is reached.
2012-10-09 21:24:04 +02:00
Michael Stapelberg a06bf27c24 tests: fix error messages, add 'bind' as synonym to mode blocks 2012-10-09 14:11:35 +02:00
Michael Stapelberg 587b92b7a3 t/201-config-parser: test more directives, test error handling 2012-10-08 13:24:47 +02:00
Michael Stapelberg a635945f85 tests: use new assign syntax, drop legacy test 2012-10-08 13:22:17 +02:00
Michael Stapelberg 00fca2dabd add first bits of a (custom) config parser 2012-10-08 13:17:46 +02:00
Deiz cae6fb627f Improve startup sequence termination conditions
If a window with _NET_STARTUP_ID set is moved to another workspace, it
will delete any associated startup sequence immediately. This will also
occur if a window has a leader with _NET_STARTUP_ID set, if the leader
has no container (never been mapped).

A startup sequence may also be deleted if it's matched by
startup_workspace_for_window() and its 30-second timeout has elapsed.
2012-10-04 17:48:51 +02:00
Deiz fdcba7b91a Replace the discrete 'split' Con property with a simple function. 2012-10-04 17:48:08 +02:00
Deiz d7e5da8b39 Un-fullscreen as needed when moving fullscreen containers
This avoids a case where a fullscreen container could be moved onto a
workspace that already had its own fullscreen container, leading to
two fullscreen containers on top of each other.
2012-10-04 17:46:54 +02:00
Michael Stapelberg 13147978c5 Merge branch 'master' into next 2012-10-03 15:08:31 +02:00
Sascha Kruse 507898484f set workspace_layout in create_workspace_on_output
fixes #835
2012-10-03 15:08:21 +02:00
Michael Stapelberg 85dc1b0865 testsuite: add 'new-test' helper script 2012-10-03 00:13:30 +02:00
Michael Stapelberg 029d9040e1 add test for previous commit 2012-10-03 00:04:05 +02:00
Deiz e89a25f81f Implement moving workspaces as if they're regular containers 2012-09-29 00:17:36 +02:00
Michael Stapelberg 43d486441d Bugfix: with one ws per output, don’t crash on cross-output moves (Thanks moju)
fixes #827
2012-09-28 23:04:37 +02:00
Michael Stapelberg 66b389cba1 Make the resize command honor criteria (Thanks Tblue)
fixes #816
2012-09-28 20:36:25 +02:00
Michael Stapelberg 5d8e3f58f6 Fix 'border toggle' (it "skipped" 1px border) (Thanks joepd)
fixes #818
2012-09-28 19:29:14 +02:00
Simon Elsbrock da2b47c1e5 fix crash: send non-floating window with floating parent to scratchpad (thanks pkordy)
Fix a crash that occured when moving a window to the scratchpad that is
seemingly floating to the user, but actually a descendant of a floating
parent con (and itself non-floating). If that is the case, move the
floating parent container to scratchpad instead of the window.

fixes #740
2012-09-28 17:58:58 +02:00
Michael Stapelberg 0610964c22 add testcase for commit 87525ad 2012-09-27 12:37:38 +02:00
Michael Stapelberg c31b3b296a Bugfix: Correctly clear the urgency hint when the window is underneath a split-con (+test)
Previously, when you had an urgent container in a stack on some
invisible workspace (say urxvt) and you switched to it, the urgency hint
was not properly cleared.
2012-09-25 15:40:08 +02:00
Yaroslav Molochko 04c58c7325 Implement variable border widths for pixel/normal
fixes #325
2012-09-24 22:20:29 +02:00
Sascha Kruse b741c49212 testcase for propagating urgency 2012-09-22 19:31:46 +02:00
Michael Stapelberg 1e143feab1 Close empty workspaces after cross-output move (+test) (Thanks chrysn)
fixes #795
2012-09-22 19:03:19 +02:00
Michael Stapelberg 11378b7012 t/506-focus-right: also verify that focus up/down is a no-op (Thanks swh) 2012-09-22 17:30:44 +02:00
Michael Stapelberg 19883108a9 Make get_output_next() work with non-aligned RandR setups (+test) (Thanks Feh, swh, Moritz)
A good visualization of the new algorithm is this:

           +--------+
           |        |
+--------+=|   S1   |========================
|        | |        |
|   S0   | +--------+
|        |         +--------+
+--------+=========|        |================
                   |   S2   | +--------+
                   |        | |        |
                   +--------+ |   S3   |
                              |        |
                              +--------+

When focus is on S0, 'focus output right' will first match S1 (the
closest output which overlaps in the highlighted area), then S2, but not
S3 (since S3 does not overlap into the highlighted area).

fixes #669
fixes #771
2012-09-22 16:54:59 +02:00
Michael Stapelberg 2fba607e4d tests: Bugfix: use exit_gracefully() in t/200-urgency-timer 2012-09-22 14:51:38 +02:00
Sebastian Ullrich 236f9f45e3 Make "[move] workspace number" accept a default ws name after the ws number 2012-09-22 14:34:05 +02:00