Commit graph

342 commits

Author SHA1 Message Date
Ryan Dwyer
27a20a4884 Allow containers to be fullscreen 2018-07-26 08:27:07 +10:00
ProgAndy
0ba52458ab Restrict CapsLock and NumLock commands to the configuration file 2018-07-25 17:24:45 +02:00
ProgAndy
c7a3a03115 Add xkb_numlock/xkb_capslock commands (#2311) 2018-07-25 17:24:45 +02:00
Drew DeVault
fc718f629a
Merge pull request #2350 from ppascher/xwayland-optional
Added meson option to allow building sway without xwayland support
2018-07-25 08:27:40 -04:00
Pascal Pascher
f95cb9a7c1 reverted includes of "sway/config.h" and replaced with "config.h" from meson build 2018-07-25 13:32:20 +02:00
Pascal Pascher
79a45d4a40 more style fixes, included "sway/config.h" where needed 2018-07-25 12:17:10 +02:00
Brian Ashworth
dca02944ce Implement floating_modifier <mod> [inverse|normal] 2018-07-24 18:41:08 -04:00
Pascal Pascher
2bf893248a style fixes, exclude sway/desctop/xwayland.c when enable_xwayland: false 2018-07-24 23:37:41 +02:00
Pascal Pascher
24ad1c3983 Added meson option "enable_xwayland" (default: true) to enable/disable xwayland support 2018-07-24 22:16:06 +02:00
Drew DeVault
817d37c950
Merge pull request #2165 from swaywm/pid-workspaces
Implement pid->workspace tracking
2018-07-24 14:44:01 -04:00
Ryan Dwyer
e02a6718c2
Merge branch 'master' into mouse-bindings 2018-07-24 19:23:04 +10:00
frsfnrrg
94dd8823a0 Invoke mouse bindings
The mouse binding logic is inspired/copied from the
keyboard binding logic; we store a sorted list of the
currently pressed buttons, and trigger a binding when
the currently pressed (or just recently pressed, in
the case of a release binding) buttons, as well as
modifiers/container region, match those of a given
binding.

As the code to execute a binding is not very keyboard
specific, keyboard_execute_command is renamed to
seat_execute_command and moved to where the other
binding handling functions are. The call to
transaction_commit_dirty has been lifted out.
2018-07-23 21:38:29 -04:00
Brian Ashworth
9ec1d6cf79 Address review comments on parse_boolean 2018-07-23 21:37:53 -04:00
Brian Ashworth
863914ec95 Switch to using a function to parse booleans 2018-07-23 21:33:17 -04:00
frsfnrrg
754372c3de Parse mouse binding options
First, the existing sway_binding structure is given an
enumerated type code. As all flags to bindsym/bindcode
are boolean, a single uint32 is used to hold all flags.
The _BORDER, _CONTENTS, _TITLEBAR flags, when active,
indicate in which part of a container the binding can
trigger; to localize complexity, they do not overlap
with the command line arguments, which center around
_TITLEBAR being set by default.

The keyboard handling code is adjusted for this change,
as is binding_key_compare; note that BINDING_LOCKED
is *not* part of the key portion of the binding.

Next, list of mouse bindings is introduced and cleaned up.

Finally, the binding command parsing code is extended
to handle the case where bindsym is used to describe
a mouse binding rather than a keysym binding; the
difference between the two may be detected as late as
when the first key/button is parsed, or as early as
the first flag.  As bindings can have multiple
keycodes/keysyms/buttons, mixed keysym/button sequences
are prohibited.
2018-07-23 21:14:22 -04:00
Drew DeVault
f4b882475e Merge branch 'master' into pid-workspaces 2018-07-23 20:31:11 -04:00
Ryan Dwyer
12e90fa600 Store scratchpad list in sway_root instead of server 2018-07-23 08:24:32 +10:00
Ryan Dwyer
81e8f31cc6 Implement scratchpad
Implements the following commands:

* move scratchpad
* scratchpad show
* [criteria] scratchpad show

Also fixes these:

* Fix memory leak when executing command with criteria
(use `list_free(views)` instead of `free(views)`)
* Fix crash when running `move to` with no further arguments
2018-07-23 08:24:32 +10:00
Ryan Dwyer
86f5531511 Remove unnecessary includes 2018-07-22 23:10:19 +10:00
Ryan Dwyer
9fbe13b9be Implement floating_modifier and mouse operations for floating views
This implements the following:

* `floating_modifier` configuration directive
* Drag a floating window by its title bar
* Hold mod + drag a floating window from anywhere
* Resize a floating view by dragging the border
* Resize a floating view by holding mod and right clicking anywhere on
the view
* Resize a floating view and keep aspect ratio by holding shift while
resizing using either method
* Mouse cursor turns into resize when hovering floating border or corner
2018-07-22 23:10:19 +10:00
Brian Ashworth
bc7d332109 Reset outputs on reload 2018-07-20 22:17:20 -04:00
Ryan Dwyer
37b33f92e8 Fix urgent timer logic and remove unnecessary header includes 2018-07-21 10:28:07 +10:00
Ryan Dwyer
c2ed3d8bd6 Implement force_display_urgency_hint
The directive sets the timeout before an urgent view becomes normal
again after switching to it from another workspace.

Also:

* When an xwayland surface removes the urgent hint while the timer is
active, we now ignore the request. This happens as soon as the view
receives focus, so it was effectively making the timer pointless.
* The timeout is now only applied when switching to it from another
workspace.
2018-07-21 10:28:07 +10:00
Brian Ashworth
9605ab45f1 Fix output wildcard handling 2018-07-20 12:32:29 -04:00
Ryan Dwyer
32806d16ee Use parse_movement_direction 2018-07-19 20:17:48 +10:00
Ryan Dwyer
08736255a3 Defer the focus commands 2018-07-19 16:41:02 +10:00
Ryan Dwyer
a173b79c54 Implement focus output command 2018-07-19 16:33:27 +10:00
Ryan Dwyer
75c699db62 Implement default_floating_border command and adjust CSD behaviour 2018-07-17 10:14:33 +10:00
Drew DeVault
d6bd314dff
Merge pull request #2276 from RyanDwyer/urgency
Implement urgency base functionality
2018-07-16 15:39:08 -07:00
Ryan Dwyer
fc2484095a Implement no_focus command 2018-07-16 22:18:12 +10:00
Ryan Dwyer
315d5311b2 Implement urgency base functionality
Introduces a command to manually set urgency, as well as rendering of
urgent views, sending the IPC event, removing urgency after focused for
one second, and matching urgent views via criteria.
2018-07-16 08:19:25 +10:00
Ian Fan
ba8981e44b bar: free old position when changing 2018-07-15 21:47:22 +01:00
Drew DeVault
53e3f35ba3
Merge pull request #2272 from RyanDwyer/simplify-transactions
Simplify transactions by using a dirty flag on containers
2018-07-15 05:01:25 -07:00
Ryan Dwyer
2032f85d94 Simplify transactions by utilising a dirty flag on containers
This PR changes the way we handle transactions to a more simple method.
The new method is to mark containers as dirty from low level code
(eg. arranging, or container_destroy, and eventually seat_set_focus),
then call transaction_commit_dirty which picks up those containers and
runs them through a transaction. The old methods of using transactions
(arrange_and_commit, or creating one manually) are now no longer
possible.

The highest-level code (execute_command and view implementation
handlers) will call transaction_commit_dirty, so most other code just
needs to set containers as dirty. This is done by arranging, but can
also be done by calling container_set_dirty.
2018-07-14 23:14:55 +10:00
Brian Ashworth
13c6627ddb Implement tap_button_map for input devices 2018-07-14 01:01:47 -04:00
Ryan Dwyer
0584ecec0a Force min/max size when resizing floating containers 2018-07-14 10:00:39 +10:00
Ryan Dwyer
5940682f40 Implement resize grow|shrink <direction> <amount> or <amount> 2018-07-14 10:00:39 +10:00
Ryan Dwyer
558ca9fc28 Implement resize command for floating views
Implements the following for floating views:

* resize set <width> <height>
* resize <grow|shrink> <width|height|up|down|left|right> <amount>
2018-07-14 10:00:39 +10:00
Robert Kubosz
f8bc928b2d
add error handling for scroll button out of range
user will be informed if the scroll button indentifier values causes
underflow or overflow.
2018-07-13 11:39:39 +02:00
Robert Kubosz
89db5b5716
expanded error detection for scroll button option
Now the scroll_button will not accept:
  - letters on string beginning;
  - negative numbers.

What is tolerated:
  - letters after number;
  - rational numbers: the fraction after dot will be omitted.
2018-07-12 23:50:34 +02:00
Robert Kubosz
094edcbea2
rm constraint for max value of button identifier
updated error message to be more adequate for current contraint
2018-07-12 15:50:42 +02:00
Robert Kubosz
08edaf4e76
increase maximum value of button identifier
and also cleanup spaces
2018-07-12 12:08:53 +02:00
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
Ryan Dwyer
f2d1cf3ceb Implement floating_minimum_size and floating_maximum_size 2018-07-11 22:16:48 +10:00
Ian Fan
23c1c26c3f Add get_config message type to ipc 2018-07-10 12:37:37 +01:00
Drew DeVault
6fd9a2bfd6
Merge branch 'master' into focus-mode-toggle 2018-07-09 16:28:37 -07:00
emersion
63b4bf5000
Update for swaywm/wlroots#1126 2018-07-09 22:54:30 +01:00
emersion
48c98b676f
Implement focus mode_toggle 2018-07-09 22:22:17 +01:00
Ryan Dwyer
ab8a86369c Implement some floating move commands
This implements the following for floating containers:

* move <direction> <amount>
* move [absolute] position <x> <y>
* move [absolute] position mouse
2018-07-09 23:38:29 +10:00
Brian Ashworth
78c08fb0a2 Implement mode --pango_markup 2018-07-05 18:12:14 -04:00