Move swayrun outside of PATH

Because swayrun is not intended to be called directly by users,
it is moved to /usr/lib. The sway.desktop wayland session file is
also updated to reflect this new location.
This commit is contained in:
Corey Hinshaw 2019-02-11 22:40:41 -05:00
parent eb22dee79c
commit 9b10a16775
4 changed files with 10 additions and 35 deletions

View file

@ -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'
)

View file

@ -1,5 +1,5 @@
[Desktop Entry]
Name=Sway
Comment=SirCmpwn's Wayland window manager
Exec=swayrun
Exec=@libdir@/sway/swayrun
Type=Application

View file

@ -1,5 +1,6 @@
executable(
'swayrun',
'main.c',
install: true
install: true,
install_dir: libdir + '/sway'
)

View file

@ -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)