Commit Graph

103 Commits

Author SHA1 Message Date
Ryan Dwyer f057a0195e Implement focus_on_window_activation
Depends on https://github.com/swaywm/wlroots/pull/1223
2018-09-02 18:20:34 +10:00
Ryan Dwyer 5dbbab7bdc Remove layout.c
When we have type safety we'll need to have functions for
workspace_add_tiling and so on. This means the existing container
functions will be just for containers, so they are being moved to
container.c. At this point layout.c doesn't contain much else, so I've
relocated everything and removed the file.

* container_swap and its static functions have been moved to the swap
command and made static.
* container_recursive_resize has been moved to the resize command and
made static.
* The following have been moved to container.c:
    * container_handle_fullscreen_reparent
    * container_insert_child
    * container_add_sibling
    * container_add_child
    * container_remove_child
    * container_replace_child
    * container_split
* enum movement_direction and sway_dir_to_wlr have been moved to util.c.

Side note: Several commands included layout.h which then included
root.h. With layout.h gone, root.h has to be included by those commands.
2018-08-26 12:05:16 +10:00
Ian Fan c1af79532f commands: add nop 2018-08-18 15:50:26 +01:00
emersion 700941dde8 Listen to server-decoration mode changes 2018-08-06 15:20:30 +01:00
Ryan Dwyer 04489ff420 Separate root-related code
This creates a root.c and moves bits and pieces from elsewhere into it.

