Commit Graph

91 Commits

Author SHA1 Message Date
emersion
2c0b65f575 meson: use pkg-config var for scdoc path 2019-03-11 10:57:16 -04:00
Brian Ashworth
e8eab3b825 meson: update scdoc requirement to >= 1.9.2
Since scdoc 1.9.1 is bugged, this updates the meson version check to
>= 1.9.2 and drops the version requirement from the README. This should
make it more obvious to users who have 1.9.1 that they need to update
scdoc to be able to compile man pages and hopefully cut down on the
duplicate issues
2019-03-04 12:50:56 -05:00
emersion
9593c72616 meson: check scdoc version 2019-03-04 12:50:47 -05:00
emersion
acc28cf9bb Print Meson features 2019-03-04 12:50:47 -05:00
emersion
1a34dbf551 Set minimum wlroots version 2019-03-04 12:50:47 -05:00
Brian Ashworth
7371ed55fe Add sway-ipc.7.scd to document IPC protocol
This add `sway-ipc.7.scd` that documents the IPC protocol.

This also increased the minimum scdoc version from 1.8.1 to 1.9.0 to
allow for table cells to be continued on the following line
2019-03-04 12:50:43 -05:00
emersion
c6b43359e7 Fix Meson subproject boolean default options 2019-02-18 15:11:48 -05:00
emersion
b02198a0d1 Disable unneeded wlroots subproject features 2019-02-18 15:11:48 -05:00
emersion
e50e1fe058 Fix --version when building from tarball 2019-02-18 15:11:48 -05:00
Michael Vetter
9346ed1805 Set version in project file
Let's set the version in the meson file instead of declaring it outside.

