aboutsummaryrefslogtreecommitdiff
path: root/sway/main.c
AgeCommit message (Collapse)Author
2016-02-27Free config before exiting sway.Mikkel Oscar Lyderik
Apart from freeing the sway_config struct, this also terminates the swaybars spawned by sway, since they are linked by PID to the bar config structs.
2016-02-26Correctly exit sway on errors.Mikkel Oscar Lyderik
Calling `exit` in sway_terminate prevents sway from correctly shutting down (freeing data, cleanly terminating the ipc server, etc.). A better way is to exit straight away if the failure occurs before `wlc_run` and use sway_abort as usual if it occur when wlc is running.
2016-02-25Fix for when sway_abort doesn't exitYacine Hmito
sway_terminate does an exit in case wlc_terminate doesn't
2016-02-25No options when using sway as IPC clientYacine Hmito
Sway used to attempt sending an IPC command composed of every argument after the first non-option argument encountered. Now, raises an error if an option is encountered before the intended command. Some options such as -h or -v take effect when parsing, so they still apply.
2016-02-25Removed p as a valid CLI optionYacine Hmito
The get-socketpath long option had an undocumented short alternative as `p`. It has been removed. However, the code in the options array is still the 'p' char.
2016-01-22Prevent ipc from crashing swaycrondog
2016-01-19libinputCole Mickens
2016-01-05Init layout before checking configMikkel Oscar Lyderik
2015-12-29Handle SIGTERM sent to swayMikkel Oscar Lyderik
This makes sway handle and gracefully shut down everything when receiving a SIGTERM. Fix #416
2015-12-14Detect proprietary AMD drivers tooStreetwalrus Einstein
2015-12-12Implement invoking `sway` as IPC clientDrew DeVault
As an alternative to invoking swaymsg.
2015-11-29Merge pull request #276 from sce/earlier_loggingDrew DeVault
main: Setup logging before wlc_init.
2015-11-29main: Setup logging before wlc_init.S. Christoffer Eliesen
If `wlc_init` fails the error message will never be logged or printed anywhere.
2015-11-28Fix option parsingChristoph Gysin
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'.
2015-11-28sway: Add --help option that prints usageChristoph Gysin
2015-11-28sway: Print usage and exit on unknown optionsChristoph Gysin
2015-11-28Use macros for exit valuesChristoph Gysin
2015-11-28sway/main: Move wlc init to after args are handled.S. Christoffer Eliesen
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?)
2015-11-27Move IPC client into common, refactor IPCDrew DeVault
2015-11-18Basic support for extensions in server and clientsDrew DeVault
2015-11-13ipc: Store socketname in SWAYSOCK. Fixes `--get-socketpath`.S. Christoffer Eliesen
After adding pid to the socket path the `--get-socketpath` command broke because it doesn't know the pid of the running instance. Fix this by setting and querying `SWAYSOCK`. Also ignore `SWAYSOCK` upon normal startup if a socket exists at that location (ie. from another sway instance), and don't overwrite `I3SOCK` if it exists either.
2015-10-18main: Implement --get-socketpath switch.S. Christoffer Eliesen
2015-10-08#187, let init handle child processestaiyu
2015-10-08Revert "#187 cleanup zombies properly"Drew DeVault
2015-10-07#187 cleanup zombies properly using defaulttaiyu
2015-09-18Fix warnings introduced by prior commitDrew DeVault
2015-09-18Fix build for debian stretchDrew DeVault
Fixes #182
2015-09-02fclose /proc/modules when we're done with itDrew DeVault
2015-09-02Add check for nvidia module and warn userDrew DeVault
2015-09-02Log sway version on startupDrew DeVault
2015-08-26Added in better versioning infoLuminarys
2015-08-26move_container_to fixuptaiyu
2015-08-25Added in build version based on git hashLuminarys
2015-08-25longopt minor fixtaiyu
2015-08-23Prefix log events from wlc with [wlc]Drew DeVault
2015-08-23Handle wlc log eventsDrew DeVault
2015-08-21Remove wlc logging stuffDrew DeVault
2015-08-20added sway_terminate to exit cleanlyminus
2015-08-20properly exit swayminus
- wlc_terminate() instead of exit(0) - unlink IPC socket
2015-08-20very basic IPC implementationminus
simply executes the received data as command
2015-08-20Add command line parsingDrew DeVault
Closes #6
2015-08-17Rearrange main.c some moreDrew DeVault
2015-08-17Switched config loading order to prevent root access w/wlcLuminarys
2015-08-16Remove WLC_IDLE_TIME environment variableDrew DeVault
2015-08-16Config errors should not be fatalDrew DeVault
2015-08-15Set WLC_IDLE_TIME to 0Drew DeVault
2015-08-13Allowed for execd commands to be spawned after abortLuminarys
2015-08-13Fixes to workspace generationLuminarys
2015-08-13moved signal handling to mainTaiyu
2015-08-12moving stuff aroundTaiyu