mirror of
https://github.com/labwc/labwc.git
synced 2026-04-16 08:21:26 -04:00
add autostart with permissions
This commit is contained in:
parent
bed325a7ff
commit
f0a9875da6
3 changed files with 14 additions and 0 deletions
|
|
@ -202,6 +202,8 @@ struct rcxml {
|
||||||
|
|
||||||
struct wl_list window_rules; /* struct window_rule.link */
|
struct wl_list window_rules; /* struct window_rule.link */
|
||||||
|
|
||||||
|
struct wl_list autostart; /* struct action.link */
|
||||||
|
|
||||||
/* Menu */
|
/* Menu */
|
||||||
unsigned int menu_ignore_button_release_period;
|
unsigned int menu_ignore_button_release_period;
|
||||||
bool menu_show_icons;
|
bool menu_show_icons;
|
||||||
|
|
|
||||||
|
|
@ -1083,6 +1083,8 @@ entry(xmlNode *node, char *nodename, char *content)
|
||||||
/* handle nested nodes */
|
/* handle nested nodes */
|
||||||
if (!strcasecmp(nodename, "margin")) {
|
if (!strcasecmp(nodename, "margin")) {
|
||||||
fill_usable_area_override(node);
|
fill_usable_area_override(node);
|
||||||
|
} else if (!strcasecmp(nodename, "autostart")) {
|
||||||
|
append_parsed_actions(node, &rc.autostart);
|
||||||
} else if (!strcasecmp(nodename, "keybind.keyboard")) {
|
} else if (!strcasecmp(nodename, "keybind.keyboard")) {
|
||||||
fill_keybind(node);
|
fill_keybind(node);
|
||||||
} else if (!strcasecmp(nodename, "context.mouse")) {
|
} else if (!strcasecmp(nodename, "context.mouse")) {
|
||||||
|
|
@ -1477,6 +1479,7 @@ rcxml_init(void)
|
||||||
|
|
||||||
if (!has_run) {
|
if (!has_run) {
|
||||||
wl_list_init(&rc.usable_area_overrides);
|
wl_list_init(&rc.usable_area_overrides);
|
||||||
|
wl_list_init(&rc.autostart);
|
||||||
wl_list_init(&rc.keybinds);
|
wl_list_init(&rc.keybinds);
|
||||||
wl_list_init(&rc.mousebinds);
|
wl_list_init(&rc.mousebinds);
|
||||||
wl_list_init(&rc.libinput_categories);
|
wl_list_init(&rc.libinput_categories);
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@
|
||||||
#include <wlr/backend/multi.h>
|
#include <wlr/backend/multi.h>
|
||||||
#include <wlr/config.h>
|
#include <wlr/config.h>
|
||||||
#include <wlr/util/log.h>
|
#include <wlr/util/log.h>
|
||||||
|
#include "action.h"
|
||||||
#include "common/buf.h"
|
#include "common/buf.h"
|
||||||
#include "common/dir.h"
|
#include "common/dir.h"
|
||||||
#include "common/file-helpers.h"
|
#include "common/file-helpers.h"
|
||||||
|
|
@ -303,6 +304,13 @@ session_environment_init(void)
|
||||||
paths_destroy(&paths);
|
paths_destroy(&paths);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
session_run_rc_autostart(void)
|
||||||
|
{
|
||||||
|
wlr_log(WLR_INFO, "run autostart actions");
|
||||||
|
actions_run(NULL, &rc.autostart, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
session_run_script(const char *script)
|
session_run_script(const char *script)
|
||||||
{
|
{
|
||||||
|
|
@ -335,6 +343,7 @@ session_autostart_init(void)
|
||||||
{
|
{
|
||||||
/* Update dbus and systemd user environment, each may fail gracefully */
|
/* Update dbus and systemd user environment, each may fail gracefully */
|
||||||
update_activation_env(/* initialize */ true);
|
update_activation_env(/* initialize */ true);
|
||||||
|
session_run_rc_autostart();
|
||||||
session_run_script("autostart");
|
session_run_script("autostart");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue