Start up in daemon mode when GNOME starts

Hat tip to Guido for the session.{c,h} files.

Closes #45
This commit is contained in:
Bob Ham
2019-08-08 14:38:28 +01:00
parent fc16ec7a71
commit 646682b878
6 changed files with 190 additions and 0 deletions

View File

@@ -1,8 +1,12 @@
datadir = get_option('datadir')
sysconfdir = get_option('sysconfdir')
# Desktop file
install_data('sm.puri.Calls.desktop',
install_dir : join_paths(datadir, 'applications'))
install_data('sm.puri.Calls-daemon.desktop',
rename : 'sm.puri.Calls.desktop',
install_dir : join_paths(sysconfdir, 'xdg/autostart'))
desktop_utils = find_program('desktop-file-validate', required: false)
if desktop_utils.found()
@@ -10,6 +14,10 @@ if desktop_utils.found()
args: [join_paths(meson.current_source_dir(),
'sm.puri.Calls.desktop')
])
test('Validate daemon desktop file', desktop_utils,
args: [join_paths(meson.current_source_dir(),
'sm.puri.Calls-daemon.desktop')
])
endif
# Appdata file

View File

@@ -0,0 +1,16 @@
[Desktop Entry]
Name=Calls (daemon)
GenericName=Phone
Comment=A phone dialer and call handler (daemon mode)
# Translators: These are desktop search terms. Do not translate semicolons, end line with a semicolon.
Keywords=Telephone;Call;Phone;Dial;Dialer;PTSN;
# Translators: Do NOT translate or transliterate this text (this is an icon file name)!
Icon=sm.puri.Calls
TryExec=calls
Exec=calls --daemon
Type=Application
StartupNotify=true
NoDisplay=true
Terminal=false
Categories=GNOME;GTK;Telephony;
X-GNOME-AutoRestart=true