aboutsummaryrefslogtreecommitdiffstats
path: root/include/sway/config.h
Commit message (Collapse)AuthorAge
...
* cmd_xwayland: add force for immediate launchLibravatar Brian Ashworth2019-08-20
| | | | | | | This just adds a force option to cmd_xwayland that allows for xwayland to be immediately launched instead of lazily launched. This is useful for slower machines so it can be part of the startup time instead of when the user is actively trying to use it
* bindsym/code: add group supportLibravatar Brian Ashworth2019-08-01
| | | | | | | | | | | This adds support for specifying a binding for a specific group. Any binding without a group listed will be available in all groups. The priority for matching bindings is as follows: input device, group, and locked state. For full compatibility with i3, this also adds Mode_switch as an alias for Group2. Since i3 only supports this for backwards compatibility with older versions of i3, it is implemented here, but not documented.
* Implement input_cmd_xkb_file (#3999)Libravatar Ed Younis2019-07-17
| | | | | | | 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.
* cmd_bindswitch: add option to execute on reloadLibravatar Brian Ashworth2019-07-09
| | | | | | | This adds a --reload flag to cmd_bindswitch that allows for the binding to be executed on reload. One possible use case for this is to allow users to disable outputs when the lid closes and enable them when the lid opens without having to open and re-close the lid after a reload.
* Add calibration_matrix config optionLibravatar Sergei Dolgov2019-07-05
| | | | | | | | | | | | | | | | | | | | | | 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
* bindings: defer while initiailizingLibravatar Brian Ashworth2019-06-12
| | | | | | | | This adds the logic to defer binding execution while sway is still initializing. Without this, the binding command would be executed, but the command handler would return CMD_DEFER, which was being treated as a failure to run. To avoid partial executions, this will defer all bindings while config->active is false.
* config/input: validate xkb keymap before storingLibravatar Brian Ashworth2019-06-09
| | | | | | | | This allows for an optional validation stage when storing an input config. Currently, only the xkb keymap is validated. If storing the delta input config will result in any invalid xkb keymaps, the input config will not be stored and error will be populated with the first line of the xkbcommon log.
* 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.
* Spawn swaybar as a wayland clientLibravatar Brian Ashworth2019-05-12
| | | | This just makes it so swaybar is handled as a wayland client
* bindsym: change xkb_rule_names initializationLibravatar Konstantin Pospelov2019-04-26
|
* bindsym: consider xkb_rule_names for --to-codeLibravatar Konstantin Pospelov2019-04-26
|
* config: simplify keysym translation fieldsLibravatar Konstantin Pospelov2019-04-26
| | | | Do not store `xkb_keymap` since it can be retrieved from `xkb_state`.
* Implement bindsym --to-codeLibravatar Konstantin Pospelov2019-04-26
| | | | | | | | | | | | * `bindsym --to-code` enables keysym to keycode translation. * If there are no `xkb_layout` commands in the config file, the translation uses the XKB_DEFAULT_LAYOUT value. * It there is one or more `xkb_layout` command, the translation uses the first one. * If the translation is unsuccessful, a message is logged and the binding is stored as BINDING_KEYSYM. * The binding keysyms are stored and re-translated when a change in the input configuration may affect the translated bindings.
* Implement input type configs (#3784)Libravatar Benjamin Cheng2019-04-14
| | | | | | | | | | | Add support for configurations that apply to a type of inputs (i.e. natural scrolling on all touchpads). A type config is differentiated by a `type:` prefix followed by the type it corresponds to. When new devices appear, the device config is merged on top of its type config (if it exists). New type configs are applied on top of existing configs.
* swaybg: one instance for all outputsLibravatar Brian Ashworth2019-04-04
| | | | | | | | | This makes it so there will only be one swaybg instance running instead of one per output. swaybg's cli has been changed to a xrandr like interface, where you select an output and then change properties for that output and then select another output and repeat. This also makes it so swaybg is only killed and respawned when a background changes or when reloading.
* Add support for manually setting subpixel hinting on outputs.Libravatar Geoff Greer2019-03-24
| | | | | | 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
* Support WLR_INPUT_DEVICE_SWITCH in swayLibravatar Ryan Walklin2019-03-19
| | | | | | | | | | | | | | | | | | | | | 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)
* Fix output config retrieval for new outputsLibravatar Brian Ashworth2019-03-16
| | | | | | | | | | | | | | | | | | | This removes `output_find_config`, which would take the first matching output config it found. This is fine if only a name output config, identifier output config, or even just wildcard exist, but if there is a name output config and identifier output config, they are not merged. Instead, this introduces find_output_config, which is just a wrapper for `get_output_config`. This ensures that both the name and identifier output configs are respected. This fixes the following case: - For simplicity in this example, remove all output configs from config - Run `swaymsg output <name> bg #ff0000 solid_color` - Run `swaymsg output <identifier> scale 2` - Disconnect and reconnect output Without this, the output will have the background, but not the scale. With this, the output will have both the background and scale
* add --i3 flag to hide_edge_bordersLibravatar db2019-02-24
| | | | | | | Enables i3-compatible behavior regarding hiding the title bar on tabbed and stacked containers with one child. Related issues and merge requests: #3031, #3002, #2912, #2987.
* Make load_include_configs void. Fix some cases where WD would not be restored.Libravatar Connor E2019-02-24
|
* Fix reload freeze when not modsetting current modeLibravatar Brian Ashworth2019-02-16
| | | | | | | | | | | | | | | | | | | | | | This fixes the issue of the display freezing on reload with wlroots#1545. On master, all output configs are applied on reload. This may cause an output to have its config applied up to three times, instead of just once. The three cases are: output name, output identifier, and wildcard. Not only is this inefficient, but it can cause swaybg to be spawned and immediately killed. However, swaybg requires two roundtrips of wl_display (to obtain needed globals) before it enters its normal event loop. Modesetting will roundtrip the wl_display. Without modesetting, waitpid for killing swaybg could block infinitely due to swaybg being blocked by wl_display_roundtrip. This only configured an output once. It either uses the wildcard config or creates an empty wildcard config and applies that. This also fixes a bug where an output would not be reset when there is no output config to apply to it.
* 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.
* Add pointer_constraint commandLibravatar Drew DeVault2019-01-30
|
* Cleanup config reading failure error logsLibravatar Brian Ashworth2019-01-29
| | | | | | | | | | | | | | This cleans up the log when sway fails to read a config file. The following changes have been made: - A missing error message has been added to the log when the config file is a directory instead of a regular file - In main, `goto` statements have been added after the `sway_terminate` calls instead of wrapping every block in `if (!terminate_request)` - Unnecessary NULL-checks around calls to free in `main` have been removed - Deferred command execution has been extracted to a separate function and the `Running deferred commands` log message will not be shown when there are no deferred commands.
* Better handle outputs without CRTCLibravatar emersion2019-01-18
| | | | | | | This happens if you plug in more outputs than supported by your GPU. This patch makes it so outputs without CRTCs appear as disabled. As soon as they get a CRTC (signalled via the mode event), we can enable them.
* bar_cmd_tray_bind: Use mouse button helpersLibravatar Brian Ashworth2019-01-16
| | | | | | | | | | | | | | | | 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`.
* Merge pull request #3144 from emersion/cmd-xwaylandLibravatar Drew DeVault2019-01-13
|\ | | | | Add xwayland command
| * Add xwayland commandLibravatar emersion2018-11-19
| |
* | swaybar: add status_edge_padding commandLibravatar Brian Ashworth2019-01-11
| | | | | | | | | | 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.
* | swaybar: add status_padding commandLibravatar Brian Ashworth2019-01-11
| | | | | | | | | | | | 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.
* | bind{code,sym}: utilize mouse button helpersLibravatar Brian Ashworth2019-01-09
| | | | | | | | | | | | | | | | | | This modifies `bindcode` and `bindsym` to use `get_mouse_bindcode` and `get_mouse_bindsym`, respectively, to parse mouse buttons. Additionally, the `BINDING_MOUSE` type has been split into `BINDING_MOUSECODE` and `BINDING_MOUSESYM` to match keys and allow for mouse bindcodes to be used. Between the two commands, all button syms and codes should be supported, including x11 axis buttons.
* | Implement tiling_drag_thresholdLibravatar Brian Ashworth2019-01-02
| | | | | | | | | | | | | | | | | | 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`.
* | swaybar: implement tray configLibravatar Ian Fan2018-12-31
| |
* | 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.
* | Implement hide_cursor <timeout> commandLibravatar Brian Ashworth2018-12-25
| | | | | | | | | | Allows the cursor to be hidden after a specified timeout in milliseconds
* | Rework default output configsLibravatar Brian Ashworth2018-12-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Default output configs were generated on reload to reset an output to its default settings. The idea was that anything that was removed from the config or changed at runtime and not in the config should be reset on reload. Originally, they were created using the output name. Recently, they were changed to use the output identifier. It turns out that there are issues of shadowing with that solution as well. This should fix those issues. Instead of generating the default output configs on reload and storing them in the output config list to merge on top of, they are now only generated when retrieving the output config for an output during a reload. This means that the default output configs are never stored anywhere and just used as a base to merge unaltered user configs on top of during a reload. Starting with a blank output config, merges get applied in the following order: 1. Default output config (only during a reload) 2. Wildcard config (only if neither output name or output identifier exist) 3. Output name config 4. Output identifier config
* | Implement bar gapsLibravatar Brian Ashworth2018-11-28
| | | | | | | | | | | | | | | | | | 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.
* | Introduce a way to show config warnings in swaynagLibravatar Brian Ashworth2018-11-28
| | | | | | | | | | | | | | | | | | | | Adds the function `config_add_swaynag_warning(char *fmt, ...)` so that handlers can add warnings to the swaynag config log in a uniform way. The formatting is identical to errors and include the line number, line, and config path. This also alters the background file access warning to use the function and introduces a warning for duplicate bindings.
* | Implement title alignmentLibravatar Brian Ashworth2018-11-25
| | | | | | | | | | | | | | | | 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.
* | Adding commands for configuring titlebar borders and paddingLibravatar Florent de Lamotte2018-11-22
| |
* | Merge pull request #3083 from c-edw/feature/StripWorkspaceNameLibravatar emersion2018-11-19
|\ \ | |/ |/| Implement strip_workspace_name.
| * Implement strip_workspace_name.Libravatar Connor E2018-11-17
| |
* | Add scroll factor config option.Libravatar Spencer Michaels2018-11-18
| |
* | Allow multiple outputs for workspace outputLibravatar Brian Ashworth2018-11-11
| | | | | | | | | | | | | | | | | | | | | | | | `i3 4.16` allows users to list multiple outputs for a workspace and the first available will be used. The syntax is as follows: `workspace <workspace> output <outputs...>` Additionally when the workspace is created, the outputs get added to the output priority list in the order specified. This ensures that if a higher output gets connected, the workspace will move to the higher output. This works the same way as if the user had a workspace on an output, disconnected the output, and then later reconnected the output.
* | Implement per side and per direction outer gapsLibravatar Brian Ashworth2018-11-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This introduces the following command extensions from `i3-gaps`: * `gaps horizontal|vertical|top|right|bottom|left <amount>` * `gaps horizontal|vertical|top|right|bottom|left all|current set|plus|minus <amount>` * `workspace <ws> gaps horizontal|vertical|top|right|bottom|left <amount>` `inner` and `outer` are also still available as options for all three of the above commands. `outer` now acts as a shorthand to set/alter all sides. Additionally, this fixes two bugs with the prevention of invalid gap configurations for workspace configs: 1. If outer gaps were not set and inner gaps were, the outer gaps would be snapped to the negation of the inner gaps due to `INT_MIN` being less than the negation. This took precedence over the default outer gaps. 2. Similarly, if inner gaps were not set and outer gaps were, inner gaps would be set to zero, which would take precedence over the default inner gaps. Fixing both of the above items also requires checking the gaps again when creating a workspace since the default outer gaps can be smaller than the negation of the workspace specific inner gaps.
* | Add focus_follows_mouse always. (#3081)Libravatar Connor E2018-11-06
|/ | | | | | | | * Add focus_follows_mouse_mode. * Fail if focus_follows_mouse is invalid. * Fix indentation.
* Remove raise_floating directiveLibravatar Ryan Dwyer2018-10-20
| | | | | | | | | | | | | 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.
* cmd_bind{sym,code}: Implement per-device bindingsLibravatar Brian Ashworth2018-10-18
| | | | | bindsym --input-device=<identifier> ... bindcode --input-device=<identifier> ...
* swaybar: show hidden bar on key eventLibravatar Ian Fan2018-10-14
| | | | | | Since wayland does not currently allow swaybar to create global keybinds, this is handled within sway and sent to the bar using a custom event, so as not to pollute existing events, called bar_state_update.