Commit Graph

82 Commits

Author SHA1 Message Date
Brian Ashworth f876009c7f Add sway-ipc.7.scd to document IPC protocol
This add `sway-ipc.7.scd` that documents the IPC protocol.

This also increased the minimum scdoc version from 1.8.1 to 1.9.0 to
allow for table cells to be continued on the following line
2019-02-27 13:23:10 -05:00
Brian Ashworth f078a1ccb8 input/cursor: allow whole-window bindings on ws
To match i3's behavior, this allows mouse bindings to be triggered over
a workspace when `--whole-window` is given.
2019-02-22 13:32:34 +01:00
Brian Ashworth 041594d2ab Use container under cursor for mouse bindings
This matches i3's behavior of executing mouse bindings in regards to the
container under the cursor instead of what is focused.
2019-02-17 20:33:37 -05:00
Drew DeVault cd10e755c1 Remove refs to unimplemented debuglog command
Closes #3695
2019-02-17 09:52:19 -05:00
Brian Ashworth ebe5399ed6 pointer_constraint: change to a seat subcommand
This changes the `pointer_constraint` command to be a subcommand of seat
to allow for per-seat settings. The current implementation that is not a
seat subcommand will only operate on the current seat and will segfault
in the config due to `config->handler_context.seat` only being set at
runtime.

This also allows for the wildcard identifier to be used to alter the
pointer constraint settings on all seats and allows for the setting to
be merged with the rest of the seat config.
2019-01-31 22:58:52 -05:00
Drew DeVault 82461c4165 Updates for scdoc 1.8.1 2019-01-31 08:42:29 -05:00
Ashkan Kiani aee9942145 Add details on `--whole-window` for bindsym
Updates sway.5 to include information on the usage of the `--whole-window` option in the context of the `bindsym` command, which modifies mouse bindings to allow them to operate over the whole window instead of just the titlebar. Also includes the disclaimer about mouse bindings only working over the title bar.

Also fixes the escaping of the `BTN_LEFT` and `BTN_RIGHT` key mention.
Add notes on --border and --exclude-titlebar

Update the flags for bindcode command.
2019-01-30 22:55:22 +01:00
Drew DeVault a6d41254c9 Add pointer_constraint command 2019-01-30 19:53:59 +01:00
Drew DeVault 783fadab28
Merge pull request #3423 from RyanDwyer/fullscreen-global
Implement fullscreen global
2019-01-27 18:06:50 -05:00
Drew DeVault cd22d555e8 Remove unnecessary underscores in man pages 2019-01-27 11:27:48 -05:00
Ryan Dwyer 20aa8ee67d Implement fullscreen global 2019-01-25 08:29:21 +10:00
Drew DeVault 4879d40695
Merge pull request #3144 from emersion/cmd-xwayland
Add xwayland command
2019-01-13 20:42:39 -05:00
Brian Ashworth aa1c838f97 seat_cmd_cursor: utilize mouse button helpers
This modifies `seat_cmd_cursor` to utilize `get_mouse_button` when
parsing mouse buttons for the `press` and `release` operations. All x11
buttons, button event names, and button event codes are supported.
For x11 axis buttons, `dispatch_cursor_axis` is used instead of
`dispatch_cursor_button`. However the `press`/`release` state is ignored
and the either axis event is processed. This also removes support for
`left` and `right` in favor of `BTN_LEFT` and `BTN_RIGHT`.
2019-01-10 11:47:34 -05:00
Brian Ashworth eefa6b1ad3 bind{code,sym}: utilize mouse button helpers
This modifies `bindcode` and `bindsym` to use `get_mouse_bindcode` and
`get_mouse_bindsym`, respectively, to parse mouse buttons. Additionally,
the `BINDING_MOUSE` type has been split into `BINDING_MOUSECODE` and
`BINDING_MOUSESYM` to match keys and allow for mouse bindcodes to be
used. Between the two commands, all button syms and codes should be
supported, including x11 axis buttons.
2019-01-09 11:29:04 -05:00
Ryan Dwyer 0cc56ebe94 Fix urgency documentation 2019-01-05 23:34:04 -05:00
David96 ee50134634 Apply tiling_drag_threshold to all containers 2019-01-03 12:52:37 -05:00
Brian Ashworth 5bf4daf263 Implement tiling_drag_threshold
Implements `tiling_drag_threshold <threshold>` to prevent accidental
dragging of tiling containers. If a container (and all of its
descendants) are unfocused and the tile bar is pressed, a threshold
will be used before actually starting the drag. Once the threshold has
been exceeded, the cursor will change to the grab icon and the operation
will switch from `OP_MOVE_TILING_THRESHOLD` to `OP_MOVE_TILING`.
2019-01-02 23:33:33 +01:00
Brian Ashworth 4d88c95790 hide_cursor: change to a seat subcommand
This makes hide_cursor a seat subcommand, which allows for seat specific
timeouts.
2018-12-30 14:17:24 +01:00
Brian Ashworth 5fca74a1f1 Implement hide_cursor <timeout> command
Allows the cursor to be hidden after a specified timeout in
milliseconds
2018-12-25 13:31:56 +01:00
Brian Ashworth a223030b70 Change mouse buttons to x11 map and libevdev names
This modifies the way mouse bindings are parsed. Instead of adding to
BTN_LEFT, which results in button numbers that may not be expected,
buttons will be parsed in one of the following ways:

