Commit Graph

276 Commits (475671ae2aea2d3d2e05b613f2fe5bfa02aca861)

Author SHA1 Message Date
Ingo Bürk 475671ae2a Added 'con_move_to_mark' to move a container to the container holding a certain mark. 2015-04-19 20:57:49 +02:00
Ingo Bürk 9613a0744d Added configuration directive for 'move [container|window] [to] mark <str>' 2015-04-19 20:57:44 +02:00
Ingo Bürk 2e4fac61d2 Only mark a window if only one window is matched
We only support unique marks, so looping over all matched windows must be prevented.
If more than one window is matched, we reject it with an error message.

fixes #1614
2015-04-01 13:51:48 +02:00
Ingo Bürk 6036d4e506 Changed the default for show_marks from "no" to "yes" 2015-03-30 23:11:50 +02:00
Ingo Bürk 2af1a80028 Introduce a cached boolean for changes to the mark of a window.
This is necessary to correctly redraw window decorations when the mark of
a window is added or removed.
2015-03-30 23:08:25 +02:00
Deiz c6581a5fd6 Handle floating centering in one function and test for consistency 2015-03-30 16:03:35 -04:00
Michael Stapelberg 2759a308a2 Merge pull request #1608 from mh21/renaming-empty-ws-startup
Update old_name when renaming current workspace
2015-03-30 22:01:18 +02:00
Michael Stapelberg 9718640622 Merge pull request #1589 from Deiz/fix-center
Make center coordinates relative to current workspace
2015-03-30 08:47:04 +02:00
Michael Hofmann f76e6c2bb1 Get workspace name when renaming current workspace.
- fixes #1607
2015-03-30 08:28:36 +02:00
Ingo Bürk 7a75cb7e0b Added test cases for 'mark --toggle' (#1463) 2015-03-29 21:21:50 +02:00
Ingo Bürk d51d6d730e Added a --toggle switch to "mark [--toggle] <mark>"
This option allows toggling marks on a window without knowing whether the mark is already set or not.
It behaves as follows:
1) If the matched window has no mark, the new mark is set.
2) If the matched window has another mark, the old mark is removed and the new mark is set.
3) If the matched window already has the mark, the mark is removed.

The behavior that all non-matched windows have this mark removed is kept.

fixes #1463
2015-03-29 21:21:50 +02:00
Deiz 24f0ea2f24 Make center coordinates relative to current workspace
Fixes #1211
2015-03-25 22:40:59 -04:00
Michael Stapelberg 822cd3bf1b Revert "Workspace command number selection"
This reverts commit cbd51ce664.

If you’ve started using this feature, I’m very sorry, but I think it’s
better to revert it entirely, as it will only cause more problems in the
future as more and more people upgrade and get bitten by this if we
didn’t revert it…

fixes #1536
2015-03-24 09:28:30 +01:00
Tony Crisci 6b150b1ac2 bugfix: workspace rename focus mismatch
When renaming a workspace on another output that moves the workspace to
the current output, the renamed workspace would be shown even though it
does not contain the focused container.

Explicitly show the focused workspace after the move. This is necessary
because `workspace_move_to_output` will show the workspace that is
moved.
2015-03-15 23:30:00 -04:00
Michael Stapelberg 513510de69 clang-format src/commands.c 2015-03-14 22:32:23 +01:00
Michael Stapelberg 56f420c3dd Merge pull request #1539 from mh21/wsrename-1527
Rename workspaces in startup sequences
2015-03-14 04:56:19 -07:00
Michael Hofmann 44f748a663 Rename workspaces in startup sequences.
When renaming workspaces, any workspace names in pending startup
sequences also need to be renamed.
2015-03-13 10:35:20 +01:00
Michael Stapelberg c263bb3d2a Merge pull request #1521 from Airblader/feature-use-refactored-function
Use the already existing function to get rid of some code duplication
2015-03-13 00:54:52 -07:00
Michael Stapelberg a5939f3edc Merge pull request #1513 from Airblader/defect-1473
Move workspace to assigned output when renaming it
2015-03-13 00:52:52 -07:00
Ingo Bürk 9ebf17c39d Properly error out when the layout file cannot be read.
This will result in an actual error message for the user.
fixes #1499
2015-03-07 15:57:05 +01:00
Ingo Bürk 6c675cc3f6 Glob filepath when calling append_layout
fixes #1500
2015-03-07 15:56:59 +01:00
Ingo Bürk 58df5aa6c4 Improve error messages on failing commands 2015-03-07 15:53:35 +01:00
Ingo Bürk c572176429 Use the already existing function to get rid of some code duplication 2015-03-05 14:00:24 +01:00
Michael Stapelberg 1b69ddacbe Merge pull request #1515 from Airblader/feature-commands-error-messages
Improve error messages on failing commands
2015-03-04 10:20:21 -08:00
Ingo Bürk acb79bd02f Improve error messages on failing commands 2015-03-04 14:01:42 +01:00
Ingo Bürk eb73059c61 Refactor functions for easy reuse 2015-03-04 09:22:25 +01:00
Ingo Bürk bcc1314a2d When renaming a workspace, look for assignments and move the renamed workspace to the appropriate output. 2015-03-04 09:06:44 +01:00
Ingo Bürk 9e739de5d3 Glob filepath when calling append_layout
fixes #1500
2015-03-01 16:51:58 +01:00
Tony Crisci 823b46a544 Include workspace con in workspace event
Send the affected workspace in the "current" property for each workspace
event for any type of workspace event that affects a particular
workspace.

