aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorLines
2019-01-14Disarm key repeat on reloadBrian Ashworth-4/+14
When resetting the keyboard during reload, disarm the key repeat on all keyboards since the bindings (and possibly keyboard) will be freed before the key repeat can go off.
2019-01-14CONTRIBUTING.md: mention tab width for line lengthBrian Ashworth-3/+3
Adds a note about assuming a tab width equal to 4 spaces when determining the line length to CONTRIBUTING.md
2019-01-14config.in: update swayidle/swaylock exampleIan Fan-5/+5
2019-01-14Merge pull request #3403 from mstoeckl/ipcleanupBrian Ashworth-621/+512
Remove 'input' field of IPC command return json
2019-01-14Remove now-unused "input" argument of cmd_results_newM Stoeckl-601/+503
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.
2019-01-14Remove 'input' field of IPC command return jsonM Stoeckl-22/+11
This field is not in i3 and provides imprecise and redundant information. (Specifically, when swaymsg is given a list of commands, the IPC return array already indicates precisely which number command failed; knowing the name of the command is not useful when multiple commands of the same type are provided.)
2019-01-14Merge pull request #3418 from RyanDwyer/remove-resize-axisemersion-114/+47
Replace resize_axis with wlr_edges
2019-01-14Use uint32_t where resize axis might contain a bitfieldRyan Dwyer-8/+8
2019-01-14Merge pull request #3419 from ianyfan/swaynagemersion-14/+4
swaynag: handle empty $XDG_CONFIG_HOME better
2019-01-14swaynag: handle empty $XDG_CONFIG_HOME betterIan Fan-14/+4
Set config path to fallback instead of setting $XDG_CONFIG_HOME
2019-01-14Replace resize_axis with wlr_edgesRyan Dwyer-114/+47
This patch removes the resize_axis enum in favour of wlr_edges. As wlr_edges has no `horizontal` or `vertical` value, it denotes these by bitwise `or`ing the left/right and up/down values. Two constants are defined to make it easier to refer to these. This will allow the tiling resize seatop to utilise the functions in this file. resize_axis was local to the resize command and couldn't be exposed in function arguments.
2019-01-14Merge pull request #3417 from swaywm/remove-swaylockemersion-2255/+14
Split swaylock into separate project
2019-01-13Split swaylock into separate projectDrew DeVault-2255/+14
2019-01-13Remove WIP from README.mdDrew DeVault-4/+3
2019-01-13Merge pull request #3144 from emersion/cmd-xwaylandDrew DeVault-38/+71
Add xwayland command
2019-01-13Merge pull request #3344 from RedSoxFan/bar-mouse-bindings-improvedDrew DeVault-114/+208
Improve mouse button parsing: bar mouse bindings
2019-01-13Merge pull request #3343 from RedSoxFan/seat-cursor-buttons-improvedDrew DeVault-23/+54
Improve mouse button parsing: seat cursor buttons
2019-01-13Merge pull request #3342 from RedSoxFan/scroll-buttons-improvedDrew DeVault-21/+24
Improve mouse button parsing: input scroll_button
2019-01-13Merge pull request #3402 from RyanDwyer/refactor-seatopsDrew DeVault-646/+924
Refactor seat operations to use an interface
2019-01-13Merge pull request #3388 from RedSoxFan/reset-inputs-on-reloadDrew DeVault-3/+215
reload: reset input configs
2019-01-13Merge pull request #3397 from RedSoxFan/fix-swaybar-heightDrew DeVault-9/+15
swaybar: obey height if given
2019-01-13Merge pull request #3398 from RedSoxFan/toggle-input-eventsDrew DeVault-5/+107
input events: toggle and ipc get_inputs
2019-01-13Merge pull request #3408 from RedSoxFan/bar-paddingDrew DeVault-9/+89
swaybar: adjustable status padding
2019-01-13Merge pull request #3415 from RedSoxFan/swaybar-output-improvedDrew DeVault-8/+31
swaybar: allow identifiers for output and tray
2019-01-13swaybar: allow identifiers for output and trayBrian Ashworth-8/+31
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.
2019-01-12Merge pull request #3412 from RedSoxFan/fix-cont-line-numIan Fan-3/+7
config: fix line number with continued lines
2019-01-12Split swayidle from swayDrew DeVault-650/+0
2019-01-11config: fix line number with continued linesBrian Ashworth-3/+7
When the config has continued lines, `get_line_with_cont` may read more than one line of the actual file. When displaying line numbers for error messages, they should be the line number in the file to make it easy to find and fix the issue.
2019-01-12Merge pull request #3411 from RedSoxFan/fix-brace-detect-seekingIan Fan-1/+3
config: do not reset pos when braces found
2019-01-11config: do not reset pos when braces foundBrian Ashworth-1/+3
When a brace is found, the config file should not seek back to before the brace, otherwise the brace will be read multiple times.
2019-01-11swaybar: add status_edge_padding commandBrian Ashworth-4/+44
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.
2019-01-11swaybar: add status_padding commandBrian Ashworth-6/+46
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.
2019-01-10swaylock: Add caps lock state to indicatorRobinhuett-39/+171
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.
2019-01-10input_cmd_scroll_button: utilize mouse btn helpersBrian Ashworth-21/+24
This modifies `input_cmd_scroll_button` to utilize the mouse button helper `get_mouse_button` when parsing the button. x11 axis buttons are not supported with this command and `CMD_INVALID` will be returned, but all other x11 buttons, button event names, and button event codes should be working
2019-01-10bar_cmd_bind: utilize mouse button helpersBrian Ashworth-114/+208
This modifies `bar_cmd_bindsym` to use `get_mouse_bindsym` for parsing mouse buttons. This also introduces `cmd_bar_bindcode`, which will use `get_mouse_bindcode` for parsing mouse buttons. Like sway bindings, the two commands are encapsulated in a single file with shared code. This also modifies swaybar to operate off of event codes rather than x11 button numbers, which allows for any mouse button to be used. This introduces two new IPC properties: - For `get_bar_config`, `event_code` has been added to the `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`. - Likewise for `click_events`, `event` has been added and will include the event code for the button clicked. If the event code can be mapped to a x11 button, `button` will still be the x11 button number. Otherwise, `button` will be `0`.
2019-01-10seat_cmd_cursor: utilize mouse button helpersBrian Ashworth-23/+54
This modifies `seat_cmd_cursor` to utilize `get_mouse_button` when parsing mouse buttons for the `press` and `release` operations. All x11 buttons, button event names, and button event codes are supported. For x11 axis buttons, `dispatch_cursor_axis` is used instead of `dispatch_cursor_button`. However the `press`/`release` state is ignored and the either axis event is processed. This also removes support for `left` and `right` in favor of `BTN_LEFT` and `BTN_RIGHT`.
2019-01-10Merge pull request #3400 from ianyfan/config-braceemersion-4/+5
config.c: fix brace detection at end of file
2019-01-10Refactor seat operations to use an interfaceRyan Dwyer-646/+924
This splits each seat operation (drag/move tiling/floating etc) into a separate file and introduces a struct sway_seatop_impl to abstract the operation. The move_tiling_threshold operation has been merged into move_tiling. The main logic for each operation is untouched aside from variable renames. The following previously-static functions have been made public: * node_at_coords * container_raise_floating * render_rect * premultiply_alpha * scale_box
2019-01-10config.c: fix brace detection at end of fileIan Fan-4/+5
2019-01-10Merge pull request #3341 from RedSoxFan/mouse-bindings-improvedIan Fan-55/+157
Improve mouse button parsing: helpers and bind{code/sym}
2019-01-10Merge pull request #3394 from RedSoxFan/bar-block-renderemersion-41/+45
swaybar: fix rendering of border and background
2019-01-10Merge pull request #3399 from RedSoxFan/fix-output-destruction-segfaultsemersion-1/+5
Fix segfaults on output destruction
2019-01-10Fix segfaults on output destructionBrian Ashworth-1/+5
This fixes two causes of segfaulting when an output is destroyed. The first occurred when an output was never enabled. The issue was that the destroy signal was never initialized so when it was emitted, sway segfaulted. This was fixed by moving the initialization into `output_create` since all outputs, regardless of whether they have ever been enabled, will be destroyed at some point. The second occurred when the cursor was on an output that was being destroyed. The sway output would have already been removed, but if there are other outputs, a cursor rebase would still occur. Since the wlr_output still existed and the sway output was destroyed, the cursor could be over nothing, resulting in a segfault when trying to get the sway output, which was destroyed.
2019-01-09get_inputs: add libinput send events modeBrian Ashworth-1/+26
Add `libinput_send_events` to the IPC output for `get_inputs` to allow scripting of mode changes.
2019-01-09input_cmd_events: implement toggleBrian Ashworth-4/+81
Implements toggling input events during runtime. This will not attempt to toggle to a mode that is not supported by the device. When toggling the wildcard input, the device specific input configs are altered. Each device will cycle one supported mode.
2019-01-09swaybar: obey height if givenBrian Ashworth-9/+15
If there is a bar height given, use that as the height rather than as a minimum height. This matches i3-gaps behavior.
2019-01-09swaybar: fix rendering of border and backgroundBrian Ashworth-41/+45
This fixes the rendering of borders and backgrounds for blocks. This also makes the following changes: * both borders and padding are scaled with the output * both lines and rectangles are rendered without an antialiasing to avoid bleeding outside the desired area
2019-01-10Merge pull request #3396 from RedSoxFan/scroll-titlebar-borderemersion-1/+3
cursor: allow scrolling tabs/stack on title border
2019-01-09cursor: allow scrolling tabs/stack on title borderBrian Ashworth-1/+3
This allows tabbed and stacked containers to be scrolled through when the cursor is over the border of the title bar. The borders around the other three edges of the contents should not be affected by this change.
2019-01-09bind{code,sym}: utilize mouse button helpersBrian Ashworth-55/+84
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.