Commit graph

5896 commits

Author SHA1 Message Date
emersion 60e1fb547c
Merge pull request #3209 from RedSoxFan/fix-3146
Do not strip quotes for cmd_mode
2018-11-28 08:01:17 +01:00
Brian Ashworth 315bca176c Do not strip quotes for cmd_mode
Like with cmd_bindsym and cmd_bindcode, the quotes should not be
stripped for cmd_mode. cmd_mode performs its own stripping for the mode
name and the only valid subcommands are cmd_bindsym and cmd_bindcode.
2018-11-28 01:28:03 -05:00
Brian Ashworth 673da83260 Implement swaynag -B/--button-no-terminal
In `i3 4.16`, `i3-nagbar` introduces the flags `-B/--button-no-terminal`
to run the action directly instead of inside a terminal. This implements
the flags for swaynag for compatibility.

Since swaynag does not use an equivalent to `i3-sensible-terminal`, the
flags `-b/--button` only uses a terminal when the environment variable
`TERMINAL` is set, otherwise it acts the same as these new flags.
2018-11-27 23:34:51 -05:00
Brian Ashworth 5c6f3d7266 Change execute_command to return a list of results
This matches i3's behavior of returning a list of results that contain
the result of each command that was executed. Additionally, the
`parse_error` attribute has been added to the IPC JSON reply.
2018-11-27 21:42:09 -05:00
emersion 1d30b7c0f6
Damage view child when destroyed 2018-11-27 21:13:08 +01:00
emersion fc79b7c2d2
Handle destroyed subsurfaces
Damage subsurfaces when they are destroyed. Since subsurfaces don't have an
unmap event we need to do that on destroy.

We also don't want to keep a sway_view_child when the wlr_subsurface has been
destroyed.

Fixes https://github.com/swaywm/sway/issues/3197
2018-11-27 11:46:30 +01:00
Drew DeVault dbf8e1cead
Merge pull request #3175 from emersion/rename-gtk-primary-selection
Update for swaywm/wlroots#1387
2018-11-26 18:41:30 -05:00
Brian Ashworth a22e7b13ad
Merge pull request #3168 from mihaicmn/scratchpad-events
Fix missing IPC scratchpad replies/move events
2018-11-26 12:02:27 -05:00
Ryan Dwyer af7a97623b
Merge pull request #3185 from emersion/remove-xopen-source
Replace _XOPEN_SOURCE with _POSIX_C_SOURCE
2018-11-26 21:25:45 +10:00
Ian Fan 0ebb4107bc
Merge pull request #3191 from emersion/fix-swayidle-busy-dispatch
swayidle: fix busy loop on writable FD
2018-11-26 09:33:30 +00:00
Mihai Coman 39db9b855d IPC: Use consistent function names across ipc-json 2018-11-26 11:15:40 +02:00
Mihai Coman 65c32e41d4 IPC: Add scratchpad containers to get_tree reply
This patch lists all hidden scratchpad containers as floating nodes
on "__i3_scratch" workspace. This workspace resides on "__i3" output.
2018-11-26 11:15:25 +02:00
Mihai Coman 6aafdd2321 IPC: Trigger move events for scratchpad containers
This patch allows IPC clients to receive window::move events
when containers are moved to scratchpad or when hidden containers
are shown via "scratchpad show" command.
2018-11-26 11:13:47 +02:00
emersion c2921b2e61
Merge pull request #3169 from RedSoxFan/title-align
Implement title alignment
2018-11-26 09:28:25 +01:00
Brian Ashworth 0e6e5af983
Merge pull request #3183 from emersion/fix-escape-pango
Fix pango title escaping
2018-11-25 22:25:12 -05:00
Brian Ashworth e6562c8cd2 Implement title alignment
This adds support for `i3 4.16`'s ability to set the title alignment.
The command is `title_align left|center|right`.

When the title is on the right, marks are moved to the left. Otherwise,
they are on the right.
2018-11-25 22:08:58 -05:00
emersion 814dc1dfe5
swayidle: fix busy loop on writable FD
The wl_event_source_fd_update docs say:

> File descriptors are usually writable to begin with, so they do not need to
> be polled for writable until a write actually fails. When a write fails,
> the event mask can be changed to poll for readable and writable, delivering
> a dispatch callback when it is possible to write more. Once all data has
> been written, the mask can be changed to poll only for readable to avoid
> busy-looping on dispatch.

So we should only poll for WL_EVENT_WRITABLE if a write fails. I'm not yet sure
how to do this properly and Weston doesn't do it, so in the meantime I'll just
fix the busy loop. I'll ask them too.

Fixes https://github.com/swaywm/sway/issues/3190
2018-11-25 18:10:01 +01:00
emersion 91bbb2a7dd
Merge pull request #3184 from kupospelov/fix-resize
resize set: fix units for floating containers
2018-11-25 17:41:45 +01:00
emersion 3a310f92ab
Replace _XOPEN_SOURCE with _POSIX_C_SOURCE
And make sure we don't define both in the same source file.
2018-11-25 17:19:43 +01:00
emersion d46d221118
Merge pull request #3049 from ianyfan/swayidle
Swayidle fixes
2018-11-25 13:47:21 +01:00
Konstantin Pospelov f9bde0030d resize set: add assertion for an invalid unit 2018-11-25 15:16:45 +03:00
Konstantin Pospelov a7b9e63cbc resize set: fix units for floating containers
This commit fixes the default size units for floating containers, so that
pixels are used if the units are not specified.
2018-11-25 12:33:11 +03:00
emersion b84bf3585c
Fix pango title escaping
This commit fixes two bugs.