* layout_init has been renamed to root_create and moved into root.c
* root_destroy has been created and is called on shutdown
* scratchpad code has been moved into root.c, because hidden scratchpad
containers are stored in the root struct
2018-08-04 14:01:20 +10:00
Brian Ashworth a7f7d4a488 Write to swaynag pipe fd directly on config errors 2018-08-03 10:37:35 -04:00
Michel Ganguin d6095588a1 Link xcb dependency to meson options "enable_xwayland" (#2393)
* Link xcb dependency to meson options "enable_xwayland"

* Link xcb dependency to meson options "enable_xwayland"
2018-08-02 08:36:47 +01:00
ProgAndy c7a3a03115 Add xkb_numlock/xkb_capslock commands (#2311) 2018-07-25 17:24:45 +02:00
Pascal Pascher 2bf893248a style fixes, exclude sway/desctop/xwayland.c when enable_xwayland: false 2018-07-24 23:37:41 +02:00
Ryan Dwyer 81e8f31cc6 Implement scratchpad
Implements the following commands:

* move scratchpad
* scratchpad show
* [criteria] scratchpad show

Also fixes these:

* Fix memory leak when executing command with criteria
(use `list_free(views)` instead of `free(views)`)
* Fix crash when running `move to` with no further arguments
2018-07-23 08:24:32 +10:00
Ryan Dwyer 9fbe13b9be Implement floating_modifier and mouse operations for floating views
This implements the following:

* `floating_modifier` configuration directive
* Drag a floating window by its title bar
* Hold mod + drag a floating window from anywhere
* Resize a floating view by dragging the border
* Resize a floating view by holding mod and right clicking anywhere on
the view
* Resize a floating view and keep aspect ratio by holding shift while
resizing using either method
* Mouse cursor turns into resize when hovering floating border or corner
2018-07-22 23:10:19 +10:00
Ryan Dwyer c2ed3d8bd6 Implement force_display_urgency_hint
The directive sets the timeout before an urgent view becomes normal
again after switching to it from another workspace.

Also:

* When an xwayland surface removes the urgent hint while the timer is
active, we now ignore the request. This happens as soon as the view
receives focus, so it was effectively making the timer pointless.
* The timeout is now only applied when switching to it from another
workspace.
2018-07-21 10:28:07 +10:00
Ryan Dwyer 75c699db62 Implement default_floating_border command and adjust CSD behaviour 2018-07-17 10:14:33 +10:00
Drew DeVault d6bd314dff
Merge pull request #2276 from RyanDwyer/urgency
Implement urgency base functionality
2018-07-16 15:39:08 -07:00
Ryan Dwyer fc2484095a Implement no_focus command 2018-07-16 22:18:12 +10:00
Ryan Dwyer 315d5311b2 Implement urgency base functionality
Introduces a command to manually set urgency, as well as rendering of
urgent views, sending the IPC event, removing urgency after focused for
one second, and matching urgent views via criteria.
2018-07-16 08:19:25 +10:00
Brian Ashworth 13c6627ddb Implement tap_button_map for input devices 2018-07-14 01:01:47 -04:00
Robert Kubosz 41b80c28df
add scroll button option
This commit introduces a scroll_button option, which is intended to be
used with scroll_method. Now user can edit his sway config and add an
scroll_button option to device section.
2018-07-11 22:03:06 +02:00
Ryan Dwyer f2d1cf3ceb Implement floating_minimum_size and floating_maximum_size 2018-07-11 22:16:48 +10:00
emersion f9625d1d56
Split renderer 2018-07-07 10:30:52 +01:00
Dominique Martinet e4bfb3bc98 Add idle inhibit unstable v1 support 2018-07-02 09:29:16 +09:00
Ryan Dwyer a2fbb20a61 Merge remote-tracking branch 'upstream/master' into atomic 2018-06-29 20:04:24 +10:00
emersion cda66e9a26
Automatically float xwayland windows 2018-06-18 22:52:10 +01:00
Ryan Dwyer 9e96cfd310 Merge remote-tracking branch 'upstream/master' into atomic 2018-06-11 11:03:43 +10:00
Nate Symer 6a910b9ba5 Implement gaps (PR #2047) 2018-06-09 09:34:56 -04:00
Ryan Dwyer 59c9488701 WIP: Atomic layout updates ground work 2018-06-09 10:08:43 +10:00
Brian Ashworth 5ea4a4d3ee Refactor cmd_output to use config_subcommand 2018-06-03 10:26:06 -04:00
Ryan Dwyer 1f2e399ade Implement floating 2018-06-01 23:14:58 +10:00
Drew DeVault f3ab895916 Implement `floating enable` 2018-06-01 23:14:58 +10:00
Brian Ashworth d76729af22 Implement config parser for workspace_layout 2018-05-28 22:55:06 -04:00
Brian Ashworth c81d0ef1e8 Support i3's legacy force_focus_wrapping command 2018-05-28 11:09:46 -04:00
Brian Ashworth 46da1dc32b Implement focus_wrapping 2018-05-27 23:20:21 -04:00
Brian Ashworth 569f4e0e4c Implement swap command 2018-05-26 11:05:02 -04:00
Ryan Dwyer 0e2cc0af30 Implement show_marks 2018-05-17 08:29:14 +10:00
Ryan Dwyer 22d38600d0 Implement marks 2018-05-15 11:18:27 +10:00
emersion 95a10dd4f3
Kill wl_shell 2018-05-14 13:26:10 +01:00
emersion 88d9d43b36
Add xdg-shell stable support 2018-05-13 16:38:56 +01:00
Brian Ashworth 3db7fc2bb2 Implement hide_edge_borders 2018-05-11 18:44:56 -04:00
Ryan Dwyer 228c478e8d Implement title_format
This implements the title_format command, with a new placeholder %shell
which gets substituted with the view type (xwayland, xdg_shell_v6 or
wl_shell).

Example config:

    for_window [title=".*"] title_format %title (class=%class instance=%instance shell=%shell)
2018-05-05 22:29:37 +10:00
Ryan Dwyer b667298a0a Render titles 2018-05-03 15:12:00 +10:00
Ryan Dwyer e67f354333 Implement borders
Implements rendering of borders. Title text is still to do.

Implements the following configuration directives:

* client.focused
* client.focused_inactive
* client.unfocused
* client.urgent
* border
* default_border
2018-04-30 21:24:13 +10:00
Ryan Dwyer 167c2e1aa9 Refactor arrange_windows()
Replaces arrange_windows() with arrange_root(), arrange_output(),
arrange_workspace() and arrange_children_of().

Also makes fullscreen views save and restore their dimensions, which
allows it to preserve any custom resize and is also a requirement for
floating views once they are implemented.
2018-04-28 11:26:14 +10:00
emersion ff61df17ff
Add map_from_region command 2018-04-26 10:53:47 +01:00
Ryan Dwyer 72767e1cc3 Implement criteria commands
Implements the following commands:

* for_window [...] <cmdlist>
* assign [...] <workspace>
2018-04-24 20:08:32 +10:00
Ryan Dwyer d956286b92 Implement rename workspace command
This implements the following commands:

* rename workspace to new_name
* rename workspace old_name to new_name
* rename workspace number n to new_name
2018-04-23 18:54:45 +10:00
Drew DeVault 21eb63cc9e
Merge branch 'master' into fullscreen 2018-04-19 08:56:03 -04:00
Ryan Dwyer 9d3739a6f7 Split repeat commands into separate files. 2018-04-19 13:47:29 +10:00
Ryan Dwyer 5b30391383 Make key repeat configurable
This creates two input commands for configuring the repeat delay and rate.

Example config:

    input "myidentifier" {
        repeat_delay 250
        repeat_rate 25
    }
2018-04-18 23:19:23 +10:00
Ryan Dwyer 52420cc24d Implement fullscreen. 2018-04-16 20:36:40 +10:00
Danny Bautista 1edb2bd892 Implement cursor event simulation with sway commands. 2018-04-10 12:40:50 -04:00