Commit graph

2184 commits

Author SHA1 Message Date
Drew DeVault ef5d896946 Merge pull request #501 from mikkeloscar/ws-on-output
Fix assigning workspaces to outputs
2016-03-04 11:08:03 -05:00
Mikkel Oscar Lyderik 8ddafeeaae Fix assigning workspaces to outputs
It's possible to assign workspaces to certain outputs using the command:

    workspace <name> output <output>

However, this did not work in some cases where the workspace was
assigned before the given output was made available to sway.

This patch fixes those cases.
2016-03-04 16:44:49 +01:00
Aaron Ouellette 133009b652 add a manpage for swaylock 2016-03-01 10:23:45 -05:00
Drew DeVault 79bfd620d6 Merge pull request #495 from gpyh/docswaybar
Segregate between config and runtime cmds in doc
2016-02-29 16:46:12 -05:00
Yacine Hmito 9437eca3eb Segregate between config and runtime cmds in doc
In anticipation for #375, reorganized and augmented slightly sway(5)
so it makes a difference between commands intended for configuration,
commands intended for control, and those that can serve as both.
2016-02-29 22:12:39 +01:00
Drew DeVault cc170e1b2d Merge pull request #497 from progandy/swaylock-arrange
swaylock: call arrange_windows for floating change
2016-02-28 15:42:23 -05:00
progandy 33887e3955 sway: rearrange the whole ws on lock view setup 2016-02-28 21:24:12 +01:00
progandy 52ff89cecc sway: set lock view to floating after ws switch
This avoids calling swayc_active_workspace.
2016-02-28 21:22:57 +01:00
Drew DeVault 86b894d804 Merge pull request #496 from mikkeloscar/focus-new-output
Correctly move focus from one output to a new one.
2016-02-28 12:32:56 -05:00
Mikkel Oscar Lyderik 6088c6cdf0 Correctly move focus from one output to a new one.
This patch aims to correctly handle moving focus <left|right|up|down>
between outputs.

For instance, if moving from one output to a new output at the left of
the current one, it should focus the right-most view/container on the
new output, and the opposite if moving from right to left. This should
happen regardless of the previously stored focus of the new output.

This also handles moving to a new output above or below the current one.
2016-02-28 18:20:18 +01:00
Drew DeVault 3453910c3e Merge pull request #492 from mikkeloscar/swaybar-multi-output
Display single swaybar on multiple outputs
2016-02-27 16:18:50 -05:00
Mikkel Oscar Lyderik 67bbcceba1 Free config before exiting sway.
Apart from freeing the sway_config struct, this also terminates the
swaybars spawned by sway, since they are linked by PID to the bar config
structs.
2016-02-27 22:13:15 +01:00
Mikkel Oscar Lyderik e15a8a0376 Improve how swaybars are spawned 2016-02-27 22:12:35 +01:00
Mikkel Oscar Lyderik af7a251806 Poll before wl_display_dispatch 2016-02-27 22:12:35 +01:00
Mikkel Oscar Lyderik e4c1176b72 Differentiate between all or no outputs 2016-02-27 22:12:35 +01:00
Mikkel Oscar Lyderik 212c6a18a2 Add outputs to bar_config ipc response 2016-02-27 22:12:35 +01:00
Mikkel Oscar Lyderik bad4e22f3b Make sway spawn only one bar per bar config 2016-02-27 22:12:35 +01:00
Mikkel Oscar Lyderik 6d57f03028 Make single bar handle multiple outputs 2016-02-27 22:12:35 +01:00
Mikkel Oscar Lyderik 5ff3fb1c04 Set pointer pos before focusing view under it 2016-02-27 13:18:55 +01:00
Mikkel Oscar Lyderik e19e32cf81 Make protocol specifications follow the DTD
Gets rid of these warnings:

    WARNING: XML failed validation against built-in DTD
2016-02-27 01:26:17 +01:00
Mikkel Oscar Lyderik 5e253fdd9a Correctly exit sway on errors.
Calling `exit` in sway_terminate prevents sway from correctly shutting
down (freeing data, cleanly terminating the ipc server, etc.).

