Age | Commit message (Collapse) | Author |
|
Fix #426
|
|
|
|
|
|
This implements the IPC binding event for keyboard bindings. It is
slightly different from the i3 implementation [1] since sway supports
more than one non-modifier key in a binding. Thus the json interface has
been changed from:
{
...
"symbol": "t",
...
}
to:
{
...
"symbols": [ "t" ],
...
}
[1] http://i3wm.org/docs/ipc.html#_binding_event
|
|
|
|
This is a "simple" version of --release (same as i3) that only supports
a binding that contain one normal key. e.g.:
bindsym --release $mod+x exec somthing-fun
I didn't bother implementing it for a combination like `$mod+x+z` since
it is a bit tricky to get right and also a bit weird to actually do on a
keyboard.
|
|
Send IPC modifier event on bar_modifier up/down
|
|
|
|
|
|
This makes sure that a modifier event is only sent for active bar
modifiers, and that it is only sent once for each of those modifiers.
An active bar modifier is a modifier defined for a bar with `mode hide`
and `hidden_state hide`.
|
|
The i3wm config locations are visited _before_ using the fallback
configs. The man page was confusing - it talked about the fallback
configs first, but also said they are looked at "at last". By changing
the order of the sentences, this should be clearer.
|
|
|
|
|
|
Lookup of modifier names is required in several places, thus it makes
sense to move it to a general place.
|
|
This reverts commit 33b24736c78d9993a26d295ea3e56ad77d6f1390.
|
|
Detects when a bar modifier key is pressed/released and sends a modifier
IPC event to any listeners (usually swaybars).
This way a swaybar can listen on the modifier event and hide/show the
bar accordingly (not implemented yet)
The modifier event looks like this:
{
"change": "pressed", // or released
"modifier": "Mod4"
}
|
|
Thanks @jollywho
|
|
Return focus to fullscreen view
|
|
This fixes https://github.com/SirCmpwn/sway/issues/431 by returning
focus to the fullscreen view. Also it fixes the issue with the
fullscreen view pointer not being set which did my head in
|
|
|
|
This fixes a bug where the key at index 0 in the `key_state_array` would
be overwritten by the next pressed key. This broke any bindings
consisting of multiple non-mod keys like: `$mod+a+b`.
|
|
|
|
Adds custom IPC_EVENT_* types
|
|
Not sure if you will accept this, but i find it useful (I use it when
opening new terminal windows on a workspace
v2: add short hand command and docs
|
|
Found this completely by accident
|
|
Handle SIGTERM sent to sway
|
|
This makes sway handle and gracefully shut down everything when
receiving a SIGTERM.
Fix #416
|
|
|
|
Previous output was confusing.
|
|
If the width or height of a container can't be evenly distributed to its
children, then the layout algorithm still thought it got it right (due
to using decimals) which caused a gap of one or more pixels for some
window arrangements.
This is fixed by this patch by first rounding off the width and height
(so that decimals are never introduced) and then adjusting the last
view in a container to fill the remaining pixels (which now is counted
correctly due to the decimals being removed).
Also, due to the way gaps are implemented, an odd sized gap can never be
aligned properly, so just adjust to closest even number.
|
|
This brings consistency into the algorithm (instead of resetting and
then fetching again).
|
|
This makes sure that the window being added to a container gets focus.
|
|
Triggers workspace init event when moving a floating window to a new
workspace.
This is a follow up on #391 which didn't handle floating windows.
|
|
- swaylock config path not hardcoded anymore
- the unusual and weird FALLBACK_CONFIG_DIR is no more
|
|
|
|
|
|
musl libc compatibility
|
|
I've tried to make as few changes, as possible.
Usually the reason for using qsort_r is, that you can pass an extra userdata pointer to the
compare function. However, in sway list_sort wrapped qsort_r and always called a wrapper
function for comparing, the wrapper function then had the real compare function as argument.
The only thing, that the wrapper function does, is dereferencing the 'left' and 'right' function
arguments before passing them to the real compare function.
I have renamed list_sort to list_qsort to avoid confusion (so nobody tries to use list_qsort like
list_sort) and removed the wrapper functionality. Now the dereferencing must be done in the
compare function, that gets passed.
Some compare functions were used in both list_sort and list_seq_find. To make the difference
clear, I've added a '_qsort' suffix to the compare functions, that are intended to be used with
the new list_qsort. (In other words: list_qsort is not compatible anymore with list_seq_find).
- Changed and renamed function (it isn't used anywhere but in commands.c, and only for sorting):
compare_set -> compare_set_qsort
- New wrapper functions:
sway_binding_cmp_qsort (for sway_binding_cmp)
sway_mouse_binding_cmp_qsort (for sway_mouse_binding_cmp)
|
|
This makes sure that the workspace IPC event is triggered when needed.
Fixes #382 while making sure that the IPC event is only triggered once.
|
|
|
|
Don't skip all clients on ipc_workspace_event.
|
|
Only clients not subcriped to the workspace event should be skipped.
|
|
|
|
|
|
Our initial implementation of `bar { }` assumed that the commands could
only be used in the config. This is not true for two commands:
* bar mode
* bar hidden_state
This patch makes it possible to issue these commands outside a bar
block, for instance through swaymsg
$ swaymsg bar mode hide bar-0
This does not implement the `barconfig_update` IPC event which should be
trigged from these commands. I have added TODO's where this should be
added once implemented.
|
|
|
|
Since x/y won't be zero when there's a top or left panel in place, we
need to take those coordinates into account too.
|
|
|
|
Per panel config
|
|
config: load_swaybars: Fix name comparison.
|