Commit graph

94 commits

Author SHA1 Message Date
Robert Kubosz 41b80c28df
add scroll button option
This commit introduces a scroll_button option, which is intended to be
used with scroll_method. Now user can edit his sway config and add an
scroll_button option to device section.
2018-07-11 22:03:06 +02:00
emersion ba3511b243 Remove clipboard command and get_clipboard message 2018-07-10 22:09:21 +01:00
Dominique Martinet fe72e3b349 cmd_results_to_json: return copied string and properly free the json
The only user of this function would copy the string right away
to get rid of the const flag anyway, and freeing a const string
afterwards might work but is not meant to be done according to the
json-c API.
2018-07-05 13:11:02 +09:00
Brian Ashworth 5ea4a4d3ee Refactor cmd_output to use config_subcommand 2018-06-03 10:26:06 -04:00
Brian Ashworth 8bfa2def88 Address first round of review for generic blocks 2018-06-02 08:07:44 -04:00
Brian Ashworth 7c810dc344 Make command block implementation generic 2018-06-02 08:07:44 -04:00
Brian Ashworth c81d0ef1e8 Support i3's legacy force_focus_wrapping command 2018-05-28 11:09:46 -04:00
Brian Ashworth 46da1dc32b Implement focus_wrapping 2018-05-27 23:20:21 -04:00
Brian Ashworth 569f4e0e4c Implement swap command 2018-05-26 11:05:02 -04:00
Ryan Dwyer 228c478e8d Implement title_format
This implements the title_format command, with a new placeholder %shell
which gets substituted with the view type (xwayland, xdg_shell_v6 or
wl_shell).

Example config:

    for_window [title=".*"] title_format %title (class=%class instance=%instance shell=%shell)
2018-05-05 22:29:37 +10:00
emersion ff61df17ff
Add map_from_region command 2018-04-26 10:53:47 +01:00
Ryan Dwyer d956286b92 Implement rename workspace command
This implements the following commands:

* rename workspace to new_name
* rename workspace old_name to new_name
* rename workspace number n to new_name
2018-04-23 18:54:45 +10:00
Ryan Dwyer 5b30391383 Make key repeat configurable
This creates two input commands for configuring the repeat delay and rate.

Example config:

    input "myidentifier" {
        repeat_delay 250
        repeat_rate 25
    }
2018-04-18 23:19:23 +10:00
Danny Bautista 1edb2bd892 Implement cursor event simulation with sway commands. 2018-04-10 12:40:50 -04:00
Drew DeVault 0e3ddf255e Add input "identifier" map_to_output "identifier" 2018-04-08 15:09:12 -04:00
Tony Crisci fc9398a42e Implement opacity command 2018-04-04 21:57:05 -04:00
Drew DeVault 69eb021767 Add default_orientation command 2018-03-30 10:43:55 -04:00
Drew DeVault 5c9cdbcdd2 Add swaybg_command 2018-03-29 22:11:08 -04:00
Drew DeVault bf7a4cd0eb Add bar configuration commands 2018-03-29 22:11:08 -04:00
Tony Crisci ac8269d536 take seat param for handle_command and rename 2018-02-24 12:50:24 -05:00
Tony Crisci 88bcd43ebf seat fallback config 2017-12-17 10:39:22 -05:00
Tony Crisci f16aa3c0ad rename config apply cmds 2017-12-16 12:14:24 -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 462a451328 input config 2017-12-11 07:55:01 -05:00
emersion 90f7f1a0e6
Add minimal config subsystem 2017-12-05 10:40:55 +01: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 733993a651 Move everything to sway/old/ 2017-11-18 11:22:02 -05:00
nyorain 60fa626116 Add the 'clipboard' command to set the clipboard 2017-07-01 18:35:42 +02: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
Drew DeVault 51143a75af Implement no_focus
Ref #2
2017-04-26 15:29:42 -04: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
Zandr Martin 18450dd16a
deprecate new_window and new_float commands 2017-03-09 14:56:15 -05:00
Drew DeVault c8dc4925d1 Add IPC security policy command handlers 2016-12-02 17:34: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 76cab04b4d Implement permit and reject commands 2016-12-01 21:36:43 -05: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
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
D.B d3f5ac8cbb add force_focus_wrapping option 2016-10-07 08:12:14 +02:00
Zandr Martin 79ffea328c
Merge branch 'master' of git://github.com/SirCmpwn/sway into commands-refactor 2016-09-02 13:46:19 -05:00
Drew DeVault 416417a54c Reorganize includes 2016-09-01 08:18:37 -04:00
Renamed from include/commands.h (Browse further)