aboutsummaryrefslogtreecommitdiff
path: root/sway
AgeCommit message (Collapse)Author
2018-12-31swaybar: implement tray configIan Fan
2018-12-31Apply implicit fallback seat configBrian Ashworth
The implicit fallback seat config needs to be applied (if created). Otherwise, the input devices will still be removed from the implicit default seat on reload when there is any seat config.
2018-12-31Set font options when computing text width.John Chen
Fix #2869
2018-12-31Undocument SWAY_CURSOR_THEME and SWAY_CURSOR_SIZEemersion
These are not yet implemented, and will be exposed as a configuration command rather than env variables when implemented. This also adds a reference to sway-input(5) in xkb env configuration. Maybe we should just un-document these instead.
2018-12-30hide_cursor: change to a seat subcommandBrian Ashworth
This makes hide_cursor a seat subcommand, which allows for seat specific timeouts.
2018-12-30Verify seat fallback settings on reloadBrian Ashworth
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-29Revamp seat configsBrian Ashworth
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-29sway-output(5): doc scaling consideration for posBrian Ashworth
This copies the information regarding positioning outputs when there is scaling involved from the wiki to sway-output(5).
2018-12-29Add failure reply on IPC_SYNCBrian Ashworth
Since it was decided that sway will not support IPC_SYNC, just return `{'success': false}` as a reply
2018-12-29Remove button from state on release during opBrian Ashworth
This fixes a bug in `dispatch_cursor_button` where if there was an operation occurring, the button would not be removed from the state on release. This resulted in the button appearing to be permanently pressed and caused mouse bindings to not match correctly.
2018-12-29Merge pull request #3346 from ermo/sway-bar_focused_statusline_colour-render-fixDrew DeVault
swaybar: fix focused_statusline color parsing.
2018-12-29swaybar: fix focused_statusline color parsing.Rune Morling
2018-12-29Fix crash when scratchpad contains split containersRyan Dwyer
To reproduce: * Launch two terminals in a workspace * `focus parent` to select both terminals * `move scratchpad` * `scratchpad show` to show the terminals * `scratchpad show` to hide the terminals * `scratchpad show` - crash When hiding the terminals, it should be moving focus to whatever is in the workspace, but this wasn't happening because the focus check didn't consider split containers. So the terminals were hidden in the scratchpad while still having focus. This confused the next invocation of scratchpad show, causing it to attempt to hide them instead of show them, and the hide-related code caused a crash when it tried to arrange the workspace which was NULL. This patch corrects the focus check.
2018-12-25added fullscreen_mode to get_tree outputNokiDev
Signed-off-by: NokiDev <noki.dev@gmail.com>
2018-12-25Split image_surface handling into own functionBrian Ashworth
2018-12-25Implement hide_cursor <timeout> commandBrian Ashworth
Allows the cursor to be hidden after a specified timeout in milliseconds
2018-12-25Change mouse buttons to x11 map and libevdev namesBrian Ashworth
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-24sway(5): document tiling_dragBrian Ashworth
Adds documentation in sway(5) for the tiling_drag command
2018-12-22Fix wlr_box_intersection args for wlroots 1441Brian Ashworth
The fix pushed to master missed wlr_box_intersection. This just fixes those lines so sway renders properly again
2018-12-22Fixes per wlroots#1441Drew DeVault
2018-12-22IPC_SUBSCRIBE ensure request object is an arrayAidan Harris
Fixes #3320
2018-12-20Combine output_by_name and output_by_identifierBrian Ashworth
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-19Terminate swaybg in output_disableBrian Ashworth
Moves the call to `terminate_swaybg` from inside `apply_output_config` to `output_disable`. The former was only called when an output was being disabled. The latter is called when an output is being disabled and when an output becomes disconnected. Without this, disconnecting an enabled output would result in a defunct swaybg process.
2018-12-18Return success when renaming a workspace to itselfRyan Dwyer
2018-12-17Focus node before tiling drag if on titlebarBrian Ashworth
Before attempting to drag a tiling container by its titlebar, focus it. This fixes clicking on titlebars to focus a container.
2018-12-17cmd_split: add null checks in do_splitBrian Ashworth
Fixes a crash when running `split` commands with the workspace focused.
2018-12-17Allow output ids and wildcard for workspace outputBrian Ashworth
This allows for output identifiers and to be used in the `workspace <workspace> output <outputs...>` command. Previously, only output names would be allowed. If an output identifier was given, it would never match an output. This also allows for the wildcard character (`*`) to be specified, which can be used to generate a list of workspace names that should be used when generating new workspaces
2018-12-17Allow tiling views to be dragged by the titlebarBrian Ashworth
Enables titling views to be dragged by the titlebar. This is in addition to using the modifier and dragging them from anywhere on the container surface. Floating views already allow this behavior.
2018-12-16Update for swaywm/wlroots#1377Rostislav Pehlivanov
-Werror is eͫ̐ͭ҉vi͆ͦ̏ͦlͥ̀͒̊͂͛
2018-12-14Fix focusing on non-visible workspaceBrian Ashworth
My previous attempt was not quite right. Changing the focus stack on a non-visible workspace should only be blocked if the focus would be set to the workspace itself
2018-12-13Rework default output configsBrian Ashworth
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-12Fix criteria execution in view_mapmwenzkowski
This patch moves view_execute_criteria(view) below the fullscreen code. Previously, if a view requested to be started in fullscreen, this was done after execution of criteria and hence it was impossible to disable fullscreen via criteria. Fixes #3285
2018-12-12Keep focus when destroying containers on nonvis wsBrian Ashworth
Changing the focus stack when destroying a container's node on a non-visible workspace (on an non-focused output) incorrectly causes the non-visible workspace to become visible. If the workspace is empty, it will not be destroyed since it is now visible. Additionally since there was no workspace::focus event, swaybar still shows the previous workspace as focus-inactive. It also makes no sense to change visible workspaces due to a container on a non-visible workspace being destroyed. Since the focus will either be set when switching to the non-visible workspace or the workspace will be destroyed due to being empty, there is no need to change the focus stack when destroying a container on a non-visible workspace.
2018-12-10Call wlr_output_enable for disabled new outputsBrian Ashworth
When a new output is detected and it is disabled by the output config, call `wlr_output_enable(output->wlr_output, false)` to DPMS off the output.
2018-12-09list.c: rename free_flat_list to list_free_items_and_destroyIan Fan
2018-12-09Cleanup list codeIan Fan
2018-12-09list.c: Remove list_foreachIan Fan
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-05cmd_split: flatten when possibleBrian Ashworth
2018-12-05Fix command list executionmwenzkowski
Determine the container/workspace a command is run on, each time when a command of the command list will be run. Previously the container/workspace was determined only once at the beginning of command list execution, which led to wrong behaviour because commands wouldn't take into account when a previous command changed the focused container.
2018-12-03config: do not set $XDG_CONFIG_HOME if unset or emptyIan Fan
Instead redefine the config paths to use the default $HOME/.config
2018-12-03config: set $XDG_CONFIG_HOME if emptyIan Fan
Before, it was only set if it was not set, but it should also be done when empty.
2018-12-03Fix identifier output configs on reloadBrian Ashworth
When generating default output configs to reset the outputs to their default settings on reload, the output name was being used. Additionally when determining the output config to apply, if there was an output config with the output name, that was being used without checking for an identifier config. This caused sway to completely ignore the users specified output config. To fix this issue, the following changes have been made: 1. Default output configs as created for the identifier now instead of name. This actually makes more sense anyway since you could hotplug multiple different outputs to the same port. 2. In get_output_config, which is only used to determine which output config to apply, output configs for both the name and identifier are queried. If both are found, a new output config is generated with the identifier config merged on top of the name config. If just one is found, a copy of that config is returned. This change also requires that the result from get_output_config be freed after use to prevent memory leaks, which required some minor changes to logic in apply_output_config_to_outputs.
2018-12-03cmd_focus: show scratchpad if hiddenBrian Ashworth
If a scratchpad container is hidden, it is still focusable using criteria and should be shown. This fixes a segfault when attempting to rebase the cursor since previously the scratchpad container would not be on any output.
2018-12-02Add option to bindsym/bindcode to suppress warning on overrideAlex Maese
2018-12-02fix typobschacht
tranform -> transform
2018-12-02Merge pull request #3227 from emersion/swap-buffers-damage-coordsDrew DeVault
Update for swaywm/wlroots#1403
2018-12-01Update for swaywm/wlroots#1403emersion
2018-11-30sway.5: Improve documentationmwenzkowski
Document the optional arguments of the fullscreen command.
2018-11-29Fix the error result of the fullscreen commandmwenzkowski
Changes the error result from CMD_INVALID to CMD_FAILURE, since CMD_INVALID indicates an unknown command or parser error and neither occurs where CMD_INVALID was used.
2018-11-29Fix json object ipc returnJohn Axel Eriksson