aboutsummaryrefslogtreecommitdiff
path: root/sway/commands
AgeCommit message (Collapse)Author
2023-06-16input/libinput: add scroll_button_lock methodCezary Drożak
Closes https://github.com/swaywm/sway/issues/6987 Co-authored-by: JJGadgets <git@jjgadgets.tech> Co-authored-by: DeltaWhy <mike5713@gmail.com>
2023-04-14Use format_str() throughoutSimon Ser
2023-04-14commands: add printf attribute to cmd_results_new()Simon Ser
And fix the resulting build failures.
2023-04-14commands/floating_minmax_size: fix error stringsSimon Ser
cmd_results_new() does not take the command name as argument.
2023-04-14Fix old style function definitionsElyes Haouas
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
2023-03-14root: Try to preserve relative positions of floating containersAnkit Pandey
This makes the behavior of floating containers more consistent with i3. The coordinates of the container are scaled when the size of the workspace it is on changes or when the container is moved between workspaces on different outputs. For scratchpad containers, add a new state that preserves the dimensions of the last output the window appeared on. This is necessary because after a container is hidden in the scratchpad, we expect it to be in the same relative position on the output when it reappears. We can't just use the container's attached workspace because that workspace's dimensions might have been changed or the workspace as a whole could have been destroyed.
2023-02-19container: rehome the container_swap function into container.cRonan Pigott
This function was already declared in container.h but defined in commands/swap.c for some unknown reason. Everything in commands/ assumes the handler context has been set appropriately by the command preludes but this function snuck its way into seatop_* which doesn't set anything in the handler context. The fact that the seatop drag actions manipulate the focus without custody of the seat means they are definitely very broken in multiseat.
2023-02-05launcher: make launcher context seat awareRonan Pigott
2023-01-03Add missing includes & remove duplicatesCarl Smedstad
2022-12-19commands/move: Warp cursor after moving workspace to another outputAnkit Pandey
This makes sway's behavior consistent with i3 when `mouse_warping` is set to any value besides `none`. Fixes #7027.
2022-12-09Fix input command order (rotation_angle)Baltazár Radics
efd83cb8 added the rotation_angle command but it didn't insert it in the proper place in the list, so the repeat_delay and repeat_rate commands became unusable.
2022-12-09Add libinput RotationAngleLucas Zampieri
This patch adds the libinput option RotationAngle to sway. Signoff-by: Lucas Zampieri <lzampier@redhat.com>
2022-12-05Add `primary_selection` config optionAidan Dang
See: https://github.com/swaywm/sway/issues/4511 Adds a bool config option `primary_selection`, which explicitly enables/disables the primary selection clipboard. Defaults to enabled. This is implemented as a launch-only option which enables or disables the creation of the `zwp_primary_selection_device_manager_v1` global. Co-authored-by: Tilde Rose <t1lde@protonmail.com>
2022-11-28Make libinput backend optionalSimon Ser
2022-11-26launcher: export X startup ids and use them for workspace matchingRonan Pigott
2022-11-26launcher: export xdga tokens and use them for workspace matchingRonan Pigott
2022-11-26launcher: fudge the interface a bitRonan Pigott
We want to create a context before knowing the pid it will match with.
2022-11-26launcher: initialize launcher_ctxs once on startupRonan Pigott
2022-11-26launcher: rename pid_workspace to launcher_ctxRonan Pigott
Soon we will match views with more than just a pid.
2022-11-26launcher: track workspaces by nodeRonan Pigott
This removes the need to rename the pid_workspaces when a workspace is renamed. It also opens the possibility of tracking other node types. Tracking containers would allow application to be placed correctly in the container tree even if the user has moved their focus elsewhere since it was launched.
2022-11-26root: move the workspace matching code to its own fileRonan Pigott
This removes the pid_workspace bits from tree/root before it gets too interesting. No functional change.
2022-10-30Support libinput's 1.21 new dwtp optionpudiva chip líquida
Support the new dwtp (disable while trackpointing) option introduced in libinput 1.21, allowing users to control whether the trackpoint (like those in Thinkpads, but not only) should be disabled while using the keyboard/touchpad. See: https://gitlab.freedesktop.org/libinput/libinput/-/issues/731
2022-10-07sway/commands/output: Add command for unplugging non-physical outputsAndri Yngvason
2022-07-04Remove internal references to DPMSSimon Ser
While at it, use an int for the config field, just like we do for all other fields.
2022-07-01Reject font values that are invalid for pangoHugo Osvaldo Barrera
Use pango to parse font configuration early, and reject the command as invalid if the value is invalid for pango. Since we're already parsing the font into a `PangoFontDescription`, keep that instance around and avoid re-parsing the font each time we render text. Fixes: https://github.com/swaywm/sway/issues/6805
2022-07-01Avoid unecessary string copyHugo Osvaldo Barrera
2022-06-25Strip quotes in bindsym --input-device=...Thomas Jost
If the input device is quoted, which is common when using variables in the config file, those quotes must be ignored here, or the input device will be ignored. Fixes #7029.
2022-06-23Rename dpms output command to powerSimon Ser
The "dpms" command refers to VESA Display Power Management Signaling, a deprecated standard. It's superseded by VESA DPM. Instead of tying out command name to a particular standard, use the neutral term "power".
2022-06-22Remove access to wlr_input_device unionSimon Ser
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3626 Closes: https://github.com/swaywm/sway/issues/7077
2022-05-30sway: add bindgesture commandFlorian Franzen
Co-authored-by: Michael Weiser <michael.weiser@gmx.de>
2022-04-28xkb_switch_layout: fix relative layout switchesVictor Makarov
Fixes #6011
2022-04-09Shuffle variables to satisfy -Werror=restrictDaniel De Graaf
This also fixes an invalid strlen invocation on uninitialized memory.
2022-03-17sway/input: follow up wlroots input device events renamingSimon Zeni
2022-03-08Remove WLR_SWITCH_STATE_TOGGLE usageSimon Ser
Ref [1]. [1]: https://gitlab.freedesktop.org/wlroots/wlroots/-/commit/4792446ee8f50104bd207d9ccd8558a7e4eb4514
2022-03-06commands/focus: fix segfault when no container is already focused.Nicolas Avrutin
Fixes #6690.
2022-02-21sway/commands: add missing wlr_keyboard interface include in xkb_switch_layoutSimon Zeni
2022-02-08Fix snprintf compiler warningMuhamed Hobi
2022-01-31chore: chase wlr_output_layout_get_box() updateKirill Primak
https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3439
2022-01-22cmd/swap: error on swapping a container with itselfRonan Pigott
2022-01-18treat fullscreen windows as 'tiled' for commands/focusPatrick Hilhorst
2022-01-16commands/focus: drop trailing whitespaceSimon Ser
2022-01-09commands/move: Fix crash when pos_y is omittedDavid96
Fixes #6737
2021-12-10Add focused_tab_titleVsevolod
2021-11-25sway: replace noop_output by fallback_outputSimon Zeni
wlroots removed the support for the noop backend. Instead we rely on the headless backend to provide the fallback output.
2021-11-25ipc: make `bar <bar_id> mode|hidden_state` behave as documentedAleksei Bavshin
sway-bar(5) says: > For compatibility with i3, bar mode <mode> [<bar-id>] syntax is > supported along with the sway only bar <bar-id> mode <mode> syntax. while the actual behavior is that `bar_cmd_mode` ignores already selected `config->current_bar` and applies the change to all the configured bars.
2021-11-23Add 'output render_bit_depth [8|10]' commandManuel Stoeckl
This makes it possible to hint to the renderer and backends how many bits per channel the buffers that the compositor draws windows onto should have. Renderers and backends may deviate from this if they do not support the formats with higher bit depth.
2021-10-30Bump RLIMIT_NOFILESimon Ser
Wayland compositors handle many file descriptors: client connections, DMA-BUFs, sync_files, wl_data_device pipes, and so on. Bump the limit to the max. Closes: https://github.com/swaywm/sway/issues/6285
2021-10-29Add smart_gaps inverse_outer commandbR3iN
Add a subcommand for `smart_gaps` that enables outer gaps only on workspaces with exactly one visible child. Also add documentation for `smart_gaps toggle`.
2021-10-21commands/focus: focus view inside containersiikamiika
seat_get_focus_inactive_floating and seat_get_focus_inactive_tiling do not always return a view, so get the previously focused view from the container with seat_get_focus_inactive_view. This is the i3 behavior.
2021-09-20Avoid unecessary font metric calculationsHugo Osvaldo Barrera
Prior to 62d90a8e, titlebar's font height (and other related values) would change any time any titlebar's content changed, so these values were recalculated each time any titlebar's content changed (or a new titlebar was created). However, since the above was merge, these values no longer change so often and we only need to recalculate them when the configured font changes (and stop calling `config_update_font_height` each time titlebars are rendered). This commit removes all the unecessary calls to this function and avoids all those unecessary calculations. Whenever the font strays from the default value, the `font` command is called, and it calls `config_update_font_height`, which is enough to keep the value always up to date. I've also added a default value to the `font_baseline` config, since otherwise that's zero for setups that don't explicitly specify a font.