Tony Crisci
5b219a1598
separate config directives and commands
2018-02-24 13:20:34 -05:00
Tony Crisci
ac8269d536
take seat param for handle_command and rename
2018-02-24 12:50:24 -05:00
Tony Crisci
66d1e0b313
basic layout command
2018-02-22 18:37:14 -05:00
Tony Crisci
bcb870bcf2
bug: fix crash on focus up
2018-02-20 19:47:48 -05:00
Tony Crisci
23e9f5dc35
use wl_container_of() in output destroy callback
2018-02-20 19:21:32 -05:00
Tony Crisci
4b3aa59b8b
rename new_input listener on input-manager
2018-02-20 19:09:38 -05:00
Tony Crisci
316effd7b1
make handle_output_destroy() static
2018-02-20 19:06:56 -05:00
Tony Crisci
4c4cc9c999
remove old comments
2018-02-20 19:04:03 -05:00
Tony Crisci
b88f06e70a
bugfix: get right layout box for rendering views
2018-02-19 17:55:16 -05:00
Tony Crisci
176d24f02d
choose adjacent container between outputs
2018-02-17 19:03:21 -05:00
Tony Crisci
fb37e80225
basic move focus in direction across outputs
2018-02-17 18:33:02 -05:00
Tony Crisci
80927985fb
fix output rendering issue
2018-02-17 16:30:32 -05:00
Tony Crisci
7c089442c3
use box projection function
2018-02-17 15:18:21 -05:00
Tony Crisci
9510a20fcd
arrange windows after output add
2018-02-17 13:32:04 -05:00
Tony Crisci
a3ae67af4e
basic focus in direction
2018-02-14 17:12:21 -05:00
Tony Crisci
52670c636c
basic focus (without direction)
2018-02-14 16:47:23 -05:00
Tony Crisci
780d9fe1e3
cleanup layout.c
2018-02-14 15:23:56 -05:00
Tony Crisci
083e11ac7c
fix build for latest api
2018-02-14 15:08:10 -05:00
Tony Crisci
c6cb87be19
output damage fix
2018-02-14 14:55:38 -05:00
Tony Crisci
7dfbf06de9
output destroy
2018-02-14 14:51:51 -05:00
Tony Crisci
06c71f115b
input device destroy
2018-02-14 14:47:59 -05:00
Tony Crisci
946d9459c5
get swayc in direction
2018-02-14 14:30:27 -05:00
Tony Crisci
93084c9cf8
remove old focus member
2018-02-10 19:53:50 -05:00
Tony Crisci
ce3a1b3922
properly pick next focus
2018-02-10 18:19:53 -05:00
Tony Crisci
145b4fdf58
use bfs iterator to collect focus stack
2018-02-10 16:52:45 -05:00
Tony Crisci
095ddb1561
fix build for output damage
2018-02-10 16:13:08 -05:00
Tony Crisci
a7d49da239
separate seat get focus and seat get focus inactive
2018-02-07 18:17:57 -05:00
Tony Crisci
7d8f2c52aa
make index_child static
2018-02-06 18:54:10 -05:00
Tony Crisci
5151502298
basic focus overhaul
2018-02-04 14:08:54 -05:00
Drew DeVault
b28602aa74
Implement workspaces
2018-01-30 23:09:21 -05:00
Drew DeVault
a686fb07ae
Execute pending commands when Xwayland is ready
2018-01-30 20:01:49 -05:00
Dominique Martinet
6259831d31
commands/reload: remove unimplemented 'load_swaybars' call
2018-01-22 07:26:40 +01:00
Dominique Martinet
5766f426aa
config reload: destroy old seat when removed from config
...
This adds new sway_seat_destroy and sway_cursor_destroy helpers
and compare new and old config on free
2018-01-22 07:26:37 +01:00
Dominique Martinet
869be4378d
commands: add 'reload' command
2018-01-22 07:25:23 +01:00
emersion
0c58673c6a
Merge pull request #1574 from acrisci/config-refactor
...
Command criteria
2018-01-22 01:16:23 +01:00
Tony Crisci
beb3805cf0
dont allow kill command in config
2018-01-21 19:13:11 -05:00
Tony Crisci
38a1628a76
clear handler context before ipc command
2018-01-21 14:21:32 -05:00
Tony Crisci
c3fc0d446f
cmd-kill: use sway_assert when no container
2018-01-21 14:15:10 -05:00
Tony Crisci
5505d84ac2
criteria cleanup
2018-01-21 14:11:41 -05:00
Drew DeVault
a6bc46eea9
Remove sway/old/
2018-01-21 12:21:57 -05:00
Drew DeVault
c933781fac
Merge pull request #1570 from acrisci/config-references
...
Copy input config references
2018-01-21 11:17:07 -05:00
Tony Crisci
6b03b1205d
implement property criteria
2018-01-21 09:17:51 -05:00
Tony Crisci
0e3eae4baa
view interface
2018-01-21 09:09:53 -05:00
Tony Crisci
1156523ccf
run all commands with focused container context
2018-01-21 08:46:31 -05:00
Tony Crisci
6a1d71b8b8
basic command criteria
2018-01-20 16:21:45 -05:00
Tony Crisci
c353e01c85
add kill command
2018-01-20 14:10:11 -05:00
Tony Crisci
cc3c713889
seat config handler context
2018-01-20 11:44:34 -05:00
Tony Crisci
9e0595f26b
input config handler context
2018-01-20 11:34:57 -05:00
Tony Crisci
2bf76509f8
update for new wlr-keyboard modifiers
2018-01-17 11:47:27 -05:00
Tony Crisci
9f54cd8935
copy config references for input and seat
2018-01-17 09:49:02 -05:00
Tony Crisci
ddc49ede46
xwm handle map and unmap
2018-01-15 09:38:05 -05:00
Tony Crisci
83ddd2d9db
render override redirect
2018-01-14 13:19:21 -05:00
Tony Crisci
2ce1d8d6cd
render wl-shell and xwayland views
2018-01-14 11:47:48 -05:00
Tony Crisci
619254db76
subsurface input
2018-01-14 10:50:20 -05:00
Tony Crisci
76ce629198
xdg-popups
2018-01-14 10:47:19 -05:00
Tony Crisci
4c8c9b29e4
render xdg surface
2018-01-14 10:35:56 -05:00
Dominique Martinet
67985e9031
sway: change all sway_log to wlr_log
2018-01-05 23:39:46 +01:00
Dominique Martinet
c83900593d
config: add 'set' command
2018-01-05 15:36:20 +01:00
Dominique Martinet
19ddb70a32
fixup free config use free_sway_binding
2018-01-05 00:07:34 +01:00
Dominique Martinet
9a326be7f8
config: leak sanitizer pass
...
Add free for everything that's implemented right now.
Will need to add more as the implementations are re-added.
2018-01-05 00:07:34 +01:00
Dominique Martinet
f5b33cb4b6
fix typos in comments/messages; add shutting down message
2018-01-05 00:07:34 +01:00
Dominique Martinet
28b8ea9f1e
cmd_input: cleanup around current_input_config
...
- Restore old one if we weren't part of a block (should be NULL anyway)
- Check current_input_config got properly allocated
- free temporary current_input_config when done using it
2018-01-05 00:07:34 +01:00
Dominique Martinet
afca73b6fc
apply_input_config: restore previous current_input_config
...
This is important for freeing the proper one at end of block
2018-01-05 00:07:34 +01:00
Drew DeVault
91313d3847
Merge pull request #1539 from acrisci/bindings
...
Bindings
2018-01-04 09:47:36 -05:00
Drew DeVault
bc7011db3c
Merge pull request #1543 from emersion/output-config-by-identifier
...
Allow to configure outputs by their identifier
2018-01-04 09:47:04 -05:00
Tony Crisci
b01a53abfb
Merge branch 'wlroots' into bindings
2018-01-04 08:00:22 -05:00
Tony Crisci
8b4eb5d7d1
cleanup bindings
2018-01-04 07:54:14 -05:00
Tony Crisci
50e791cadb
binding release
2018-01-04 07:25:52 -05:00
Calvin Lee
7196f59db0
Consolidate WLR and Sway logging
...
See #1390
2017-12-31 14:32:28 -07:00
emersion
ead3f1e676
Allow to configure outputs by their identifier
2017-12-29 19:04:16 +01:00
Tony Crisci
bd3ca70e3d
fix nitpicks
2017-12-29 09:11:15 -05:00
Tony Crisci
62b7ab3959
overwrite old bindings
2017-12-28 18:50:22 -05:00
Tony Crisci
0b8481f41a
fix keyboard_execute_bindcode
2017-12-28 16:52:12 -05:00
Tony Crisci
8d567cd062
bindcode
2017-12-28 16:24:23 -05:00
Tony Crisci
27cd633b40
run compositor bindings last
2017-12-27 19:07:17 -05:00
Tony Crisci
ccaedf5b15
run binding command
2017-12-27 15:25:16 -05:00
emersion
21c61f1c09
Refactor output command, add output enable
2017-12-27 21:23:30 +01:00
Tony Crisci
d941246d58
match user bindsym
2017-12-27 15:17:01 -05:00
Tony Crisci
daad222337
compositor bindings
2017-12-27 13:31:31 -05:00
Tony Crisci
eea80e7276
keyboard translate keysyms
2017-12-27 13:20:28 -05:00
Tony Crisci
ba69f06695
binding config
2017-12-27 12:31:06 -05:00
Drew DeVault
e1c5adc918
Merge pull request #1535 from martinetd/libinput
...
Libinput config
2017-12-27 08:04:06 -08:00
Tony Crisci
2f7e435c6f
desktop: use wlr-surface commit
2017-12-27 10:10:13 -05:00
Dominique Martinet
f3d8df45fc
seat_configure_pointer: apply libinput config
...
Restore the code that used to be in config.c:apply_input_config() pre-wlroots
2017-12-24 20:54:48 +01:00
Tony Crisci
63f7fb9517
cleanup
2017-12-20 06:12:08 -05:00
Tony Crisci
f35575f71d
handle keymap not found
2017-12-19 05:36:17 -05:00
Tony Crisci
39e7871a85
dont set cursor image on motion
2017-12-19 05:28:06 -05:00
Tony Crisci
5c036a3eac
error on not enough input/seat args for cmd
2017-12-19 05:26:55 -05:00
Tony Crisci
730af5e721
use snprintf to get identifier len
2017-12-19 04:57:42 -05:00
Tony Crisci
9df4a2c7a8
document fallback seat
2017-12-19 04:52:03 -05:00
Tony Crisci
f2985000f3
ipc get_inputs
2017-12-18 14:27:38 -05:00
Tony Crisci
a949d7de5a
Merge branch 'wlroots' into feature/input
2017-12-18 11:01:11 -05:00
Tony Crisci
a87960711a
Merge branch 'feature/input' of github.com:acrisci/sway into feature/input
2017-12-18 10:45:04 -05:00
Tony Crisci
4c436a1a6f
remove assumption of one device per identifier
2017-12-18 10:44:51 -05:00
Tony Crisci
483ede0146
improve xkb command logging
2017-12-18 10:44:25 -05:00
Drew DeVault
eb4f66f785
Merge pull request #1526 from emersion/fractional-output-scale
...
Add support for fractional output scale
2017-12-18 09:21:30 -05:00
emersion
c815d6d1a9
Add support for fractional output scale
2017-12-18 14:13:07 +01:00
emersion
4e2ab53119
Add IPC get_outputs
2017-12-18 14:06:03 +01:00
Tony Crisci
41e71d950a
remove verbose commit logging
2017-12-18 07:13:02 -05:00
Drew DeVault
b0291d126f
Fix compile error
2017-12-17 21:00:17 -05:00
Tony Crisci
a27736adcd
cleanup input-manager
2017-12-17 10:44:53 -05:00
Tony Crisci
88bcd43ebf
seat fallback config
2017-12-17 10:39:22 -05:00
Tony Crisci
e27eff8a29
send keyboard enter on keyboard configuration
2017-12-17 08:30:20 -05:00
Tony Crisci
c41801b75e
set keyboard config at runtime
2017-12-16 20:06:58 -05:00
Tony Crisci
0256cd1473
fix keyboard hotplugging
2017-12-16 19:16:00 -05:00
Tony Crisci
9e4fc7253e
get device id correctly
2017-12-16 14:03:58 -05:00
Tony Crisci
b0ed1ad28d
device add/remove logging
2017-12-16 13:16:58 -05:00
Tony Crisci
24e2406429
strip whitespace for device id
2017-12-16 13:00:31 -05:00
Tony Crisci
b8261ab24b
expect exactly one xkb arg
2017-12-16 12:40:58 -05:00
Tony Crisci
f16aa3c0ad
rename config apply cmds
2017-12-16 12:14:24 -05:00
Tony Crisci
f4a5a0ead4
put seat and input config in their own files
2017-12-16 11:25:59 -05:00
Tony Crisci
2624f55f8d
input and seat command docs
2017-12-16 08:19:33 -05:00
Tony Crisci
b3a0309f26
fix logging issue for new wlroots
2017-12-16 07:39:22 -05:00
Tony Crisci
9fa70ce426
Merge branch 'wlroots' into feature/input
2017-12-16 07:33:23 -05:00
Tony Crisci
030fcb64da
keyboard cleanup
2017-12-16 07:21:21 -05:00
Tony Crisci
9eecbb5d8a
xkb config
2017-12-15 05:22:51 -05:00
Tony Crisci
92fef27eaa
basic configuration
2017-12-14 11:11:56 -05:00
emersion
cba592b3d2
Use strtol instead of atoi in output command
2017-12-14 02:23:33 +01:00
emersion
9254c5a93f
Fail if unknown output subcommand
2017-12-14 00:50:01 +01:00
emersion
4d389f8b65
Replace refresh_rate and position by mode in output command
2017-12-14 00:45:47 +01:00
emersion
ec2fd6e5c0
Handle output remove
2017-12-13 21:47:37 +01:00
emersion
a4619e98c4
Update output containers on output layout change
2017-12-13 15:52:18 +01:00
emersion
d293c42942
Update output container box in event handler
2017-12-12 21:09:51 +01:00
emersion
c7abb77f22
Listen to output layout change
2017-12-12 20:02:01 +01:00
emersion
f3d880b0ec
Add scale and transform events to sway_output
2017-12-12 19:40:17 +01:00
Tony Crisci
c173d30b92
seat configuration
2017-12-12 10:55:20 -05:00
Tony Crisci
538903bc5a
config cleanup
2017-12-12 09:03:58 -05:00
Tony Crisci
163edc5a90
sway input device
2017-12-12 08:29:37 -05:00
emersion
475a0132a9
Use custom modes when output has no mode
2017-12-11 21:47:40 +01:00
Tony Crisci
462a451328
input config
2017-12-11 07:55:01 -05:00
Tony Crisci
9ae906cd37
sway pointer
2017-12-10 16:57:38 -05:00
Tony Crisci
4d449743c5
keyboard remove
2017-12-10 15:37:17 -05:00
Tony Crisci
5e9ee32d63
set focus on new window
2017-12-10 15:13:27 -05:00
Tony Crisci
609f63934a
basic keyboard
2017-12-10 15:01:09 -05:00
Tony Crisci
6339c4f161
remove pointer device
2017-12-10 13:28:04 -05:00
Tony Crisci
21626e8153
seat focus on button press
2017-12-10 11:11:47 -05:00
Tony Crisci
0fdecb4d3a
Merge branch 'wlroots' into feature/input
2017-12-10 10:25:56 -05:00
Tony Crisci
5f644d78fc
button and axis events
2017-12-10 10:08:16 -05:00
Tony Crisci
e69b052a6d
working pointer motion
2017-12-10 08:48:44 -05:00
Tony Crisci
9333a7eb53
working xcursor
2017-12-09 14:06:00 -05:00
Tony Crisci
7c67bea942
sway xcursor manager
2017-12-09 11:51:28 -05:00
emersion
4a14aa9ad9
Remove output from layout
2017-12-09 15:48:52 +01:00
Tony Crisci
d76e745b73
input include directory
2017-12-08 08:07:47 -05:00
Tony Crisci
ec7fc42a00
sway cursor
2017-12-08 08:04:03 -05:00
Tony Crisci
f6f63f60d6
basic input manager and seat
2017-12-07 09:58:32 -05:00
Tony Crisci
21ce20885a
rename input to input-manager
2017-12-07 07:35:10 -05:00
emersion
8764dc26c6
Add new_output_config, update root container size on output hotplug
2017-12-06 19:45:43 +01:00
emersion
41dd291612
Use wlr_output_layout_get_box
2017-12-06 19:23:43 +01:00
emersion
7c5d8c553c
Simplify free calls, use wlr_output_set_scale
2017-12-06 19:16:12 +01:00
emersion
c25ad5e7c4
Merge branch 'wlroots' into output-config
2017-12-06 19:11:46 +01:00
Drew DeVault
ab36a5a4d7
Merge pull request #1501 from emersion/command-include
...
Add include command
2017-12-06 12:10:24 -05:00
Tony Crisci
338a0399f8
input skeleton
2017-12-06 08:28:46 -05:00
Tony Crisci
47f268d8fa
view activate
2017-12-06 07:34:33 -05:00
emersion
68ae989cee
Init, merge output config params, use wlr_output_layout
2017-12-06 12:57:13 +01:00
emersion
aaae59026f
Add output config
2017-12-06 12:36:06 +01:00
emersion
9aeda82477
Add include command
2017-12-05 18:47:57 +01:00
Drew DeVault
3fe64482bb
Merge pull request #1498 from emersion/config
...
Add minimal config subsystem
2017-12-05 12:35:51 -05:00
Tony Crisci
8bdf3b1b02
view set position
2017-12-05 11:02:31 -05:00
emersion
90f7f1a0e6
Add minimal config subsystem
2017-12-05 10:40:55 +01:00
emersion
514c819ff9
Add exec and exec_always commands
2017-12-04 22:43:49 +01:00
Tony Crisci
0896b68675
Merge branch 'wlroots' into feature/xwayland
2017-12-04 07:32:25 -05:00
Tony Crisci
1870f116ba
xwayland shell
2017-12-04 07:28:47 -05:00
Tony Crisci
9afcfd44c4
wl-shell: class instead of app_id
2017-12-03 17:00:17 -05:00
Tony Crisci
6a694853e5
wl-shell: dimensions to size
2017-12-03 14:23:23 -05:00
Tony Crisci
823f6ee122
Merge branch 'wlroots' into feature/wl-shell
2017-12-03 14:22:06 -05:00
Tony Crisci
8239067da4
basic wl-shell
2017-12-03 14:21:26 -05:00
Tony Crisci
802e7392f8
use "size" instead of "dimensions"
2017-12-03 11:01:44 -05:00
Tony Crisci
59db38ce17
sway wl_shell
2017-12-03 10:49:13 -05:00
Drew DeVault
b6f4120afc
Merge pull request #1489 from acrisci/feature/basic-get-tree
...
basic get_tree
2017-12-03 08:55:39 -05:00
Tony Crisci
9220225f1d
remove unused timespec_to_msec
2017-12-03 08:42:47 -05:00
Tony Crisci
421f49fe03
basic get_tree
2017-12-03 08:33:52 -05:00
Tony Crisci
7152075681
log env after ipc init
2017-12-02 07:49:23 -05:00
Drew DeVault
1cfebe827a
Merge pull request #1479 from acrisci/feature/meson-build
...
meson build
2017-12-01 08:21:01 -05:00
Tony Crisci
31e44c01b4
send callbacks with send_frame_done
2017-12-01 07:15:34 -05:00
Tony Crisci
517af37cc9
remove relevant CMakeLists.txt
2017-11-30 11:54:01 -05:00
Tony Crisci
2f3633433e
add meson install files
2017-11-30 08:31:13 -05:00
Tony Crisci
cc310cffb0
meson: common static library
2017-11-30 06:25:13 -05:00
Tony Crisci
88cc7e3178
use meson subdirectories
2017-11-30 03:39:27 -05:00
Drew DeVault
974d510585
Merge pull request #1477 from acrisci/bug/set-mode
...
set mode on output
2017-11-28 08:46:50 -05:00
Tony Crisci
9696f50eba
remove nvidia support claim
2017-11-28 05:40:00 -05:00
Tony Crisci
6993a76232
set mode on output
2017-11-28 04:46:22 -05:00
Drew DeVault
8caabe59c2
Handle view destruction properly
2017-11-25 16:30:15 -05:00
Drew DeVault
a57d462926
Fix rendering issues, wire up some xdg listeners
2017-11-25 15:49:10 -05:00
Drew DeVault
ce1936bc65
Arrange windows on desktop
2017-11-25 11:19:25 -05:00
Drew DeVault
b379b40071
Invoke command handlers once parsed
2017-11-22 21:39:35 -05:00
Drew DeVault
7753a0ec75
Wire up IPC server
2017-11-22 21:37:07 -05:00
Drew DeVault
d7d21bb0f8
Add initial command subsystem (untested)
...
Need to spin up the IPC server to test this
2017-11-22 21:20:41 -05:00
Drew DeVault
4ca1e77fdb
Add views to tree and render them
2017-11-22 21:06:08 -05:00
Drew DeVault
aeda2e077f
Add workspace to outputs
2017-11-22 20:39:50 -05:00
Dominique Martinet
6c1cd82e32
xdg_shell_v6: add _POSIX_C_SOURCE define for struct timespec
...
wlroots 1e0e73 added struct timespec to wlr_seat.h, so we need to
define a _POSIX_C_SOURCE large enough whenever we include wlr_seat.h
2017-11-23 00:19:11 +01:00
Dominique Martinet
b8f8de27b8
wlr_data_device header update
...
wlroots 6a7560 renamed the header file
2017-11-23 00:19:11 +01:00
Drew DeVault
db4fb1c85c
Add outputs to the tree
2017-11-19 17:04:28 -05:00
Drew DeVault
733993a651
Move everything to sway/old/
2017-11-18 11:22:02 -05:00
Drew DeVault
0c8491f7d0
Initial (awful) pass on xdg shell support
2017-11-11 18:06:50 -05:00
Drew DeVault
1efd5f819f
Wire up output frame loop
2017-11-11 14:41:18 -05:00
Drew DeVault
7eafcc75f6
Initialize outputs from backend and add to tree
2017-11-11 11:58:43 -05:00
Drew DeVault
0ba6554c4f
Move sway's internal tree code to sway/tree/
2017-11-11 11:00:18 -05:00
Drew DeVault
0f45fad18c
Establish sway input submodule
2017-11-11 09:09:17 -05:00
Drew DeVault
7c448b4081
Fire up the wlroots backend and run the event loop
2017-11-11 09:08:50 -05:00
Drew DeVault
6edc32848f
Find and link to wlroots
2017-11-11 09:08:50 -05:00
Dan Robertson
88d042ec49
nvidia: Validate the nvidia_drm module options
...
When the proprietary nvidia driver is used, ensure the modeset option is
set instead of checking /proc/cmdline for nvidia-drm.modeset=1.
2017-10-24 22:35:31 +00:00
Mykyta Holubakha
22906f7fce
handlers: preserve parent pointer value
2017-10-17 23:45:57 +03:00
Drew DeVault
b16dbf6d64
Fix crash closing fullscreen windows in container
2017-10-16 21:07:55 -04:00
David Hurst
ee15068a8f
Add scale to merge_output_config
2017-10-14 17:50:31 -07:00
Drew DeVault
2216e830be
Merge pull request #1398 from johalun/freebsd-fix
...
Fix build on FreeBSD adjusting/removing _XOPEN_SOURCE declaration.
2017-10-14 16:32:50 -04:00
madblobfish
93fe8ae705
Various manpage edits
...
Fix some spelling mistakes, missing punctuation and made some paragraphs more clear.
2017-10-14 21:41:49 +02:00
Johannes Lundberg
5a63f0f57b
Fix build on FreeBSD adjusting/removing _XOPEN_SOURCE declaration.
2017-10-14 20:38:33 +02:00
David Zero
03f8a8ae05
Update man 5 page
...
Changes 'orientation' to 'default_orientation' to match commands.c
2017-10-13 18:53:03 -07:00
Drew DeVault
a82aa2a20d
Fix use-after free introduced by cbe7364
2017-10-09 12:04:06 -04:00
Drew DeVault
6271abd644
Fix #1291
2017-10-08 11:26:45 -04:00
Drew DeVault
eb7b920303
Document new criteria
...
Via #1387
2017-10-08 11:09:24 -04:00
Drew DeVault
a6d5cad309
Document swaylock -f, scratchpad show
2017-10-08 11:09:24 -04:00
Drew DeVault
6d83a59b46
Merge pull request #1263 from nyorain/master
...
Implement get_clipboard ipc message
2017-10-08 11:05:54 -04:00
Drew DeVault
5ecedc7199
Remove destroyed views from scratchpad
...
Fixes #1363
2017-10-08 10:57:41 -04:00
Drew DeVault
46e5aeac50
Fix crash on swaygrab with scratchpad populated
...
Fixes #1217
2017-10-08 10:48:33 -04:00
lbonn
61005c3bda
ipc/window-event: fill "container" on close events
...
Also use the recursive description to include children as well
Careful: send the event before deleting the parent
2017-10-08 11:54:46 +02:00
lbonn
b2d4caf6c3
commands: fail when criteria match nothing
...
For whatever command, this probably was not intended by the user
2017-10-08 11:54:46 +02:00
lbonn
514eed7e4b
commands: allow criterion values to be unquoted
...
Sometimes it doesn't really make sense to quote them (numeric values for
example)
In that case, the value is parsed until the next space or the end of the
whole criteria expression
2017-10-08 11:54:46 +02:00
lbonn
d879e5b15d
commands: implement 3 missing criteria from i3
...
* con_id
* floating
* tiling
2017-10-08 11:51:03 +02:00
lbonn
fd7c4bacbd
ipc/tree: populate focus
fields
...
Ids of children, by order of focus
2017-10-08 11:51:03 +02:00
lbonn
661625b29e
ipc/tree: output mandatory fields for all nodes
...
Still missing: focus
2017-10-08 11:51:03 +02:00
lbonn
e7df811f10
Security config: skip hidden files
...
Also: fix a small memory leak
2017-10-06 16:23:59 +02:00
lbonn
a7e1a0eea9
Make workspace_next_name
work with spaces
...
`workspace_next_name` parses workspace commands to find the default
workspace names. It handled " " as a separator, which prevents the use
of workspace names with spaces.
2017-10-06 14:37:35 +02:00
lbonn
6197fff0b4
Fix move to named workspaces
...
The command parsing did not handle workspaces with spaces in their name
(like it's done in `cmd_workspace`)
2017-10-06 14:16:24 +02:00
Drew DeVault
c850d433a7
Merge pull request #1383 from kasicka/macarena
...
Fix github links in doc
2017-10-05 23:18:39 -04:00
Zuzana Svetlikova
ef0c51b2f3
Fix github links in doc
2017-10-06 05:13:42 +02:00
Calvin Lee
419a1087ac
Clean up output command
...
Plugs memory leaks during failure of the output command and in other
circumstances and fixes `bg` option.
Fixes #1381
2017-10-05 20:46:31 -06:00
Jonas Karlsson
05aeccfca0
Fix issue #1287
...
All variables without a $ prefix lost their last character due to off by one error
2017-10-03 21:51:02 +02:00
azarus
5987f19eb2
Check for Raspberry Pi
2017-08-14 22:29:21 +02:00
Hummer12007
6f355c6ff7
Raise max ipc message size limit to 256 MB
2017-08-14 20:43:37 +03:00
Drew DeVault
3553fa0a74
One more
2017-08-09 18:42:22 -04:00
Drew DeVault
03af90d302
Clean up fallthrough issues
2017-08-09 18:34:51 -04:00
Ilya Lukyanov
1c5a96c112
Implement nonblocking IO in IPC server
...
Added client write buffer and handler for writable status on client
socket.
2017-08-08 19:23:50 +03:00
Calvin Lee
3c93e2cf1b
Prevent race condition in the kill command
...
When killing views with `close_views` a use-after-free can sometimes
occur because parent views are killed before their children. This commit
makes `container_map` run functions on child containers before their
parent, fixing the race.
Fixes #1302
2017-08-06 16:56:39 +02:00
Drew DeVault
14eeeed7e0
Remove test clipboard code
2017-07-26 19:11:57 -04:00
Scott Anderson
c29e5bbde8
Use WLC v2 pointer interface
2017-07-12 16:39:14 +12:00
nyorain
1cca551c6f
Add get_clipbard ipc errors; Adapt swaymsg
...
Also increase the get_clipboard timeout to 30 secs
2017-07-11 18:04:28 +02:00
nyorain
20888fbb5e
Close fd in clipboard request
2017-07-11 17:12:53 +02:00
nyorain
727215c907
Add timeout; Fix receive loop & style issues
2017-07-11 17:07:06 +02:00
Johannes Lundberg
a3c07273ba
Add secucity config for FreeBSD.
2017-07-11 10:56:07 +02:00
Tobias Blass
566863ba5d
fix use-after-free bug
2017-07-10 22:59:59 +02:00
nyorain
f0463dab32
Signal base64 in clipboard type; Reimplement loop
2017-07-07 23:34:58 +02:00
nyorain
1e894c1166
Handle x11 text atoms in get_clipboard ipc
2017-07-07 22:34:00 +02:00
nyorain
c0f2acce4e
Rework get_clipboard implementation
2017-07-07 21:51:34 +02:00
nyorain
42547cafb6
Fix/Simplify get_clipboard ipc-server impl
2017-07-07 15:46:17 +02:00
nyorain
02c75ebe37
Implement ipc get_clipboard
2017-07-07 15:38:45 +02:00
Drew DeVault
23a1e94402
Make asciidoc (and man pages) optional
...
And remove it from the build
2017-07-04 16:02:54 -04:00
Mykyta Holubakha
7d8a84b587
Do not add empty policies
...
Policy allocation failure is non-fatal
2017-07-01 21:36:17 +03:00
Mykyta Holubakha
4f905ecb96
permit.c: check for NULL pointer dereference
2017-07-01 21:35:53 +03:00
nyorain
60fa626116
Add the 'clipboard' command to set the clipboard
2017-07-01 18:35:42 +02:00
Drew DeVault
298f56353e
Merge branch 'master' into server-decoration
2017-06-14 18:53:40 -04:00
Drew DeVault
76fcfa1e7f
Force focus on unmanaged views during pointer test
2017-06-14 18:13:41 -04:00
Drew DeVault
d158e18308
Fix Firefox address bar thing
...
And probably some other stuff too
2017-06-14 18:09:18 -04:00
Calvin Lee
843ad38b3c
Implement Tray Icons
...
This commit implements the StatusNotifierItem protocol, and enables
swaybar to show tray icons. It also uses `xembedsniproxy` in order to
communicate with xembed applications.
The tray is completely optional, and can be disabled on compile time
with the `enable-tray` option. Or on runtime with the bar config option
`tray_output none`.
Overview of changes:
In swaybar very little is changed outside the tray subfolder except
that all events are now polled in `event_loop.c`, this creates no
functional difference.
Six bar configuration options were added, these are detailed in
sway-bar(5)
The tray subfolder is where all protocol implementation takes place and
is organised as follows:
tray/sni_watcher.c:
This file contains the StatusNotifierWatcher. It keeps track of
items and hosts and reports when they come or go.
tray/tray.c
This file contains the StatusNotifierHost. It keeps track of
sway's version of the items and represents the tray itself.
tray/sni.c
This file contains the StatusNotifierItem struct and all
communication with individual items.
tray/icon.c
This file implements the icon theme protocol. It allows for
finding icons by name, rather than by pixmap.
tray/dbus.c
This file allows for asynchronous DBus communication.
See #986 #343
2017-06-07 17:49:16 -07:00
johalun
7fef283044
FreeBSD fixes
...
Increase _POSIX_SOURCE value where needed.
Increase _XOPEN_SOURCE value where needed.
Conditionally link to libcap (only on Linux).
Possibly some trailing whitespace fixes (automatic).
2017-06-06 09:45:50 +02:00
Mykyta Holubakha
93cf21fb9a
Terminate when both suid bit and filecaps are set
2017-05-11 19:33:57 +03:00
Mykyta Holubakha
f736198c31
Initialise logging earlier
2017-05-11 19:29:25 +03:00
wdbw
264a9ee9d8
Add missing send-event mode to sway-input(5)
...
Also, fix a small typo.
2017-05-06 10:45:17 +01:00
Josip Janzic
400998d6d2
Add mouse button bindings
...
Adds support for bindings like:
bindsym button3 floating toggle
bindsym $mod+button3 floating toggle
2017-05-04 23:00:03 +02:00
Zandr Martin
51ce752ebf
document font command
2017-05-01 12:53:07 -04:00
Zandr Martin
f65a88e68d
prevent crash when layout auto
is missing args
2017-04-29 14:02:07 -04:00
Drew DeVault
816ceddcbd
Set child border to background if not specified
2017-04-29 10:07:18 -04:00
Drew DeVault
02812a2e4d
Support specifying fewer than 5 colors
...
This doesn't work, I'm not sure why. The color structs definitely get
changed but if you specify fewer than 5, it renders with the defaults.
2017-04-29 09:56:07 -04:00
Drew DeVault
a5c07dde6a
Implement KDE's server-side decoration protocol
2017-04-28 20:32:05 -04:00
Drew DeVault
537261f23f
Fix handling of floating windows
2017-04-26 17:14:24 -04:00
Drew DeVault
ffd0d020d6
Update sway(5)
2017-04-26 15:35:54 -04:00
Drew DeVault
51143a75af
Implement no_focus
...
Ref #2
2017-04-26 15:29:42 -04:00
Sebastian Noack
173b338567
Add -DVERSION flag for release version numbers
2017-04-26 15:56:46 +02:00
Calvin Lee
0dc7e9f514
Fix typo in sway(5)
2017-04-23 21:57:23 -06:00
Tomáš Čech
974be01e83
explicitly ignore unused return value
...
fixes issue#1182
2017-04-19 10:16:24 +02:00
Drew DeVault
94ad169eb6
Merge pull request #1181 from wasamasa/bugfix-initial-scratchpad-size
...
Use i3's dimensions for initial scratchpad views
2017-04-18 17:57:07 -04:00
Drew DeVault
35603b2341
Merge pull request #1178 from 4e554c4c/fork
...
Prevent sway from duplicating on a failed fork
2017-04-18 17:49:23 -04:00
Vasilij Schneidermann
0f31323659
Use i3's dimensions for initial scratchpad views
...
See https://github.com/i3/i3/blob/master/src/scratchpad.c#L196-L197
2017-04-18 23:47:09 +02:00
Calvin Lee
cee26500a8
Prevent sway from duplicating on a failed fork
...
Also remove a useless `sway_log` and replace it with a pipe
2017-04-18 15:25:37 -06:00
Vasilij Schneidermann
d4ac594264
Implement and document move [to] scratchpad
2017-04-18 21:41:28 +02:00
Jerzi Kaminsky
2ad8850398
Handle symlinks as IPC security targets
...
- When policies are allocated, the ipc target path goes
through symlink resolution. The result is used as
the canonical for matching pids to policies at runtime.
In particular, this matches up with the target of
the `/proc/<pid>/exe`.
- There's a possible race condition if this isn't done
correctly, read below.
Originally, validate_ipc_target() always tried to resolve
its argument for symlinks, and returned a parogram target string
if it validates. This created a possible race condition with
security implications. The problem is that get_feature_policy()
first independently resolved the policy target in order to check
whether a policy already exists. If it didn't find any, it called
alloc_feature_policy() which called validate_ipc_target() which
resolved the policy target again. In the time between the two
checks, the symlink could be altered, and a lucky attacker could
fool the program into thinking that a policy doesn't exist
for a target, and then switch the symlink to point at another file.
At the very least this could allow him to create two policies
for the same program target, and possibly to bypass security
by associating the permissions for one target with another,
or force default permissions to apply to a target for which
a more specific rule has been configured. So we don't that.
Instead, the policy target is resolved once and that result is
used for the rest of the lookup/creation process.
2017-04-16 17:09:53 +03:00
Jerzi Kaminsky
bcf9338ce7
Add validate_ipc_target()
2017-04-16 17:09:53 +03:00
Jerzi Kaminsky
bfb99235e3
Move get_feature_policy to sway/security.c
2017-04-16 17:09:53 +03:00
Jerzi Kaminsky
b4357a8eb6
Rename get_policy to get_feature_policy
2017-04-16 17:09:53 +03:00
Jerzi Kaminsky
cf5e764c7f
Disambiguate get_*_policy() and get_*_policy_mask()
2017-04-16 17:09:53 +03:00
Jerzi Kaminsky
6079e6f7e5
Fix style in sway-bar(5) manpage
2017-04-14 02:30:41 +03:00
Jerzi Kaminsky
b463fb8adc
Remain compat with libinput < 1.7.0
2017-04-14 02:30:41 +03:00
Drew DeVault
b3541d9dc5
Implement more thourough nvidia config check
2017-04-12 10:04:44 -04:00
Drew DeVault
b036ad9b54
Downgrade nvidia proprietary driver warning
2017-04-12 10:04:44 -04:00
Drew DeVault
5d3a02a7c6
Merge branch 'master' into pretty-print-swaymsg
2017-04-10 07:17:47 -04:00
Drew DeVault
7fee555a46
Merge pull request #1150 from JerziKaminsky/cmake_find_libcap
...
Add libcap check to CMake
2017-04-08 06:53:22 -04:00
Calvin Lee
154c6718c1
Add -t get_marks
and use more i3-like marks
...
In i3 every mark is unique and one mark cannot be used in more than one
window, sway behavior has been amended to match this.
`swaymsg -t get_marks` will now return an array of all marks used in sway.
See #98
2017-04-07 11:37:51 -06:00
Scott Anderson
1b2cd93212
Removed explicitly setting file descriptors to -1
2017-04-08 00:45:31 +12:00
Drew DeVault
50a31a6c88
Fix dangling file descriptors ( fixes #1152 )
2017-04-07 07:55:35 -04:00
JerziKaminsky
aa6bd85da1
Add libcap check to CMake
...
- Moved ``<sys/capability.h>`` include inside `__linux__` guard,
because all uses are similarly guarded.
- <sys/capability.h> is part of an optional devel package, at least
in fedora. CMake now explicitly checks that libcap devel files
are available.
- Added libcap to the list of install packages in .travis.yml, to
make the dependency explicit. travis-ci installs the package by
default, which is why this hasn't surfaced previously.
2017-04-07 03:14:16 +03:00
Scott Anderson
3a32be67ed
Added designated initaliser, to prevent any possible problem with
...
ordering
2017-04-07 00:34:33 +12:00
Scott Anderson
fe54a6725e
Changed regular expressions to use PCRE for i3 compatibility
2017-04-07 00:16:06 +12:00
Calvin Lee
069d37f987
Improve criteria handling
...
This commit changes how commands decide what container to act on.
Commands get the current container though `current_container`, a global
defined in sway/commands.c. If a criteria is given before a command,
then the following command will be run once for every container the
criteria matches with a reference to the matching container in
'current_container'. Commands should use this instead of
`get_focused_container()` from now on.
This commit also fixes a few (minor) mistakes made in implementing marks
such as non-escaped arrows in sway(5) and calling the "mark" command
"floating" by accident. It also cleans up `criteria.c` in a few places.
2017-04-05 22:07:23 -06:00
Calvin Lee
2445d27960
Impliment i3-style marks
...
This commit adds three commands to sway: `show_marks`, `mark` and
`unmark`. Marks are displayed right-aligned in the window border as i3
does. Marks may be found using criteria.
Fixes #1007
2017-04-03 11:48:37 -06:00
Drew DeVault
ab7570d311
Update man page
2017-04-03 07:46:11 -04:00
Drew DeVault
60ce81e06a
Add pretty printing to swaymsg
...
If stdout is a tty, it will pretty print unless -r (--raw) is given.
Sample outputs:
```
~/s/s/build > ./bin/swaymsg fullscreen toggle
Error: Permission denied for fullscreen toggle via IPC
~/s/s/build > ./bin/swaymsg -t get_workspaces
Workspace 3:三
Output: DVI-I-1
Layout: splith
Workspace 1:一 (off-screen)
Output: HDMI-A-1
Layout: splith
Workspace 5:五 (focused)
Output: HDMI-A-1
Layout: splith
~/s/s/build > ./bin/swaymsg -t get_inputs
Input device Metadot - Das Keyboard Das Keyboard
Type: Keyboard
Sway ID: 9456:320:Metadot_-_Das_Keyboard_Das_Keyb
Input device Wacom Intuos S 2 Pen
Type: Tablet tool
Sway ID: 1386:827:Wacom_Intuos_S_2
Input device Wacom Intuos S 2 Pad
Type: Tablet pad
Sway ID: 1386:827:Wacom_Intuos_S_2
Input device Logitech Gaming Mouse G502
Type: Keyboard, Mouse
Sway ID: 1133:49277:Logitech_Gaming_Mous
~/s/s/build > ./bin/swaymsg -t get_outputs
Output DVI-I-1
Geometry: 1920x1080 @ 3840,0
Scale factor: 1x
Workspace: 3:三
Output DVI-D-1
Geometry: 1920x1080 @ 0,0
Scale factor: 1x
Workspace: 4:四
Output HDMI-A-1
Geometry: 1920x1080 @ 1920,0
Scale factor: 1x
Workspace: 5:五
```
2017-04-03 07:27:25 -04:00
Jarkko Oranen
924ed6464c
Prevent "move next" and "move prev" commands from crashing
...
Fixes #1120
When the parent of a view is C_WORKSPACE and the movement direction
is either MOVE_PREV or MOVE_NEXT, the code would attempt to move the
views to the next output, but swayc_adjacent_output can't accept
non-directional movement commands and causes undefined behaviour and
a segfault.
If the code is simply skipped, we end up in an infinite loop.
Instead, we can allow containers whose parent is a C_WORKSPACE take the
path that handles MOVE_PREV and MOVE_NEXT, which behaves as you would
expect.
I'm not certain that this fix is entirely correct as the desired behaviour
of move_container is not very well defined, but it seems to work.
2017-03-19 16:58:39 +02:00
Jarkko Oranen
d7350915d9
The default layout of a workspace should follow the output
...
Hardcoding it to L_HORIZ does not make sense to me,
as you get the unexpected behaviour that windows will be
arranged horizontally until you switch the layout.
2017-03-19 16:57:05 +02:00
Zandr Martin
2d46fc5602
prevent fullscreen focus thievery
...
I believe this fixes #1102
2017-03-18 17:55:50 -04:00
Zandr Martin
baa17ec696
remove unnecessary todo item
...
As best I can tell this todo was intended to add workspace movement to
the given output with the `workspace <ws> output <op>` command, but i3
does not behave this way.
2017-03-18 17:26:59 -04:00
Jarkko Oranen
f6196b7e9a
Fix off-by-one error when checking workspace_layout arguments
2017-03-18 22:24:44 +02:00
Jaanus Torp
8306b886e9
Allow also 444 for security file mode
2017-03-16 15:12:22 +00:00
Zandr Martin
b507462d1c
Merge branch 'master' of git://github.com/SirCmpwn/sway into new-command-aliases
2017-03-13 07:35:12 -04:00
John Chen
a0711d9c94
Fix trivial typo in sway.5.txt (right_ -> _right_)
...
as title
2017-03-13 10:32:27 +08:00
Drew DeVault
9aed9d9359
UnGNUify the codebase
2017-03-10 23:41:24 -05:00
Drew DeVault
74d4f1bec9
Further indentation corrections
2017-03-10 21:41:14 -05:00
Zandr Martin
18450dd16a
deprecate new_window and new_float commands
2017-03-09 14:56:15 -05:00
Zandr Martin
8684b9ecca
fix workspace output assignment
2017-03-08 14:30:01 -05:00
Calvin Lee
d47d3d78de
Fix #1099 : Allow spaces in worspace names
...
This commit allows unquoted spaces in worspace names in order to keep
compatability with i3. The names _must not_ contain the string "output"
which is documented in 'sway.5' because how sway detects the `move
<workspace> output <output>` command. Also I documented that "number"
may be used before the worspace name without affecting how the name is
evaluated.
2017-03-01 11:35:47 -07:00
Calvin Lee
032907e9d2
Clarify move documentation for floating containers
2017-03-01 11:00:56 -07:00
Calvin Lee
b35782bcad
i3 feature support: Moving flotaing containers
...
This commit lets the 'move' command apply to floating containers as well
as tiled ones. The command may be appended with a number of pixels and
then optionally the string `px` (like '10 px') in order to move the
container more or fewer than the standard ten pixels.
2017-03-01 11:00:16 -07:00
Drew DeVault
407ebe9cd3
Move env logging to earlier than wlc_init
2017-02-23 08:32:11 -05:00
Drew DeVault
126ce571da
Read configs from /etc/sway/security.d/*
2017-02-20 07:51:31 -05:00
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
Drew DeVault
39cf9a82f7
Enforce command policies
2016-12-02 08:17:45 -05:00
Drew DeVault
f23880b1fd
Add support for command policies in config file
2016-12-02 08:10:03 -05:00
Drew DeVault
0d395681fe
Enforce mouse permissions
2016-12-01 22:11:48 -05:00
Drew DeVault
8aeeacf178
Enforce keyboard permissions
2016-12-01 22:09:33 -05:00
Drew DeVault
ffdbb9d050
Enforce fullscreen permissions
2016-12-01 22:03:36 -05:00
Drew DeVault
dc4b57c868
Shut Clang up
2016-12-01 21:58:38 -05:00
Drew DeVault
21e1b2bef3
Add security checks for background, panel, lock
2016-12-01 21:51:07 -05:00
Drew DeVault
76cab04b4d
Implement permit and reject commands
2016-12-01 21:36:43 -05:00
Drew DeVault
1a8a42f372
Memory leak
2016-12-01 20:39:35 -05:00
Drew DeVault
2675293200
Implement policy lookups
2016-12-01 19:58:11 -05:00
Drew DeVault
44cc0ef125
Add config related code and initial headers
2016-12-01 19:38:36 -05:00
Drew DeVault
5831f7ab68
Write example security config, start on code
2016-12-01 19:27:35 -05:00
D.B
05be14ff7c
change default layout toggle to L_HORIZ
...
After issuing 'layout toggle split' command from tabbed/stacked layout,
layout should have been horizontally split.
2016-11-06 08:13:24 +01:00
D.B
3d1b472b83
swap unnecessary function for strndup
2016-11-03 06:43:12 +01:00
D.B
58eb7ac19f
change bar colors from char[10] to *char
...
This commit removes has_* booleans from bar color struct. It also
generalizes of functions in commands/bar/colors.c.
2016-11-02 21:07:04 +01:00
D.B
ad4d21d60b
add bar colours for focused_(workspace|statusline|separator)
...
If these aren't defined in config, color settings without 'focused_'
prefix are used as a fallback.
2016-11-02 18:58:33 +01:00
D.B
39ee0ec552
use urgent_ws color in swaybar if binding_mode is undefined
2016-11-02 18:58:33 +01:00
Drew DeVault
d3e55f88ec
Log LD_LIBRARY_PATH
2016-10-27 11:05:04 -04:00
Drew DeVault
78b65e2317
Remove duplicate redhat-release line
2016-10-27 10:57:18 -04:00
Drew DeVault
7aef6e66ae
Log uname -a on startup
2016-10-27 10:50:22 -04:00
Drew DeVault
6ad2186f0e
Log contents of distro version files
2016-10-27 10:48:46 -04:00
Drew DeVault
0d6cbcacbe
Log important env vars on startup
2016-10-27 10:37:16 -04:00
Michał Winiarski
e8d8abfbb5
Add left_handed support for input devices
...
Some users may want to switch buttons on their input devices, turns out
libinput already supports it. Let's add a support for it in our config.
Signed-off-by: Michał Winiarski <knr@hardline.pl>
2016-10-25 22:06:23 +02:00
Mykyta Holubakha
2a24772c4b
config: set pango_markup default to false
2016-10-20 16:43:38 +03:00
Drew DeVault
67a9a94596
Overwrite alpha when drawing borders
...
This does two important things when using alpha:
1. At corners, borders don't double in opacity
2. Foreground elements (text) can be made transparent and you can see
fully through to the wallpaper
2016-10-12 22:42:23 -04:00
Drew DeVault
56a7e5fbce
Revert "Merge pull request #952 from SirCmpwn/revert-948-floating-titlebar-click"
...
This reverts commit 857eea8b63
, reversing
changes made to ce713efcd2
.
2016-10-12 21:54:19 -04:00
Drew DeVault
4cba91803e
Revert "Fixes dealing with workspace_layout and related bugs [rfc]"
2016-10-12 21:26:06 -04:00
Drew DeVault
f30f60dad8
Revert "also check floating cons in container_find"
2016-10-12 12:19:02 -04:00
Drew DeVault
ce713efcd2
Merge pull request #945 from thejan2009/workspace_layout
...
Fixes dealing with workspace_layout and related bugs [rfc]
2016-10-11 08:24:38 -04:00
D.B
166c2a3687
generalize wrapping views under workspaces
2016-10-11 09:16:59 +02:00
D.B
571321a1d8
add workspace_layout, ensure ws is always L_HORIZ
...
Add swayc_change_layout function, which changes either layout or
workspace_layout, depending on the container type. Workspace being
always L_HORIZ makes this much more i3-compatible.
2016-10-11 09:16:59 +02:00
D.B
0ddc4279d1
wrap workspace's child into a container if needed
...
If workspace has stacked/tabbed layout, its direct children should be
wrapped into a container which enables them to draw the titlebar.
2016-10-11 09:15:48 +02:00
D.B
24c3b86065
also check floating cons in container_find
2016-10-11 06:22:54 +02:00
Nicolas Cornu
5384d3effe
Can't move an empty workspace
2016-10-11 01:51:55 +02:00
Drew DeVault
8d277bc962
Merge pull request #942 from thejan2009/bugfix-931
...
fix for_window [] move scratchpad
2016-10-08 09:45:21 -04:00
Drew DeVault
0fc03f9c13
Merge pull request #941 from thejan2009/floating-border
...
Fix border color for floating containers
2016-10-08 09:45:06 -04:00
D.B
8264fedce6
fix for_window [] move scratchpad
...
- move wlc_view_set_mask before applying window criteria
- check parent_container because container in scratchpad doesn't have a
parent
2016-10-08 12:37:28 +02:00
D.B
746345e3b8
reorder cmd_handler arrays for bsearch
2016-10-08 11:12:45 +02:00
D.B
77f99480ae
draw indicator border only for non-floating
2016-10-08 09:15:34 +02:00
Nicolas Cornu
382d47e238
Fix creating of sibling floating/children
...
If we want to add a sibling of different type than current
container it failed. Because we add it to the wrong list
2016-10-07 22:29:56 +02:00
Nicolas Cornu
2d82586c88
Add constant scale factor in get_text_size
...
af44154
forget one "get_text_size" made it possible to
do a format string by setting title bar.
2016-10-07 20:38:56 +02:00
D.B
379b1a0378
add focus changing between floating containers
...
It will also wrap if needed.
2016-10-07 09:37:09 +02:00
D.B
d3f5ac8cbb
add force_focus_wrapping option
2016-10-07 08:12:14 +02:00
D.B
7f558ce894
wrap container in direction (if possible)
...
Introduces container wrapping - if there is no other viable move, the
selection wraps on the first container where such action is possible.
2016-10-07 08:12:14 +02:00
Nicolas Cornu
6ced4098dc
fix for click on title_bar
...
- Check null pointer for swayc_parent_by_type
- Split lines to follow coding style
2016-10-06 21:17:45 +02:00
Nicolas Cornu
37065cd0c4
add click on title_bar to focus a container
2016-10-06 20:23:46 +02:00
Drew DeVault
d2aba3ce3a
Merge pull request #924 from zandrmartin/fix-focus-segfault
...
prevent dereference of freed workspace
2016-10-03 08:10:29 -04:00
Zandr Martin
ba581c4442
consolidate nodes json
2016-10-02 22:21:16 -05:00
Zandr Martin
09a44263c3
Merge branch 'master' into fix-focus-segfault
2016-10-02 22:13:40 -05:00
Zandr Martin
4c0e809028
prevent dereference of freed workspace
2016-10-02 22:03:52 -05:00
Patrick Sauter
153620aefe
moved ipc_init above config file processing.
...
This is necessary because commands in the config file (mode for
instance) emit ipc events, and if ipc_init has not been called the
ipc_clients_list is not initialized, and we segfault. This fixes that
bug.
2016-10-02 17:29:40 -05:00
Zandr Martin
58ac1f7f24
fix pointer format string in sway_log() call
2016-10-01 06:40:16 -05:00
Drew DeVault
4e660975a9
Merge pull request #911 from thejan2009/setgid-setuid
...
Split setgid and setuid, add privilege check [RFC]
2016-09-27 14:28:14 -04:00
Drew DeVault
a95ce5ce65
Merge pull request #914 from zandrmartin/container-ids
...
add unique IDs to containers
2016-09-27 14:27:29 -04:00
Ryan Dwyer
64d463142f
Implement default name for workspace command
...
This implements commands such as:
workspace number 9: test
If a workspace with the given number exists then it will be focused,
otherwise a new workspace with the given name will be created.
2016-09-25 21:42:28 +10:00
Zandr Martin
7d947fdb95
add unique IDs to containers
2016-09-21 21:05:09 -05:00
D.B
5e585f9603
Split setgid and setuid, add privilege check
...
This commit deals with issue #884 . I consulted the following sources:
https://www.securecoding.cert.org/confluence/display/c/POS36-C.+Observe+correct+revocation+order+while+relinquishing+privileges
and
https://www.securecoding.cert.org/confluence/display/c/POS37-C.+Ensure+that+privilege+relinquishment+is+successful
2016-09-20 16:25:32 +02:00
Zandr Martin
0516dba3f6
implement "focused container" feature for swaygrab
2016-09-18 16:41:08 -05:00
Zandr Martin
e75217cfb1
fix get_workspaces json reply
2016-09-17 22:00:11 -05:00
Zandr Martin
87080bb9cc
take four!
2016-09-17 16:36:55 -05:00
Zandr Martin
e18b7cdfa9
add global current_focus
pointer
2016-09-17 15:54:45 -05:00
Ryan Dwyer
e4cb4d1b5c
Fix swaybar when running on named outputs.
...
When using a bar on a named output, load_swaybars() requires the
output to be active (ie. in the root container), but this is not the case if
the bar is added to the last output. To fix this, load_swaybars() is now
called after the output has been added to the root container.
After fixing that, swaybar would segfault due to using the wrong index
variable when loading outputs and config.
2016-09-17 17:25:45 +10:00
Zandr Martin
64f61873a9
document workspace_auto_back_and_forth
command
2016-09-16 21:53:46 -05:00
D.B
873dfc07f3
Use indicator border color only when needed.
...
Indicator border color is now used only when a container is the only
child. Reason for the change? i3 does it this way. Sway container
borders are now a bit more similar to i3 ones.
2016-09-10 16:11:33 +02:00
Zandr Martin
511eed90cd
squash commits, move enum into resize.c
2016-09-07 06:48:41 -05:00
Mikkel Oscar Lyderik
84d504ebdf
Make it possible to move views between outputs
...
This patch makes it possible to move views between outputs using the
`move left|right|up|down` commands.
It behaves similar to i3 with one important difference. The focus will
always follow the view being moved, unlike i3 where the focus doesn't
always follow the view to a new output (I assume that's a bug in i3).
2016-09-05 12:14:23 -04:00
Drew DeVault
af44154119
Fix constant scale factor in font code
2016-09-05 11:52:52 -04:00
Drew DeVault
0913eff915
Add support for * input configs
...
Closes #852
2016-09-05 10:18:38 -04:00
Zandr Martin
65ace5dec5
merge in latest commits
2016-09-02 14:11:48 -05:00
Zandr Martin
79ffea328c
Merge branch 'master' of git://github.com/SirCmpwn/sway into commands-refactor
2016-09-02 13:46:19 -05:00
Zandr Martin
b374c35758
refactor commands.c
2016-09-01 21:39:08 -05:00
Lukas Lihotzki
6addaca9fa
Correct hide_edge_borders
command
...
`vertical` and `horizontal` should be swapped.
If border_left and border_right were set to 0, the vertical borders
instead of the horizontal borders would be hidden.
i3 handles this command equally.
2016-09-02 01:16:03 +02:00
Drew DeVault
38ca94e0ed
Tweak how swaylock surfaces are handled
...
Fixes #875
2016-09-01 08:34:52 -04:00
Drew DeVault
416417a54c
Reorganize includes
2016-09-01 08:18:37 -04:00
Zandr Martin
a9c0993218
document orientation
command
2016-08-31 21:07:20 -05:00
Hummer12007
db1c105e77
Fix a format string
2016-08-22 18:56:49 +03:00
James Murphy
8af49eb696
Avoid dereferencing null configuration
...
Fixes: https://github.com/SirCmpwn/sway/issues/865
2016-08-20 16:24:08 +00:00
Götz Christ
aecd33d25d
Add input example section to config
...
Also improve sway-input(5) description to be more consistent with sway-bar(5).
2016-08-18 18:00:58 -05:00
Guillaume Brogi
7bbf7e15a0
Update man page
...
The man page mentioned that "indicator" wasn't implemented, this isn't
the case anymore.
2016-08-12 00:13:48 +02:00
Guillaume Brogi
6173c84117
Rerender after every split command
2016-08-12 00:12:56 +02:00
Guillaume Brogi
fc492a4da8
Add support for indicator color
2016-08-11 23:57:38 +02:00
D.B
ce98569fbc
Handle output disabling during runtime
...
Output now gets disabled if disable command is invoked via bindsym or
IPC.
2016-08-10 18:52:49 +02:00
Manuel Mendez
631ba506d6
document all xkb settings handled by wlc
2016-08-09 10:41:06 -04:00
Drew DeVault
b8642ce681
Merge pull request #843 from thejan2009/bug/move-container-819
...
Fix container move when workspace is focused
2016-08-07 12:04:08 -04:00
D.B
41b5c6d1a9
Sort workspaces when moving workspace to output
...
This should fix #839
2016-08-07 17:32:18 +02:00
D.B
61781bbef0
Fix container move when workspace is focused
...
Fixes #819 . If workspace is focused and command 'move container to
workspace/output' is issued, workspace child containers are wrapped in a
new container and moved according to command.
2016-08-07 17:07:30 +02:00
D.B
9c91952aec
Display class in tab title if app_id is null
...
This is a feature that can't work the same as i3, because there is no
real window classes in wayland. This way, we avoid null titles as much
as possible.
2016-08-07 08:37:26 +02:00