aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-04-26bindsym: change default keymap for --to-codeKonstantin Pospelov
Replace XKB_DEFAULT_LAYOUT with NULL as the default layout.
2019-04-26config: simplify keysym translation fieldsKonstantin Pospelov
Do not store `xkb_keymap` since it can be retrieved from `xkb_state`.
2019-04-26Implement bindsym --to-codeKonstantin Pospelov
* `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.
2019-04-25ci: enable all featuresSimon Ser
If unspecified, feature options are set to "auto", which means enabled only if the required dependencies are found. In CI we don't want to miss compilation errors because a dependency hasn't been found and code isn't built. Leave FreeBSD out for now because it uses a subproject (haven't found a way to make auto_features=enabled only apply to the toplevel project).
2019-04-25swaybg: split into standalone projectDrew DeVault
The new upstream is https://github.com/swaywm/swaybg This commit also refactors our use of gdk-pixbuf a bit, since the only remaining reverse dependency is swaybar tray support.
2019-04-25Remove obsolete README translationsDrew DeVault
Everything which still mentioned wlc has been removed.
2019-04-25Set the correct version for wlroots dependencybschacht
2019-04-24cmd_move: respect workspace layout when insertingBrian Ashworth
When moving a container to become a direct child of the workspace and the workspace's layout is tabbed or stacked, wrap it in a container with the same layout. This allows for the following: - Run `layout tabbed|stacked` on an empty workspace (or use `workspace_layout tabbed|stacked` in the config) - Open some views - Move one of the views in any direction - Open another view - The new container should also be `tabbed`/`stacked`
2019-04-24swaybar: add multiseat supportBrian Ashworth
This just adds multiseat support to swaybar
2019-04-24swaybar: hide mode visibility improvementsBrian Ashworth
This allows swaybar to become visible when the mode changes (to any mode other than the default). swaybar will be hidden again when the modifier is pressed and released or when switching back to the default mode. This also applies the same logic to visible by urgency to hide swaybar when the modifier is pressed and released. These changes are to match i3's behavior.
2019-04-23Update for wlroots#1660Simon Ser
2019-04-21Fix uninitialized read for wlr_surface_send_frameScott Anderson
2019-04-20Validate icon_struct in read_theme_fileMaxime “pep” Buquet
The read_theme_file function used to return an invalid icon_struct in some cases, for example when an empty index.theme file was read. This makes sure the struct we're returning is always valid as per the Icon Theme specification. Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2019-04-20swaynag: revamp type configsBrian Ashworth
This revamps the type configs for swaynag. All sizing attributes for swaynag are now `ssize_t` instead of `uint32_t` to allow for a default value of `-1`, which allows for `0` to be a valid value. Additionally, the initialization of the type configs has been changed from a simple calloc to use a new function `swaynag_type_new`. `swaynag_type_new` calloc's the memory, checks for an allocation failure, sets the name, and all sizes to -1. The layering order has also been changed to default, general config, type config, and as highest priority command line arguments. Finally, `swaynag_type_merge` has been modified to handle the layering and sizing changes.
2019-04-20ipc: fix criteria for emitting bar_state_updateBrian Ashworth
This fixes the criteria for emitting a `bar_state_update` event to notify swaybar (and any other bars utilizing the event) on whether the bar is visible by modifier. It is not enough to only emit the event when both the bar mode and bar hidden state are `hide` since it is possible to release the modifier while hidden state is `show` and then change hidden state to `hide` without pressing the modifier. This also emits the event whenever visible by modifier is set and should no longer be regardless of the mode and state to ensure that it gets properly cleared. If visible by modifier is not set and the bar is not in `hide`/`hide`, then no events will be sent and visible by modifier will not be set
2019-04-19cmd_move: allow for all i3 syntax optionsBrian Ashworth
This modifies cmd_move to allow for the syntax options allowed by i3. The following syntaxes are supported: - `move left|right|up|down [<amount> [px]]` - `move [--no-auto-back-and-forth] [window|container] [to] workspace <name>|next|prev|next_on_output|prev_on_output|current|number <num>` - `move [window|container] [to] output <name/id>|left|right|up|down` - `move [window|container] [to] mark <mark>` - `move workspace to [output] <name/id>|left|right|up|down` - `move [window|container] [to] [absolute] position <x> [px] <y> [px]` - `move [window|container] [to] [absolute] position center` - `move [window|container] [to] position mouse|cursor|pointer` This also allows retains the following syntax option that is not supported by i3, but is supported in sway 1.0: - `move workspace [to] output <name/id>|left|right|up|down` The changes are: - `window` and `container` are now optional - `output` is now optional for `move workspace` when `to` is given There is also stricter command checking now. If `absolute` or `--no-auto-back-and-forth` are given for commands that do not support them, it will be treated as invalid syntax instead of being silently ignored.
2019-04-19hide_edge_borders.c: add missing case for --i3mwenzkowski
Disable the i3-compatible behavior if the option '--i3' is not given. Previously it was only possible to disable it by changing the config file. Now it also works via swaymsg.
2019-04-17Add unbindsym/unbindcode command for swaybarAlex Maese
2019-04-17Add unbindswitch commandAlex Maese
2019-04-17Create unbindsym and unbindcode commandsAlex Maese
2019-04-17swaymsg: add timeout and type checksBrian Ashworth
This adds a 3 second timeout to the initial reply in swaymsg. This prevents swaymsg from hanging when `swaymsg -t get_{inputs,seats}` is used in i3. The timeout is removed when waiting for a subscribed event or monitoring for subscribed events. This also adds type checks to commands where i3 does not reply with all of the properties that sway does (such as `modes` in `get_outputs`). This is mostly just a behavioral adjustment since swaymsg should run on i3. When running under i3, some command reply's (such as the one for `get_outputs) may have more useful information in the raw json than the pretty printed version.
2019-04-16Fix the payload type returned by IPCAshkan Kiani
If a client is subscribed and sends a subsequent ipc command which causes event updates, then those event updates override the `client->current_command` and send the incorrect type for the payload associated with the command. Example: SUBSCRIBE {window} RUN_COMMAND focus -> PAYLOAD_TYPE is 0x80000002 for window events Therefore, we decouple the `client->current_command` by passing it as an argument to the ipc_send_reply function, avoiding a data race. The same is done for the `client->payload_length` as a precautionary measure for the same reason.
2019-04-16Don't apply hide_edge_borders to floating windowsmwenzkowski
This change matches i3's behavior.
2019-04-16view.c: refactor view_autoconfigure()mwenzkowski
2019-04-16Add documentation for rename workspaceAshkan Kiani
2019-04-16Send disabled output available modes on IPC get_outputsRanieri Althoff
- Also fix missing trailing newline on pretty print Signed-off-by: Ranieri Althoff <1993083+ranisalt@users.noreply.github.com>
2019-04-14Add deprecation warnings for new_float, new_window, and force_focus_wrapping.Connor E
2019-04-14Implement input type configs (#3784)Benjamin Cheng
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.
2019-04-14Add heuristics to differentiate touchpadsBenjamin Cheng
Use libinput_device_config_tap_get_finger_count to determine whether a pointer is a touchpad. swaymsg is also updated to reflect the new touchpad type.
2019-04-14Spawn swaynag as a wayland clientBrian Ashworth
This spawns swaynag as a wayland client similar to how swaybar and swaybg are already done
2019-04-14swaynag: fix pointer managementBrian Ashworth
Currently on master, swaynag will retrieve a pointer instance whenever the capabilities change and WL_SEAT_CAPBILITY_POINTER is set. The pointer instances were never being destroyed so swaynag received events multiple times due to having several instances of the pointer. This fixes it so if there is already a pointer instance, swaynag does not attempt to retrieve another. Additionally, if the pointer capability is removed, the pointer instance is destroyed.
2019-04-13Fix scratchpad fullscreen behavior and crashBrian Ashworth
When setting fullscreen on a hidden scratchpad container, there was a check to see if there was an existing fullscreen container on the workspace so it could be fullscreen disabled first. Since the workspace is NULL, it would cause a SIGSEGV. This adds a NULL check to avoid the crash. This also changes the behavior of how fullscreen is handled when adding a container to the scratchpad or changing visibility of a scratchpad container to match i3's. The behavior is as follows: - When adding a container to the scratchpad or hiding a container back into the scratchpad, there is an implicit fullscreen disable - When setting fullscreen on a container that is hidden in the scratchpad, it will be fullscreen when shown (and fullscreen disabled when hidden as stated above) - When setting fullscreen global on a container that is hidden in the scratchpad, it will be shown immediately as fullscreen global. The container is not moved to a workspace and remains in the scratchpad. The container will be visible until fullscreen disabled or killed. Since the container is in the scratchpad, running `scratchpad show` or `move container to scratchpad` will have no effect This also changes `container_replace` to transfer fullscreen and scratchpad status.
2019-04-13Fix potential null accessesAshkan Kiani
2019-04-13swaybg: add manpageSimon Ser
2019-04-12Fix scratchpad logic for floating windowsAshkan Kiani
When a tiled window is sent to the scratchpad, we want to use sane defaults, which is to center it and resize it to the default. For floating windows, we want to use their existing geometry.
2019-04-12sway-input.5: add xkeyboard-config(7) to "see also"Martin Michlmayr
Since xkeyboard-config(7) is mentioned in the man page, add a reference to the "see also" section.
2019-04-11cmd_focus: raise floating for `<criteria> focus`Brian Ashworth
Floaters are currently raised for `focus <direction>`. This extends the same functionality to `<criteria> focus`.
2019-04-11Honor output for xdg_toplevel_set_fullscreenBrian Ashworth
This honors the fullscreen output request for `xdg_toplevel_set_fullscreen` and `zxdg_toplevel_v6_set_fullscreen`. If the request was sent before mapping, the fullscreen output request will be retrieved from the client_pending state for the toplevel. The output will be passed to `view_map` and if there is a workspace on the output, the view will be placed on that workspace. If the request comes in after being mapped, the view will be moved to the workspace on the output (if there is one) before becoming fullscreen.
2019-04-08config/output: unbreak on 32-bit architecturesJan Beich
sway/config/output.c:624:54: error: format specifies type 'long' but the argument has type 'size_t' (aka 'unsigned int') [-Werror,-Wformat] sway_log(SWAY_DEBUG, "spawn_swaybg cmd[%ld] = %s", k, cmd[k]); ~~~ ^ %zu include/log.h:40:74: note: expanded from macro 'sway_log' _sway_log(verb, "[%s:%d] " fmt, _sway_strip_path(__FILE__), __LINE__, ##__VA_ARGS__) ^~~~~~~~~~~
2019-04-04Add margin to short_text handling.Dmitri Kourennyi
Add a 3xscale margin matching other spacing in swaybar as part of short text width calculations
2019-04-04Ensure predicted position for short text handling doesn't overflow.Dmitri Kourennyi
- Predicted status line can be negative, so corresponding variables should not be unsigned. Changed to double as position is actually calculated as double.
2019-04-04Implement handling of short_text field of i3 input protocol.Dmitri Kourennyi
Matches i3bar behavior of setting all blocks to use the short_text if the full text width does not fit.
2019-04-04swaybg: one instance for all outputsBrian Ashworth
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.
2019-04-03idle_inhibit: fix crash during view destructionBrian Ashworth
This fixes a crash for application set idle inhibitors when their associated view is being destroyed. There is a call to `view_is_visible` to determine is the view is visible and it assumes that the view has an container, but it is possible for the container to already have been destroyed at this point. There is a NULL check for the view in `check_active` and this re-adds the NULL check for the container that I accidentally dropped when refactoring during the inhibit_idle command PR
2019-04-03root_scratchpad_hide: fix crash when layer focusedBrian Ashworth
This fixes a crash in `root_scratchpad_hide` when a layer surface is focused. Since `seat_get_focus` is NULL when a layer surface is focused, the call to `node_has_ancestor` was causing a SIGSEGV since it was attempting to access the parent of NULL. This changes the call to `seat_get_focus_inactive`, which will return a node even when a layer surface is focused and is also guaranteed to have something in the focus stack if a scratchpad container is being hidden (otherwise there would not be any containers yet).
2019-04-02fix broken link to README.zh-CN.mdDacheng Gao
2019-04-02fix typoDacheng Gao
2019-04-01Update formatting of zh-cn link in README.mdDrew DeVault
2019-04-01add link to README-zh-CNDacheng Gao
2019-04-01fix csDacheng Gao