Commit graph

2211 commits

Author SHA1 Message Date
Drew DeVault 50a31a6c88 Fix dangling file descriptors (fixes #1152) 2017-04-07 07:55:35 -04:00
Drew DeVault 270e01ce6d Merge pull request #1151 from ascent12/master
Change regex to use PCRE
2017-04-06 08:51:22 -04:00
Scott Anderson 3a32be67ed Added designated initaliser, to prevent any possible problem with
ordering
2017-04-07 00:34:33 +12:00
Scott Anderson fe54a6725e Changed regular expressions to use PCRE for i3 compatibility 2017-04-07 00:16:06 +12:00
Drew DeVault 3f40b61321 Merge pull request #1149 from 4e554c4c/criteria
Improve criteria handling
2017-04-06 06:47:26 -04:00
Calvin Lee 069d37f987 Improve criteria handling
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-05 22:07:23 -06:00
Drew DeVault 7d43a76b4e Merge pull request #1145 from 4e554c4c/marks
Impliment i3-style marks
2017-04-03 14:52:20 -04:00
Calvin Lee 2445d27960 Impliment i3-style marks
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-04-03 11:48:37 -06:00
Drew DeVault ab7570d311 Update man page 2017-04-03 07:46:11 -04:00
Drew DeVault 8d9a928058 Update README.md 2017-03-28 07:45:16 -04:00
Drew DeVault 82729eeb0c Mention cap_sys_tty_config in readme 2017-03-27 07:02:08 -04:00
Drew DeVault e659db4f73 Merge pull request #1130 from oranenj/fix_move_next_crash
Fix move next crash
2017-03-19 17:57:44 -04:00
Jarkko Oranen 924ed6464c Prevent "move next" and "move prev" commands from crashing
Fixes #1120

When the parent of a view is C_WORKSPACE and the movement direction
is either MOVE_PREV or MOVE_NEXT, the code would attempt to move the
views to the next output, but swayc_adjacent_output can't accept
non-directional movement commands and causes undefined behaviour and
a segfault.

If the code is simply skipped, we end up in an infinite loop.

Instead, we can allow containers whose parent is a C_WORKSPACE take the
path that handles MOVE_PREV and MOVE_NEXT, which behaves as you would
expect.

I'm not certain that this fix is entirely correct as the desired behaviour
of move_container is not very well defined, but it seems to work.
2017-03-19 16:58:39 +02:00
Jarkko Oranen d7350915d9 The default layout of a workspace should follow the output
Hardcoding it to L_HORIZ does not make sense to me,
as you get the unexpected behaviour that windows will be
arranged horizontally until you switch the layout.
2017-03-19 16:57:05 +02:00
Drew DeVault 0fa8b5abfb Merge pull request #1126 from zandrmartin/prevent-fullscreen-focus-stealing
prevent fullscreen focus thievery
2017-03-18 18:04:02 -04:00
Zandr Martin 2d46fc5602
prevent fullscreen focus thievery
I believe this fixes #1102
2017-03-18 17:55:50 -04:00
Drew DeVault 856984a7f6 Merge pull request #1125 from zandrmartin/remove-unnecessary-todo
remove unnecessary todo item
2017-03-18 17:35:30 -04:00
Drew DeVault 84ae6d02e8 Merge branch 'master' into remove-unnecessary-todo 2017-03-18 17:30:00 -04:00
Zandr Martin baa17ec696
remove unnecessary todo item
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-18 17:26:59 -04:00
Drew DeVault cef4a5cf70 Merge pull request #1124 from zandrmartin/correct-typo
wl_poitner -> wl_pointer
2017-03-18 17:01:26 -04:00
Zandr Martin 956eb6d714
wl_poitner -> wl_pointer 2017-03-18 16:57:26 -04:00
Drew DeVault 5c3d3184a3 Merge pull request #1119 from oranenj/master
Fix off-by-one error when checking workspace_layout arguments
2017-03-18 16:36:17 -04:00
Drew DeVault e956c61719 Merge branch 'master' into master 2017-03-18 16:27:58 -04:00
Jarkko Oranen f6196b7e9a Fix off-by-one error when checking workspace_layout arguments 2017-03-18 22:24:44 +02:00
Drew DeVault b01e8dea58 Merge pull request #1121 from zandrmartin/registry-keyboard-caps
add missing ! for wl seat keyboard caps
2017-03-18 16:17:11 -04:00
Zandr Martin 2d2ce91883
add missing ! for wl seat caps 2017-03-18 11:29:02 -04:00
Drew DeVault ec50b92bb4 Merge pull request #1117 from jnsaff/master
Allow also 444 for security file mode
2017-03-16 14:06:03 -04:00
Jaanus Torp 8306b886e9 Allow also 444 for security file mode 2017-03-16 15:12:22 +00:00
Drew DeVault 109f384771 Merge pull request #1115 from snoack/missing-includes
Superfluous include causes failures if WLC headers aren't installed globally
2017-03-14 14:40:50 -04:00
Sebastian Noack d90f97b3d4 Removed superfluous include, causing failures if WLC headers aren't installed globally 2017-03-14 19:33:35 +01:00
Drew DeVault 39ecc10553 Merge pull request #1108 from zandrmartin/new-command-aliases
deprecate new_window and new_float commands
2017-03-13 15:13:07 -04:00
Zandr Martin b507462d1c
Merge branch 'master' of git://github.com/SirCmpwn/sway into new-command-aliases 2017-03-13 07:35:12 -04:00
Drew DeVault 2e1083f52c Merge pull request #1113 from johnchen902/patch-1
Fix trivial typo in sway.5.txt (right_ -> _right_)
2017-03-12 23:34:10 -04:00
John Chen a0711d9c94 Fix trivial typo in sway.5.txt (right_ -> _right_)
as title
2017-03-13 10:32:27 +08:00
Drew DeVault 9aed9d9359 UnGNUify the codebase 2017-03-10 23:41:24 -05:00
Drew DeVault 74d4f1bec9 Further indentation corrections 2017-03-10 21:41:14 -05:00
Drew DeVault d5c338d9ee Correct indentation 2017-03-10 21:40:21 -05:00
Zandr Martin 18450dd16a
deprecate new_window and new_float commands 2017-03-09 14:56:15 -05:00
Drew DeVault dc33c2cc1d Merge pull request #1105 from zandrmartin/fix-workspace-output-assignment
fix workspace output assignment
2017-03-08 14:35:11 -05:00
Zandr Martin 8684b9ecca
fix workspace output assignment 2017-03-08 14:30:01 -05:00
Drew DeVault 79468d2c74 Update unsupported packages link in readme 2017-03-02 10:27:05 -05:00
Drew DeVault d4aa604812 Merge pull request #1101 from 4e554c4c/worspace_names
Fix #1099: Allow spaces in worspace names
2017-03-01 14:09:17 -05:00
Calvin Lee d47d3d78de Fix #1099: Allow spaces in worspace names
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-01 11:35:47 -07:00
Drew DeVault d6ac3021ce Merge pull request #1092 from 4e554c4c/move_floating
i3 feature support: Moving flotaing containers
2017-03-01 13:24:47 -05:00
Calvin Lee 032907e9d2 Clarify move documentation for floating containers 2017-03-01 11:00:56 -07:00
Calvin Lee b35782bcad i3 feature support: Moving flotaing containers
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-03-01 11:00:16 -07:00
Drew DeVault 21ad45b622 Fix #1087 2017-02-26 05:49:42 -05:00
Drew DeVault 893c049aa3 Merge pull request #1086 from Fale/ignore-Wimplicit-fallthrough
Ignore Wimplicit-fallthrough
2017-02-26 03:53:31 -05:00
Fabio Alessandro Locati c51e83f834
Make it work for all compilers 2017-02-25 23:39:04 +00:00
Fabio Alessandro Locati 6800c60d4b
Ignore Wimplicit-fallthrough 2017-02-25 18:21:55 +00:00