In case git is installed we use the git hash as version. Instead it
isn't (like on a clean build system), let's use the version defined in
the project.
2019-02-11 10:15:00 -05:00
Drew DeVault
1fb6918f9e
Merge pull request #3482 from emersion/meson-systemd-version
meson: set minimum systemd version
2019-01-21 09:25:11 -05:00
M Stoeckl
1211a81aad Replace wlr_log with sway_log
This commit mostly duplicates the wlr_log functions, although
with a sway_* prefix. (This is very similar to PR #2009.)
However, the logging function no longer needs to be replaceable,
so sway_log_init's second argument is used to set the exit
callback for sway_abort.

wlr_log_init is still invoked in sway/main.c

This commit makes it easier to remove the wlroots dependency for
the helper programs swaymsg, swaybg, swaybar, and swaynag.
2019-01-21 12:59:42 +01:00
emersion
51e4b94270
meson: set minimum systemd version
sd_bus_slot_set_floating has been introduced in systemd 239.
2019-01-21 12:56:32 +01:00
emersion
35d73345d9
meson: make sure wlroots has been built with xwayland 2019-01-18 23:47:46 +01:00
emersion
765d7bc94f
meson: remove extraneous parentheses 2019-01-18 08:44:02 +01:00
emersion
bb2f007ad3
meson: remove rpath options 2019-01-18 08:26:44 +01:00
emersion
ab35e0383f
meson: remove unused dependencies 2019-01-18 08:22:59 +01:00
emersion
ba16f16e4d
meson: add gdk-pixbuf and man-pages options 2019-01-18 08:21:43 +01:00
emersion
08a5b304e4
Use Meson feature options 2019-01-17 18:26:24 +01:00
Connor E
aa9d7d8ca1 Remove usage of VLAs. 2019-01-16 13:02:26 +01:00
Drew DeVault
3fca8b8d22 Split swaylock into separate project 2019-01-13 21:40:26 -05:00
Drew DeVault
bc808680b1 Split swayidle from sway 2019-01-12 11:24:06 -05:00
Gaël PORTAY
3b4cf3718b bash: add completion for swaybar 2018-12-31 22:35:57 -05:00
Ian Fan
5f65f33989 swaybar: add tray interface 2018-12-31 20:40:18 +00:00
Brian Ashworth
a223030b70 Change mouse buttons to x11 map and libevdev names
This modifies the way mouse bindings are parsed. Instead of adding to
BTN_LEFT, which results in button numbers that may not be expected,
buttons will be parsed in one of the following ways:

1. `button[1-9]` will now map to their x11 equivalents. This is already
the case for bar bindings. This adds support for binding to axis events,
which was not possible in the previous approach.

2. Anything that starts with `BTN_` will be parsed as an event code name
using `libevdev_event_code_from_name`. This allows for any button to be
mapped to instead of limiting usage to the ones near BTN_LEFT. This also
adds a dependency on libevdev, but since libevdev is already a dependency
of libinput, this should be fine. If needed, this option can have dependency
guards added.

Binding changes:
- button1: BTN_LEFT -> BTN_LEFT
- button2: BTN_RIGHT -> BTN_MIDDLE
- button3: BTN_MIDDLE -> BTN_RIGHT
- button4: BTN_SIDE -> SWAY_SCROLL_UP
- button5: BTN_EXTRA -> SWAY_SCROLL_DOWN
- button6: BTN_FORWARD -> SWAY_SCROLL_LEFT
- button7: BTN_BACK -> SWAY_SCROLL_RIGHT
- button8: BTN_TASK -> BTN_SIDE
- button9: BTN_JOYSTICK -> BTN_EXTRA

Since the axis events need to be mapped to an event code, this uses the
following mappings to avoid any conflicts:
- SWAY_SCROLL_UP: KEY_MAX + 1
- SWAY_SCROLL_DOWN: KEY_MAX + 2
- SWAY_SCROLL_LEFT: KEY_MAX + 3
- SWAY_SCROLL_RIGHT: KEY_MAX + 4
2018-12-25 13:27:08 +01:00
Ian Fan
49502494e7 meson.build: remove obsolete definition of swayidle_deps 2018-12-01 13:55:19 +00: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
cad851805b
Use #if instead of #ifdef 2018-11-18 00:33:06 +01:00
emersion
2afd930914
Use #if instead of #ifdef for WLR_HAS_* 2018-11-12 22:23:06 +01:00
madblobfish
31d1ffb88f added fish completions for swaynag 2018-10-27 16:54:32 +02:00
madblobfish
834f23f57a added fish completions for swayidle 2018-10-27 16:54:20 +02:00
sghctoma
af2cfa5221 Set sysconfdir to /etc only if prefix is /usr
PR #2855 basically hardcodes the config file path to /etc, which is a
problem on e.g. FreeBSD, where the expected path for config files of
non-base software is '/usr/local/etc'.
Meson sets sysconfdir to '/etc' explicitly only when prefix is '/usr',
so it is still possible to use '/usr/local' as prefix, and install the
config files under '/usr/local/etc'. This commit allows to do that by
setting sysconfdir based on the value of prefix.
2018-10-17 15:28:18 +02:00
Niccolò Scatena
027928bdeb
Set SYSCONFDIR to /etc even when "prefix" is set
SYSCONFDIR should be "/etc" even when prefix="/usr" to be FHS compliant.
This is the default in meson from v0.44.
2018-10-16 19:44:45 +02:00
Niccolò Scatena
615d4bf958
Revert "Fix SYSCONFDIR to include "prefix""
This reverts commit 6942f5b684.
SYSCONFDIR should be "/etc" even when prefix="/usr" to be FHS compliant.
This is the default in meson from v0.44.
2018-10-16 19:35:06 +02:00
Drew DeVault
b69060fc58 Establish sway-output(5) 2018-10-14 10:52:57 -04:00
Drew DeVault
c89e00a97e Fix swaylock w/shadow on glibc, improve security
Today I learned that GNU flaunts the POSIX standard in yet another
creative way. Additionally, this adds some security improvements,
namely:

- Zeroing out password buffers in the privileged child process
- setuid/setgid after reading /etc/shadow
2018-10-06 12:20:12 -04:00
Arkadiusz Hiler
eed0bc3ebd Add support for installing binaries with DT_RPATH
It's better to use DT_RPATH dynamic section of the elf binary to store
the paths of libraries to load instead of overwriting LD_LIBRARY_PATH
for the whole environment, causing surprises. This solution is much more
transparent and perfectly suitable for running contained installations
of wayland/wlroots/sway.

The code unsetting the LD_LIBRARY_PATH/LD_PRELOAD was also deleted as
it's a placebo security at best - we should trust the execution path
that leads us to running sway, and it's way too late to care about those
variables since we already started executing our compositor, thus we
would be compromised anyway.
2018-09-30 15:37:01 +03:00
Arkadiusz Hiler
00dfb76832 Remove libcap/prctl artifacts
They seem like relics of the pasts, from when we were retaining the
ptrace cap.

Some translations still may need updates.
2018-09-30 13:39:26 +03:00
Drew DeVault
c977349120 Add support for building swaylock without PAM
This involves setuid'ing swaylock, which then forks and drops perms on
the parent process. The child process remains root and listens on a pipe
for requests to validate passwords against /etc/shadow.
2018-09-28 13:53:01 +02:00
sghctoma
3e924f2345 Add _C11_SOURCE feature test macro on FreeBSD
This will restrict the default namespace set on FreeBSD to the C11
standard (everything is visible by default), which will prevent possible
conflicts with symbols hidden behing __BSD_VISIBLE.
2018-09-26 20:05:45 +02:00
Drew DeVault
a8a0014e0f Make libpam optional 2018-09-26 17:32:15 +02:00
sghctoma
df730a8891 Merge remote-tracking branch 'upstream/master' into fix-freebsd-build 2018-09-03 08:57:17 +02:00
Ryan Dwyer
4ece26e511 Add ld-library-path meson option 2018-09-02 23:07:47 +10:00
Ryan Dwyer
7795f733d8 Use dashes in meson option names 2018-09-02 22:58:15 +10:00
sghctoma
6942f5b684 Fix SYSCONFDIR to include "prefix"
SYSCONFDIR is used to determine the path of the default configuration
file. 'sysconfdir' is set to 'prefix/sysconfdir' later (on line 139),
so configuration files are installed under 'prefix', but SYSCONFDIR did
not reflect it.
2018-08-30 09:44:24 +02:00
sghctoma
462e15d9a5 Make libcap an optional dependency
FreeBSD does not have libcap, so without "required: false" Sway fails
to build.
2018-08-30 09:40:35 +02:00
Scott Anderson
ff86dc0c35 Hide deprecated wayland functions 2018-08-27 18:01:00 +12:00
Martin Kalchev
f3c18336d2 added fish to meson.build 2018-08-26 19:27:18 +03:00
Ryan Dwyer
706c0fbe23
Merge branch 'master' into nagbar 2018-08-02 23:05:49 +10:00
Michel Ganguin
d6095588a1 Link xcb dependency to meson options "enable_xwayland" (#2393)
* Link xcb dependency to meson options "enable_xwayland"

* Link xcb dependency to meson options "enable_xwayland"
2018-08-02 08:36:47 +01:00