aboutsummaryrefslogtreecommitdiff
path: root/sway/commands
AgeCommit message (Collapse)Author
2017-04-26Implement no_focusDrew DeVault
Ref #2
2017-04-18Use i3's dimensions for initial scratchpad viewsVasilij Schneidermann
See https://github.com/i3/i3/blob/master/src/scratchpad.c#L196-L197
2017-04-18Implement and document `move [to] scratchpad`Vasilij Schneidermann
2017-04-16Handle symlinks as IPC security targetsJerzi Kaminsky
- When policies are allocated, the ipc target path goes through symlink resolution. The result is used as the canonical for matching pids to policies at runtime. In particular, this matches up with the target of the `/proc/<pid>/exe`. - There's a possible race condition if this isn't done correctly, read below. Originally, validate_ipc_target() always tried to resolve its argument for symlinks, and returned a parogram target string if it validates. This created a possible race condition with security implications. The problem is that get_feature_policy() first independently resolved the policy target in order to check whether a policy already exists. If it didn't find any, it called alloc_feature_policy() which called validate_ipc_target() which resolved the policy target again. In the time between the two checks, the symlink could be altered, and a lucky attacker could fool the program into thinking that a policy doesn't exist for a target, and then switch the symlink to point at another file. At the very least this could allow him to create two policies for the same program target, and possibly to bypass security by associating the permissions for one target with another, or force default permissions to apply to a target for which a more specific rule has been configured. So we don't that. Instead, the policy target is resolved once and that result is used for the rest of the lookup/creation process.
2017-04-16Move get_feature_policy to sway/security.cJerzi Kaminsky
2017-04-16Rename get_policy to get_feature_policyJerzi Kaminsky
2017-04-07Add `-t get_marks` and use more i3-like marksCalvin Lee
In i3 every mark is unique and one mark cannot be used in more than one window, sway behavior has been amended to match this. `swaymsg -t get_marks` will now return an array of all marks used in sway. See #98
2017-04-05Improve criteria handlingCalvin Lee
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-03Impliment i3-style marksCalvin Lee
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-03-18remove unnecessary todo itemZandr Martin
As best I can tell this todo was intended to add workspace movement to the given output with the `workspace <ws> output <op>` command, but i3 does not behave this way.
2017-03-18Fix off-by-one error when checking workspace_layout argumentsJarkko Oranen
2017-03-13Merge branch 'master' of git://github.com/SirCmpwn/sway into new-command-aliasesZandr Martin
2017-03-10UnGNUify the codebaseDrew DeVault
2017-03-09deprecate new_window and new_float commandsZandr Martin
2017-03-08fix workspace output assignmentZandr Martin
2017-03-01Fix #1099: Allow spaces in worspace namesCalvin Lee
This commit allows unquoted spaces in worspace names in order to keep compatability with i3. The names _must not_ contain the string "output" which is documented in 'sway.5' because how sway detects the `move <workspace> output <output>` command. Also I documented that "number" may be used before the worspace name without affecting how the name is evaluated.
2017-03-01i3 feature support: Moving flotaing containersCalvin Lee
This commit lets the 'move' command apply to floating containers as well as tiled ones. The command may be appended with a number of pixels and then optionally the string `px` (like '10 px') in order to move the container more or fewer than the standard ten pixels.
2017-02-20Read configs from /etc/sway/security.d/*Drew DeVault
2017-02-20Add * policies and fix bugDrew DeVault
2017-02-20Enforce new IPC policiesDrew DeVault
2017-02-20Add initial support code for new IPC securityDrew DeVault
2017-01-14replaced "bot" with "bottom" in auto layout commandswil
2017-01-14Merge branch 'master' into masterwillakat
2017-01-12Implement hide_edge_borders smart (like in i3 4.13)Frantisek Fladung
2017-01-08reworked "layout auto*" star commandswil
- "layout auto_left|auto_xxx" are now "layout auto xxx" - "layout incmaster <n>" is now "layout auto master [set|inc] <n>" - "layout incncol <n>" is now "layout auto ncol [set|inc] <n>"
2017-01-08Indent cleanupswil
2017-01-07[fix] resize should now preserve surrounding container's dimensionswil
- prior to this modification, the requested pixels were added/removed to both edges of the modified container. To preserve sizes, only half the pixels should be added/removed to each edge.
2017-01-07Moved auto_* layout functions from resize.c to layout.cwil
2017-01-01[fix] cleanups suggested by Sway communitywil
2017-01-01changed "layout promote" command to "move first"wil
This is more consistent with other Sway semantics.
2016-12-31[fix] cycle auto layouts backwardswil
2016-12-29cleanup in auto layoutswil
- added L_AUTO_FIRST/LAST instead of using explicit layouts. - when switching between auto layout that don't share the same major axis, invert the width/height of their child views to preserve their relative proportions.
2016-12-29introduce next/prev as a direction for focus/move commands.wil
2016-12-29[fix] Handle auto layout resize with multiple slave groupswil
2016-12-29Added "layout incnmaster|incncol" commandswil
2016-12-29Handle resize in auto layoutswil
2016-12-29Added Awesome/Monad type "auto" layoutswil
2016-12-17Change how security config is loadedDrew DeVault
2016-12-15Fix indentation issuesDrew DeVault
2016-12-15Handle calloc failuresDrew DeVault
2016-12-15Handle allocation failures in security codeDrew DeVault
Note that such errors are generally going to be fatal
2016-12-15Handle allocation failure in commandsDrew DeVault
2016-12-04fix layout switching (was broken because of workspace_layout)D.B
For workspace containers, swayc_change_layout also changes ->layout alongside ->workspace_layout when it's a sensible thing to do. There is an additional test for 'layout toggle' command which ensures that containers will be tiled horizontally after toggling from tabbed or stacked.
2016-12-04add workspace_layout to containerD.B
Add swayc_change_layout function, which changes either layout or workspace_layout, depending on the container type.
2016-12-02Fix clang issuesDrew DeVault
2016-12-02Add ipc connection feature policy controlsDrew DeVault
2016-12-02Enforce IPC security policyDrew DeVault
2016-12-02Add IPC security policy command handlersDrew DeVault
2016-12-02Add support for command policies in config fileDrew DeVault
2016-12-01Implement permit and reject commandsDrew DeVault