Commit graph

309 commits

Author SHA1 Message Date
Ryan Dwyer e67f354333 Implement borders
Implements rendering of borders. Title text is still to do.

Implements the following configuration directives:

* client.focused
* client.focused_inactive
* client.unfocused
* client.urgent
* border
* default_border
2018-04-30 21:24:13 +10:00
Tony Crisci e677c5b204 rename seat functions 2018-04-02 08:45:37 -04:00
Drew DeVault 9b38ef950f Implement focus_follows_mouse
Also contains two other small changes:

- Clicking any button will focus the container clicked (not just left)
- Remove seamless_mouse (doesn't make sense on wlroots)
2018-03-31 13:05:45 -04:00
Drew DeVault 18173fb5ad Free bar configs on reload and exit 2018-03-31 00:35:06 -04:00
Drew DeVault f26ecd9f58 Merge remote-tracking branch 'origin/wlroots' into swaybar-layers 2018-03-30 00:04:04 -04:00
Tony Crisci dc8c9fbeb6 Revert "Merge pull request #1653 from swaywm/revert-1647-refactor-tree"
This reverts commit 472e81f35d, reversing
changes made to 6b7841b11f.
2018-03-29 23:41:33 -04:00
Drew DeVault d0c7f66e95
Revert "Refactor tree" 2018-03-29 23:29:29 -04:00
Drew DeVault 569b2bfd5d Move bar config into its own file 2018-03-29 22:11:08 -04:00
Drew DeVault bf7a4cd0eb Add bar configuration commands 2018-03-29 22:11:08 -04:00
Drew DeVault 6836074fed Implement enough IPC for swaybar to work 2018-03-29 22:11:08 -04:00
Tony Crisci 874f009866 move tree includes to their own directory 2018-03-29 14:21:42 -04:00
Drew DeVault b28602aa74 Implement workspaces 2018-01-30 23:09:21 -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 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 9f54cd8935 copy config references for input and seat 2018-01-17 09:49:02 -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
Tony Crisci ba69f06695 binding config 2017-12-27 12:31:06 -05:00
Tony Crisci f4a5a0ead4 put seat and input config in their own files 2017-12-16 11:25:59 -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
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
Tony Crisci 462a451328 input config 2017-12-11 07:55:01 -05:00
emersion 9aeda82477
Add include command 2017-12-05 18:47:57 +01:00
emersion 90f7f1a0e6
Add minimal config subsystem 2017-12-05 10:40:55 +01: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 7eafcc75f6 Initialize outputs from backend and add to tree 2017-11-11 11:58:43 -05:00
David Hurst ee15068a8f Add scale to merge_output_config 2017-10-14 17:50:31 -07:00
lbonn e7df811f10 Security config: skip hidden files
Also: fix a small memory leak
2017-10-06 16:23:59 +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
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
Drew DeVault 51143a75af Implement no_focus
Ref #2
2017-04-26 15:29:42 -04:00
Tomáš Čech 974be01e83
explicitly ignore unused return value
fixes issue#1182
2017-04-19 10:16:24 +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
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
Jaanus Torp 8306b886e9 Allow also 444 for security file mode 2017-03-16 15:12:22 +00: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
Drew DeVault 126ce571da Read configs from /etc/sway/security.d/* 2017-02-20 07:51:31 -05:00
Drew DeVault b10721b89e Add initial support code for new IPC security 2017-02-20 06:11:56 -05:00
Drew DeVault 7c636da8a3 Fix format error 2017-01-08 11:07:45 -05:00
Drew DeVault 36e48fcf8d Update default swaybar command
Fixes #988
2016-12-23 11:21:18 -05:00
Drew DeVault 1172566d4e Change how security config is loaded 2016-12-17 15:21:57 -05:00
Drew DeVault 10c8b73075 Handle calloc 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 4c6c65e70c Handle malloc failures from read_line 2016-12-15 19:01:40 -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 f23880b1fd Add support for command policies in config file 2016-12-02 08:10:03 -05:00
Drew DeVault 44cc0ef125 Add config related code and initial headers 2016-12-01 19:38:36 -05: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 39ee0ec552 use urgent_ws color in swaybar if binding_mode is undefined 2016-11-02 18:58:33 +01: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
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
Drew DeVault 416417a54c Reorganize includes 2016-09-01 08:18:37 -04:00
James Murphy 8af49eb696 Avoid dereferencing null configuration
Fixes: https://github.com/SirCmpwn/sway/issues/865
2016-08-20 16:24:08 +00: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
minus b246799548 fixed uninitialized bar.wrap_scroll 2016-08-02 22:02:39 +02:00
Drew DeVault 11e7ca044c Update hidpi support to latest wlc API 2016-07-28 14:36:49 -04:00
Drew DeVault 6ea02f3064 Initial pass on HiDPI support 2016-07-28 14:36:49 -04:00
minus 50b09937b2 clean up apply_input_config 2016-07-18 20:12:49 +02:00
Drew DeVault 6d971af5c3 Turn swaybg into a shell surface 2016-07-17 11:55:05 -04:00
Zandr Martin 9ecb43ea3b
couple small fixes 2016-06-11 15:29:04 -05:00
Zandr Martin 2298143d09
cleanup + add timeouts for pid_workspace list 2016-06-11 12:43:34 -05:00
Zandr Martin 66caee645c Merge branch 'master' into assign-command 2016-06-11 09:33:24 -05:00
thuck 3710cd6963 Fix segfault when using include with *
This should fix the issue #681
2016-06-06 22:20:27 +02:00
Zandr Martin 0f1859ed25 messy, unfinished version 2016-06-06 06:58:53 -05:00
Denis Doria b692a6d31a Initial implementation for floating_maximum_size 2016-06-02 17:35:02 +02:00
Denis Doria 009eaccd42 Clean up not used variables 2016-06-01 14:44:02 +02:00
Denis Doria 0ad7857f90 Included option floating_minimum_size
Values cannot be negative or 0; if so uses the default 75x50.
Uses the same syntax as i3: floating_minimum_size <width> x <height>, although the x can be anything.
2016-06-01 13:37:50 +02:00
Denis Doria f1d5b89d3e Initial work for floating view with sane values 2016-05-31 14:59:33 +02:00
Mykyta Holubakha e73dde3b10 Support floating_scroll sideways 2016-05-14 23:42:02 +03:00
Mykyta Holubakha 0c495eecde Remove FSB_GAPS_INNER and FSB_GAPS_OUTER 2016-05-08 17:17:35 +03:00
Mykyta Holubakha 0423c41a0f Implemented configurable floating scroll behavior 2016-05-07 20:49:51 +03:00
Daniel Lockyer b41097c085 sway/config.c: fix double free issue as we need to store path in list 2016-05-05 23:50:12 +01:00
Jasen Borisov de007c9b58 Add input cmd for setting pointer accel profile. 2016-05-01 11:02:44 +01:00
Daniel Lockyer 682efbb7dd sway/config.c: Initialise struct value 2016-04-30 01:12:41 +01:00
Daniel Lockyer e1fa51a152 sway/config.c: Move the wordfree call before the if statement so it is always called 2016-04-29 18:36:29 +01:00
Daniel Lockyer 06986e58b8 sway/config.c: Change to the useful free_cmd_results helper method 2016-04-29 18:31:21 +01:00
Daniel Lockyer 01c2b5f2d6 sway/config.c: move free call to after sway_log 2016-04-29 18:27:49 +01:00
Daniel Lockyer b8722ecd5f sway/config.c: Leading on from cdf017c, we need to free path 2016-04-29 18:09:56 +01:00
Daniel Lockyer e077ebdc72 sway/config.c: res->input is a malloc'ed section which wasn't freed 2016-04-29 18:08:28 +01:00
Daniel Lockyer cdf017ceea sway/config.c: wordexp has a corresponding wordfree which was never used
I had to change the assignment to path to be wrapped by strdup as we
pass the data out of the method.
2016-04-29 18:07:38 +01:00
Daniel Lockyer c225bcacee sway/config.c: config_home is the result of a malloc but was never freed 2016-04-29 18:06:21 +01:00
Mykyta Holubakha 0f1cfdec61 Renamed to pango_markup 2016-04-24 20:35:21 +03:00
Mykyta Holubakha 53b53dd8c2 Added plaintext markup configuration 2016-04-24 19:57:35 +03:00
Mikkel Oscar Lyderik 7be476c115 Add cmds new_window and new_float
Makes it possible to set default layout style for new windows and new
floating windows.

Close #556
2016-03-31 12:42:20 +02:00