Commit Graph

335 Commits

Author SHA1 Message Date
Brian Ashworth
c81d0ef1e8 Support i3's legacy force_focus_wrapping command 2018-05-28 11:09:46 -04:00
emersion
1071785f56
Merge pull request #2060 from RedSoxFan/focus-wrapping
Implement focus_wrapping
2018-05-28 10:30:11 +01:00
Brian Ashworth
46da1dc32b Implement focus_wrapping 2018-05-27 23:20:21 -04:00
Ryan Dwyer
7c7d24600b Fix ancestor typos 2018-05-28 12:45:42 +10:00
Drew DeVault
b2c0ba5b18
Merge pull request #2050 from smlx/focus-fix
Focus containers only on entry.
2018-05-27 15:42:39 -04:00
frsfnrrg
a78a5684ea Implement bindsym/bindcode --locked
Adds the --locked flag to bindsym and bindcode commands.

When a keyboard's associated seat has an exclusive client
(i.e, a screenlocker), then bindings are only executed if
they have the locked flag. When there is no such client,
this restriction is lifted.
2018-05-27 13:28:02 -04:00
Scott Leggett
1b8de39287 Move previous cursor_position inline. 2018-05-28 02:14:19 +10:00
Scott Leggett
4cd304e4ba Store previous position in sway_cursor. 2018-05-28 01:37:43 +10:00
Ryan Dwyer
8fda41dab5
Merge branch 'master' into cmd-swap 2018-05-28 00:14:22 +10:00
Ryan Dwyer
d3dd7e5bae Rename view_get_type to view_get_shell 2018-05-27 22:02:00 +10:00
Ryan Dwyer
484cc189e9 Add shell criteria token
Closes #2044.
2018-05-27 22:02:00 +10:00
Scott Leggett
06098bef98 Focus containers only on entry. 2018-05-27 15:29:48 +10:00
Brian Ashworth
569f4e0e4c Implement swap command 2018-05-26 11:05:02 -04:00
Ryan Dwyer
db38b9bbf3 Clean up container title functions
* Add and use lenient_strcat and lenient_strncat functions
* Rename `concatenate_child_titles` function as that's no longer what it
does
* Rename `container_notify_child_title_changed` because we only need to
notify that the tree structure has changed, not titles
* Don't notify parents when a child changes its title
* Update ancestor titles when changing a container's layout
	* Eg. create nested tabs and change the inner container to stacking
* No need to store tree presentation in both container->name and
formatted_title
2018-05-25 21:07:59 +10:00
Ryan Dwyer
4de137e021 Replace empty argument with void 2018-05-22 09:44:34 +10:00
Ryan Dwyer
f6c3682c05 Use constants for titlebar dimensions 2018-05-22 08:27:42 +10:00
Ryan Dwyer
efc07fb3d4 Don't track damage for views on inactive tabs 2018-05-21 20:16:56 +10:00
Ryan Dwyer
c08f9bf257 Implement tabbed layout 2018-05-21 20:16:56 +10:00
Brian Ashworth
82cd55a670 Fix border commands from changing focus 2018-05-20 23:12:33 -04:00
Ryan Dwyer
9fd28aea8c Rebuild textures if needed when moving a container
When moving a container to an output which has a different scale than
the previous, rebuild the title and marks textures at the new scale.

Fixes #1999.
2018-05-19 23:33:36 +10:00
Ryan Dwyer
0e2cc0af30 Implement show_marks 2018-05-17 08:29:14 +10:00
Dominique Martinet
89ae1792b5 sway: run commands without waiting for Xwayland
Xwayland is lazy now, there is no need to wait at all
2018-05-16 16:50:56 +09:00
Ryan Dwyer
4d1edfcba9 Change unmark implemention to match i3's 2018-05-15 11:24:16 +10:00
Ryan Dwyer
22d38600d0 Implement marks 2018-05-15 11:18:27 +10:00
Brian Ashworth
9ba0dca7ba
Merge branch 'master' into fix-1975 2018-05-14 09:06:23 -04:00
emersion
95a10dd4f3
Kill wl_shell 2018-05-14 13:26:10 +01:00
Brian Ashworth
34b864fb17
Merge branch 'master' into fix-1975 2018-05-14 00:28:21 -04:00
Brian Ashworth
6ff7c52736 Fix titles and detect edges for hide_edge_borders 2018-05-14 00:20:34 -04:00
Ryan Dwyer
bffcb496cc Revert "Revert "Merge pull request #1953 from RyanDwyer/criteria-focused""
This reverts commit ac0e62584f.

