aboutsummaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)AuthorLines
2019-01-01Implement tiling_drag_thresholdFurkan Sahin-0/+7
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`.
2018-12-17swaybar: use KDE's SNI IconThemePath propertyFurkan Sahin-0/+1
2018-12-11swaybar: do not create tray if hiddenFurkan Sahin-0/+1
2018-12-07swaybar: set bar dirty on SNI eventFurkan Sahin-0/+2
2018-12-07swaybar: implement mouse events for trayFurkan Sahin-0/+2
2018-12-07swaybar: implement tray renderingFurkan Sahin-0/+6
2018-12-09swaybar: implement tray configFurkan Sahin-3/+17
2018-12-07swaybar: add StatusNotifierItem to trayFurkan Sahin-1/+39
2018-12-07swaybar: add StatusNotifierHost to trayFurkan Sahin-0/+21
2018-12-06swaybar: implement icon themes and lookup for trayFurkan Sahin-0/+48
2018-12-05swaybar: add StatusNotifierWatcher to trayFurkan Sahin-0/+22
2018-10-28swaybar: add tray interfaceFurkan Sahin-0/+36
2018-10-26swaybar: remove old tray implementationFurkan Sahin-98/+0
2018-12-27hide_cursor: change to a seat subcommandFurkan Sahin-4/+7
This makes hide_cursor a seat subcommand, which allows for seat specific timeouts.
2018-12-29Verify seat fallback settings on reloadFurkan Sahin-0/+6
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.
2018-12-27Revamp seat configsFurkan Sahin-1/+1
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.
2018-12-29Add failure reply on IPC_SYNCFurkan Sahin-0/+1
Since it was decided that sway will not support IPC_SYNC, just return `{'success': false}` as a reply
2018-12-19Split image_surface handling into own functionFurkan Sahin-0/+4
2018-12-17Implement hide_cursor <timeout> commandFurkan Sahin-0/+10
Allows the cursor to be hidden after a specified timeout in milliseconds
2018-12-23Change mouse buttons to x11 map and libevdev namesFurkan Sahin-0/+5
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
2018-12-20Combine output_by_name and output_by_identifierFurkan Sahin-3/+1
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.
2018-12-15swaybar: fix cursor scaleFurkan Sahin-0/+4
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`.
2018-12-12Rework default output configsFurkan Sahin-2/+0
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
2018-12-09list.c: rename free_flat_list to list_free_items_and_destroyFurkan Sahin-2/+2
2018-12-08list.c: Remove list_foreachFurkan Sahin-2/+6
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.
2018-12-04Add relative coordinates in JSON for i3bar click eventsFurkan Sahin-2/+4
Compatibility with i3 commit 161db6f17d734ac9deb0a20e81b78d4b2a92ce68.
2018-11-28Implement bar gapsFurkan Sahin-0/+8
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.
2018-11-28Introduce a way to show config warnings in swaynagFurkan Sahin-0/+7
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.
2018-11-28Fix segfault when destroying unmapped child viewFurkan Sahin-0/+1
2018-11-28Merge pull request #3199 from emersion/handle-subsurface-destroyFurkan Sahin-0/+6
Handle destroyed subsurfaces
2018-11-28Merge pull request #3207 from RedSoxFan/swaynag-no-term-buttonsFurkan Sahin-0/+1
Implement swaynag -B/--button-no-terminal
2018-11-27Implement swaynag -B/--button-no-terminalFurkan Sahin-0/+1
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.
2018-11-27Change execute_command to return a list of resultsFurkan Sahin-3/+3
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.
2018-11-26Handle destroyed subsurfacesFurkan Sahin-0/+6
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
2018-11-25Implement title alignmentFurkan Sahin-0/+8
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.
2018-11-17Adding commands for configuring titlebar borders and paddingFurkan Sahin-6/+5
2018-11-19Merge pull request #3083 from c-edw/feature/StripWorkspaceNameFurkan Sahin-0/+4
Implement strip_workspace_name.
2018-11-17Add scroll factor config option.Furkan Sahin-0/+8
2018-11-18Use #if instead of #ifdefFurkan Sahin-16/+20
2018-11-17Implement strip_workspace_name.Furkan Sahin-0/+4
2018-11-17Move view {x,y,width,height} into container structFurkan Sahin-10/+8
This renames/moves the following properties: * sway_view.{x,y,width,height} -> sway_container.content_{x,y,width,height} * This is required to support placeholder containers as they don't have a view. * sway_container_state.view_{x,y,width,height} -> sway_container_state.content_{x,y,width,height} * To remain consistent with the above. * sway_container_state.con_{x,y,width,height} -> sway_container_state.{x,y,width,height} * The con prefix was there to give it contrast from the view properties, and is no longer useful. The function container_set_geometry_from_floating_view has also been renamed to container_set_geometry_from_content.
2018-11-12Use #if instead of #ifdef for WLR_HAS_*Furkan Sahin-6/+1
2018-11-11Allow multiple outputs for workspace outputFurkan Sahin-1/+1
`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.
2018-11-08Merge pull request #3087 from RedSoxFan/side-gapsFurkan Sahin-4/+14
Implement per side and per direction outer gaps
2018-11-07Implement per side and per direction outer gapsFurkan Sahin-4/+14
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.
2018-11-07gaps: remove duplicate inner gapsFurkan Sahin-1/+6
2018-11-06Add focus_follows_mouse always. (#3081)Furkan Sahin-1/+7
* Add focus_follows_mouse_mode. * Fail if focus_follows_mouse is invalid. * Fix indentation.
2018-11-03Merge pull request #3021 from Snaipe/singlekey-binding-triggerFurkan Sahin-0/+1
binding: match single-key bindings if no multi-key binding matched
2018-10-29binding: match single-key bindings if no multi-key binding matchedFurkan Sahin-0/+1
This makes bindings more snappy when the user is typing faster than his keycaps are releasing. Signed-off-by: Franklin "Snaipe" Mathieu <me@snai.pe>
2018-10-31Move view marks properties to container structFurkan Sahin-28/+28
Like border properties, this will be needed to implement layout saving and restoring.