summaryrefslogtreecommitdiffstats
path: root/sway/criteria.c
Commit message (Collapse)AuthorAge
* Fix oversights from previous pull requestLibravatar Tony Crisci2018-03-29
|
* Revert "Merge pull request #1653 from swaywm/revert-1647-refactor-tree"Libravatar Tony Crisci2018-03-29
| | | | | This reverts commit 472e81f35d689d67cda241acafda91c688d61046, reversing changes made to 6b7841b11ff4cd35f54d69dc92029855893e5ce0.
* Revert "Refactor tree"Libravatar Drew DeVault2018-03-29
|
* rename container_for_each_descendentLibravatar Tony Crisci2018-03-29
|
* address feedbackLibravatar Tony Crisci2018-03-29
|
* rename container functionsLibravatar Tony Crisci2018-03-29
|
* move tree includes to their own directoryLibravatar Tony Crisci2018-03-29
|
* criteria cleanupLibravatar Tony Crisci2018-01-21
|
* implement property criteriaLibravatar Tony Crisci2018-01-21
|
* view interfaceLibravatar Tony Crisci2018-01-21
|
* basic command criteriaLibravatar Tony Crisci2018-01-20
|
* Move sway's internal tree code to sway/tree/Libravatar Drew DeVault2017-11-11
|
* Fix #12910.15-rc1Libravatar Drew DeVault2017-10-08
|
* commands: allow criterion values to be unquotedLibravatar lbonn2017-10-08
| | | | | | | | Sometimes it doesn't really make sense to quote them (numeric values for example) In that case, the value is parsed until the next space or the end of the whole criteria expression
* commands: implement 3 missing criteria from i3Libravatar lbonn2017-10-08
| | | | | | * con_id * floating * tiling
* FreeBSD fixesLibravatar johalun2017-06-06
| | | | | | | 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).
* Implement no_focusLibravatar Drew DeVault2017-04-26
| | | | Ref #2
* Added designated initaliser, to prevent any possible problem withLibravatar Scott Anderson2017-04-07
| | | | ordering
* Changed regular expressions to use PCRE for i3 compatibilityLibravatar Scott Anderson2017-04-07
|
* Improve criteria handlingLibravatar Calvin Lee2017-04-05
| | | | | | | | | | | | | | 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.
* Impliment i3-style marksLibravatar Calvin Lee2017-04-03
| | | | | | | | 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
* UnGNUify the codebaseLibravatar Drew DeVault2017-03-10
|
* Merge pull request #1053 from Hummer12007/__focused__Libravatar Drew DeVault2017-01-18
|\ | | | | Support __focused__ as a valid criterion
| * Support __focused__ as a valid criterionLibravatar Mykyta Holubakha2017-01-19
| | | | | | | | | | | | This reflects i3 behavior (see i3/i3#1770) Scrapping focused support will probably break some existing configs
* | Add window instance supportLibravatar Mykyta Holubakha2017-01-19
|/
* Reorganize includesLibravatar Drew DeVault2016-09-01
|
* criteria: Code formatting.Libravatar S. Christoffer Eliesen2015-11-25
|
* criteria: Add. Learn for_window command.Libravatar S. Christoffer Eliesen2015-11-25
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.)