Mikkel Oscar Lyderik
9d7f1afdfb
Add bar option: swaybar_command <command>
9 years ago
Mikkel Oscar Lyderik
90ff36cab8
Terminate children when freeing output container
9 years ago
Mikkel Oscar Lyderik
ede27eabc5
Reload swaybar/swaybg on config reload.
...
This works by tracking the pids of the child processes in the related
output container and terminating the processes and spawning new ones on
a config reload.
Should solve: #347
9 years ago
Drew DeVault
03787871d0
Fix bar invocation for multihead setup
9 years ago
Drew DeVault
1a365f19c9
Use system swaybar instead of local swaybar
9 years ago
Drew DeVault
60c204a09b
Invoke swaybar when an output matches a bar config
9 years ago
Drew DeVault
01798a5ae2
Merge pull request #338 from mikkeloscar/bar-separator-symbol
...
Implement bar option: separator_symbol
9 years ago
Mikkel Oscar Lyderik
053fb09d1e
Use free_flat_list for simple char* list.
...
No need to reimplement free_flat_list functionality.
9 years ago
Mikkel Oscar Lyderik
2fd7dd64ec
Implement bar option: separator_symbol
9 years ago
Mikkel Oscar Lyderik
47f4aea9e7
Correctly free bindings list
9 years ago
Mikkel Oscar Lyderik
f59f5d27aa
Implement bar option: output <output>
9 years ago
Mikkel Oscar Lyderik
05e7334106
Fix active_workspace_border color definition
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
Drew DeVault
242da783f4
Merge pull request #324 from mikkeloscar/free-bar-bindings
...
Free bar->bindings
9 years ago
Mikkel Oscar Lyderik
95de999922
Free bar->bindings
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
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
211bc71599
Use tabs instead of spaces
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
0a8ec26383
Implement bar option: tray_padding <px> [px]
9 years ago
Mikkel Oscar Lyderik
74152043f4
Implement 'bar { }' block parsing
9 years ago
Drew DeVault
19fd979af4
Merge pull request #300 from mikkeloscar/configure-mouse-btn
...
[RFC] Make mouse key used for drag/resize configurable
9 years ago
Drew DeVault
bffbe11e53
Fix config.c strlen error
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
Yacine Hmito
f3f77f9ff1
FALLBACK_CONFIG_DIR did not work. Fixed.
...
- Flag was ignored. Now it's taken into account.
- Missing trailing slashes in path now behaves properly.
9 years ago
Yacine Hmito
09feef89ee
Can customize config fallback directory
...
CMake takes a `FALLBACK_CONFIG_DIR` flag which is the directory where the
standard configuration file `config` is copied at installation.
If loading from typical configuration directories fails, sway loads
FALLBACK_CONFIG_DIR/config (/etc/sway/config by default).
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
Drew DeVault
5a369b3132
Only strip comments at the start of a line
...
This is necessary because i3 config files use CSS notation for colors
(i.e. #rrggbb).
9 years ago
Christoph Gysin
ffdfaaa985
apply_output_config: use list_seq_find() to find config
9 years ago
Christoph Gysin
7d82cd9c0a
cmd_output: Use list_seq_find() to find matching config
9 years ago
Drew DeVault
1661edee28
Allow output config for output named *
...
Which will match any output.
9 years ago
Drew DeVault
2f192cceca
Improve config file loading
...
This also makes it so that your i3 config is used before
/etc/sway/config.
9 years ago
Christoph Gysin
e362f871d9
Call swaybg without invoking a shell
...
This makes escaping the arguments obsolete.
Also avoid dynamic memory allocation for the output id. It only supported ids up
to 99. Now we support up to 999, and take 4 bytes off the stack instead.
9 years ago
Drew DeVault
9fb020d04c
Merge pull request #251 from sce/criteria_1
...
criteria: Add. Learn for_window command.
9 years ago
Christoph Gysin
eeb7f5c036
config: print line number
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
a6c9f40b9a
sway_binding_cmp_keys: Differentiate between modifier keys.
...
Compare modifiers as well as keys when number of modifiers+keys are the
same (so that e.g. mod1+x != mod4+x).
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
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
2100d7bfef
Fix #240
9 years ago
Drew DeVault
5728307520
Add wallpapers to output command
9 years ago
S. Christoffer Eliesen
a94a91a723
cmd_output: Replace existing config if called multiple times.
9 years ago
Drew DeVault
38b18d460a
Revert "Try ~/.i3/config earlier than /etc/sway/config"
...
This reverts commit f0ceb4e909
.
9 years ago
Drew DeVault
f0ceb4e909
Try ~/.i3/config earlier than /etc/sway/config
...
And ~/.config/i3/config, of course.
9 years ago
Drew DeVault
250097d32b
Fix gaps for views being incorrect
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
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
4fea92ef0c
config: Don't try to apply bad output resolution.
9 years ago
S. Christoffer Eliesen
ca862a5bd4
config: Apply output config also during config reload.
9 years ago
taiyu
72aaffcf5b
fix config search paths
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
e1d18e42a8
new_workspace null behavior + testmap functions + regex
9 years ago
taiyu
aaa0923bc4
cmd status + workspace ws output op
9 years ago
taiyu
799ff640f8
remove old things
9 years ago
taiyu
aa22dc3113
var replacement changes
9 years ago
taiyu
fd6d06ff61
fix missing symbol bug
9 years ago
taiyu
da76ecb5f8
escape check fix
9 years ago
taiyu
d673a72705
set variable changes
9 years ago
Thomas Wouters
c3f76f8785
fix outut typo
9 years ago
taiyu
3eb29ea736
strdup + style
9 years ago
taiyu
47ff000697
put strip_whitespace back
9 years ago
taiyu
71af5b7dde
config modes
9 years ago
taiyu
3fb8397724
free config stuff
9 years ago
taiyu
b7de289332
free config when reloading
9 years ago
taiyu
5408d34c9c
config_path cleanup
9 years ago
taiyu
f25c6b312b
gap resize
9 years ago
taiyu
afa6747145
enum for command type
9 years ago
taiyu
c5d0b5d437
style
9 years ago
taiyu
4cd18449d2
better handling of commands during config
9 years ago
Luminarys
12e96f0f9e
Added in workspace_auto_back_and_forth
9 years ago
taiyu
e0d5486957
default floating_mod
9 years ago
Luminarys
acb3fbdfb5
Added in default_orientation handling
9 years ago
taiyu
c8415d7fef
split_string memory leaks cleanedup
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
minus
8dfaf6265b
fixed #108 signed/unsigned comparison
9 years ago
Drew DeVault
3a5fce339f
Reset key buffer on reload
...
To preserve my sanity
9 years ago
Drew DeVault
579fe70ed9
Add command line parsing
...
Closes #6
9 years ago
aouelete
acbcf17905
Fixed config path
9 years ago
Luminarys
0e4df85ba1
Fixed config loading
9 years ago
Drew DeVault
0f29f04816
Set test to NULL when appropriate
...
Thanks @SyedAmerGilani
9 years ago
Drew DeVault
1ec8e082a2
Free environment vars after loading config
...
Thanks @SyedAmerGilani
9 years ago
Drew DeVault
79f9d93ef3
Refactor config file loading
9 years ago
Drew DeVault
ae367c5af4
Merge pull request #80 from SyedAmerGilani/fix_memory_leaks
...
fix a few possible memory leaks
9 years ago
Syed Amer Gilani
ba5b451dd0
fixed string building for XDG_CONFIG_HOME config loading
9 years ago
Syed Amer Gilani
95517ac77e
fix a few possible memory leaks
9 years ago
Luminarys
f718556a85
Removed debugging, added in proper gap resets for config reloads
9 years ago
Drew DeVault
446d593b4c
Merge pull request #73 from KoffeinFlummi/gaps
...
Add support for gaps option
9 years ago
KoffeinFlummi
c75d5ceba4
Merge remote-tracking branch 'upstream/master' into gaps
9 years ago
Drew DeVault
8e201091a5
Fix indented comments being weird
9 years ago
KoffeinFlummi
4c688cba4e
Add support for gaps option
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
Drew DeVault
debb0d6bc1
Fix #64
9 years ago
taiyu
b132f67e7b
minor fixes
9 years ago
taiyu
abd0afb03a
enhanced whitespace remover
9 years ago
taiyu
e9c3a9016f
config handles comments better
9 years ago
Drew DeVault
780893a933
Add support for workspace [name] output [name]
9 years ago
Luminarys
7427ce8930
Switched config loading order to prevent root access w/wlc
9 years ago
Luminarys
64a971882a
Minor fix to config loading
9 years ago
Luminarys
24231bef0e
Added in additional checks for i3 config paths
9 years ago
Luminarys
614393c09c
Added in config file loading from multiple sources
9 years ago
Luminarys
ea9efc884d
Allowed for execd commands to be spawned after abort
9 years ago
Luminarys
527288a826
fixes to cmd queue freeing, style
9 years ago
Luminarys
9a0a858d1e
Typo fix
9 years ago
Luminarys
d12a786160
Removed some unnecessary logs
9 years ago
Luminarys
ab130fb56b
Added in command queue
9 years ago
Luminarys
a5b02791d4
Changed command handler to perform var subs on all cmd args
...
Fixed workspace_next_name to use the first workspace name it can find in the config
Minor fixes
Changed command handler to perform var subs on all portions of a command
Revert "Changed command handler to perform var subs on all portions of a command"
This reverts commit fcfcffa1ea9819bcada6e6c85b40b21bf1b3a96e.
Var sub fixes
Minor fixes
More minor fixes
9 years ago
Taiyu
beabb12d63
destroys empty workspace + minor bugfixes
9 years ago
Luminarys
508980e3ab
Abstracted load_config
9 years ago
Luminarys
7c02a1967b
Spaces to Tabs
9 years ago
Luminarys
68beabda03
Style fixes and slight reload command alteration
9 years ago
Luminarys
c0ee2a6406
Added in reload and exec_always handling
9 years ago
Drew DeVault
f97a48d5b7
Implement focus_follows_mouse
9 years ago
Drew DeVault
a78b921803
Implement key bindings
9 years ago
Drew DeVault
47b28bd335
Clean up config loading and launch wayland
9 years ago
Drew DeVault
5767dcc86e
Mostly implement bindsym command
9 years ago
Drew DeVault
d0f1fb71d1
Flesh out some command parsing
...
This implements the `set` command from i3
9 years ago
Drew DeVault
e07c77fbb7
Build out command subsystem
...
Everyone loves code stolen from your own projects
9 years ago
Drew DeVault
542ef0c777
Pull in some scas code and read i3 config file
9 years ago