Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@ result
*.idb
*.pdb

# Generated protocol files
*-protocol.c
*-protocol.h
*-client-protocol.h

# IDE files
.vscode/
*.swp
Expand Down
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,25 @@

All notable changes to this project will be documented in this file.

### [4.0.0] - 2026-04-18

- pull from upstream [2.0.0](https://github.com/saatvik333/wayland-bongocat/releases/tag/v2.0.0)
- replace png bongocat with svg bongocat
- 5 animation frames including a dedicated sleeping frame
- fix KWin input and fullscreen handling
- Generated Wayland protocol files are now committed to git. Building from source no longer requires `wayland-scanner` or `wayland-protocols`.
- Uses wlr-layer-shell double-buffered properties instead of destroying/recreating surfaces.

BREAKING CHANGE: New bongocat replacement has different height and position needs to be reconfigured!

### [3.6.2] - 2026-03-30

- pull from upstream [1.4.0](https://github.com/saatvik333/wayland-bongocat/releases/tag/v1.4.0)
- ~~**Multi-monitor CSV**~~
- **NO** comma-separated output names for now; don't have much time to do bigger merges/refactors
- adapt `--monitor` argument
- Input hotplug robustness

### [3.6.1] - 2025-12-13

### Improved
Expand Down
141 changes: 77 additions & 64 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set(CMAKE_C_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_C_STANDARD_REQUIRED ON)
include(FetchContent)
if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.24.0")
if(CMAKE_VERSION VERSION_GREATER_EQUAL "4.0.0")
cmake_policy(SET CMP0135 NEW)
endif()

Expand Down Expand Up @@ -34,11 +34,12 @@ endif()
project(
bongocat
LANGUAGES C CXX
VERSION 3.6.1)
VERSION 3.6.2)

# Feature Flags
include(CMakeDependentOption)
option(FEATURE_BONGOCAT_EMBEDDED_ASSETS "Include bongocat assets (default)" ON)
cmake_dependent_option(FEATURE_USE_BONGOCAT_SVG "Use bongocat SVG embedded assets" ON FEATURE_BONGOCAT_EMBEDDED_ASSETS OFF)
option(FEATURE_ENABLE_DM_EMBEDDED_ASSETS "Enable include dm embedded assets" OFF)
cmake_dependent_option(FEATURE_DM_EMBEDDED_ASSETS "Include dm embedded assets" OFF FEATURE_ENABLE_DM_EMBEDDED_ASSETS OFF)
cmake_dependent_option(FEATURE_DM20_EMBEDDED_ASSETS "Include dm20 embedded assets (replaces original dm)" OFF
Expand Down Expand Up @@ -71,6 +72,13 @@ option(ENABLE_ASAN "Enable Address Sanitizer" OFF)
option(ENABLE_UBSAN "Enable Undefined Behavior Sanitizer" OFF)
option(ENABLE_TSAN "Enable Thread Sanitizer" OFF)

find_program(WAYLAND_SCANNER_EXECUTABLE wayland-scanner)
if (WAYLAND_SCANNER_EXECUTABLE)
option(GENERATE_PROTOCOLS "Generate Wayland protocol files" ON)
else()
option(GENERATE_PROTOCOLS "Generate Wayland protocol files" OFF)
endif()

# project_options More Warnings
set(CLANG_WARNINGS
-Wall
Expand Down Expand Up @@ -310,8 +318,7 @@ if(FEATURE_MULTI_VERSIONS)
target_link_libraries(bongocat-pkmn PRIVATE bongocat_base bongocat_options bongocat_libs)

add_executable(bongocat-all)
target_link_libraries(bongocat-all PRIVATE assets_bongocat_loader assets_bongocat assets_bongocat_feature assets_bongocat_interface
)# include bongocat as fallback
target_link_libraries(bongocat-all PRIVATE assets_bongocat_loader assets_bongocat assets_bongocat_feature assets_bongocat_interface)
target_link_libraries(bongocat-all PRIVATE assets_dm_loader assets_dm assets_dm_feature assets_dm_interface)
target_link_libraries(bongocat-all PRIVATE assets_dm20_loader assets_dm20 assets_dm20_feature assets_dm20_interface)
target_link_libraries(bongocat-all PRIVATE assets_dmx_loader assets_dmx assets_dmx_feature assets_dmx_interface)
Expand All @@ -327,21 +334,20 @@ if(FEATURE_MULTI_VERSIONS)
bongocat-all
PRIVATE # only include pmd for testing
$<$<CONFIG:Debug>:assets_pmd_loader
assets_pmd
assets_pmd_feature
assets_pmd_interface
assets_custom_loader>
assets_pmd
assets_pmd_feature
assets_pmd_interface
assets_custom_loader>
$<$<CONFIG:RelWithDebInfo>:assets_pmd_loader
assets_pmd
assets_pmd_feature
assets_pmd_interface
assets_custom_loader>
assets_pmd
assets_pmd_feature
assets_pmd_interface
assets_custom_loader>
$<$<BOOL:${FEATURE_PRELOAD_ASSETS}>:assets_pmd_loader
assets_pmd
assets_pmd_feature
assets_pmd_interface
assets_custom_loader>)
# target_link_libraries(bongocat-all PRIVATE assets_pmd_loader assets_pmd assets_pmd_feature assets_pmd_interface assets_custom_loader)
assets_pmd
assets_pmd_feature
assets_pmd_interface
assets_custom_loader>)
target_link_libraries(bongocat-all PRIVATE assets_misc_loader assets_misc assets_misc_feature assets_misc_interface assets_custom_loader)
target_link_libraries(bongocat-all PRIVATE assets_custom_sprite_sheet_feature assets_custom_loader)
target_link_libraries(bongocat-all PRIVATE bongocat_base bongocat_options bongocat_libs)
Expand All @@ -354,26 +360,31 @@ if(FEATURE_MULTI_VERSIONS)
# @NOTE(assets): 1.2. add exec for multi versions
endif()

# Formatting
include(cmake/CPM.cmake)
cpmaddpackage(
NAME
Format.cmake
VERSION
1.8.3
GITHUB_REPOSITORY
TheLartians/Format.cmake
OPTIONS
# set to yes skip cmake formatting
"FORMAT_SKIP_CMAKE NO"
# set to yes skip clang formatting
"FORMAT_SKIP_CLANG NO"
# path to exclude (optional, supports regular expressions)
"CMAKE_FORMAT_EXCLUDE cmake/CPM.cmake"
# extra arguments for cmake_format (optional)
"CMAKE_FORMAT_EXTRA_ARGS -c ${PROJECT_SOURCE_DIR}/cmake-format.yaml"
# path to exclude (optional, supports regular expressions)
"CMAKE_FORMAT_EXCLUDE lib|assets|protocols|docs|examples|nix")
option(SKIP_CPM "Skip CPM-based downloads" OFF)
if(DEFINED ENV{NIX_BUILD_TOP} OR SKIP_CPM)
message(STATUS "Nix build detected: skipping CPM and formatting setup")
else()
# Formatting
include(cmake/CPM.cmake)
cpmaddpackage(
NAME
Format.cmake
VERSION
1.8.3
GITHUB_REPOSITORY
TheLartians/Format.cmake
OPTIONS
# set to yes skip cmake formatting
"FORMAT_SKIP_CMAKE NO"
# set to yes skip clang formatting
"FORMAT_SKIP_CLANG NO"
# path to exclude (optional, supports regular expressions)
"CMAKE_FORMAT_EXCLUDE cmake/CPM.cmake"
# extra arguments for cmake_format (optional)
"CMAKE_FORMAT_EXTRA_ARGS -c ${PROJECT_SOURCE_DIR}/cmake-format.yaml"
# path to exclude (optional, supports regular expressions)
"CMAKE_FORMAT_EXCLUDE lib|assets|protocols|docs|examples|nix")
endif()

# Install
include(GNUInstallDirs)
Expand Down Expand Up @@ -459,33 +470,35 @@ if(PANDOC)
endif()

# Package
cpmaddpackage("gh:TheLartians/PackageProject.cmake@1.13.0")
set(CPACK_PACKAGE_NAME "bongocat")
set(CPACK_PACKAGE_VERSION "3.6.1")
set(CPACK_PACKAGE_CONTACT "hircreacc@gmail.com")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "A delightful Wayland overlay that displays an animated V-Pet reacting to your keyboard input! ")
set(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE")
set(CPACK_GENERATOR "TGZ;ZIP")
packageproject(
# the name of the target to export
NAME
${PROJECT_NAME}
# the version of the target to export
VERSION
${PROJECT_VERSION}
# a temporary directory to create the config files
BINARY_DIR
${PROJECT_BINARY_DIR}
# should match the target's INSTALL_INTERFACE include directory
INCLUDE_DESTINATION
include/${PROJECT_NAME}-${PROJECT_VERSION}
# (optional) define the project's version compatibility, defaults to `AnyNewerVersion` supported values:
# `AnyNewerVersion|SameMajorVersion|SameMinorVersion|ExactVersion`
COMPATIBILITY
SameMajorVersion
# (optional) option to generate CPack variables
CPACK
YES)
if(NOT DEFINED ENV{NIX_BUILD_TOP} AND NOT SKIP_CPM)
cpmaddpackage("gh:TheLartians/PackageProject.cmake@1.13.0")
set(CPACK_PACKAGE_NAME "bongocat")
set(CPACK_PACKAGE_VERSION "4.0.0")
set(CPACK_PACKAGE_CONTACT "hircreacc@gmail.com")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "A delightful Wayland overlay that displays an animated V-Pet reacting to your keyboard input! ")
set(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE")
set(CPACK_GENERATOR "TGZ;ZIP")
packageproject(
# the name of the target to export
NAME
${PROJECT_NAME}
# the version of the target to export
VERSION
${PROJECT_VERSION}
# a temporary directory to create the config files
BINARY_DIR
${PROJECT_BINARY_DIR}
# should match the target's INSTALL_INTERFACE include directory
INCLUDE_DESTINATION
include/${PROJECT_NAME}-${PROJECT_VERSION}
# (optional) define the project's version compatibility, defaults to `AnyNewerVersion` supported values:
# `AnyNewerVersion|SameMajorVersion|SameMinorVersion|ExactVersion`
COMPATIBILITY
SameMajorVersion
# (optional) option to generate CPack variables
CPACK
YES)
endif()

# If MSVC is being used, and ASAN is enabled, we need to set the debugger environment so that it behaves well with MSVC's debugger, and we
# can run the target from visual studio if(MSVC) get_all_installable_targets(all_targets) message("all_targets=${all_targets}")
Expand Down
78 changes: 76 additions & 2 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
"generator": "Ninja",
"binaryDir": "${sourceDir}/cmake-build-release",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release"
"CMAKE_BUILD_TYPE": "Release",
"GENERATE_PROTOCOLS": "OFF"
}
},
{
Expand Down Expand Up @@ -88,6 +89,24 @@
"FEATURE_LAZY_LOAD_ASSETS": "OFF"
}
},
{
"name": "release_preload_assets_svg",
"displayName": "Release (preload assets + svg)",
"description": "Release with assets preloaded at the start",
"generator": "Ninja",
"binaryDir": "${sourceDir}/cmake-build-release-preload-assets-svg",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"FEATURE_BONGOCAT_EMBEDDED_ASSETS": "ON",
"FEATURE_ENABLE_DM_EMBEDDED_ASSETS": "ON",
"FEATURE_MS_AGENT_EMBEDDED_ASSETS": "ON",
"FEATURE_PKMN_EMBEDDED_ASSETS": "ON",
"FEATURE_MISC_EMBEDDED_ASSETS": "ON",
"FEATURE_PRELOAD_ASSETS": "ON",
"FEATURE_LAZY_LOAD_ASSETS": "OFF",
"FEATURE_USE_BONGOCAT_SVG": "ON"
}
},
{
"name": "release_only_bongocat",
"displayName": "Release (Only Bongocat)",
Expand All @@ -100,7 +119,8 @@
"FEATURE_MS_AGENT_EMBEDDED_ASSETS": "OFF",
"FEATURE_ENABLE_DM_EMBEDDED_ASSETS": "OFF",
"FEATURE_PKMN_EMBEDDED_ASSETS": "OFF",
"FEATURE_MISC_EMBEDDED_ASSETS": "OFF"
"FEATURE_MISC_EMBEDDED_ASSETS": "OFF",
"FEATURE_USE_BONGOCAT_SVG": "ON"
}
},
{
Expand Down Expand Up @@ -254,6 +274,60 @@
"FEATURE_PRELOAD_ASSETS": "OFF",
"FEATURE_LAZY_LOAD_ASSETS": "ON"
}
},
{
"name": "debug_all_assets_lazy_load_svg",
"displayName": "Debug (All Assets + colored sprites + svg, assets lazy load)",
"description": "Debug build with ALL assets (full dm versions + colored sprites), lazy load assets on demand",
"generator": "Ninja",
"binaryDir": "${sourceDir}/cmake-build-debug-all-assets-lazy-load-svg",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"ENABLE_ASAN": "ON",
"ENABLE_UBSAN": "ON",
"FEATURE_BONGOCAT_EMBEDDED_ASSETS": "ON",
"FEATURE_MS_AGENT_EMBEDDED_ASSETS": "ON",
"FEATURE_MORE_MS_AGENT_EMBEDDED_ASSETS": "ON",
"FEATURE_ENABLE_DM_EMBEDDED_ASSETS": "ON",
"FEATURE_DM_EMBEDDED_ASSETS": "ON",
"FEATURE_DM20_EMBEDDED_ASSETS": "ON",
"FEATURE_DMX_EMBEDDED_ASSETS": "ON",
"FEATURE_PEN_EMBEDDED_ASSETS": "ON",
"FEATURE_PEN20_EMBEDDED_ASSETS": "ON",
"FEATURE_DMC_EMBEDDED_ASSETS": "ON",
"FEATURE_DMALL_EMBEDDED_ASSETS": "ON",
"FEATURE_PKMN_EMBEDDED_ASSETS": "ON",
"FEATURE_MISC_EMBEDDED_ASSETS": "ON",
"FEATURE_PRELOAD_ASSETS": "OFF",
"FEATURE_LAZY_LOAD_ASSETS": "ON",
"FEATURE_USE_BONGOCAT_SVG": "ON"
}
},
{
"name": "debug_svg",
"displayName": "Debug Build",
"description": "Debug build with sanitizers",
"generator": "Ninja",
"binaryDir": "${sourceDir}/cmake-build-debug-svg",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"ENABLE_ASAN": "ON",
"ENABLE_UBSAN": "ON",
"FEATURE_USE_BONGOCAT_SVG": "ON"
}
},
{
"name": "debug_no_svg",
"displayName": "Debug Build",
"description": "Debug build with sanitizers",
"generator": "Ninja",
"binaryDir": "${sourceDir}/cmake-build-debug-no-svg",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"ENABLE_ASAN": "ON",
"ENABLE_UBSAN": "ON",
"FEATURE_USE_BONGOCAT_SVG": "OFF"
}
}
],
"buildPresets": [
Expand Down
16 changes: 10 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,6 @@ cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug
cmake --build build
````

> Legacy `make debug` is supported for old Bongo Cat dev workflows.

`make debug` provides a quick debug build.
You can inspect the old workflow in the old [`Makefile`](Makefile.old).
_**Note:** The binary name in AUR is `wpets`, but during development and `make install` it is still `bongocat`._

### Running

```bash
Expand All @@ -74,6 +68,10 @@ Follow the project’s coding guidelines:
* **Try to avoid STL & Minimal Templates, you can use C functions and Linux build-in functions**
* **Assets**: Embed large assets in separate TUs
* **Global State**: Avoid globals, pass context structs
* **Style**: Use clang-format and `cmake --build build --target fix-format`
* `lower_case` functions/variables, `UPPER_CASE` macros/constants, `_t` suffix on typedefs
* **Commit messages**: conventional commits (`feat:`, `fix:`, `docs:`, `refactor:`)
* **No `popen`**: use `spawn_pipe` for subprocess execution _(security requirement)_

_Run `make format` before committing_

Expand Down Expand Up @@ -223,3 +221,9 @@ See [COPYRIGHT](assets/COPYRIGHT.md) for more details.

Thank you for helping make **Wayland Bongo Cat + V-Pets** a better, more delightful overlay! 💖

## LLM Disclaimer

I personally don't use much LLMs, only some Web based LLms like ChatGPT, for troubleshooting and helping me generate some Boilerplate-Code for some wayland functions, bash scripts, or rule-of-five C++ constructors.
Upstream uses [Claude Code](https://github.com/saatvik333/wayland-bongocat/blob/main/CLAUDE.md), I merge most code by hand and adapt fixes, improvments, step-by-step.

This is a Project for fun and hand-writen code is fun for me.
Loading
Loading