implement a startup monitor, move code to src/startup.c
This commit is contained in:
@ -66,5 +66,6 @@
|
||||
#include "assignments.h"
|
||||
#include "regex.h"
|
||||
#include "libi3.h"
|
||||
#include "startup.h"
|
||||
|
||||
#endif
|
||||
|
35
include/startup.h
Normal file
35
include/startup.h
Normal file
@ -0,0 +1,35 @@
|
||||
/*
|
||||
* vim:ts=4:sw=4:expandtab
|
||||
*
|
||||
* i3 - an improved dynamic tiling window manager
|
||||
*
|
||||
* © 2009-2011 Michael Stapelberg and contributors
|
||||
*
|
||||
* See file LICENSE for license information.
|
||||
*
|
||||
*/
|
||||
#ifndef _STARTUP_H
|
||||
#define _STARTUP_H
|
||||
|
||||
#define SN_API_NOT_YET_FROZEN 1
|
||||
#include <libsn/sn-monitor.h>
|
||||
|
||||
/**
|
||||
* Starts the given application by passing it through a shell. We use double
|
||||
* fork to avoid zombie processes. As the started application’s parent exits
|
||||
* (immediately), the application is reparented to init (process-id 1), which
|
||||
* correctly handles childs, so we don’t have to do it :-).
|
||||
*
|
||||
* The shell is determined by looking for the SHELL environment variable. If
|
||||
* it does not exist, /bin/sh is used.
|
||||
*
|
||||
*/
|
||||
void start_application(const char *command);
|
||||
|
||||
/**
|
||||
* Called by libstartup-notification when something happens
|
||||
*
|
||||
*/
|
||||
void startup_monitor_event(SnMonitorEvent *event, void *userdata);
|
||||
|
||||
#endif
|
@ -66,18 +66,6 @@ Rect rect_add(Rect a, Rect b);
|
||||
*/
|
||||
bool update_if_necessary(uint32_t *destination, const uint32_t new_value);
|
||||
|
||||
/**
|
||||
* Starts the given application by passing it through a shell. We use double
|
||||
* fork to avoid zombie processes. As the started application’s parent exits
|
||||
* (immediately), the application is reparented to init (process-id 1), which
|
||||
* correctly handles childs, so we don’t have to do it :-).
|
||||
*
|
||||
* The shell is determined by looking for the SHELL environment variable. If
|
||||
* it does not exist, /bin/sh is used.
|
||||
*
|
||||
*/
|
||||
void start_application(const char *command);
|
||||
|
||||
/**
|
||||
* exec()s an i3 utility, for example the config file migration script or
|
||||
* i3-nagbar. This function first searches $PATH for the given utility named,
|
||||
|
Reference in New Issue
Block a user