1. `button[1-9]` will now map to their x11 equivalents. This is already
the case for bar bindings. This adds support for binding to axis events,
which was not possible in the previous approach.

2. Anything that starts with `BTN_` will be parsed as an event code name
using `libevdev_event_code_from_name`. This allows for any button to be
mapped to instead of limiting usage to the ones near BTN_LEFT. This also
adds a dependency on libevdev, but since libevdev is already a dependency
of libinput, this should be fine. If needed, this option can have dependency
guards added.

Binding changes:
- button1: BTN_LEFT -> BTN_LEFT
- button2: BTN_RIGHT -> BTN_MIDDLE
- button3: BTN_MIDDLE -> BTN_RIGHT
- button4: BTN_SIDE -> SWAY_SCROLL_UP
- button5: BTN_EXTRA -> SWAY_SCROLL_DOWN
- button6: BTN_FORWARD -> SWAY_SCROLL_LEFT
- button7: BTN_BACK -> SWAY_SCROLL_RIGHT
- button8: BTN_TASK -> BTN_SIDE
- button9: BTN_JOYSTICK -> BTN_EXTRA

Since the axis events need to be mapped to an event code, this uses the
following mappings to avoid any conflicts:
- SWAY_SCROLL_UP: KEY_MAX + 1
- SWAY_SCROLL_DOWN: KEY_MAX + 2
- SWAY_SCROLL_LEFT: KEY_MAX + 3
- SWAY_SCROLL_RIGHT: KEY_MAX + 4
2018-12-25 13:27:08 +01:00
Brian Ashworth 00d97cb195 sway(5): document tiling_drag
Adds documentation in sway(5) for the tiling_drag command
2018-12-24 11:15:31 +01:00
Alex Maese 1a1a2d96cb Add option to bindsym/bindcode to suppress warning on override 2018-12-02 21:35:44 -06:00
mwenzkowski 68668c22e5 sway.5: Improve documentation
Document the optional arguments of the fullscreen command.
2018-11-30 18:15:26 +01:00
Brian Ashworth e6562c8cd2 Implement title alignment
This adds support for `i3 4.16`'s ability to set the title alignment.
The command is `title_align left|center|right`.

When the title is on the right, marks are moved to the left. Otherwise,
they are on the right.
2018-11-25 22:08:58 -05:00
Florent de Lamotte 7555c7efdc Adding commands for configuring titlebar borders and padding 2018-11-22 10:30:04 +01:00
emersion 311c7db7e3
Add xwayland command 2018-11-19 17:38:37 +01:00
Brian Ashworth 12876932a9 Allow multiple outputs for workspace output
`i3 4.16` allows users to list multiple outputs for a workspace and the
first available will be used. The syntax is as follows:
`workspace <workspace> output <outputs...>`

Additionally when the workspace is created, the outputs get added to the
output priority list in the order specified. This ensures that if a higher
output gets connected, the workspace will move to the higher output. This
works the same way as if the user had a workspace on an output, disconnected
the output, and then later reconnected the output.
2018-11-11 11:22:38 -05:00
Connor E 78d07f5be4 Update documentation for focus_follows_mouse. 2018-11-08 20:38:50 +00:00
Brian Ashworth c248e96b84 resize set: implement width and height keywords
This implements the following syntaxes from `i3 4.16`:
* `resize set [width] <width> [px|ppt]`
* `resize set height <height> [px|ppt]`
* `resize set [width] <width> [px|ppt] [height] <height> [px|ppt]`

Additionally, a bug was fixed that caused setting the height of a tiled
container to change the width instead due to a typo.
2018-11-08 14:17:49 -05:00
Brian Ashworth 9e8aa39530 Implement per side and per direction outer gaps
This introduces the following command extensions from `i3-gaps`:
* `gaps horizontal|vertical|top|right|bottom|left <amount>`
* `gaps horizontal|vertical|top|right|bottom|left all|current
set|plus|minus <amount>`
* `workspace <ws> gaps horizontal|vertical|top|right|bottom|left
<amount>`

`inner` and `outer` are also still available as options for all three
of the above commands. `outer` now acts as a shorthand to set/alter
all sides.

