aboutsummaryrefslogtreecommitdiffstats
path: root/sway/commands/seat.c
Commit message (Collapse)AuthorAge
* Declare all struct cmd_handler arrays constLibravatar Manuel Stoeckl2021-02-04
| | | | And make the functions handling these arrays use const types.
* 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>
* 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 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.
* cmd_seat: split action and config handlersLibravatar Brian Ashworth2019-06-20
| | | | | | | | | This separates the logic for seat subcommand handlers that only perform actions on the seat and handlers that alter the seat config. The former group can immediately free the seat config after running the command as it is only used by the subcommand to find the name of the seat to operate on. The latter group alters the seat config so it will need to go through the storage and application stage (assuming success).
* add seat sub command 'xcursor_theme'Libravatar Daniel Eklöf2019-06-05
| | | | | | | | | | 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.
* fix misc memory leaksLibravatar Brian Ashworth2019-02-11
| | | | | | | | | This fixes a few misc memory leaks reported by asan: - Items of `config->config_chain` are now freed instead of just the list itself - `bar->swaybar_command` is now freed - The result returned by a seat subcommand is now returned instead of leaked
* cmd_seat: allow - to be used as alias for currentLibravatar Brian Ashworth2019-02-02
| | | | | | This allows for `-` (hyphen) to be used as an alias for the current seat while sway is running. This alias was chosen since it is unlikely to interfere with any desirable seat identifier
* pointer_constraint: change to a seat subcommandLibravatar Brian Ashworth2019-01-31
| | | | | | | | | | | | 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.
* Remove now-unused "input" argument of cmd_results_newLibravatar M Stoeckl2019-01-14
| | | | | | | | | 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.
* reload: apply seat cfgs after reading entire cfgLibravatar Brian Ashworth2019-01-09
| | | | | | | Wait until all seat configs have been read before applying them on reload. This prevents unnecessary attachment/detachment of input devices and therefore creation/destruction of seat devices as individual lines are read.
* hide_cursor: change to a seat subcommandLibravatar Brian Ashworth2018-12-30
| | | | | This makes hide_cursor a seat subcommand, which allows for seat specific timeouts.
* Revamp seat configsLibravatar Brian Ashworth2018-12-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes seat configs work like output and input configs do. This also adds support for wildcard seat configs. A seat config is still created in the main seat command handler, but instead of creating a new one in the subcommands and destroying the main seat command's instance, the seat subcommands modify the main one. The seat config is then stored, where it is merged appropriately. The seat config returned from `store_seat_config` is then applied. When attempting to apply a wildcard seat config, a seat specific config is queried for and if found, that is used. Otherwise, the wildcard config is applied directly. Additionally, instead of adding input devices to the default seat directly when there is no seat configs, a seat config for the default seat is created with only fallback set to true, which is more explicit. It also fixes an issue where running a seat command at runtime (with no seat config in the sway config), would result in all input devices being removed from the default seat and leaving sway in an unusable state. Also, instead of checking for any seat config, the search is for a seat config with a fallback option seat. This makes it so if there are only seat configs with fallback set to -1, the default seat is still created since there is no explicit notion on what to do regarding fallbacks. However, if there is even a single fallback 0, then the default seat is not used as a fallback. This will be needed for seat subcommands like hide_cursor where the user may only want to set that property without effecting anything else.
* commands: prevent running empty seat commandLibravatar Ian Fan2018-09-08
|
* Address first round of review for generic blocksLibravatar Brian Ashworth2018-06-02
|
* Make command block implementation genericLibravatar Brian Ashworth2018-06-02
|
* Implement cursor event simulation with sway commands.Libravatar Danny Bautista2018-04-10
|
* 80colLibravatar Tony Crisci2018-04-02
|
* seat config handler contextLibravatar Tony Crisci2018-01-20
|
* sway: change all sway_log to wlr_logLibravatar Dominique Martinet2018-01-05
|
* error on not enough input/seat args for cmdLibravatar Tony Crisci2017-12-19
|
* seat fallback configLibravatar Tony Crisci2017-12-17
|
* basic configurationLibravatar Tony Crisci2017-12-14