A better way is to exit straight away if the failure occurs before
`wlc_run` and use sway_abort as usual if it occur when wlc is running.
2016-02-26 09:42:21 +01:00
Drew DeVault 40b3215444 Merge pull request #494 from gpyh/argsegfault
Fix segfault when trying to use sway as IPC without a sway instance
2016-02-25 18:09:20 -05:00
Yacine Hmito c400ca8f88 Fix for when sway_abort doesn't exit
sway_terminate does an exit in case wlc_terminate doesn't
2016-02-25 23:46:27 +01:00
Yacine Hmito 8db417fafe Fixed swaymsg command name in sway(5) doc 2016-02-25 23:05:38 +01:00
Yacine Hmito e239fbbd88 No options when using sway as IPC client
Sway used to attempt sending an IPC command composed of every argument
after the first non-option argument encountered.
Now, raises an error if an option is encountered before the intended command.
Some options such as -h or -v take effect when parsing, so they still
apply.
2016-02-25 23:04:59 +01:00
Yacine Hmito 179192e222 Removed p as a valid CLI option
The get-socketpath long option had an undocumented short alternative
as `p`. It has been removed.
However, the code in the options array is still the 'p' char.
2016-02-25 21:50:24 +01:00
Drew DeVault 28c8e4fb9e Merge pull request #493 from mikkeloscar/view-behind-swaylock
Don't rearrange views behind swaylock.
2016-02-25 09:02:47 -05:00
Mikkel Oscar Lyderik 89bb6a4a42 Don't rearrange views behind swaylock.
Fix #481
2016-02-25 14:42:48 +01:00
Mikkel Oscar Lyderik c9d9dd7516 Check for empty ws on view destroyed.
In some cases destroying a view can result in an empty and inactive
workspace, which should be destroyed.

This handles those cases.
2016-02-25 13:36:25 +01:00
Mikkel Oscar Lyderik ee32bc3aef Send workspace ICP event on ws destroy/empty.
There is no 'destroy' change type in the i3 IPC so this uses `empty` to
notify about empty workspaces (which will be destroyed from sway right
after).
2016-02-25 12:59:22 +01:00
Mikkel Oscar Lyderik 739ba902e0 Prevent crash when showing scratchpad on new ws.
Fix #469
2016-02-25 11:43:07 +01:00
Mikkel Oscar Lyderik b107fc6e5a Fix ipc event bit masks 2016-02-21 22:49:20 +01:00
Mikkel Oscar Lyderik 016a77424a Prefer named output config over wildcard config.
This makes sure that a named output config is applied before the
general wildcard config when a new output is created. This ensures that
the config:

    output * ...
    output NAME ...

behaves the same way as:

    output NAME ...
    output * ...
2016-02-12 13:45:47 +01:00
Drew DeVault 91d6113d4a Merge pull request #488 from mikkeloscar/get-pixels
Replace deprecated function wlc_output_get_pixels.
2016-02-08 07:40:41 -05:00
Mikkel Oscar Lyderik 6f7cbf2eac Replace deprecated function wlc_output_get_pixels.
This makes IPC GET_PIXELS use the new `wlc_pixels_read` call instead of
the deprecated `wlc_output_get_pixels`.

The old version worked by passing a callback function to wlc which would
grab the pixels and send them to the IPC client.
The new version works by maintaining a list of clients who have
requested the pixels of some output and then grap and send the pixels in
the output_post_render hook of the `wlc_interface`.
2016-02-08 12:39:07 +01:00
Mikkel Oscar Lyderik be6455b295 Squash trailing whitespace 2016-02-08 12:31:13 +01:00
Mikkel Oscar Lyderik bacd40d6db Fix clang warnings 2016-02-08 12:30:42 +01:00
Drew DeVault 4546ce1188 Add wlc-render.h to handlers.c 2016-02-08 12:20:24 +01:00
Mikkel Oscar Lyderik 6038bf5924 Merge pull request #486 from SethBarberee/sway-zsh
refactored sway command to include single dash
2016-02-08 11:36:21 +01:00
Seth Barberee 4cb30880ca fixed config help 2016-02-01 14:53:45 -06:00
Seth Barberee aa06ee4fbd refactored to include single dash 2016-01-31 22:39:08 -06:00
Mikkel Oscar Lyderik 6793648f8e use tabs 2016-01-29 03:24:21 +01:00
Mikkel Oscar Lyderik 10e50b690a Improve _swaymsg and _swaygrab completions 2016-01-29 03:06:13 +01:00
Mikkel Oscar Lyderik 34948c7ee1 Autocomplete scale options 2016-01-29 02:48:48 +01:00
Mikkel Oscar Lyderik 25361fa67a complete image, not color 2016-01-29 02:45:01 +01:00
Mikkel Oscar Lyderik 65a03ab502 Add files completion to _swaylock 2016-01-29 02:42:50 +01:00
Mikkel Oscar Lyderik a64e281356 Merge pull request #483 from aouelete/zsh-swaylock-completion
zsh completions for swaylock
2016-01-29 02:30:25 +01:00
Aaron Ouellette 7ac0fbe8e3 zsh completions for swaylock 2016-01-28 20:20:15 -05:00
Drew DeVault 533e59f7b1 Merge pull request #482 from crondog/movemouse
commands: move position mouse
2016-01-28 07:57:46 -05:00
Drew DeVault e5bb08cc18 Print /proc/<pid>/maps on segfault 2016-01-28 07:57:07 -05:00