summaryrefslogtreecommitdiffstats
path: root/include
Commit message (Collapse)AuthorAge
...
| * | | reload: reset input configsLibravatar Brian Ashworth2019-01-09
| | | | | | | | | | | | | | | | | | | | This resets all input options to their defaults on reload. This also fixes some debug log typos in `input_manager_libinput_config_pointer`.
* | | | Merge pull request #3408 from RedSoxFan/bar-paddingLibravatar Drew DeVault2019-01-13
|\ \ \ \ | | | | | | | | | | swaybar: adjustable status padding
| * | | | 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.
* | | | | swaybar: allow identifiers for output and trayLibravatar Brian Ashworth2019-01-13
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows `bar output` and `bar tray_output` to specify an output identifier. Output names should still work as well. This parses the output identifier from the xdg_output description, which wlroots currently sets to `make model serial (name)`. Since this could change in the future, all identifier comparisons are guarded by NULL-checks in case the description cannot be parsed to an identifier.
* | / / swaylock: Add caps lock state to indicatorLibravatar Robinhuett2019-01-10
| |/ / |/| | | | | | | | | | | Implements customization for the indicator as proposed in #2788 with comments from #3367 in mind. The default behaviour does not change exept for the caps lock text color.
* | | 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.
* | | Add helpers for improved mouse button parsingLibravatar Brian Ashworth2019-01-09
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following helper functions have been added to aid with parsing mouse buttons from a string: 1. `get_mouse_bindsym`: attempts to parse the string as an x11 button (button[1-9]) or as an event name (ex BTN_LEFT or BTN_SIDE) 2. `get_mouse_bindcode`: attempts to parse the string as an event code and validates that the event code is a button (starts with `BTN_`). 3. `get_mouse_button`: this is a conveniency function for callers that do not care whether a bindsym or bindcode are used and attempts to parse the string as a bindsym and then bindcode. None of these functions are used in this commit. The sole purpose of this commit is to make the larger set more granular and easier to review/manipulate. There will be a series of commits following this one that will modify any command which uses a mouse button to use these helpers.
* | swaybar: handle SNI signals betterLibravatar Ian Fan2019-01-08
| | | | | | | | | | This fixes a crash caused by callbacks not matching the right sender, and frees old values later, before they are re-assigned.
* | Merge pull request #3275 from ianyfan/remove-readlineLibravatar emersion2019-01-08
|\ \ | | | | | | Rewrite strip_whitespace and remove readline.c
| * | Remove readline.cLibravatar Ian Fan2019-01-01
| | | | | | | | | | | | | | | All occurrences of read_line have been replaced by getline. peek_line has been absorbed into detect_brace.
| * | stringop.c: rewrite strip_whitespaceLibravatar Ian Fan2019-01-01
| | |
* | | cursor: move unhide and timeout retrieval into separate functionsLibravatar Rouven Czerwinski2019-01-07
| | | | | | | | | | | | | | | The unhide and timeout retrieval functions are needed in a later commit. No functional changes.
* | | 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: use KDE's SNI IconThemePath propertyLibravatar Ian Fan2018-12-31
| |
* | swaybar: do not create tray if hiddenLibravatar Ian Fan2018-12-31
| |
* | swaybar: set bar dirty on SNI eventLibravatar Ian Fan2018-12-31
| |
* | swaybar: implement mouse events for trayLibravatar Ian Fan2018-12-31
| |
* | swaybar: implement tray renderingLibravatar Ian Fan2018-12-31
| |
* | swaybar: implement tray configLibravatar Ian Fan2018-12-31
| |
* | swaybar: add StatusNotifierItem to trayLibravatar Ian Fan2018-12-31
| |
* | swaybar: add StatusNotifierHost to trayLibravatar Ian Fan2018-12-31
| |
* | swaybar: implement icon themes and lookup for trayLibravatar Ian Fan2018-12-31
| |
* | swaybar: add StatusNotifierWatcher to trayLibravatar Ian Fan2018-12-31
| |
* | swaybar: add tray interfaceLibravatar Ian Fan2018-12-31
| |
* | swaybar: remove old tray implementationLibravatar 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.
* | Verify seat fallback settings on reloadLibravatar Brian Ashworth2018-12-30
| | | | | | | | | | | | | | | | | | | | | | | | | | This fixes an issue where on reload, all input devices that were added via an implicit fallback to the default seat would be removed from the default seat and applications would crash due to the seat having no capabilities. On reload, there is a query for a seat config with the fallback setting set (it can either be true or false). If no such seat config exists, the default seat is created (if needed) and has the implicit fallback true applied to its seat config. This is the same procedure that occurs when a new input is detected.
* | 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.
* | Add failure reply on IPC_SYNCLibravatar Brian Ashworth2018-12-29
| | | | | | | | | | Since it was decided that sway will not support IPC_SYNC, just return `{'success': false}` as a reply
* | Split image_surface handling into own functionLibravatar Brian Ashworth2018-12-25
| |
* | Implement hide_cursor <timeout> commandLibravatar Brian Ashworth2018-12-25
| | | | | | | | | | Allows the cursor to be hidden after a specified timeout in milliseconds
* | Change mouse buttons to x11 map and libevdev namesLibravatar Brian Ashworth2018-12-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This modifies the way mouse bindings are parsed. Instead of adding to BTN_LEFT, which results in button numbers that may not be expected, buttons will be parsed in one of the following ways: 1. `button[1-9]` will now map to their x11 equivalents. This is already the case for bar bindings. This adds support for binding to axis events, which was not possible in the previous approach. 2. Anything that starts with `BTN_` will be parsed as an event code name using `libevdev_event_code_from_name`. This allows for any button to be mapped to instead of limiting usage to the ones near BTN_LEFT. This also adds a dependency on libevdev, but since libevdev is already a dependency of libinput, this should be fine. If needed, this option can have dependency guards added. Binding changes: - button1: BTN_LEFT -> BTN_LEFT - button2: BTN_RIGHT -> BTN_MIDDLE - button3: BTN_MIDDLE -> BTN_RIGHT - button4: BTN_SIDE -> SWAY_SCROLL_UP - button5: BTN_EXTRA -> SWAY_SCROLL_DOWN - button6: BTN_FORWARD -> SWAY_SCROLL_LEFT - button7: BTN_BACK -> SWAY_SCROLL_RIGHT - button8: BTN_TASK -> BTN_SIDE - button9: BTN_JOYSTICK -> BTN_EXTRA Since the axis events need to be mapped to an event code, this uses the following mappings to avoid any conflicts: - SWAY_SCROLL_UP: KEY_MAX + 1 - SWAY_SCROLL_DOWN: KEY_MAX + 2 - SWAY_SCROLL_LEFT: KEY_MAX + 3 - SWAY_SCROLL_RIGHT: KEY_MAX + 4
* | Combine output_by_name and output_by_identifierLibravatar Brian Ashworth2018-12-20
| | | | | | | | | | | | | | | | This combines `output_by_name` and `output_by_identifier` into a single function called `output_by_name_or_id`. This allows for output identifiers to be used in all commands, simplifies the logic of the callers, and is more efficient since worst case is a single pass through the output list.
* | swaybar: fix cursor scaleLibravatar Brian Ashworth2018-12-15
| | | | | | | | | | | | | | | | | | | | | | | | This fixes a few issues with swaybar's cursor scaling: 1. The cursor scale is now changed when the output scale changes 2. The cursor scale is no longer bound by the max output scale when swaybar is launched 3. Related to the previous item, the cursor is no longer tiny on low scale outputs after the max output scale has changed This also bumps up `wl_compositor` to version 4 to allow usage of `wl_surface_damage_buffer`.
* | 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
* | list.c: rename free_flat_list to list_free_items_and_destroyLibravatar Ian Fan2018-12-09
| |
* | list.c: Remove list_foreachLibravatar Ian Fan2018-12-09
| | | | | | | | | | Most occurrences have been replaced by `free_flat_list` which has been moved from stringop.c to list.c. The rest have been replaced by for loops.
* | Add relative coordinates in JSON for i3bar click eventsLibravatar Hristo Venev2018-12-04
| | | | | | | | Compatibility with i3 commit 161db6f17d734ac9deb0a20e81b78d4b2a92ce68.
* | 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.
* | Fix segfault when destroying unmapped child viewLibravatar emersion2018-11-28
| |
* | Merge pull request #3199 from emersion/handle-subsurface-destroyLibravatar Ryan Dwyer2018-11-28
|\ \ | | | | | | Handle destroyed subsurfaces
| * | Handle destroyed subsurfacesLibravatar emersion2018-11-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Damage subsurfaces when they are destroyed. Since subsurfaces don't have an unmap event we need to do that on destroy. We also don't want to keep a sway_view_child when the wlr_subsurface has been destroyed. Fixes https://github.com/swaywm/sway/issues/3197
* | | Merge pull request #3207 from RedSoxFan/swaynag-no-term-buttonsLibravatar emersion2018-11-28
|\ \ \ | | | | | | | | Implement swaynag -B/--button-no-terminal
| * | | Implement swaynag -B/--button-no-terminalLibravatar Brian Ashworth2018-11-27
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | In `i3 4.16`, `i3-nagbar` introduces the flags `-B/--button-no-terminal` to run the action directly instead of inside a terminal. This implements the flags for swaynag for compatibility. Since swaynag does not use an equivalent to `i3-sensible-terminal`, the flags `-b/--button` only uses a terminal when the environment variable `TERMINAL` is set, otherwise it acts the same as these new flags.
* / / Change execute_command to return a list of resultsLibravatar Brian Ashworth2018-11-27
|/ / | | | | | | | | | | 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.
* | 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.