Drew DeVault
efff8e5ba5
Merge pull request #335 from mikkeloscar/bar-font
...
Implement bar option: font <font>
9 years ago
Mikkel Oscar Lyderik
9316851715
Implement bar option: font <font>
9 years ago
Mikkel Oscar Lyderik
ded8919c69
Implement bar option: binding_mode_indicator <yes|no>
9 years ago
Mikkel Oscar Lyderik
f59f5d27aa
Implement bar option: output <output>
9 years ago
Mikkel Oscar Lyderik
6834a33290
Add bar height option (Airblader/i3)
9 years ago
Mikkel Oscar Lyderik
de1f625c27
Add rgba support for bar colors
9 years ago
Mikkel Oscar Lyderik
8c1d56812b
Implement bar option: colors {}
9 years ago
Mikkel Oscar Lyderik
71a25d5da7
Remove a couple of unwanted spaces
9 years ago
Drew DeVault
7b0ea051c6
Merge pull request #325 from gpyh/bar_cmd_modifier
...
Added bar_cmd_modifier
9 years ago
Yacine Hmito
0ead9324dc
Added bar_cmd_modifier
9 years ago
Drew DeVault
9db15e29b1
Merge pull request #323 from gpyh/bar_cmd_status_command
...
Added bar_cmd_status_command
9 years ago
Yacine Hmito
5786fa7e35
Added bar_cmd_status_command
9 years ago
Mikkel Oscar Lyderik
0513322c03
Move default bar config to bar creation.
...
Get rid of `config->bar` and define the default bar config options when
a bar is initialized.
9 years ago
Yacine Hmito
87126a9fc2
Added bar_cmd_bindsym
...
Defined a sway_mouse_binding for clicks on the swaybar
9 years ago
Drew DeVault
42a85431ee
Merge pull request #320 from mikkeloscar/configure-mouse-btn2
...
Lookup dragging key when in dragging mode
9 years ago
Mikkel Oscar Lyderik
0aeee6963d
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
Mikkel Oscar Lyderik
0d1eb5553c
Implement bar option: mode <dock|hide|invisible>
9 years ago
Mikkel Oscar Lyderik
d6cd37d873
Implement bar option: hidden_state <hide|show>
9 years ago
Mikkel Oscar Lyderik
401333e7c7
Implement bar option: id <custom-id>
...
If the id is defined by another bar it will just use the default id for
the bar. Typically `bar-x`.
If the id command is used multiple times within a bar block, the last
one will 'win'.
9 years ago
Drew DeVault
2be742d02d
Merge pull request #314 from mikkeloscar/bar-id
...
Add initial support for custom bar-id
9 years ago
Mikkel Oscar Lyderik
2cedf88273
Add bar id to debug logs
9 years ago
Mikkel Oscar Lyderik
c6b13163c9
Add initial support for custom bar-id
9 years ago
Drew DeVault
b65e348233
Fix crash in bar { } blocks
9 years ago
Drew DeVault
0b2cf8b65c
Merge pull request #313 from mikkeloscar/bar-confing-subcommands
...
Bar confing subcommands
9 years ago
Mikkel Oscar Lyderik
b00c106460
Add more debug logging to bar option parsing
9 years ago
Mikkel Oscar Lyderik
bd0c58e85a
Implement bar option: position <top|bottom|left|right>
9 years ago
Mikkel Oscar Lyderik
cc08daded4
Implement bar option: strip_workspace_numbers <yes|no>
9 years ago
Drew DeVault
4d17aa9919
Revert "Make mouse key used for drag/resize configurable"
...
This reverts commit 22916e9ebc
.
9 years ago
Mikkel Oscar Lyderik
cb9b157e03
Add tray_output not supported warning
9 years ago
Mikkel Oscar Lyderik
0a8ec26383
Implement bar option: tray_padding <px> [px]
9 years ago
Mikkel Oscar Lyderik
b9e8accc51
Implement bar option: workspace_buttons <yes|no>
9 years ago
Mikkel Oscar Lyderik
74152043f4
Implement 'bar { }' block parsing
9 years ago
Drew DeVault
d361ce656d
Track the fullscreen view on a workspace swayc_t
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
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
3f950b6e52
Merge pull request #278 from christophgysin/merge
...
cmd_output: Merge instead of replace output config
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
Christoph Gysin
3c8763af22
cmd_output: check for missing subcommand arguments
9 years ago
Drew DeVault
9d2bbe2640
Merge pull request #274 from sce/fix_stray_floats
...
cmd_floating: Don't add non-float as sibling to float.
9 years ago
Christoph Gysin
7059eccaa1
cmd_output: Log enable/disable state
9 years ago
Christoph Gysin
7d82cd9c0a
cmd_output: Use list_seq_find() to find matching config
9 years ago
Christoph Gysin
88f372a22a
cmd_output: Cleanup cmd_output argument handling
9 years ago
S. Christoffer Eliesen
badfb4bb43
cmd_floating: Don't add non-float as sibling to float.
...
When turning a float to a non-float, `get_focused_container` might
return another floating view, causing the active view to be inserted
into the floating list on its workspace instead of the normal child list
which it should. (Since it has `is_floating` as false the resulting
discrepency triggered other bad behaviour eventually leading sway to
crash.)
This patch fixes that by simply checking floating status before making
it a sibling.
9 years ago
Mikkel Oscar Lyderik
c477bbf345
Add warnings about invalid output commands
...
This handles some cases where sway will crash if an output command is
invalid/missing an argument.
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
S. Christoffer Eliesen
db642fc8c5
commands: code formatting: Sort list of commands by alphabet.
9 years ago
S. Christoffer Eliesen
d9770cc243
cmd_floating: Support `enable` and `disable` commands too.
...
This is especially relevant in combination with `for_window`, e.g.:
`for_window [title="Terminal"] floating enable`.
9 years ago
Christoph Gysin
be3fae148b
swaybg: implement scaling mode "fit"
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
db92920cf9
handle_command: Skip commands that has a criteria string.
...
We can't handle them currently (the criteria needs to e.g. be passed to
each command handler which then needs to do the right thing), so it's
better to just do nothing than to create unexpected results (because the
command was executed on the wrong view).
(Before this patch any command list with a criteria string would simply
fail to parse, so this is at least a step in the right direction.)
9 years ago
taiyu
9d50f88cef
fix list sorting
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
9ce5d635f1
commands: Comment/doc for config_command.
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
Drew DeVault
35fd139105
Add all documented scaling modes to config parser
...
Note that not all scaling modes are actually supported by swaybg yet.
9 years ago
Drew DeVault
79b277fe9b
Parse output background config
9 years ago
Drew DeVault
01202568f9
Track pid of child process from exec
...
This will allow us to eventually open that process on the current view.
Requires support from @Cloudef.
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
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
eeec0fda8a
commands: gaps: Re-arrange windows after changing default gaps.
9 years ago
S. Christoffer Eliesen
936f8c24e0
commands: gaps: Always apply default gaps config.
9 years ago
S. Christoffer Eliesen
5c1e20b6ff
commands: gaps: Accept zero value.
9 years ago
S. Christoffer Eliesen
820681965d
commands: gaps: Refactor, expected_syntax.
9 years ago
S. Christoffer Eliesen
af31a3f04a
commands: Learn 'move workspace to output <direction|name>'.
9 years ago
S. Christoffer Eliesen
9c8394022e
commands: Learn 'move <container|window> to output <direction|name>'.
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
5fa8f91655
commands: Learn 'focus output <direction|name>'
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
c49e5340db
commands: cmd_move: Fix "move container to workspace _number_ n"
...
This is an undocumented feature (the word "number" is just ignored
anyway), but it exists to be compatible with i3 config syntax.
Plus some code cleanup at the same time.
9 years ago
S. Christoffer Eliesen
362413bd50
commands: cmd_results->input is duplicated/freed.
9 years ago
S. Christoffer Eliesen
88a2ddbe83
commands: Code formatting.
9 years ago
S. Christoffer Eliesen
187f0ab1c4
commands: Allow 'floating_modifier' & 'focus_follows_mouse' at runtime.
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
9b271573a9
commands: Allow changing resolution outside config load.
9 years ago
S. Christoffer Eliesen
ca862a5bd4
config: Apply output config also during config reload.
9 years ago
S. Christoffer Eliesen
6eb8da0e14
commands,container: Tweak debug output to better reflect reality.
9 years ago
S. Christoffer Eliesen
e3837ba634
commands: Gracefully handle empty commands.
...
Before this patch sway would proceed into find_handler which would cause
a crash trying to parse a NULL string.
This could be triggered via e.g. `i3-msg -s $(sway --get-socketpath)`.
9 years ago
S. Christoffer Eliesen
71ebe8c36b
commands: Catch empty exec with --no-startup-id cases.
9 years ago
S. Christoffer Eliesen
71bcee4f96
commands: Ignore exec switch "--no-startup-id".
...
When using an i3 config verbatim in sway this switch to exec or
exec_always might appear.
Before this patch the switch would be passed to /bin/sh, causing
an error, and the command would not be run.
9 years ago
taiyu
18f4905e62
#187 , let init handle child processes
9 years ago
taiyu
7672886cb5
dont log empty config lines
9 years ago
taiyu
0d51f62224
merge + no c_extensions
9 years ago
Drew DeVault
318e1be240
Fix warnings introduced by prior commit
9 years ago
Drew DeVault
8e25ce4e57
Fix build for debian stretch
...
Fixes #182
9 years ago
taiyu
a04f645d7c
style, safer fork
9 years ago
taiyu
a18caf6706
nomacro
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
2093d4ddee
cmd_for_window dummy function
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
799ff640f8
remove old things
9 years ago
taiyu
aa22dc3113
var replacement changes
9 years ago
taiyu
d673a72705
set variable changes
9 years ago
taiyu
3eb29ea736
strdup + style
9 years ago
taiyu
71af5b7dde
config modes
9 years ago
taiyu
3e9cdfd6a3
man page
9 years ago
taiyu
f25c6b312b
gap resize
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
taiyu
972748e674
cleaned up leaky prev_workspace_name
9 years ago
Luminarys
12e96f0f9e
Added in workspace_auto_back_and_forth
9 years ago
Luminarys
23f040133d
Removed unnecessary debug line
9 years ago
Luminarys
fe2ec8a676
Added in workspace back_and_forth
9 years ago
taiyu
f787fac8fc
#153 add "ctrl" and "alt" to modifiers struct
9 years ago
Luminarys
28e937020a
Made scratchpad handling identical to i3
9 years ago
Luminarys
167409702f
Fixed move scratchpad and added in scratchpad show
9 years ago
Luminarys
7eefecf479
Added in scratchpad adding
9 years ago
taiyu
63e735270c
move v3
9 years ago
taiyu
28c22c8f80
style
9 years ago
taiyu
1820b3f0bb
move function redone
9 years ago
Luminarys
acb3fbdfb5
Added in default_orientation handling
9 years ago
taiyu
4df64127e9
slight fix
9 years ago
taiyu
1fa7a91bfb
move_container_to fixup
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
taiyu
c8415d7fef
split_string memory leaks cleanedup
9 years ago
Luminarys
7a21388997
Minor fix
9 years ago
Luminarys
e01cf0b566
Added in glitchy disabling
9 years ago
Luminarys
98fad060e2
Added in glitchy disabling
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
Luminarys
ad1ca31dd5
Altered resize command to prevent resizing past min h/w
9 years ago
Luminarys
63a3236064
Fixed resizing
9 years ago
taiyu
d2e1c660b1
swayc_is_fullscreen
9 years ago
taiyu
1a1ac64662
bugfixes, renames
9 years ago
minus
8dfaf6265b
fixed #108 signed/unsigned comparison
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
f589731f29
Rewrite of resize command to make it more sane
9 years ago
Half-Shot
68213d57c5
Fixed style errors
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
taiyu
36e07e9ebc
find_parent_by_type
9 years ago
Luminarys
c9935507f2
Style fixes
9 years ago
Luminarys
d06732e1a8
Altered incorrect comment
9 years ago
Luminarys
bc3babf566
Added in basic resize command
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
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
Luminarys
29b6b2f37b
Fixed mode_toggle
9 years ago
taiyu
48a983316c
floating mode_toggle
9 years ago
taiyu
289aab9f0a
removed debug which shouldnt be there
9 years ago
taiyu
8205a6fd3b
floating_modifier uses mod_keys instead of anykey
9 years ago
Drew DeVault
8fb2e7e34e
Merge pull request #79 from taiyu-len/master
...
fixed floating_modifier related things
9 years ago
Syed Amer Gilani
95517ac77e
fix a few possible memory leaks
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
Drew DeVault
cf916bbf6f
Improvements to gaps
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
Half-Shot
f314d95103
Merge branch 'master' of https://github.com/SirCmpwn/sway
9 years ago
Will Hunt
d6ab5e481b
Beguin work on the move command.
...
Stubbed method.
9 years ago
taiyu
03e83c7ef9
restored fullscreen/focus behavior
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
abd0afb03a
enhanced whitespace remover
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
3f475f5009
Minor fix to do proper floating refocuses
9 years ago
Luminarys
47ec999e71
Fixes to floating and umanaged views
9 years ago
Luminarys
05f969074e
Added in basic floating toggling
9 years ago
Luminarys
6b80879ec9
Minor naming fix workspace changing commands
9 years ago
Drew DeVault
7f4529ec8b
Merge pull request #44 from Luminarys/master
...
Added in workspace next/prev and workspace output_next/prev
9 years ago
taiyu
5b860c67c3
fixed split [vh], small memory leak, unescape_strings handle \xnn
9 years ago
Luminarys
0a0fe18fd6
Added in workspace next/prev and workspace output_next/prev
9 years ago
Luminarys
dfaf3a059f
Added in better exit handling
9 years ago
Luminarys
c94c41d1db
Added in kill command
9 years ago
Drew DeVault
360b3d67b0
Add split [h|v|horizontal|vertical] command
9 years ago
taiyu
824a3d81aa
fixed fullscreen & focusing
9 years ago
Drew DeVault
d5ff5e98fa
Fix build
9 years ago
taiyu
9bb2788768
fixed split
9 years ago
Taiyu
80ae2a7774
removed debug
9 years ago
Taiyu
b8cba33c01
changed swayc related functions, cleaned up some functions, moved wlc related things into handlers
9 years ago
Luminarys
ffe59b27a9
Style fix
9 years ago
Luminarys
ea9efc884d
Allowed for execd commands to be spawned after abort
9 years ago
Luminarys
d785cbd54c
Even more style fixes
9 years ago
Luminarys
7788aa4cbd
More style fixes
9 years ago
Luminarys
527288a826
fixes to cmd queue freeing, style
9 years ago
Luminarys
ab130fb56b
Added in command queue
9 years ago
Taiyu
7d294213d1
style
9 years ago
Taiyu
e3edab8a4c
change workspace layout when trying to split it
9 years ago
Taiyu
57c28f96fd
split workspace bug
9 years ago
Taiyu
0a205776d7
small change
9 years ago
Taiyu
ad21281540
style, spelling
9 years ago
Taiyu
5df5b00989
moved signal handling to main
9 years ago
Taiyu
f798e9bb0b
moved fd modifying stuff to log.c
9 years ago