Drew DeVault
eabfb6c559
Add * policies and fix bug
2017-02-20 06:48:33 -05:00
Drew DeVault
1980a08358
Enforce new IPC policies
2017-02-20 06:33:04 -05:00
Drew DeVault
b10721b89e
Add initial support code for new IPC security
2017-02-20 06:11:56 -05:00
Drew DeVault
7dbecdde95
Revise IPC security configuration
2017-02-19 02:56:59 -05:00
Zandr Martin
c6f971d108
use absolute view geometry to calculate position
2017-02-14 14:03:56 -05:00
Mykyta Holubakha
4eae9b33e8
xdg-positioner: log window placement
2017-02-06 02:59:23 +02:00
Mykyta Holubakha
006bd0bc3f
Handle xdg-positioner stuff
2017-02-06 02:59:23 +02:00
Drew DeVault
b3c0aa3a9e
Merge pull request #1055 from Hummer12007/positioner
...
Properly place windows with xdg-positioner
2017-01-19 06:19:08 -05:00
Mykyta Holubakha
7520607b8d
Properly place windows with xdg-positioner
2017-01-19 12:31:43 +02:00
Drew DeVault
7cc6f288d9
Merge pull request #1053 from Hummer12007/__focused__
...
Support __focused__ as a valid criterion
2017-01-18 22:54:19 -05:00
Mykyta Holubakha
28278864b4
Support __focused__ as a valid criterion
...
This reflects i3 behavior (see i3/i3#1770 )
Scrapping focused support will probably break some existing configs
2017-01-19 03:58:31 +02:00
Mykyta Holubakha
d443bce6fe
Display instance (if present) in nested layouts
2017-01-19 03:45:23 +02:00
Mykyta Holubakha
e714fbcbec
Add window instance support
2017-01-19 03:14:59 +02:00
Frantisek Fladung
33a709cae9
add hide_edge_borders smart to sway.5 manual
2017-01-17 11:46:58 +01:00
Mykyta Holubakha
138bcd0cfa
Unset LD_LIBRARY_PATH, unless specified
2017-01-16 01:05:05 +02:00
wil
a90dddea40
[fix] handle auto layout of empty container
2017-01-14 19:48:41 +01:00
wil
71b386964a
replaced "bot" with "bottom" in auto layout commands
2017-01-14 19:41:00 +01:00
wil
b74870f516
Improved behavior of insert/remove child in auto layouts
...
Previous implementation would not preserve dimension of groups
along the major axis. This should avoid weird behavior when
using container motion commands.
2017-01-14 19:41:00 +01:00
willakat
4c06a10004
Merge branch 'master' into master
2017-01-14 19:40:02 +01:00
Daniel Kessler
eda4bad725
Add output wrapping
...
This fixes issue #733 . Now if the user focuses output right but is at
the rightmost monitor, the focus will wrap the the leftmost monitor.
This commit adds a new function, swayc_opposite_output, which selects
the opposite output given a position and a direction. Now, when calling
output_by_name, we first check if there is an adjacent output to switch
to. If that fails, we call swayc_opposite_output to handle wrapping.
2017-01-13 16:06:10 -08:00
Drew DeVault
c1e6cc3257
Merge pull request #1044 from ametisf/master
...
Implement hide_edge_borders smart (like in i3 4.13)
2017-01-12 11:39:31 -05:00
Frantisek Fladung
c04819e8c0
Implement hide_edge_borders smart (like in i3 4.13)
2017-01-12 12:40:28 +01:00
Mykyta Holubakha
d9ba61d7e9
Log capability dropping
2017-01-12 04:35:09 +02:00
Mykyta Holubakha
ea1313d80d
Keep CAP_SYS_PTRACE with suid binary
2017-01-12 04:25:27 +02:00
Drew DeVault
527c259d06
Fix #1008
2017-01-11 21:13:44 -05:00
willakat
dc361fd9df
Merge branch 'master' into master
2017-01-08 18:15:37 +01:00
wil
52f3a8df51
fixed up space-after-cast style issues
2017-01-08 18:08:10 +01:00
wil
07474a4fa7
reworked "layout auto*" star commands
...
- "layout auto_left|auto_xxx" are now "layout auto xxx"
- "layout incmaster <n>" is now "layout auto master [set|inc] <n>"
- "layout incncol <n>" is now "layout auto ncol [set|inc] <n>"
2017-01-08 17:57:38 +01:00
Drew DeVault
7c636da8a3
Fix format error
2017-01-08 11:07:45 -05:00
wil
063c79874a
Indent cleanups
2017-01-08 14:49:47 +01:00
wil
d822150d83
[fix] Keep Clang happy
2017-01-08 14:16:40 +01:00
wil
2040c62da9
Merge branch 'master' of https://github.com/SirCmpwn/sway
2017-01-07 21:35:30 +01:00
wil
f24ebd75fa
Added mouse resize for auto layouts
2017-01-07 21:24:43 +01:00
wil
1f47c58d63
simplification of apply_auto_layout
...
Achieved by introducing auto_group_bounds function that produces
the start/end indexes of a group inside an auto layot container.
2017-01-07 20:26:46 +01:00
wil
3c84250be8
[fix] resize should now preserve surrounding container's dimensions
...
- prior to this modification, the requested pixels were added/removed
to both edges of the modified container. To preserve sizes,
only half the pixels should be added/removed to each edge.
2017-01-07 18:20:13 +01:00
wil
f7269684d0
[fix] scale check to prevent un-necessary layouts was in the wrong place.
2017-01-07 18:15:42 +01:00
wil
d99efb5f6f
[fix] corner cases win nb_children < nb_master|nb_col
2017-01-07 18:09:42 +01:00
wil
bd415029ba
Moved auto_* layout functions from resize.c to layout.c
2017-01-07 17:41:15 +01:00
Hummer12007
d59af31256
Fix workspace layouts in json data
2017-01-06 01:28:36 +02:00
wil
704b2db050
Merge branch 'master' of https://github.com/willakat/sway
2017-01-01 22:02:19 +01:00
wil
97f70987d7
[fix] cleanups suggested by Sway community
2017-01-01 21:52:49 +01:00
wil
a62048f15d
changed "layout promote" command to "move first"
...
This is more consistent with other Sway semantics.
2017-01-01 19:53:53 +01:00
Drew DeVault
0412e95ba9
Document new layout command syntax
...
And an old one that the docs overlooked
2017-01-01 12:41:52 -05:00
Drew DeVault
c01b898398
Fix inline is_auto_layout
2017-01-01 12:36:47 -05:00
wil
15745abf0c
[fix] cycle auto layouts backwards
2016-12-31 18:41:13 +01:00
wil
1b87193c3d
Added "layout promote" command.
2016-12-29 20:31:30 +01:00
wil
a0aa8d9780
cleanup in auto layouts
...
- added L_AUTO_FIRST/LAST instead of using explicit layouts.
- when switching between auto layout that don't share the same major axis, invert the
width/height of their child views to preserve their relative proportions.
2016-12-29 20:31:30 +01:00
wil
2b0e3c212a
[fix] move next/prev behavior for vert/horiz layout
2016-12-29 20:31:30 +01:00
wil
0ff9fe9a7a
introduce next/prev as a direction for focus/move commands.
2016-12-29 20:31:30 +01:00
wil
bc3dc97026
[fix] Handle auto layout resize with multiple slave groups
2016-12-29 20:31:30 +01:00
wil
ed71e67d7e
[fix] handle cases where nb_master > children->length in auto layout
2016-12-29 20:31:30 +01:00
wil
8b0073b195
Added "layout incnmaster|incncol" commands
2016-12-29 20:31:30 +01:00
wil
5425d0489f
Handle resize in auto layouts
2016-12-29 20:31:30 +01:00
wil
97f7d47413
Added Awesome/Monad type "auto" layouts
2016-12-29 20:31:30 +01:00
Drew DeVault
aab360bf2f
Add redshift support
2016-12-28 02:04:51 -05:00
Aleksa Sarai
09259021ab
sway: extensions: make locking give back focus
...
Don't switch the internal tracking of focus to the swaylock surface,
to allow for switching back to the previously active window (or the
currently active window, if some new process changed).
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
2016-12-26 20:00:17 +11:00
Aleksa Sarai
29a535aae4
sway: extensions: only unlock if lock_surfaces.length == 0
...
When destroying lock surfaces, we really should only unlock a
desktop_shell if the set of lock surfaces has dropped to zero (since
callers need to do a set_lock_surface for every output).
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
2016-12-26 19:23:07 +11:00
Drew DeVault
36e48fcf8d
Update default swaybar command
...
Fixes #988
2016-12-23 11:21:18 -05:00
Nicolas Cornu
0f0bbbff4d
Put floating views in center, fallback on top left
...
Sometimes views are created before we got its size
2016-12-18 10:43:10 +01:00
Drew DeVault
1172566d4e
Change how security config is loaded
2016-12-17 15:21:57 -05:00
Drew DeVault
14d9200e4e
Merge pull request #996 from woutershep/datadir
...
Use CMAKE_INSTALL_FULL_DATA{,ROOT}DIR
2016-12-17 14:56:51 -05:00
Wouter van Kesteren
09b9106550
Use CMAKE_INSTALL_FULL_DATA{,ROOT}DIR
...
Exherbo installs architecture dependent data in a different place than architecture
independent data. More concretely: binaries go in /usr/$chost/{bin,lib},
data goes in /usr/share and configs in /etc, /etc is already configurable
through CMAKE_INSTALL_FULL_SYSCONFDIR but the datadir was not. This
patch fixes it so that things can be pushed in the right places.
2016-12-17 01:00:39 +01:00
Drew DeVault
d859f825d3
Fix build error
2016-12-15 19:01:41 -05:00
Drew DeVault
63d96c1bb4
Fix indentation issues
2016-12-15 19:01:41 -05:00
Drew DeVault
10c8b73075
Handle calloc failures
2016-12-15 19:01:41 -05:00
Drew DeVault
a2b9149656
Add remaining sway allocation failure handling
2016-12-15 19:01:41 -05:00
Drew DeVault
7784f1a905
Handle allocation failures in security code
...
Note that such errors are generally going to be fatal
2016-12-15 19:01:41 -05:00
Drew DeVault
31b002b6d5
Handle IPC server allocation failures
2016-12-15 19:01:41 -05:00
Drew DeVault
8cef81d6f2
Handle some more memory allocation failures
2016-12-15 19:01:41 -05:00
Drew DeVault
d75a747a3d
Handle config-related allocation failures
2016-12-15 19:01:41 -05:00
Drew DeVault
248df18c24
Handle allocation failure in commands
2016-12-15 19:01:40 -05:00
Drew DeVault
8691ff1b63
Handle border-related malloc failures
2016-12-15 19:01:40 -05:00
Drew DeVault
4c6c65e70c
Handle malloc failures from read_line
2016-12-15 19:01:40 -05:00
Greg V
da26d69cb1
Fix build on FreeBSD
...
- Make sure CMake always finds absolute paths for Cairo, Pango and GdkPixbuf
- Add forgotten json-c include path to swaymsg/CMakeLists.txt
- Disable -Werror because of assert warnings
- Add correct /proc/pid/file path for FreeBSD
- Use libepoll-shim on FreeBSD
- Only use Linux capabilities on, well, Linux
2016-12-09 19:32:07 +03:00
Drew DeVault
d93e53fd4b
Use return value of write
2016-12-06 09:10:16 -05:00
Drew DeVault
979878d8af
Decrement expected_len
2016-12-04 10:55:11 -05:00
Drew DeVault
1a509dcc29
Fix to sway-security(7)
2016-12-04 09:49:13 -05:00
Drew DeVault
cdecf3c495
Drop restart command from sanity check
...
Since we don't actually have one of those
2016-12-04 09:37:24 -05:00
D.B
35b8d185ac
fix layout switching (was broken because of workspace_layout)
...
For workspace containers, swayc_change_layout also changes ->layout alongside
->workspace_layout when it's a sensible thing to do. There is an additional test
for 'layout toggle' command which ensures that containers will be tiled
horizontally after toggling from tabbed or stacked.
2016-12-04 08:31:34 -05:00
D.B
4762bcb3b9
wrap some views under workspaces
...
If workspace layout is set to tabbed or stacked, its C_VIEW children
should get wrapped in a container. Alongside that, move_container was
modified to retain previous functionality.
2016-12-04 08:31:34 -05:00
D.B
6fb4b6737a
add workspace_layout to container
...
Add swayc_change_layout function, which changes either layout or
workspace_layout, depending on the container type.
2016-12-04 08:31:34 -05:00
Drew DeVault
e7a764fdf4
Disallow everything by default
...
And update config.d/security to configure sane defaults
2016-12-03 12:38:42 -05:00
Drew DeVault
93d99f3712
Fix use-after-free
2016-12-02 18:57:10 -05:00
Drew DeVault
d2d6fcd1ff
Fix clang issues
2016-12-02 18:38:31 -05:00
Drew DeVault
8577095db7
Check for CAP_SYS_PTRACE
2016-12-02 18:37:01 -05:00
Drew DeVault
d353da248b
Add ipc connection feature policy controls
2016-12-02 18:09:19 -05:00
Drew DeVault
62dad7148f
Enforce IPC security policy
2016-12-02 17:55:03 -05:00
Drew DeVault
c8dc4925d1
Add IPC security policy command handlers
2016-12-02 17:34:26 -05:00
Drew DeVault
e9e1a6a409
Add IPC policy to config
...
Also reduces enum abuse, cc @minus7
2016-12-02 16:08:45 -05:00
Drew DeVault
0a1b211e09
Drop -Denable-binding-event
2016-12-02 16:01:33 -05:00
Drew DeVault
25a4a85a59
Run config files through sed and install to /etc
2016-12-02 15:56:36 -05:00
Drew DeVault
751e6d2ab2
Clarify lock permission consequences
2016-12-02 10:34:17 -05:00
Drew DeVault
0c8dc0e6df
Clarify that executable has to be a full path
2016-12-02 10:32:08 -05:00
Drew DeVault
c61746a15b
Soften up environment security
...
So no one gets their feewings hurt
2016-12-02 10:29:50 -05:00
Drew DeVault
a4e92ad272
Deal with LD_LIBRARY_PATH
2016-12-02 10:23:30 -05:00
Drew DeVault
1a143e601b
Clarify when keyboard/mouse features work
2016-12-02 10:17:53 -05:00
Drew DeVault
4d312f753c
Add docs on what features sway programs require
2016-12-02 10:13:06 -05:00
Drew DeVault
3dbeb9c35c
Add sway-security(7)
2016-12-02 10:05:43 -05:00
Drew DeVault
10c2125040
Unset LD_PRELOAD on startup (before dropping root)
...
LD_PRELOAD enables keyloggers to easily be made. This solution isn't
perfect - really a secure system wouldn't have LD_PRELOAD at all. It was
a stupid idea in the first place.
2016-12-02 08:47:47 -05:00
Drew DeVault
04fc10feeb
Flesh out security_sanity_check
2016-12-02 08:42:26 -05:00