Additionally, this fixes two bugs with the prevention of invalid gap
configurations for workspace configs:
1. If outer gaps were not set and inner gaps were, the outer gaps
would be snapped to the negation of the inner gaps due to `INT_MIN`
being less than the negation. This took precedence over the default
outer gaps.
2. Similarly, if inner gaps were not set and outer gaps were, inner
gaps would be set to zero, which would take precedence over the
default inner gaps.

Fixing both of the above items also requires checking the gaps again
when creating a workspace since the default outer gaps can be smaller
than the negation of the workspace specific inner gaps.
2018-11-07 22:44:11 -05:00
emersion d0bb450681
Merge pull request #3066 from mwenzkowski/fix-gaps
Improvements to the runtime only part of the gaps command
2018-11-05 15:33:40 +01:00
mwenzkowski 60df5cc9f8 Correct manpage regarding gaps command
The command 'gaps inner|outer all|current set|plus|minus <amount>'
is not valid in the configuration file, hence list it accordingly.
2018-11-04 20:10:41 +01:00
madblobfish 7d8ed7a3a7 added space after table in sway.5 manpage 2018-11-04 17:38:35 +01:00
Tom Warnke 1670eafd7b protect newline 2018-10-25 21:48:39 +02:00
mteyssier f530ac6459 Add references to sway-output(5) in sway(5)
- update ref in the swaybg_command description
- add ref to sway-output(5) in See Also
- add an `output` command description
2018-10-23 00:00:36 +02:00
Ryan Dwyer b9b1b0e566 Remove raise_floating directive
The directive controlled whether floating views should raise to the top
when the cursor is moved over it while using focus_follows_mouse. The
default was enabled, which is undesirable. For example, if you have two
floating views where one completely covers the other, the smaller one
would be inaccessible because moving the mouse over the bigger one would
raise it above the smaller one.

There is no known use case for having raise_floating enabled, so this
patch removes the directive and implements the raise_floating disabled
behaviour instead.
2018-10-20 17:51:32 +10:00
Brian Ashworth 2e637b7368 cmd_bind{sym,code}: Implement per-device bindings
bindsym --input-device=<identifier> ...
bindcode --input-device=<identifier> ...
2018-10-18 13:42:01 -04:00
Drew DeVault b69060fc58 Establish sway-output(5) 2018-10-14 10:52:57 -04:00
Drew DeVault 7f2e6d812a Document `border csd` 2018-10-14 10:23:40 -04:00
Ian Fan 85dd36e92b swaybar: add documentation for hide/hidden_state subcommands 2018-10-14 13:33:12 +01:00
Tarmack 36d9037f2c fix_edge_gaps: Allow negative values for outer gaps.
While allowing negative values for the outer gaps it is still prevented that negative values move windows out of the container. This replaces the non-i3 option for edge_gaps.
2018-10-13 17:42:49 +02:00
chtison 5ab7755649 Fix documentation of output 2018-10-11 22:14:56 +02:00
Rouven Czerwinski 41991542ca Add mouse_warping container
This option always moves the cursor into the middle of the container if the warp
variable is true in seat_set_focus_warp.

Fixes #2577
2018-10-10 12:45:21 +02:00
Ryan Dwyer 8c98bde20d Fix back_and_forth documentation 2018-10-10 09:41:37 +10:00
Brian Ashworth 3f328b6276
Merge branch 'master' into popup-during-fullscreen 2018-10-08 15:18:49 -04:00
Brian Ashworth 09c3c33081 Allow swaynag to be disabled 2018-10-08 09:59:38 -04:00
emersion c988b03d85 Allow swaybg to be disabled
Same as #2791 but for swaybg.

Fixes #2790
2018-10-08 15:08:33 +02:00
Ryan Dwyer 832ebc8966 Implement popup_during_fullscreen
This introduces a new view_impl function: is_transient_for. Similar to
container_has_ancestor but works using the surface parents rather than
the tree.

This patch modifies view_is_visible, container_at and so on to allow
transient views to function normally when they're in front of a
fullscreen view.
2018-10-08 22:49:59 +10:00
Jonathan Buch 8bec0c90c7
Add manpage documentatioon for raise_floating 2018-10-03 16:23:14 +02:00
Brian Ashworth bb25194844 Handle border options for gaps
Fixes `hide_edge_borders smart` when gaps are in use.
Implements `hide_edge_borders smart_no_gaps` and `smart_borders
on|no_gaps|off`.

Since `smart_borders on` is equivalent to `hide_edge_borders smart`
and `smart_borders no_gaps` is equivalent to `hide_edge_borders
smart_no_gaps`, I opted to just save the last value set for
`hide_edge_borders` and restore that on `smart_borders off`. This
simplifies the conditions for setting the border.
2018-10-01 21:19:06 -04:00