Mikkel Oscar Lyderik
74152043f4
Implement 'bar { }' block parsing
9 years ago
Drew DeVault
e277d4e094
Subscribe to workspace change events and redraw
9 years ago
Drew DeVault
d361ce656d
Track the fullscreen view on a workspace swayc_t
9 years ago
Drew DeVault
34277207fd
Pass keys along from wayland backend to clients
9 years ago
Drew DeVault
029e0c7a2c
Add some more keyboard handling for wayland clients
9 years ago
Mikkel Oscar Lyderik
22916e9ebc
Make mouse key used for drag/resize configurable
...
This makes it possible to define what mouse button key (left|right) to
use for dragging/resizing.
9 years ago
Drew DeVault
a7710c5537
Initialize keyboard in registry poll
9 years ago
Drew DeVault
266393a705
Include wayland-server.h instead of -core.h
9 years ago
Drew DeVault
7614cb0373
Add keyboard handling shims to registry
9 years ago
Drew DeVault
067ac6cfa7
Discover swaylock extension in registry
9 years ago
Drew DeVault
080a263785
Refactor gdk pixbuf code into shared client lib
9 years ago
Drew DeVault
71afa38890
Add swaylock protocol, add resource destructors
...
This prevents sway crashing if swaybg or swaybar dies.
9 years ago
Drew DeVault
44d0f731c3
Add framework for switching command sets
...
This will allow the bar {} block to have a different command set (and
also bar { colors { } }.
9 years ago
Drew DeVault
4f89735fc4
Add bar config struct and defaults
9 years ago
Christoph Gysin
b1bd3ae6f3
cmd_output: Merge instead of replace output config
9 years ago
Christoph Gysin
ae7ed79573
config: Store 'enabled' as int
9 years ago
Drew DeVault
82d464bb90
Add text rendering support to wayland clients
9 years ago
Drew DeVault
e59cffcea2
Support desktop shell panels in compositor
9 years ago
Drew DeVault
4c1fad95b9
Remove trailing semicolon
9 years ago
Christoph Gysin
7d82cd9c0a
cmd_output: Use list_seq_find() to find matching config
9 years ago
Drew DeVault
e0cb8284fb
Rearrange logging headers
...
Ref #270
9 years ago
S. Christoffer Eliesen
2d0f78c0d6
workspace: Learn sticky.
...
A floating window that's sticky will move to the new active workspace
whenever the workspace on the same output changes.
9 years ago
Drew DeVault
062c74b7d0
Add command line to swaygrab
...
Also modifies IPC client so that we can work with persistent
connections.
9 years ago
Drew DeVault
27f03c705d
Move IPC client into common, refactor IPC
9 years ago
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.)
9 years ago
S. Christoffer Eliesen
4367e6d3e3
container: Store app_id attribute for views.
9 years ago
S. Christoffer Eliesen
47c313fe3e
container: Store class attribute for views.
9 years ago
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.
9 years ago
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).
9 years ago
S. Christoffer Eliesen
d0af224e6d
stringop: lenient_strcmp: Add.
9 years ago
S. Christoffer Eliesen
a33e3badad
list: Add list_seq_find.
...
Sometimes one has to traverse a list to find out if some data already
exists there in order to avoid dupilcates in the list, and this function
facilitates in that without requiring that the data is ordered.
9 years ago
Drew DeVault
79b277fe9b
Parse output background config
9 years ago
Drew DeVault
b4e5e1381f
Refactor the crap out of wayland clients
...
And create a background surface on every output when invoking swaybg.
9 years ago
Drew DeVault
4a1584be53
Fix background extensions
...
Thanks @Cloudef, it works great
9 years ago
Drew DeVault
65b8a5c3ce
Add background handling
...
This does not work as expected. I think the problem is on the wlc side.
Please review, @Cloudef. To reproduce the issues:
1. Run sway
2. Open terminal in sway
3. Run swaybg
swaybg will create a surface and ask to have it set as the background,
but wlc_handle_from_wl_surface_resource will return 0. If the swaybg
surface is a shell surface, then it works - but wlc complains about the
pointer type and segfaults as soon as the pre-render hook tries to draw
the background.
9 years ago
Drew DeVault
82db2a57a9
Basic support for extensions in server and clients
9 years ago
Drew DeVault
7a40eb6de6
Support cursors over wayland clients
...
Apparently wayland has fucking client-side cursors, too
9 years ago
Drew DeVault
86372d00db
Fix SIGBUS from wayland clients
9 years ago
Drew DeVault
665d4baaf1
Normalize indentation
9 years ago
Drew DeVault
9a1e95b7da
Clean up memory pool files better
9 years ago
Drew DeVault
399220f14b
Fix up wayland client implementation
...
Now it receives frame callbacks and renders properly, and is double
buffered and such.
9 years ago
S. Christoffer Eliesen
236f26f62e
output: Support multiple adjacent outputs.
...
When querying for an adjacent output we now need an absolute position in
order to know which adjacent output that matches. (The position is
either the current mouse position or the center of the currently focused
container, depending on context.)
If two outputs have one edge each that at least partially align with
each other they now count as adjacent.
Seamless mouse is affected by this and now properly moves and positions
itself between outputs with "uneven" placement (as long as they have at
least some part of the edge adjacent to each other).
When focusing or moving a container in a specified direction the center
of the current focused container decides where to look for an adjacent
output. So if e.g. an output has two adjacent outputs to the right and a
"focus right" command is issued then it's the placement of the currently
focused container that decides which output actually gets focused.
Also, if an output has at least one output adjacent in some direction
but the entire edge is not covered (ie. it has "holes" with no outputs),
then the algorithm will choose the output that is closest to the
currently focused container (this does not apply to seamless mouse, the
pointer will just stop at the edge in that case).
9 years ago
S. Christoffer Eliesen
a94a91a723
cmd_output: Replace existing config if called multiple times.
9 years ago
Drew DeVault
c43ef2aedd
We don't need to implement strdup
...
After defining _GNU_SOURCE
9 years ago
Drew DeVault
11b1ba397f
Further refinement of wayland client support
9 years ago
Drew DeVault
bfcabe48ef
Start fleshing out wayland client implementation
...
This introduces a basic shared framework for making wayland clients
within sway itself.
9 years ago
Drew DeVault
ef8335d694
Start working on IPC for get_pixels
...
This is broken
9 years ago
Drew DeVault
d729032ba2
Add file and line number to log in Debug build
9 years ago
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
9 years ago
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.
9 years ago
S. Christoffer Eliesen
af31a3f04a
commands: Learn 'move workspace to output <direction|name>'.
9 years ago
S. Christoffer Eliesen
515ed86f4d
container.h: Remove unused.
9 years ago
S. Christoffer Eliesen
5ba47d4a44
input_state: Remove mouse_origin (x&y). Query wlc instead.
9 years ago
S. Christoffer Eliesen
78ca619769
commands: Learn mouse_warping.
...
Place mouse at center of focused view when changing to a workspace on a
different output, if option is enabled. (This replicates existing i3
option.)
This can be triggered in multiple ways:
A) via `workspace <name>` which changes output
B) via `focus <direction>` which changes output
C) via `focus output <name>` which (obviously) changes output
9 years ago
S. Christoffer Eliesen
4799d07ac1
input_state: Extract 'pointer_position_set' function from handlers.
9 years ago
S. Christoffer Eliesen
865b30f138
container: Move container_under_pointer here from handlers.
9 years ago
Drew DeVault
6cd106d23c
Merge pull request #208 from minus7/ipc_subscribe
...
implemented IPC subscribe for workspace event
9 years ago
minus
9925554ea4
implemented IPC subscribe for workspace event
9 years ago
S. Christoffer Eliesen
9f02b0bf16
commands: Learn 'debuglog'.
...
Replicates i3 option. Verbosity level given as command line argument
becomes default log level, and using 'debuglog toggle' switches back and
forth between default and debug (or L_ERROR and debug if default is also
L_DEBUG).
9 years ago
S. Christoffer Eliesen
5a70853253
log: Add swayc_log, use at a few key places.
...
swayc_log works just like sway_log, but appends type and name from given
container to the log output.
9 years ago
S. Christoffer Eliesen
c6bb23b7dd
sway/output: Create, move code from handlers.c here.
9 years ago
S. Christoffer Eliesen
c1479701de
seamless_mouse: Move pointer only if successfully changed workspace.
...
If e.g. a window has a popup open then that will lock the current focus,
making a workspace switch denied.
So don't move the mouse pointer in such cases.
9 years ago
S. Christoffer Eliesen
362413bd50
commands: cmd_results->input is duplicated/freed.
9 years ago
S. Christoffer Eliesen
af30a1b67c
ipc,commands,config: Replace cmd_status enum with cmd_results struct.
...
In i3 the ipc reply will contain a human readable error message, and
this patch replicates that behaviour.
However, that error message is also useful for logging, which this
patch takes advantage of.
E.g. instead of logging errors directly in commands.c/checkargs, it is
fed back to the caller which eventually ends up logging everything with
maximum context available (config.c/read_config).
So instead of logging e.g. "Error on line 'exit'" it will now log:
"Error on line 'exit': Can't execute from config."
9 years ago
S. Christoffer Eliesen
edf33aad29
config: Add "seamless_mouse" to decide if pointer crosses output edges.
9 years ago
S. Christoffer Eliesen
ca862a5bd4
config: Apply output config also during config reload.
9 years ago
S. Christoffer Eliesen
3be11a08e6
main: Implement --get-socketpath switch.
9 years ago
taiyu
0d51f62224
merge + no c_extensions
9 years ago
Drew DeVault
318e1be240
Fix warnings introduced by prior commit
9 years ago
taiyu
0bea2e2122
multi command keybinds
9 years ago
Drew DeVault
e505abfe75
Revert "new_workspace null behavior + testmap functions + regex"
...
This reverts commit e1d18e42a8
.
Fixes #180
cc @taiyu-len
9 years ago
taiyu
f76f9e2eea
visible values
9 years ago
taiyu
e1d18e42a8
new_workspace null behavior + testmap functions + regex
9 years ago
taiyu
aaa0923bc4
cmd status + workspace ws output op
9 years ago
taiyu
6388241abb
mode supports multi token names
9 years ago
taiyu
aa22dc3113
var replacement changes
9 years ago
taiyu
d673a72705
set variable changes
9 years ago
taiyu
71af5b7dde
config modes
9 years ago
taiyu
f25c6b312b
gap resize
9 years ago
taiyu
2ef83664f5
remove outdated comment
9 years ago
taiyu
afa6747145
enum for command type
9 years ago
taiyu
4cd18449d2
better handling of commands during config
9 years ago
taiyu
dbeca88dee
default gap value
9 years ago
Luminarys
12e96f0f9e
Added in workspace_auto_back_and_forth
9 years ago
Luminarys
fe2ec8a676
Added in workspace back_and_forth
9 years ago
Luminarys
28e937020a
Made scratchpad handling identical to i3
9 years ago
Luminarys
7eefecf479
Added in scratchpad adding
9 years ago
taiyu
1820b3f0bb
move function redone
9 years ago
taiyu
5678d824e4
update visibility + container info functions
9 years ago
taiyu
da79bd65de
use previous outputs
9 years ago
Luminarys
acb3fbdfb5
Added in default_orientation handling
9 years ago
taiyu
357af228d6
some function documentation, fixed gaps on config reload
9 years ago
taiyu
1fa7a91bfb
move_container_to fixup
9 years ago
taiyu
225c2fbe5b
fixed segfault on exit + a little fixup of that floatfocus pr
9 years ago
minus
ca89ba83a8
changed view visibility to be bool
...
view_visibility enum remains with one constant that is the mask to wlc's view masking
9 years ago
minus
e533014201
added missing util.h/c stuff
9 years ago
minus
e854a54e96
changed workspace_{outout_,}{next,prev} to return workspace
...
so it can be reused for "move container to workspace next"
9 years ago
minus
03e4a97dbe
added "move container to workspace"
...
makes the previous commit actually testable
9 years ago
minus
f22c937953
refactored view visibility
...
- replace visibilty mask integers with an enum
- set output's visibilty mask on creation
- added update_visibility to manually update a containers visibility (e.g. when it moved to an invisible workspace)
9 years ago
minus
1efda79bf2
refactored workspace_next/prev
9 years ago
Luminarys
7c5b6f8c52
Added in backtrace printing
9 years ago
taiyu
dbad30a409
add limit to swayc_in_direction
9 years ago
taiyu
c8415d7fef
split_string memory leaks cleanedup
9 years ago
taiyu
51ab3c9180
merge
9 years ago
Drew DeVault
1ac0c8cd47
Refactor keyboard to consider modified keysyms
...
Press Shift
Press 0 # Reads as ')'
Release Shift
Release 0 # Reads as '0' but we now recognize it as the same
9 years ago
Luminarys
a65dca04e8
Style fix
9 years ago
Luminarys
98fad060e2
Added in glitchy disabling
9 years ago
taiyu
d72cc92541
style
9 years ago
taiyu
f24b78898a
dont swap view with workspace...
9 years ago
taiyu
42d5d9a177
mouse tile resize mode done
9 years ago
taiyu
e139de0857
floating/tiling move + floating resize cleaned and fixed
9 years ago
Drew DeVault
b7f4607544
Implement output configuration through config
...
Do not use `output res WIDTHxHEIGHT` yet, wlc has issues with it (cc
@Cloudef)
9 years ago
Luminarys
f6b16ca089
Refactored resizing functions into resize.c
9 years ago
taiyu
5a67628ad9
Merge branch 'master' of https://github.com/SirCmpwn/sway
...
merge
9 years ago
taiyu
1a1ac64662
bugfixes, renames
9 years ago
Drew DeVault
1c38b7a8d2
Merge pull request #111 from Luminarys/master
...
Added in proper resize locking
9 years ago
Luminarys
a8eab5492a
Added in proper resize locking
9 years ago
minus
8dfaf6265b
fixed #108 signed/unsigned comparison
9 years ago
Luminarys
7ecb55f218
Minor style fix
9 years ago
Luminarys
97bd548456
More minor fixes
9 years ago
Luminarys
de86c5f4ea
Cleanup and minor fixes
9 years ago
Drew DeVault
a436fc17ff
Merge pull request #105 from Half-Shot/master
...
Basic 'move' functionality.
9 years ago
Drew DeVault
464b49eda2
Merge pull request #101 from Luminarys/master
...
Added in basic resizing command.
9 years ago
Luminarys
96ab21b276
Fixes to resizing and added in resize lock once boundaries are exceeded
9 years ago
Luminarys
461da7f87f
Added in bspwm like mouse resizing
9 years ago
Luminarys
f589731f29
Rewrite of resize command to make it more sane
9 years ago
Drew DeVault
3a5fce339f
Reset key buffer on reload
...
To preserve my sanity
9 years ago
Half-Shot
713bf29ec9
Few stray bits
9 years ago
Half-Shot
5a9ba261bc
Merge branch 'master' of https://github.com/SirCmpwn/sway
9 years ago
Half-Shot
2a62c5c7fb
Basic left right move command implemented.
9 years ago
minus
754793aad4
added IPC messages get_workspaces and get_outputs
...
No escaping on container names is done yet, as well as some values are
hardcoded because they don't exist yet.
9 years ago
taiyu
36e07e9ebc
find_parent_by_type
9 years ago
Luminarys
bc3babf566
Added in basic resize command
9 years ago
Luminarys
15d9f1edcb
Added in basic resize command
9 years ago
minus
f8787ce69e
added missing header file
9 years ago
minus
f26ed32e46
added sway_terminate to exit cleanly
9 years ago
minus
91c0877264
properly exit sway
...
- wlc_terminate() instead of exit(0)
- unlink IPC socket
9 years ago
minus
773e85c681
properly handle IPC clients
9 years ago
minus
5d99215469
added i3-ipc support/parsing
9 years ago
minus
8981b48cd2
very basic IPC implementation
...
simply executes the received data as command
9 years ago
Drew DeVault
579fe70ed9
Add command line parsing
...
Closes #6
9 years ago
taiyu
f5fde7c45c
style
9 years ago
taiyu
fbaa9111a8
setup for resizable windows, drop weight
9 years ago
taiyu
5ff0619ca1
input state, find_container_in_direction
9 years ago
taiyu
470b4dfbae
key_state.ch, and command conflicts resolved
9 years ago
taiyu
c5a6982893
fixed some more bugs, moved layout_log into log.ch, restored focus_parent
9 years ago
taiyu
e16a4015ff
fixed focus key handler
9 years ago
Luminarys
3c430688a8
header update
9 years ago
KoffeinFlummi
c75d5ceba4
Merge remote-tracking branch 'upstream/master' into gaps
9 years ago
KoffeinFlummi
4c688cba4e
Add support for gaps option
9 years ago
minus
faccaf6112
added sway_assert function
...
returns false on a failed assertion in release mode and raises SIGABRT in debug mode
9 years ago
Drew DeVault
85a573dab7
Revert "enhanced whitespace remover"
...
This reverts commit abd0afb03a
.
9 years ago
Drew DeVault
2139001c9f
Coding style enforcement
...
This was done by hand, so I might have missed things. If anyone knows of
a good C style enforcement tool, let me know.
9 years ago
Drew DeVault
2f6dd0687b
Merge pull request #65 from taiyu-len/focus_v2
...
Focus v2
9 years ago
taiyu
b132f67e7b
minor fixes
9 years ago
taiyu
abd0afb03a
enhanced whitespace remover
9 years ago
taiyu
63bc0d3b54
more changes
9 years ago
taiyu
4606fb1ee3
merged Luminarys resizing code
9 years ago
taiyu
11321ca2dd
changed handling of focus, handling of view by type
9 years ago
Luminarys
e541ba3d87
Added in basic, but semi-broken moving/resizing functionality to floating windows
9 years ago
Drew DeVault
780893a933
Add support for workspace [name] output [name]
9 years ago
Luminarys
c9ce8bf1bd
Style and other minor fixes
9 years ago
Luminarys
47ec999e71
Fixes to floating and umanaged views
9 years ago
Luminarys
05f969074e
Added in basic floating toggling
9 years ago
taiyu
f1d5305dc6
fix
9 years ago
taiyu
c024f06631
handle_view_state_request
9 years ago
Luminarys
0a0fe18fd6
Added in workspace next/prev and workspace output_next/prev
9 years ago
Drew DeVault
7f8ebb7d0d
Move headers to include/
9 years ago