aboutsummaryrefslogtreecommitdiff
path: root/include/sway/commands.h
AgeCommit message (Collapse)Author
2019-11-29add scale_filter output config optionRonan Pigott
2019-11-21Add support for wlr_keyboard_groupBrian Ashworth
A wlr_keyboard_group allows for multiple keyboard devices to be combined into one logical keyboard. This is useful for keyboards that are split into multiple input devices despite appearing as one physical keyboard in the user's mind. This adds support for wlr_keyboard_groups to sway. There are two keyboard groupings currently supported, which can be set on a per-seat basis. The first keyboard grouping is none, which disables all grouping and provides no functional change. The second is keymap, which groups the keyboard devices in the seat by their keymap. With this grouping, the effective layout and repeat info is also synced across keyboard devices in the seat. Device specific bindings will still be executed as normal, but everything else related to key and modifier events will be handled by the keyboard group's keyboard.
2019-11-17view: add max_render_timeIvan Molodetskikh
2019-11-17output: add max_render_timeIvan Molodetskikh
2019-11-17Implement input map_to_region commandTadeo Kondrak
2019-07-17Implement input_cmd_xkb_file (#3999)Ed Younis
Adds a new commend "xkb_file", which constructs the internal xkb_keymap from a xkb file rather than an RMLVO configuration. This allows greater flexibility when specifying xkb configurations. An xkb file can be dumped with the xkbcomp program.
2019-07-05Add calibration_matrix config optionSergei Dolgov
Can be used to change the orientation of a touchscreen. Example usage with swaymsg: # identity swaymsg input type:touch calibration_matrix '"1 0 0 0 1 0"' # 90 degree clockwise swaymsg input type:touch calibration_matrix '"0 -1 1 1 0 0"' # 180 degree clockwise swaymsg input type:touch calibration_matrix '"-1 0 1 0 -1 1"' # 270 degree clockwise swaymsg input type:touch calibration_matrix '"0 1 0 -1 0 1"' Documentation: https://wayland.freedesktop.org/libinput/doc/latest/absolute-axes.html#calibration-of-absolute-devices
2019-06-20config: fix find_handler logicBrian Ashworth
Without this change, the handlers listed in the config_handlers or command_handlers arrays (depending on reading or active) in commands.c would be valid subcommands. To make matters worse, they would also take precedence over the defined subcommand handlers. This corrects find_handler to only work on the handler array given instead of implicitly trying others.
2019-06-09Add a new xkb_switch_layout commandSimon Ser
This allows users to programatically change the active layout.
2019-06-05add seat sub command 'xcursor_theme'Daniel Eklöf
New 'seat <name> xcursor_theme <theme> [<size>]' command that configures the default xcursor theme. The default seat's xcursor theme is also propagated to XWayland, and exported through the XCURSOR_THEME and XCURSOR_SIZE environment variables. This is done every time the default seat's configuration is changed.
2019-05-14Implement output toggleMoelf
discussed in #4136, this can't handle wildcard but won't crash.
2019-04-17Add unbindsym/unbindcode command for swaybarAlex Maese
2019-04-17Add unbindswitch commandAlex Maese
2019-04-17Create unbindsym and unbindcode commandsAlex Maese
2019-04-14Add deprecation warnings for new_float, new_window, and force_focus_wrapping.Connor E
2019-03-24Implement inhibit_idle commandBrian Ashworth
This implements the following command to set/unset a user idle inhibitor for a view: `inhibit_idle focus|fullscreen|open|none|visible` The modes are as follows: - focus: inhibited when the view is focused by any seat - fullscreen: inhibited when the view is fullscreen (or a descendant of a fullscreen container) and is visible on any output - open: inhibited until the view is closed or the inhibitor is unset or changed - none: unsets any user set idle inhibitors for the view - visible: inhibited when the view is visible on any output This should have no effect on idle inhibitors set by the applications themselves and those should still work as intended. Since this operates on the view in the handler context, it is possible to set it on the currently focused view, on any existing view with criteria, or for any future view with for_window.
2019-03-24Add support for manually setting subpixel hinting on outputs.Geoff Greer
Many laptop screens report unknown subpixel order. Allow users to manually set subpixel hinting to work around this. Addresses https://github.com/swaywm/sway/issues/3163
2019-03-19Support WLR_INPUT_DEVICE_SWITCH in swayRyan Walklin
This commit adds support for laptop lid and tablet mode switches as provided by evdev/libinput and handled by wlroots. Adds a new bindswitch command with syntax: bindswitch <switch>:<state> <command> Where <switch> is one of: tablet for WLR_SWITCH_TYPE_TABLET_MODE lid for WLR_SWITCH_TYPE_LID <state> is one of: on for WLR_SWITCH_STATE_ON off for WLR_SWITCH_STATE_OFF toggle for WLR_SWITCH_STATE_TOGGLE (Note that WLR_SWITCH_STATE_TOGGLE doesn't map to libinput and will trigger at both on and off events)
2019-02-17Remove refs to unimplemented debuglog commandDrew DeVault
Closes #3695
2019-01-31pointer_constraint: change to a seat subcommandBrian Ashworth
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-30Add pointer_constraint commandDrew DeVault
2019-01-16bar_cmd_tray_bind: Use mouse button helpersBrian Ashworth
This modifies `bar_cmd_tray_bindsym` to use `get_mouse_bindsym` for parsing mouse buttons. This also introduces `bar_cmd_tray_bindcode`, which will use `get_mouse_bindcode` for parsing mouse buttons. Like with sway bindings, the two commands are encapsulated in a single file to maximize shared code. This also modifies tray bindings to work off of events codes rather than x11 buttons, which allows for any mouse buttons to be used. For `get_bar_config`, `event_code` has been added to the `tray_bindings` section and will include to event code for the button. If the event code can be mapped to a x11 button, `input_code` will still be the x11 button number. Otherwise, `input_code` will be `0`.
2019-01-15Resize only current and immediate siblings rather than all siblingsRyan Dwyer
For example, create layout V[view view view] and resize the leftmost view using mod+rightclick. Previously, the edge between view 2 and 3 would be adjusted as well. Now this edge will remain constant, which matches the behaviour of i3. To do this operation correctly, the resize tiling seatop now keeps track of two containers, as the container that resizes horizontally will be a different container to the one which resizes vertically (one will be an ancestor). The tiling resize seatop now figures out these containers during the start of the operation and keeps references to them in the event. A new function container_find_resize_parent has been introduced to do this. This function is also used by the resize command. During cursor motion, the seatop logic is similar to before, but now has to choose the correct container to resize. In resize.c, container_resize_tiled and resize_tiled have been merged into one. One of them originally did nothing except pass the values through to the other. container_resize_tiled now takes a simplified approach where it just finds the immediate siblings on either side and resizes them without worrying about the others. The parellel_coord and parallel_size functions are no longer needed and have been removed.
2019-01-14Remove now-unused "input" argument of cmd_results_newM Stoeckl
Patch tested by compiling with `__attribute__ ((format (printf, 2, 3)))` applied to `cmd_results_new`. String usage constants have been converted from pointers to arrays when encountered. General handler format strings were sometimes modified to include the old input string, especially for unknown command errors.
2019-01-14Remove 'input' field of IPC command return jsonM Stoeckl
This field is not in i3 and provides imprecise and redundant information. (Specifically, when swaymsg is given a list of commands, the IPC return array already indicates precisely which number command failed; knowing the name of the command is not useful when multiple commands of the same type are provided.)
2019-01-13Merge pull request #3144 from emersion/cmd-xwaylandDrew DeVault
Add xwayland command
2019-01-13Merge pull request #3344 from RedSoxFan/bar-mouse-bindings-improvedDrew DeVault
Improve mouse button parsing: bar mouse bindings
2019-01-11swaybar: add status_edge_padding commandBrian Ashworth
This adds the bar subcommand `status_edge_padding <padding>` to set the padding used when the status line is on the right edge of the bar.
2019-01-11swaybar: add status_padding commandBrian Ashworth
Adds the bar subcommand `status_padding <padding>` which allows setting the padding used for swaybar. If `status_padding` is set to `0`, blocks will be able to take up the full height of the bar.
2019-01-10bar_cmd_bind: utilize mouse button helpersBrian Ashworth
This modifies `bar_cmd_bindsym` to use `get_mouse_bindsym` for parsing mouse buttons. This also introduces `cmd_bar_bindcode`, which will use `get_mouse_bindcode` for parsing mouse buttons. Like sway bindings, the two commands are encapsulated in a single file with shared code. This also modifies swaybar to operate off of event codes rather than x11 button numbers, which allows for any mouse button to be used. This introduces two new IPC properties: - For `get_bar_config`, `event_code` has been added to the `bindings` section and will include to event code for the button. If the event code can be mapped to a x11 button, `input_code` will still be the x11 button number. Otherwise, `input_code` will be `0`. - Likewise for `click_events`, `event` has been added and will include the event code for the button clicked. If the event code can be mapped to a x11 button, `button` will still be the x11 button number. Otherwise, `button` will be `0`.
2019-01-02Implement tiling_drag_thresholdBrian Ashworth
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`.
2018-12-31swaybar: implement tray configIan Fan
2018-12-30hide_cursor: change to a seat subcommandBrian Ashworth
This makes hide_cursor a seat subcommand, which allows for seat specific timeouts.
2018-12-25Implement hide_cursor <timeout> commandBrian Ashworth
Allows the cursor to be hidden after a specified timeout in milliseconds
2018-11-28Implement bar gapsBrian Ashworth
Adds the bar subcommand `gaps <amount>|<horizontal> <vertical>|<top> <right> <bottom> <left>` to set gaps for swaybar. Due to restrictions on margins for a layer_surface, only the sides that are anchored to an edge of the screen can have gaps. Since there is support for per-side outer gaps for workspaces, those should be able to be used instead for the last side.
2018-11-27Change execute_command to return a list of resultsBrian Ashworth
This matches i3's behavior of returning a list of results that contain the result of each command that was executed. Additionally, the `parse_error` attribute has been added to the IPC JSON reply.
2018-11-25Implement title alignmentBrian Ashworth
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-22Adding commands for configuring titlebar borders and paddingFlorent de Lamotte
2018-11-19Merge pull request #3083 from c-edw/feature/StripWorkspaceNameemersion
Implement strip_workspace_name.
2018-11-19Add xwayland commandemersion
2018-11-18Add scroll factor config option.Spencer Michaels
2018-11-17Implement strip_workspace_name.Connor E
2018-10-23commands: replace EXPECTED_LESS_THAN with EXPECTED_AT_MOSTIan Fan
This makes it a bit more obvious what the expected number of arguments is.
2018-10-23commands: remove EXPECTED_MORE_THANIan Fan
Its uses have been replaced with EXPECTED_AT_LEAST.
2018-10-20Remove raise_floating directiveRyan Dwyer
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-09resize: Determine if anything changed using before/after checkRyan Dwyer
Returning a boolean from container_resize_tiled and resize_tiled doesn't work in all cases. This patch changes it back to void and does a before/after check to see if the container was resized.
2018-10-08Implement popup_during_fullscreenRyan Dwyer
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-07Shim client.background and client.placeholderDrew DeVault
These are not supported by sway, but are valid i3 commands and should not cause config errors. Also includes a couple of minor touch-ups.
2018-10-03Add configuration for raising containers on focusJonathan Buch
* New configuration option: raise_floating (From the discussion on https://github.com/i3/i3/issues/2990) * By default, it still raises the window on focus, otherwise it will raise the window on click.
2018-10-01Handle border options for gapsBrian Ashworth
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.