Skip to content

Commit ab67da2

Browse files
committed
Add notification daemon handler
1 parent e9b2a54 commit ab67da2

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed

data/desktop.conf.example

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ message_manager/command=lxsession-message-gtk
9191
# Utility to load and apply xsettings (options available : "gnome", "xfce" and "build-in" for using build-in support of lxsession)
9292
xsettings_manager/command=build-in
9393

94+
# Utility for displaying notification
95+
notification/command=
96+
notification/autostart=
97+
9498
# Default web browser (desktop is the corresponding desktop file)
9599
webbrowser/command=
96100
webbrowser/desktop=

lxsession/main.vala

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,16 @@ namespace Lxsession {
384384
}
385385
}
386386

387+
if (global_settings.get_item_string("Session", "notification", "autostart") == "true")
388+
{
389+
if (global_settings.get_item_string("Session", "notification", "command") != null)
390+
{
391+
var notification = new GenericSimpleApp();
392+
global_notification = notification;
393+
global_notification.launch();
394+
}
395+
}
396+
387397
/* Autostart application define by the user */
388398
var auto = new LxsessionAutostartConfig();
389399
auto.start_applications();

lxsession/settings.vala

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -772,6 +772,13 @@ public class LxsessionConfigKeyFile: LxsessionConfig
772772
read_key_value(kf, "Session", "widget1", "autostart", "string");
773773
}
774774

775+
/* Notification */
776+
if (read_keyfile_string_value(kf, "Session", "notification", "command", null) != null)
777+
{
778+
read_key_value(kf, "Session", "notification", "command", "string");
779+
read_key_value(kf, "Session", "notification", "autostart", "string");
780+
}
781+
775782
/* Other session applications */
776783
read_key_value(kf, "Session", "screensaver", "command", "string");
777784
read_key_value(kf, "Session", "power_manager", "command", "string");

0 commit comments

Comments
 (0)