Mikkel Oscar Lyderik
95de999922
Free bar->bindings
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
82af08d8e9
Lookup dragging key when in dragging mode
...
Fixes bug introduced in 22916e9
where dragging of floating windows was
messed up.
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
Mikkel Oscar Lyderik
cf56c41c10
Move sway/util.c to common/util.c
9 years ago
Streetwalrus Einstein
774ffbe0d5
Detect proprietary AMD drivers too
9 years ago
Drew DeVault
b65e348233
Fix crash in bar { } blocks
9 years ago
Mikkel Oscar Lyderik
45b959f601
Move numlen(1) to sway/util.c
9 years ago
Mikkel Oscar Lyderik
211bc71599
Use tabs instead of spaces
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
Drew DeVault
3ef6173c15
Merge pull request #311 from mikkeloscar/bar-config-parser
...
Implement bar { } config parsing
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
Kevin Hamacher
64a183b23d
Fix dangling pointer on focus swap/describe WS
9 years ago
Drew DeVault
0b6949df08
Merge pull request #305 from mikkeloscar/fix-window-start
...
Don't reset x,y position before use.
9 years ago
Drew DeVault
7868e44d3f
Notify IPC on workspace changes more frequently
9 years ago
Mikkel Oscar Lyderik
3891a7c73f
Don't reset x,y position before use.
...
The x and y position is calculated based on the position of the bar, we
don't want to reset these values when we need them.
9 years ago
Kevin Hamacher
d77d03ce84
Make destroy_workspace behave as expected
9 years ago
Drew DeVault
2f89b7084d
Correctly handle moving between fullscreen views
...
If focus would move in an output with a fullscreen view, it always
leaves the output. If focus would enter an output with a fullscreen
view, it always focuses the fullscreened view.
9 years ago
Drew DeVault
d361ce656d
Track the fullscreen view on a workspace swayc_t
9 years ago
Drew DeVault
6655534feb
Fullscreen on top of bar
9 years ago
Drew DeVault
af80b12add
Implement invoking `sway` as IPC client
...
As an alternative to invoking swaymsg.
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
f28a1d9183
Add floating_modifier extension to manpage
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
762a78be3c
Merge pull request #292 from christophgysin/man
...
move manpages to subfolders
9 years ago
Drew DeVault
71afa38890
Add swaylock protocol, add resource destructors
...
This prevents sway crashing if swaybg or swaybar dies.
9 years ago
Christoph Gysin
bf5244b49c
Fix using last output config if none matched
9 years ago
Christoph Gysin
99af7e7c9c
move manpages to subfolders
9 years ago
Christoph Gysin
cce9c338c0
cmake: build common code only once
...
This creates (static) libraries for protocols/, common/, and wayland/.
9 years ago
Drew DeVault
9b9d968cbf
Fix for_window [...] move scratchpad correctly
9 years ago
Drew DeVault
d098c620fe
Revert "Fix bug with for_window [...] move scratchpad"
...
This reverts commit 0796b0c475
.
9 years ago
Drew DeVault
0796b0c475
Fix bug with for_window [...] move scratchpad
9 years ago
Drew DeVault
98ff23b497
Fix busted install of /etc/sway/config
9 years ago
Christoph Gysin
92a3538381
cmake: extract sway
9 years ago
Mikkel Oscar Lyderik
3658777e47
Use wlc_point instead of deprecated wlc_origin
...
Struct was renamed in wlc, use the new name.
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
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
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
Drew DeVault
ef91764bc7
Fix output adjustment for panels
9 years ago
Drew DeVault
e59cffcea2
Support desktop shell panels in compositor
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
Drew DeVault
25ad3181f5
Merge pull request #276 from sce/earlier_logging
...
main: Setup logging before wlc_init.
9 years ago
Drew DeVault
c942f1624e
Merge pull request #275 from christophgysin/cmd_output
...
refactor cmd_output
9 years ago
Drew DeVault
0af15cc19e
Merge pull request #269 from christophgysin/usage
...
Add --help to print usage
9 years ago
S. Christoffer Eliesen
c26a4b42cf
main: Setup logging before wlc_init.
...
If `wlc_init` fails the error message will never be logged or printed
anywhere.
9 years ago
Christoph Gysin
7059eccaa1
cmd_output: Log enable/disable state
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
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
Christoph Gysin
923c3245ac
Fix option parsing
...
Using 'flag' results in duplicate code paths for short and long options.
This broke the -q short option in swaymsg, because there was:
{"quiet", no_argument, &quiet, 'q'}
Which will set quiet to 'q' and return 0, not 'q'.
9 years ago
Christoph Gysin
2f2e1f3fc7
sway: Add --help option that prints usage
9 years ago
Christoph Gysin
e48a16ce5e
sway: Print usage and exit on unknown options
9 years ago
Christoph Gysin
3ba33321de
Use macros for exit values
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
20cb390323
sway/main: Move wlc init to after args are handled.
...
First of all because it's not needed that early, and second of all
because there's a bug where calling `sway --get-socketpath` via `popen`
causes the child sway process to spin/hang instead of returning EOF.
(Specifically `(unset SWAYSOCK; swaymsg)` hangs.) This patch fixes that.
(Also note that this patch moves the "detailed review" comment, so I
guess this patch requires extra detailed review?)
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
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
Drew DeVault
cbd7348704
Merge pull request #265 from sce/better_logging
...
debug_log: Improve container_log so that debug lines are aligned.
9 years ago
Drew DeVault
cad2694a3c
Merge pull request #264 from sce/fix_ws_next_name
...
workspace: Improve workspace_next_name.
9 years ago
S. Christoffer Eliesen
c1d88acf72
debug_log: Improve container_log so that debug lines are aligned.
...
Makes the log easier to read, and the developers more happy (this one at
least).
9 years ago
S. Christoffer Eliesen
0a78af0acc
workspace: Improve workspace_next_name.
...
This function looks for bound commands that start with `workspace` (ie.
the commands that change to a static workspace) and fetches the
workspace name.
However, if it's actually a list of commands, then the parsing will pick
up the delimiter ("," or ";") and also fail to recognize keywords
("next" etc).
This patch fixes that by properly separating with delimiters.
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
Drew DeVault
27f03c705d
Move IPC client into common, refactor IPC
9 years ago
Drew DeVault
53d353e6b4
Add "variant": "sway" to IPC version response
9 years ago
Drew DeVault
9a15371ba3
Parse command line args for swaymsg
9 years ago
Drew DeVault
206606b32c
Merge pull request #261 from christophgysin/exec
...
Call swaybg without invoking a shell
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
Christoph Gysin
be3fae148b
swaybg: implement scaling mode "fit"
9 years ago
Drew DeVault
9fb020d04c
Merge pull request #251 from sce/criteria_1
...
criteria: Add. Learn for_window command.
9 years ago
S. Christoffer Eliesen
5483fe1883
criteria: Code formatting.
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
Christoph Gysin
a99aa92bc6
extensions: add missing include
...
This fixes a compiler warning:
../sway/extensions.c: In function ‘set_background’:
../sway/extensions.c:16:37: warning: implicit declaration of function ‘malloc’ [-Wimplicit-function-declaration]
struct background_config *config = malloc(sizeof(struct background_config));
^
../sway/extensions.c:16:37: warning: incompatible implicit declaration of built-in function ‘malloc’
../sway/extensions.c:16:37: note: include ‘<stdlib.h>’ or provide a declaration of ‘malloc’
9 years ago