diff --git a/meson.build b/meson.build index 3f60ba83a..98b92b637 100644 --- a/meson.build +++ b/meson.build @@ -30,6 +30,7 @@ cc = meson.get_compiler('c') is_freebsd = host_machine.system().startswith('freebsd') datadir = get_option('datadir') +libdir = get_option('libdir') sysconfdir = get_option('sysconfdir') prefix = get_option('prefix') @@ -106,8 +107,7 @@ if scdoc.found() 'sway/sway-output.5.scd', 'swaymsg/swaymsg.1.scd', 'swaynag/swaynag.1.scd', - 'swaynag/swaynag.5.scd', - 'swayrun/swayrun.1.scd' + 'swaynag/swaynag.5.scd' ] foreach filename : man_files topic = filename.split('.')[-3].split('/')[-1] @@ -154,6 +154,7 @@ subdir('swayrun') config = configuration_data() config.set('datadir', join_paths(prefix, datadir)) +config.set('libdir', join_paths(prefix, libdir)) config.set('prefix', prefix) config.set('sysconfdir', join_paths(prefix, sysconfdir)) @@ -180,8 +181,10 @@ else ) endif -install_data( - 'sway.desktop', +configure_file( + configuration: config, + input: 'sway.desktop.in', + output: '@BASENAME@', install_dir: datadir + '/wayland-sessions' ) diff --git a/sway.desktop b/sway.desktop.in similarity index 75% rename from sway.desktop rename to sway.desktop.in index 2e83cc893..e41771cea 100644 --- a/sway.desktop +++ b/sway.desktop.in @@ -1,5 +1,5 @@ [Desktop Entry] Name=Sway Comment=SirCmpwn's Wayland window manager -Exec=swayrun +Exec=@libdir@/sway/swayrun Type=Application diff --git a/swayrun/meson.build b/swayrun/meson.build index bbf682b1a..a374ac12a 100644 --- a/swayrun/meson.build +++ b/swayrun/meson.build @@ -1,5 +1,6 @@ executable( 'swayrun', 'main.c', - install: true + install: true, + install_dir: libdir + '/sway' ) diff --git a/swayrun/swayrun.1.scd b/swayrun/swayrun.1.scd deleted file mode 100644 index 44a917fde..000000000 --- a/swayrun/swayrun.1.scd +++ /dev/null @@ -1,29 +0,0 @@ -swayrun(1) - -# NAME - -swayrun - Run Sway from a login shell - -# SYNOPSIS - -_swayrun_ [options...] [command] - -# DESCRIPTION - -Attempts to run *sway*(1) via the user's login shell. This allows environment -configuration and other login actions, for example when run via a display manager. - -All arguments to swayrun will be passed through unaltered to sway. - -If a login shell cannot be determined, sway will be executed normally. - -# ENVIRONMENT - -The following environment variables have an effect on swayrun: - -_SHELL_ - Holds the path to the login shell. - -# SEE - -*sway*(1)