Commit Graph

71 Commits

Author SHA1 Message Date
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
Brian Ashworth
8463a2896a swaynag: implement config file support 2018-08-01 22:47:54 -04:00
Brian Ashworth
a4f7bf23b2 Address first round review for swaynag 2018-08-01 22:47:54 -04:00
Brian Ashworth
88bc4b528e Implements swaynagbar 2018-08-01 22:47:54 -04:00
Drew DeVault
878d1ddd07
Merge pull request #2387 from 1ace/feature/bash-completion
bash completion
2018-07-30 13:11:20 -04:00
Eric Engestrom
52a27f1529 delete references to swaygrab 2018-07-30 16:24:46 +01:00
Eric Engestrom
b9d531b318 meson: install bash completion 2018-07-30 15:56:50 +01:00
Drew DeVault
8dacd0639c Enable unstable wlroots features 2018-07-29 19:33:54 -04:00
Pascal Pascher
2bf893248a style fixes, exclude sway/desctop/xwayland.c when enable_xwayland: false 2018-07-24 23:37:41 +02:00
Pascal Pascher
24ad1c3983 Added meson option "enable_xwayland" (default: true) to enable/disable xwayland support 2018-07-24 22:16:06 +02:00
emersion
cda66e9a26
Automatically float xwayland windows 2018-06-18 22:52:10 +01:00
Ryan Dwyer
9d99e5c2e7 Swaylock: Allow per-output images 2018-05-20 22:54:09 +10:00
Mattias Eriksson
8fbafbfab5 Idle handling for dpms/lockscreen et al
Swayidle handles idle events and allows
for dpms and lockscreen handling. It also
handles systemd sleep events, and can
raise a lockscreen on sleep

Fixes #541
2018-05-13 00:30:09 +02:00
Drew DeVault
22f52b91ed Add swaylock(1) and swaymsg(1) 2018-05-11 21:39:47 -04:00
Drew DeVault
d9a08b7a9d Add sway-input(5) 2018-05-11 21:25:05 -04:00
Drew DeVault
1813482266 Add sway-bar(5) 2018-05-11 21:13:43 -04:00
Drew DeVault
432256ad84 Add sway(5) 2018-05-11 21:03:43 -04:00
Drew DeVault
c2a7d367af Wire up scdoc and rewrite sway(1) 2018-05-11 20:58:38 -04:00
Yorick van Pelt
f31b2e1b33
meson.build: Look for '-lpam', not '-llibpam'.
See #1920 for more information.
2018-05-06 14:10:09 +02:00
Bruno Pinto
b24b319bdf
Improve dependency checks 2018-04-08 00:34:12 +01:00
Drew DeVault
842a3ea45c Add -Wno-unused-result
Fixes #1744
2018-04-05 15:23:59 -04:00