diff --git a/data/code.service.in b/data/code.service.in new file mode 100644 index 000000000..b850f9ee7 --- /dev/null +++ b/data/code.service.in @@ -0,0 +1,3 @@ +[D-BUS Service] +Name=io.elementary.code +Exec=@BINDIR@/io.elementary.code --gapplication-service diff --git a/data/io.elementary.code.desktop.in.in b/data/io.elementary.code.desktop.in.in index 9b0d98861..3ef75749c 100644 --- a/data/io.elementary.code.desktop.in.in +++ b/data/io.elementary.code.desktop.in.in @@ -1,17 +1,21 @@ [Desktop Entry] Type=Application + Name=@NAME@ Comment=Edit code files GenericName=Code Editor -Exec=@EXEC_NAME@ %U -Icon=io.elementary.code -Terminal=false Categories=Development;GTK;IDE;WebDevelopment; Keywords=text;IDE;scratch;code; MimeType=text/plain;inode/directory; -StartupNotify=true Actions=NewWindow;NewFile; +Icon=io.elementary.code +Exec=@EXEC_NAME@ %U +DBusActivatable=true +SingleMainWindow=false +StartupNotify=true +Terminal=false + [Desktop Action NewFile] Name=New File Exec=@EXEC_NAME@ --new-tab diff --git a/data/meson.build b/data/meson.build index 0520e340b..9e9201f2f 100644 --- a/data/meson.build +++ b/data/meson.build @@ -30,6 +30,7 @@ install_data( ) config_data = configuration_data() +config_data.set('BINDIR', get_option('bindir')) config_data.set('EXEC_NAME', meson.project_name()) if (branch != '') @@ -38,6 +39,14 @@ else config_data.set('NAME', 'Code') endif +configure_file( + input: 'code.service.in', + output: meson.project_name() + '.service', + configuration: config_data, + install_dir: get_option('datadir') / 'dbus-1' / 'services', + install: true +) + # Set the executable name and translate the desktop files desktop_in_file = configure_file( input: 'io.elementary.code.desktop.in.in',