Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions data/code.service.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[D-BUS Service]
Name=io.elementary.code
Exec=@BINDIR@/io.elementary.code --gapplication-service
12 changes: 8 additions & 4 deletions data/io.elementary.code.desktop.in.in
Original file line number Diff line number Diff line change
@@ -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
Expand Down
9 changes: 9 additions & 0 deletions data/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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 != '')
Expand All @@ -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',
Expand Down