First, commit [1] has inverted the condition when we escape pango markup. We
need to escape client-provided strings when markup is enabled.

Second, parse_title_format has a shortcut when title_format is set to `%title`,
and escape_pango_markup wasn't used anymore there.

Fixes https://github.com/swaywm/sway/issues/3181

[1]: caee2dff03
2018-11-25 09:09:32 +01:00
emersion 9b88ee0143
swayidle: fix dbus_event not to block 2018-11-24 23:26:57 +01:00
emersion 41ffb5b4d5
swayidle: listen when display becomes writable 2018-11-24 23:18:44 +01:00
Ian Fan 6358de3827
swaylock: fix display_event to not block 2018-11-24 23:10:05 +01:00
Ian Fan 6e2dccc2e9
swayidle: when acquiring sleep lock, initialize and free variables properly 2018-11-24 23:10:05 +01:00
emersion 827e5513e0
Merge pull request #3179 from baloo/baloo/title_format-pango_markup
fixes pango_markup support with title_format
2018-11-24 23:07:13 +01:00
Arthur Gautier caee2dff03 fixes pango_markup support with title_format
The support for pango_markup was broken in title_format because the
formated title was escaped. I think only the payload should be escaped.

This commit fixes 789a877b37
2018-11-24 08:26:43 -08:00
emersion d440468d2d
Merge pull request #3145 from fdlamotte/master
Adding commands for configuring titlebar borders and padding
2018-11-24 08:59:01 +01:00
emersion d9ed1f080b
Merge pull request #3178 from progandy/sysconfdir
Meson: Fix SYSCONFDIR definition
2018-11-24 08:06:25 +01:00
progandy c4bbd0d3c6 Meson: Fix SYSCONFDIR definition.
SYSCONFDIR was set to the wrong path if prefix is not '/usr' and
sysconfdir is an absolute path. Use join_paths() to fix it.

Also remove the special case for prefix '/usr'. In that case Meson
already sets sysconfdir to the absolute path '/etc', so just using
join_paths() will return the correct value.

    join_paths('/usr/local', 'etc') => '/usr/local/etc'
    join_paths('/usr/local', '/etc') => '/etc'
    join_paths('/usr', '/etc') => '/etc'
2018-11-23 23:30:46 +01:00
emersion cc28f9712e
Update for swaywm/wlroots#1387 2018-11-23 12:07:46 +01:00
Florent de Lamotte 7555c7efdc Adding commands for configuring titlebar borders and padding 2018-11-22 10:30:04 +01:00
emersion 77554f545e
Merge pull request #3158 from emersion/get-outputs-focused
ipc: fix focused in get_outputs reply
2018-11-22 09:16:14 +01:00
emersion d63f9028d7
Merge pull request #3171 from camoz/master
fix typo in swayidle(1)
2018-11-22 08:53:48 +01:00
camoz 075b080f54 fix typo in swayidle(1) 2018-11-21 23:13:23 +01:00
emersion cecf00b924
Merge pull request #3160 from camoz/master
fix typo in config.in
2018-11-20 22:53:29 +01:00
camoz 101e4e55a2 fix typo in config.in 2018-11-19 22:32:08 +01:00
emersion 2f1050796c
ipc: fix focused in get_outputs reply
It's set even if a child of the output is focused.
2018-11-19 19:57:41 +01:00
emersion bf7af9c690
Merge pull request #3083 from c-edw/feature/StripWorkspaceName
Implement strip_workspace_name.
2018-11-19 17:56:18 +01:00
emersion 311c7db7e3
Add xwayland command 2018-11-19 17:38:37 +01:00
Drew DeVault 67d24e8fc5
Merge pull request #3152 from camoz/master
fix typo in config.in
2018-11-18 21:57:54 -05:00
camoz a476efc5a6 fix typo in config.in 2018-11-19 02:45:59 +01:00
Brian Ashworth b2c5248ad3
Merge pull request #3018 from sxmichaels/add-scroll-factor
Add scroll factor input command.
2018-11-18 14:05:03 -05:00
Spencer Michaels 70bc4c3ab6 Add scroll factor config option. 2018-11-18 13:49:30 -05:00
Drew DeVault b87250425f
Merge pull request #3147 from emersion/set10
Use #if instead of #ifdef
2018-11-18 08:22:25 -05:00
emersion cad851805b
Use #if instead of #ifdef 2018-11-18 00:33:06 +01:00
Connor E 4bd46fb079 Implement strip_workspace_name. 2018-11-17 16:11:28 +00:00
Drew DeVault eda3bfeed5
Merge pull request #3142 from RyanDwyer/move-view-properties
Move view {x,y,width,height} into container struct
2018-11-17 11:04:34 -05:00