fixes #1411
2014-12-22 09:47:31 +01:00
Mats e59a76e456 Extend the fullscreen command
Rather than just toggling the fullscreen modes, allow to set them
directly with:

    fullscreen enable|toggle [global]
    fullscreen disable

For compatibility, retain the previous command and its toggling behavior:

    fullscreen [global]

fixes #1120
2014-12-10 20:42:52 +01:00
Mats dc351fb291 Prevent workspace change during global fullscreen
While in global fullscreen, the workspace could be changed leaving the
fullscreen container still visible on top but losing its focus.
2014-12-10 20:24:32 +01:00
Michael Stapelberg ee75821699 Merge branch 'master' into next 2014-07-15 10:28:51 +02:00
Michael Stapelberg 679a5de8cf Bugfix: properly restore workspace containers (Thanks vals)
fixes #1306
2014-07-15 10:27:42 +02:00
Tony Crisci 7381b50587 Make absolute floating move work with criteria
Make commands of type `move [window|container] [to] [absolute] position
<px> [px] <px> [px]` work with command selection criteria.

fixes #1301
2014-07-02 19:07:08 +02:00
Michael Stapelberg 01a2c5a3f1 Merge branch 'master' into next 2014-06-27 09:05:32 +02:00
Michael Stapelberg c159fc4197 Bugfix: create the directory for storing the restart state (Thanks hjem)
fixes #1303
2014-06-27 09:04:51 +02:00
Tony Crisci a9c094b731 Implement EWMH desktop names
Maintain the _NET_DESKTOP_NAMES property on the root window.

http://standards.freedesktop.org/wm-spec/latest/ar01s03.html#idm140251368131760

> _NET_DESKTOP_NAMES
>
> _NET_DESKTOP_NAMES, UTF8_STRING[]
>
> The names of all virtual desktops. This is a list of NULL-terminated
> strings in UTF-8 encoding [UTF8]. This property MAY be changed by a
> Pager or the Window Manager at any time.
2014-06-24 09:04:05 +02:00
Tony Crisci cbd51ce664 Workspace command number selection
If a `workspace {N}` or `move to workspace {N}` command is given with N
as a plain number, the workspace of this number is selected for the
context of the command if one exists and there is no workspace with a
name that exactly matches N.
2014-06-23 21:30:07 +02:00
Michael Stapelberg d1e59a204e fix src/commands.c with clang-format 2014-06-23 21:29:42 +02:00
Tony Crisci c2b6b06da7 Make command `move [direction]` work with criteria
A container selected with criteria should be moved with the `move
[direction]` command, instead of this command always acting on the
focused container.
2014-06-23 21:17:27 +02:00
Tony Crisci c936232545 Consistently parse workspace numbers
Use ws_name_to_number() to parse workspace numbers where this
transformation takes place.
2014-06-23 21:16:18 +02:00
Michael Stapelberg 4c06e7a573 clang-format-3.5 **/*.h **/*.c
This should be the last commit that formats a big bunch of files. From
here on, whenever I merge patches, I’ll run clang-format like described
in the title.
2014-06-19 11:20:32 +02:00
Michael Stapelberg 9200094203 format **/*.c with clang-format-3.5
This has multiple effects:

1) The i3 codebase is now consistently formatted. clang-format uncovered
   plenty of places where inconsistent code made it into our code base.

2) When writing code, you don’t need to think or worry about our coding
   style. Write it in yours, then run clang-format-3.5

3) When submitting patches, we don’t need to argue about coding style.

The basic idea is that we don’t want to care about _how_ we write the
code, but _what_ it does :). The coding style that we use is defined in
the .clang-format config file and is based on the google style, but
adapted in such a way that the number of modifications to the i3 code
base is minimal.
2014-06-15 19:07:02 +02:00
Michael Stapelberg 94574db6f6 cleanup temporary directory when restarting and not using XDG_RUNTIME_DIR
fixes #1253
2014-06-11 09:17:43 +02:00
Michael Stapelberg 26460c091a delete ipc socket when exiting, cleanup tmpdir
fixes #1253
2014-06-08 22:13:43 +02:00
Michael Stapelberg 617afc67a2 replace remaining printf()s with D?LOG
fixes #1252
2014-06-08 21:56:14 +02:00
Tony Crisci c7aae56030 Refactor parse_command
parse_command returns a struct that contains useful information about
the result of a command as a whole (instead of the intermediate
representation used during parsing).

parse_command now requires the caller to allocate the yajl_gen used for
generating a json reply. This is passed as the second parameter to
parse_command. If NULL is passed, no json reply will be generated.
2014-05-31 14:59:35 +02:00
Tony Crisci 45fa4b7d23 Change the names of parser result structs
Change the name of structs CommandResult and ConfigResult to
CommandResultIR and ConfigResultIR to show they are an intermediate
representation used during parsing.
2014-05-20 19:59:01 +02:00
Michael Stapelberg ff94d28b85 improve error messages for i3-internal workspace names 2014-05-03 15:02:51 +02:00
Alexander Berntsen bc79884a9e Make all workspaces starting with "__" internal
Workspaces won't work properly if they start with "__", so reserve that
namespace altogether. Disallow renaming workspaces to reserved namespace
and using reserved namespace in configuration.

Fixes #1209.
2014-05-03 15:00:15 +02:00