Commit Graph

75 Commits

Author SHA1 Message Date
Christoph Gysin
7d82cd9c0a cmd_output: Use list_seq_find() to find matching config 2015-11-29 15:29:06 +02:00
S. Christoffer Eliesen
a06cb7cd01 criteria: Add. Learn for_window command.
A criteria is a string in the form of `[class="regex.*" title="str"]`.
It is stored in a struct with a list of *tokens* which is a
attribute/value pair (stored as a `crit_token` struct). Most tokens will
also have a precompiled regex stored that will be used during criteria
matching.

for_window command: When a new view is created its metadata is tested
against all stored criteria, and if a match is found the associated
command list is executed.

Unfortunately some metadata is not available in sway at the moment
(specifically `instance`, `window_role` and `urgent`). Any criteria
string that tries to match an unsupported attribute will fail.

(Note that while the criteria code can be used to parse any criteria
string it is currently only used by the `for_window` command.)
2015-11-25 14:34:33 +01:00
S. Christoffer Eliesen
a0c5a0bb30 cmd_bindsym: Detect/handle duplicates.
Also replace `bindsym_sort` with function `sway_binding_cmp` that takes
all data into account when comparing.
2015-11-22 21:17:36 +01:00
S. Christoffer Eliesen
5531dbe1b2 cmd_workspace: Don't fill up config->workspace_outputs with duplicates.
This also fixes a bug where issuing a new "workspace a output b" command
for an already assigned workspace would not work (the old config would
be found first and used instead).
2015-11-22 11:08:08 +01:00
Drew DeVault
79b277fe9b Parse output background config 2015-11-19 18:25:15 -05:00
S. Christoffer Eliesen
a94a91a723 cmd_output: Replace existing config if called multiple times. 2015-11-16 15:57:42 +01:00
Drew DeVault
edb3e4b5ab Add some documentation comments
This is mostly setting a precedent, I hope that others will continue to
write docs for more headers.

Ref #218
2015-11-08 12:06:51 -05:00
S. Christoffer Eliesen
abc5fbfaec Learn "gaps edge_gaps <on|off|toggle>".
When yes, the old behaviour of adding half the inner gap around each
view is used.

When no, don't add any gap when an edge of the view aligns with the
workspace. The result is inner gap only between views, not against the
workspace edge.

The algorithm is not perfect because it means the extra space is
distributed amongst edge-aligned views only, but it's simple, looks good
and it works.
2015-11-04 13:21:10 +01:00
S. Christoffer Eliesen
edf33aad29 config: Add "seamless_mouse" to decide if pointer crosses output edges. 2015-10-22 01:39:12 +02:00
S. Christoffer Eliesen
ca862a5bd4 config: Apply output config also during config reload. 2015-10-21 23:24:06 +02:00
Drew DeVault
e505abfe75 Revert "new_workspace null behavior + testmap functions + regex"
This reverts commit e1d18e42a8.

Fixes #180

cc @taiyu-len
2015-09-13 19:46:16 -04:00
taiyu
e1d18e42a8 new_workspace null behavior + testmap functions + regex 2015-09-12 02:38:03 -07:00
taiyu
aaa0923bc4 cmd status + workspace ws output op 2015-09-10 11:07:40 -07:00
taiyu
71af5b7dde config modes 2015-09-07 14:29:40 -07:00
Luminarys
12e96f0f9e Added in workspace_auto_back_and_forth 2015-08-30 21:34:24 -05:00
Luminarys
acb3fbdfb5 Added in default_orientation handling 2015-08-27 21:52:59 -05:00
Luminarys
a65dca04e8 Style fix 2015-08-23 13:19:47 -05:00
Luminarys
98fad060e2 Added in glitchy disabling 2015-08-23 12:23:01 -05:00
Drew DeVault
b7f4607544 Implement output configuration through config
Do not use `output res WIDTHxHEIGHT` yet, wlc has issues with it (cc
@Cloudef)
2015-08-22 11:18:55 -04:00
Drew DeVault
579fe70ed9 Add command line parsing
Closes #6
2015-08-20 08:37:24 -04:00
KoffeinFlummi
4c688cba4e Add support for gaps option 2015-08-18 23:53:57 +02:00
taiyu
b132f67e7b minor fixes 2015-08-18 03:48:41 -07:00
Luminarys
e541ba3d87 Added in basic, but semi-broken moving/resizing functionality to floating windows 2015-08-18 01:33:15 -05:00
Drew DeVault
780893a933 Add support for workspace [name] output [name] 2015-08-17 20:34:53 -04:00
Drew DeVault
7f8ebb7d0d Move headers to include/ 2015-08-16 11:02:56 -04:00