This reimplements the criteria __focused__ commit in preparation for
fixing a known bug.
2018-05-14 11:38:09 +10:00
Ryan Dwyer
1e9aaa54a8 Revert "Revert "Merge pull request #1943 from RyanDwyer/criteria-improvements""
This reverts commit 32a572cecf.

This reimplements the criteria overhaul in preparation for fixing a
known bug.
2018-05-14 11:38:09 +10:00
Drew DeVault
b2dec12368
Merge pull request #1970 from emersion/xdg-shell-stable
Add xdg-shell stable support
2018-05-13 13:45:15 -04:00
emersion
88d9d43b36
Add xdg-shell stable support 2018-05-13 16:38:56 +01:00
Drew DeVault
61aa0937a7
Merge pull request #1824 from snaggen/idle
DPMS and lock handling
2018-05-13 10:11:10 -04:00
Ryan Dwyer
90e6dfa268
Merge branch 'master' into edge-borders 2018-05-13 11:45:11 +10:00
Mattias Eriksson
8fbafbfab5 Idle handling for dpms/lockscreen et al
Swayidle handles idle events and allows
for dpms and lockscreen handling. It also
handles systemd sleep events, and can
raise a lockscreen on sleep

Fixes #541
2018-05-13 00:30:09 +02:00
emersion
360e63b8a7
Don't destroy view child on xdg-popup unmap 2018-05-12 19:33:38 +01:00
Brian Ashworth
ec60e24f75
Merge branch 'master' into edge-borders 2018-05-12 12:43:34 -04:00
Brian Ashworth
e3625d8f33 Count descendant views for hide_edge_borders smart 2018-05-12 12:37:48 -04:00
Drew DeVault
51b0b25587
Merge pull request #1959 from RyanDwyer/ipc-get-seats
Implement IPC get_seats command
2018-05-12 09:00:32 -04:00
Drew DeVault
32a572cecf Revert "Merge pull request #1943 from RyanDwyer/criteria-improvements"
This reverts commit 3e1bf721c6, reversing
changes made to 2217518bd5.
2018-05-12 08:52:54 -04:00
Drew DeVault
ac0e62584f Revert "Merge pull request #1953 from RyanDwyer/criteria-focused"
This reverts commit 2511adffc2, reversing
changes made to 3e1bf721c6.
2018-05-12 08:52:48 -04:00
Ryan Dwyer
c72940837c Implement IPC get_seats command 2018-05-12 18:17:36 +10:00
Ryan Dwyer
94e42f9857 Implement __focused__ criteria 2018-05-12 12:34:12 +10:00
Ryan Dwyer
3b0c26d149 Overhaul criteria implementation
The criteria struct now uses properties for each token type rather than
the list_t list of tokens. The reason for this is that different token
types have different data types: pcre, string and number to name a few.
This solution should be more flexible moving forward. A bonus of this is
that criteria is now easier to understand when looking at the struct
definition.

The criteria parser has been rewritten because the previous one didn't
support valueless pairs (eg. [class="foo" floating]).

Criteria now has types. Types at the moment are CT_COMMAND,
CT_ASSIGN_WORKSPACE and CT_ASSIGN_OUTPUT. i3 uses types as well.
Previously the assign command was creating a criteria with 'move to
workspace <name>' as its command, but this caused the window to appear
briefly on the focused workspace before being moved to the assigned
workspace. It now creates the view directly in the assigned workspace.

Each view will only execute a given criteria once. This is achieved by
storing a list of executed criteria in the view. This is the same
strategy used by i3.

Escaping now works properly. Previously you could do things like
[class="Fire\"fox"] and the stored value would be 'Fire\"fox', but it
should be (and now is) 'Fire"fox'.

The public functions in criteria.c are now all prefixed with criteria_.

Xwayland views now listen to the set_title, set_class and
set_window_type events and criteria will be run when these happen. XDG
shell has none of these events so it continues to update the title in
handle_commit.

Each view type's get_prop function has been split into get_string_prop
and get_int_prop because some properties like the X11 window ID and
window type are numeric.

The following new criteria tokens are now supported:

* id (X11 window ID)
* instance
* tiling
* workspace
2018-05-11 09:38:53 +10:00
emersion
bec80f1551
Damage borders when damaging view 2018-05-10 23:03:50 +01:00
Ryan Dwyer
556ff5f50e Implement pango support
Implements support for the pango: prefix in the font command.

Closes #1903.
2018-05-06 08:25:22 +10:00
Ryan Dwyer
5d6d24e71a Move code for re-arranging after font height change into a common place 2018-05-05 22:29:37 +10: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
Drew DeVault
58a033d816 Convert border_colors.text to float[4] 2018-05-03 08:14:17 -04:00
Ryan Dwyer
d3d1e38c1b Change comment format 2018-05-03 15:12:00 +10:00