mirror of
https://github.com/swaywm/sway.git
synced 2024-11-26 18:01:29 +00:00
Merge pull request #399 from gpyh/dont-hardcode-path
Use SYSCONFDIR as recommended
This commit is contained in:
commit
72043b231d
|
@ -2,10 +2,6 @@ cmake_minimum_required(VERSION 3.1.0)
|
||||||
|
|
||||||
project(sway C)
|
project(sway C)
|
||||||
|
|
||||||
set(FALLBACK_CONFIG_DIR "/etc/sway" CACHE PATH
|
|
||||||
"Fallback config directory defaults to /etc/sway")
|
|
||||||
add_definitions(-DFALLBACK_CONFIG_DIR=\"${FALLBACK_CONFIG_DIR}\")
|
|
||||||
|
|
||||||
set(CMAKE_C_FLAGS "-g")
|
set(CMAKE_C_FLAGS "-g")
|
||||||
set(CMAKE_C_STANDARD 99)
|
set(CMAKE_C_STANDARD 99)
|
||||||
set(CMAKE_C_EXTENSIONS OFF)
|
set(CMAKE_C_EXTENSIONS OFF)
|
||||||
|
|
|
@ -66,9 +66,8 @@ On systems without logind, you need to suid the sway binary:
|
||||||
|
|
||||||
If you already use i3, then copy your i3 config to `~/.config/sway/config` and
|
If you already use i3, then copy your i3 config to `~/.config/sway/config` and
|
||||||
it'll work out of the box. Otherwise, copy the sample configuration file to
|
it'll work out of the box. Otherwise, copy the sample configuration file to
|
||||||
`~/.config/sway/config`. It is located at `/etc/sway/config`, unless the
|
`~/.config/sway/config`. It is usually located at `/etc/sway/config`.
|
||||||
`DFALLBACK_CONFIG_DIR` flag has been set. Run `man 5 sway` for information on
|
Run `man 5 sway` for information on the configuration.
|
||||||
the configuration.
|
|
||||||
|
|
||||||
## Running
|
## Running
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@ install(
|
||||||
)
|
)
|
||||||
install(
|
install(
|
||||||
FILES ${PROJECT_SOURCE_DIR}/config
|
FILES ${PROJECT_SOURCE_DIR}/config
|
||||||
DESTINATION ${FALLBACK_CONFIG_DIR}
|
DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/sway/
|
||||||
COMPONENT configuration
|
COMPONENT configuration
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -153,8 +153,8 @@ static char *get_config_path(void) {
|
||||||
"$XDG_CONFIG_HOME/sway/config",
|
"$XDG_CONFIG_HOME/sway/config",
|
||||||
"$HOME/.i3/config",
|
"$HOME/.i3/config",
|
||||||
"$XDG_CONFIG_HOME/i3/config",
|
"$XDG_CONFIG_HOME/i3/config",
|
||||||
FALLBACK_CONFIG_DIR "/config",
|
"${CMAKE_INSTALL_FULL_SYSCONFDIR}/sway/config",
|
||||||
"/etc/i3/config",
|
"${CMAKE_INSTALL_FULL_SYSCONFDIR}/i3/config",
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!getenv("XDG_CONFIG_HOME")) {
|
if (!getenv("XDG_CONFIG_HOME")) {
|
||||||
|
|
|
@ -39,6 +39,6 @@ install(
|
||||||
|
|
||||||
install(
|
install(
|
||||||
FILES ${CMAKE_CURRENT_SOURCE_DIR}/pam/swaylock
|
FILES ${CMAKE_CURRENT_SOURCE_DIR}/pam/swaylock
|
||||||
DESTINATION /etc/pam.d/
|
DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/pam.d/
|
||||||
COMPONENT data
|
COMPONENT data
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue