--- CMakeLists.txt.orig 2026-05-03 12:07:01 UTC +++ CMakeLists.txt @@ -419,6 +419,44 @@ install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_I configure_file(src/compose ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_INSTALL_LIBEXECDIR}/nchat/compose COPYONLY) install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_INSTALL_LIBEXECDIR}/nchat/compose DESTINATION ${CMAKE_INSTALL_LIBEXECDIR}/nchat) +# Themes +macro(add_theme themedir) + configure_file(themes/${themedir}/color.conf ${CMAKE_CURRENT_BINARY_DIR}/share/nchat/themes/${themedir}/color.conf COPYONLY) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/share/nchat/themes/${themedir}/color.conf DESTINATION share/nchat/themes/${themedir}) + if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/themes/${themedir}/usercolor.conf") + configure_file(themes/${themedir}/usercolor.conf ${CMAKE_CURRENT_BINARY_DIR}/share/nchat/themes/${themedir}/usercolor.conf COPYONLY) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/share/nchat/themes/${themedir}/usercolor.conf DESTINATION share/nchat/themes/${themedir}) + endif() +endmacro() +add_theme("ayu-dark") +add_theme("default") +add_theme("basic-color") +add_theme("dracula") +add_theme("catppuccin-mocha") +add_theme("espresso") +add_theme("gruvbox-dark-hard") +add_theme("gruvbox-dark") +add_theme("solarized-dark-higher-contrast") +add_theme("tokyo-night") +add_theme("tomorrow-night") +add_theme("zenbones-dark") +add_theme("zenburned") + +# Themes +macro(add_template templatedir) + configure_file(themes/templates/${templatedir}/nchat-color.conf ${CMAKE_CURRENT_BINARY_DIR}/share/nchat/themes/templates/${templatedir}/nchat-color.conf COPYONLY) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/share/nchat/themes/templates/${templatedir}/nchat-color.conf DESTINATION share/nchat/themes/templates/${templatedir}) + if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/themes/templates/${templatedir}/nchat-usercolor.conf") + configure_file(themes/templates/${templatedir}/nchat-usercolor.conf ${CMAKE_CURRENT_BINARY_DIR}/share/nchat/themes/templates/${templatedir}/nchat-usercolor.conf COPYONLY) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/share/nchat/themes/templates/${templatedir}/nchat-usercolor.conf DESTINATION share/nchat/themes/templates/${templatedir}) + endif() + if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/themes/templates/${templatedir}/README.md") + configure_file(themes/templates/${templatedir}/README.md ${CMAKE_CURRENT_BINARY_DIR}/share/nchat/themes/templates/${templatedir}/README.md COPYONLY) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/share/nchat/themes/templates/${templatedir}/README.md DESTINATION share/nchat/themes/templates/${templatedir}) + endif() +endmacro() +add_template("iterm2-color-schemes") + # Uninstall if(HAS_SHARED_LIBS) add_custom_target(uninstall