X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=include%2Fstartup.h;h=cb784913b303efc859a6894750673b4a596288ee;hb=4daed31c3e0bfb314f83050fe77a310eec11eb5a;hp=290c8d21cf4f72db53d72dc7650fa5c0ea6c1414;hpb=0adbffb38621192c416ac52aa6b82ac57fb6394d;p=i3%2Fi3 diff --git a/include/startup.h b/include/startup.h index 290c8d21..cb784913 100644 --- a/include/startup.h +++ b/include/startup.h @@ -10,8 +10,7 @@ * the appropriate workspace. * */ -#ifndef _STARTUP_H -#define _STARTUP_H +#pragma once #define SN_API_NOT_YET_FROZEN 1 #include @@ -22,8 +21,8 @@ * (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. + * The shell used to start applications is the system's bourne shell (i.e., + * /bin/sh). * * The no_startup_id flag determines whether a startup notification context * (and ID) should be created, which is the default and encouraged behavior. @@ -31,12 +30,33 @@ */ void start_application(const char *command, bool no_startup_id); +/** + * Deletes a startup sequence, ignoring whether its timeout has elapsed. + * Useful when e.g. a window is moved between workspaces and its children + * shouldn't spawn on the original workspace. + * + */ +void startup_sequence_delete(struct Startup_Sequence *sequence); + /** * Called by libstartup-notification when something happens * */ void startup_monitor_event(SnMonitorEvent *event, void *userdata); +/** + * Renames workspaces that are mentioned in the startup sequences. + * + */ +void startup_sequence_rename_workspace(char *old_name, char *new_name); + +/** + * Gets the stored startup sequence for the _NET_STARTUP_ID of a given window. + * + */ +struct Startup_Sequence *startup_sequence_get(i3Window *cwindow, + xcb_get_property_reply_t *startup_id_reply, bool ignore_mapped_leader); + /** * Checks if the given window belongs to a startup notification by checking if * the _NET_STARTUP_ID property is set on the window (or on its leader, if it’s @@ -47,5 +67,3 @@ void startup_monitor_event(SnMonitorEvent *event, void *userdata); * */ char *startup_workspace_for_window(i3Window *cwindow, xcb_get_property_reply_t *startup_id_reply); - -#endif