aboutsummaryrefslogtreecommitdiffstats
path: root/include/sway/config.h
Commit message (Collapse)AuthorAge
* config/output: Refactor handling of tiered configsLibravatar Kenny Levinsen8 days
| | | | | | | | | | | | | | | | | | | | Output configuration can be applied to a particular output in three ways: As a wildcard, by connector name and by identifier. This in turn means that three different configurations must be handled at any given time. In the current model, this is managed by merging new configuration into every other matching configuration. At the same time, an additional synthetic configuration is made which matchehes both identifier and name at the same time, further complicating logic. Instead, manage and store each configuration independently and merge them in order when retrieving configuration for an output. When changes are made to a less specific configuration, clear these fields from more specific configurations to allow the change to take effect regardless of precedence. Fixes: https://github.com/swaywm/sway/issues/8048
* output/config: Remove unused test_output_configLibravatar Kenny Levinsen2024-03-28
|
* config/output: Make merge_output_config staticLibravatar Kenny Levinsen2024-03-28
|
* output/config: Remove reset_outputs and co.Libravatar Kenny Levinsen2024-03-28
| | | | | | | | | | | | | | | apply_output_config_to_outputs uses the specified output config to check which outputs to apply to, and to use as backup when no config is found. If any config matches the output, the specified config will be disregarded. The only remaining user of apply_output_config_to_outputs is reset_outputs, which called apply_output_config_to_outputs with either the first stored wildcard config, or a new empty wildcard config. Providing a stored or empty wildcard config is practically the same as calling `apply_all_output_configs`. Replace uses of `reset_outputs` with `apply_all_output_configs` and remove the now unused functions.
* config/output: Remove apply_output_configLibravatar Kenny Levinsen2024-03-28
|
* output/config: Add apply_all_output_configsLibravatar Kenny Levinsen2024-03-28
| | | | | | Apply all output configs as they are. This differs from apply_output_config_to_outputs, which tries to apply a specific output config.
* config/output: Introduce apply_output_configsLibravatar Kenny Levinsen2024-03-28
| | | | | | | Introduce apply_output_configs, which applies the specified matched output configs as a single backend commit. Reimplement apply_output_config_to_outputs using apply_output_configs.
* input/libinput: add scroll_button_lock methodLibravatar Cezary Drożak2023-06-16
| | | | | | | Closes https://github.com/swaywm/sway/issues/6987 Co-authored-by: JJGadgets <git@jjgadgets.tech> Co-authored-by: DeltaWhy <mike5713@gmail.com>
* config: add printf attribute to config_add_swaynag_warning()Libravatar Simon Ser2023-04-14
|
* Add libinput RotationAngleLibravatar Lucas Zampieri2022-12-09
| | | | | | This patch adds the libinput option RotationAngle to sway. Signoff-by: Lucas Zampieri <lzampier@redhat.com>
* Add `primary_selection` config optionLibravatar Aidan Dang2022-12-05
| | | | | | | | | | | | 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>
* Support libinput's 1.21 new dwtp optionLibravatar pudiva chip líquida2022-10-30
| | | | | | | | | 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
* Remove internal references to DPMSLibravatar Simon Ser2022-07-04
| | | | | While at it, use an int for the config field, just like we do for all other fields.
* Reuse parsed PangoFontDescriptionLibravatar Hugo Osvaldo Barrera2022-07-01
| | | | Avoids parsing the configured font each time text is rendered.
* Reject font values that are invalid for pangoLibravatar Hugo Osvaldo Barrera2022-07-01
| | | | | | | | | 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
* sway: add bindgesture commandLibravatar Florian Franzen2022-05-30
| | | | Co-authored-by: Michael Weiser <michael.weiser@gmx.de>
* config: Remove unused mouse binding structureLibravatar Michael Weiser2022-05-11
| | | | | | | Mouse bindings are handled alongside normal bindings. Remove the unused separate data structure definition to avoid confusion. Signed-off-by: Michael Weiser <michael.weiser@gmx.de>
* Remove WLR_SWITCH_STATE_TOGGLE usageLibravatar Simon Ser2022-03-08
| | | | | | Ref [1]. [1]: https://gitlab.freedesktop.org/wlroots/wlroots/-/commit/4792446ee8f50104bd207d9ccd8558a7e4eb4514
* Add focused_tab_titleLibravatar Vsevolod2021-12-10
|
* Add 'output render_bit_depth [8|10]' commandLibravatar Manuel Stoeckl2021-11-23
| | | | | | | 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.
* Add smart_gaps inverse_outer commandLibravatar bR3iN2021-10-29
| | | | | | 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`.
* commands: Remove unused code after 1d3681f52135Libravatar Evgeniy Khramtsov2021-10-01
| | | | | | | | | | | | Clang 13 reports: ../sway/commands.c:470:23: error: variable 'context' set but not used [-Werror,-Wunused-but-set-variable] enum command_context context = 0; ^ Last use of was removed in commit 1d3681f52135. Downstream PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=258813
* Add `output modeline` commandLibravatar David Rosca2021-08-31
| | | | Only works with DRM backend.
* Use fixed titlebar heightsLibravatar Hugo Osvaldo Barrera2021-08-26
| | | | | | | | | | | | | | | Use fixed titlebar heights. The default height is calculated based on font metrics for the configured font and current locale. Some testing with titles with emoji and CJK characters (which are substantially higher in my setup) shows that the titlebars retain their initial value, text does shift up or down, and all titlebars always remain aligned. Also drop some also now-unecessary title_height calculations. Makes also needed to be updated, since they should be positioned with the same rules.
* Update wlr_box includesLibravatar Simon Ser2021-07-07
| | | | | | Update for the breaking change in [1]. [1]: https://github.com/swaywm/wlroots/pull/3011
* config: Fix swaybar pango_markup inconsistencyLibravatar Daniel Otero2021-06-03
| | | | | | Until now, swaybar did not have pango markup enabled by default, even if the sway config had it on. This patch aims to mimic the i3 behavior, but maintaining the functionality of the "pango_markup" sway config command.
* Fix for_window criteria and mouse button bindingsLibravatar ftilde2021-02-25
| | | | | | | | | | | | | | | | | | | Previously, the special case handling of scratchpad and unmark commands was (probably accidentally) limited to criteria directly handled in the execute_command function. This would exclude: 1. for_window criteria, as these are handled externally for views and 2. and mouse bindings which select target the node currently under the mouse cursor. As a concrete example `for_window [app_id="foobar"] move scratchpad, scratchpad show` would show (or hide due to the toggling functionality) another window from the scratchpad, instead of showing the window with app_id "foobar". This commit replaces the "using_criteria" flag with "node_overridden" with the more general notion of signifying that the node (and container/workspace) in the current command handler context of the sway config is not defined by the currently focused node, but instead overridden by other means, i.e., criteria or mouse position.
* hide_cursor: Add an option to hide when typingLibravatar Tamir Zahavi-Brunner2020-10-30
| | | | | Add an option for the `hide_cursor` command to hide the cursor when typing, i.e. whenever a key is pressed.
* input/tablet: add tool_mode option to set tablet tools as relative inputLibravatar Tudor Brindus2020-10-12
| | | | Closes #4139.
* Add support for workspace_min_width bar option.Libravatar Tarmack2020-10-11
|
* Reload command now matches i3's implementationLibravatar Geoffrey Casper2020-07-07
|
* Remove code related to the security featuresLibravatar Érico Rolim2020-05-21
| | | | | | - Remove struct definitions - Remove struct members - Remove initializations and frees
* Use bitshifts for bitfieldsLibravatar Simon Ser2020-04-10
| | | | | | | | Instead of hardcoded power of 2 values, use bitshifts. This makes the enums more readable, avoids mistakes, and makes it clear how much of the int32_t bit space we have left. While at it, fix other minor style issues.
* Introduce test_output_configLibravatar Simon Ser2020-04-08
| | | | | This function checks whether the backend would accept an output configuration, without applying the changes.
* add --no-repeat option for bindingsLibravatar Linus Heckemann2020-03-30
| | | | | | | | | This allows e.g. triggering one command while a key is held, then triggering another to undo the change performed by it afterwards. One use case for this is triggering push-to-talk functionality for VoIP tools without granting them full access to all input events. Fixes #3151
* commands: Add shortcuts_inhibitor commandLibravatar Michael Weiser2020-03-11
| | | | | | | | | | | | | | | | | | | Add a command to influence keyboard shortcuts inhibitors. In its current form it can be used to activate, deactivate or toggle an existing inhibitor on the surface currently receiving input. This can be used to define an escape shortcut such as: bindsym --inhibited $mod+Escape seat - shortcuts_inhibitor deactivate It also allows the user to configure a per-seat default of whether keyboard inhibitors are honoured by default (the default) or not. Using the activate/toggle command they can then enable the lingering inhibitor at a later time of their choosing. As a side effect this allows to specifically address a named seat for actions as well, whatever use-case that might serve. Signed-off-by: Michael Weiser <michael.weiser@gmx.de>
* input: Add support for keyboard shortcuts inhibitLibravatar Michael Weiser2020-03-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | Adding support for the keyboard shortcuts inhibit protocol allows remote desktop and virtualisation software to receive all keyboard input in order to pass it through to their clients so users can fully interact the their remote/virtual session. The software usually provides its own key combination to release its "grab" to all keyboard input. The inhibitor can be deactivated by the user by removing focus from the surface using another input device such as the pointer. Use support for the procotol in wlroots to add support to sway. Extend the input manager with handlers for inhibitor creation and destruction and appropriate bookkeeping. Attach the inhibitors to the seats they apply to to avoid having to search the list of all currently existing inhibitors on every keystroke and passing the inhibitor manager around. Add a helper function to retrieve the inhibitor applying to the currently focused surface of a seat, if one exists. Extend bindsym with a flag for bindings that should be processed even if an inhibitor is active. Conversely this disables all normal shortcuts if an inhibitor is found for the currently focused surface in keyboard::handle_key_event() since they don't have that flag set. Use above helper function to determine if an inhibitor exists for the surface that would eventually receive input. Signed-off-by: Michael Weiser <michael.weiser@gmx.de>
* config: Fix typo in reload bindsym flag bitmaskLibravatar Michael Weiser2020-03-11
| | | | | | | Fix a typo in the bit mask value of the BINDING_RELOAD flag introduced in commit 152e30c37 so it can work as intended. Signed-off-by: Michael Weiser <michael.weiser@gmx.de>
* Add an adaptive_sync output commandLibravatar Simon Ser2020-03-07
| | | | | | | | | This enables/disables adaptive synchronization on the output. For now, the default is disabled because it might cause flickering on some hardware if clients don't submit frames at regular enough intervals. In the future an "auto" option will only enable adaptive sync if a fullscreen client opts-in via a Wayland protocol.
* seat_cmd_keyboard_grouping: change keymap to smartLibravatar Brian Ashworth2019-12-16
| | | | | | | | | | This removes `seat <seat> keyboard_grouping keymap` and replaces it with `seat <seat> keyboard_grouping smart`. The smart keyboard grouping will group based on both the keymap and repeat info. The reasoning for this is that deciding what the repeat info should be for a group is either arbitrary or non-deterministic when multiple keyboards in the group have repeat info configured (unless somehow exposed to the user in a reproducible uniquely identifiable fashion).
* Add seat <seat> idle_{inhibit,wake} <sources...>Libravatar Drew DeVault2019-12-12
| | | | | | | | | | This adds seat configuration options which can be used to configure what events affect the idle behavior of sway. An example use-case is mobile devices: you would remove touch from the list of idle_wake events. This allows the phone to stay on while you're actively using it, but doesn't wake from idle on touch events while it's sleeping in your pocket.
* add scale_filter output config optionLibravatar Ronan Pigott2019-11-29
|
* Add support for wlr_keyboard_groupLibravatar Brian Ashworth2019-11-21
| | | | | | | | | | | | | | | | | 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.
* output: add max_render_timeLibravatar Ivan Molodetskikh2019-11-17
|
* Use an enum instead of a marker string for map_to_Libravatar Tadeo Kondrak2019-11-17
|
* Implement input map_to_region commandLibravatar Tadeo Kondrak2019-11-17
|
* smart_borders: separate smartness from edge typesLibravatar Ronan Pigott2019-11-04
|
* Add --custom to `output mode` commandLibravatar Simon Ser2019-11-04
| | | | This forces to set the mode as a custom mode.
* focus: support focus_wrapping workspaceLibravatar lbonn2019-10-17
| | | | Following i3 support: https://github.com/i3/i3/pull/3407
* Fix typo for the force/immediate option in xwayland_mode enumLibravatar Ben Brown2019-09-02
|