diff --git a/bin/com.github.rafostar.ClapperRemote.in b/bin/com.github.rafostar.ClapperRemote.in new file mode 100644 index 00000000..e567a7b9 --- /dev/null +++ b/bin/com.github.rafostar.ClapperRemote.in @@ -0,0 +1,12 @@ +#!@GJS@ + +const Package = imports.package; + +Package.init({ + name: '@PACKAGE_NAME@', + version: '@PACKAGE_VERSION@', + prefix: '@prefix@', + libdir: '@libdir@', + datadir: '@datadir@', +}); +Package.run(imports.clapper_src.mainRemote); diff --git a/bin/meson.build b/bin/meson.build index 2cdf501d..6a3aec8e 100644 --- a/bin/meson.build +++ b/bin/meson.build @@ -6,11 +6,15 @@ bin_conf.set('prefix', get_option('prefix')) bin_conf.set('libdir', join_paths(get_option('prefix'), get_option('libdir'))) bin_conf.set('datadir', join_paths(get_option('prefix'), get_option('datadir'))) -configure_file( - input: 'com.github.rafostar.Clapper.in', - output: 'com.github.rafostar.Clapper', - configuration: bin_conf, - install: true, - install_dir: get_option('bindir'), - install_mode: 'rwxr-xr-x' -) +clapper_apps = [ '', 'Remote' ] + +foreach id_postfix : clapper_apps + configure_file( + input: 'com.github.rafostar.Clapper' + id_postfix + '.in', + output: 'com.github.rafostar.Clapper' + id_postfix, + configuration: bin_conf, + install: true, + install_dir: get_option('bindir'), + install_mode: 'rwxr-xr-x' + ) +endforeach diff --git a/clapper_src/appRemote.js b/clapper_src/appRemote.js new file mode 100644 index 00000000..ae34f9c2 --- /dev/null +++ b/clapper_src/appRemote.js @@ -0,0 +1,17 @@ +const { GObject } = imports.gi; +const { AppBase } = imports.clapper_src.appBase; +const { HeaderBarBase } = imports.clapper_src.headerbarBase; + +var AppRemote = GObject.registerClass( +class ClapperAppRemote extends AppBase +{ + vfunc_startup() + { + super.vfunc_startup(); + + let headerBar = new HeaderBarBase(this.active_window); + this.active_window.set_titlebar(headerBar); + + this.active_window.maximize(); + } +}); diff --git a/clapper_src/mainRemote.js b/clapper_src/mainRemote.js new file mode 100644 index 00000000..6321f769 --- /dev/null +++ b/clapper_src/mainRemote.js @@ -0,0 +1,17 @@ +imports.gi.versions.Gdk = '4.0'; +imports.gi.versions.Gtk = '4.0'; + +const { AppRemote } = imports.clapper_src.appRemote; +const Misc = imports.clapper_src.misc; + +const opts = { + idPostfix: 'Remote', +}; + +Misc.clapperPath = pkg.datadir + '/' + + pkg.name.substring(0, pkg.name.lastIndexOf(opts.idPostfix)); + +function main() +{ + new AppRemote(opts).run(); +}