Commit graph

170 commits

Author SHA1 Message Date
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).
2015-10-27 14:37:44 +01:00
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.
2015-10-25 13:19:48 +01:00
S. Christoffer Eliesen 362413bd50 commands: cmd_results->input is duplicated/freed. 2015-10-23 13:03:14 +02:00
S. Christoffer Eliesen 88a2ddbe83 commands: Code formatting. 2015-10-23 12:55:48 +02:00
S. Christoffer Eliesen 187f0ab1c4 commands: Allow 'floating_modifier' & 'focus_follows_mouse' at runtime. 2015-10-23 12:45:46 +02:00
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."
2015-10-22 23:36:24 +02:00
S. Christoffer Eliesen edf33aad29 config: Add "seamless_mouse" to decide if pointer crosses output edges. 2015-10-22 01:39:12 +02:00
S. Christoffer Eliesen 9b271573a9 commands: Allow changing resolution outside config load. 2015-10-22 00:16:10 +02:00
S. Christoffer Eliesen ca862a5bd4 config: Apply output config also during config reload. 2015-10-21 23:24:06 +02:00
S. Christoffer Eliesen 6eb8da0e14 commands,container: Tweak debug output to better reflect reality. 2015-10-21 22:22:01 +02:00
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)`.
2015-10-19 19:45:35 +02:00
S. Christoffer Eliesen 71ebe8c36b commands: Catch empty exec with --no-startup-id cases. 2015-10-18 19:14:49 +02:00
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.
2015-10-17 14:28:38 +02:00
taiyu 18f4905e62 #187, let init handle child processes 2015-10-08 08:12:31 -07:00
taiyu 7672886cb5 dont log empty config lines 2015-09-18 08:33:28 -07:00
taiyu 0d51f62224 merge + no c_extensions 2015-09-18 07:23:04 -07:00
Drew DeVault 318e1be240 Fix warnings introduced by prior commit 2015-09-18 07:27:35 -04:00
Drew DeVault 8e25ce4e57 Fix build for debian stretch
Fixes #182
2015-09-18 07:16:20 -04:00
taiyu a04f645d7c style, safer fork 2015-09-15 06:56:51 -07:00
taiyu a18caf6706 nomacro 2015-09-15 06:39:24 -07:00
taiyu 0bea2e2122 multi command keybinds 2015-09-14 19:59:25 -07:00
Drew DeVault e505abfe75 Revert "new_workspace null behavior + testmap functions + regex"
This reverts commit e1d18e42a8.

Fixes #180

cc @taiyu-len
2015-09-13 19:46:16 -04:00
taiyu 2093d4ddee cmd_for_window dummy function 2015-09-12 02:45:03 -07:00
taiyu e1d18e42a8 new_workspace null behavior + testmap functions + regex 2015-09-12 02:38:03 -07:00
taiyu aaa0923bc4 cmd status + workspace ws output op 2015-09-10 11:07:40 -07:00
taiyu 6388241abb mode supports multi token names 2015-09-08 10:53:15 -07:00
taiyu 799ff640f8 remove old things 2015-09-08 10:28:53 -07:00
taiyu aa22dc3113 var replacement changes 2015-09-08 10:27:09 -07:00
taiyu d673a72705 set variable changes 2015-09-08 08:54:57 -07:00
taiyu 3eb29ea736 strdup + style 2015-09-07 15:03:04 -07:00
taiyu 71af5b7dde config modes 2015-09-07 14:29:40 -07:00
taiyu 3e9cdfd6a3 man page 2015-09-06 06:52:20 -07:00
taiyu f25c6b312b gap resize 2015-09-05 20:48:52 -07:00
taiyu afa6747145 enum for command type 2015-09-04 17:09:07 -07:00
taiyu 4cd18449d2 better handling of commands during config 2015-09-04 16:57:03 -07:00
taiyu dbeca88dee default gap value 2015-09-04 16:14:59 -07:00
taiyu 972748e674 cleaned up leaky prev_workspace_name 2015-09-01 09:02:26 -07:00
Luminarys 12e96f0f9e Added in workspace_auto_back_and_forth 2015-08-30 21:34:24 -05:00
Luminarys 23f040133d Removed unnecessary debug line 2015-08-30 20:02:31 -05:00
Luminarys fe2ec8a676 Added in workspace back_and_forth 2015-08-30 19:59:14 -05:00
taiyu f787fac8fc #153 add "ctrl" and "alt" to modifiers struct 2015-08-30 13:20:56 -07:00
Luminarys 28e937020a Made scratchpad handling identical to i3 2015-08-29 21:14:13 -05:00
Luminarys 167409702f Fixed move scratchpad and added in scratchpad show 2015-08-29 00:33:33 -05:00
Luminarys 7eefecf479 Added in scratchpad adding 2015-08-28 23:39:12 -05:00
taiyu 63e735270c move v3 2015-08-28 19:35:29 -07:00
taiyu 28c22c8f80 style 2015-08-28 11:14:59 -07:00
taiyu 1820b3f0bb move function redone 2015-08-28 11:03:10 -07:00
Luminarys acb3fbdfb5 Added in default_orientation handling 2015-08-27 21:52:59 -05:00
taiyu 4df64127e9 slight fix 2015-08-26 16:50:47 -07:00
taiyu 1fa7a91bfb move_container_to fixup 2015-08-26 11:01:26 -07:00