From a782d30f1526fd7e4e60140a0d7bb0a074dab29e Mon Sep 17 00:00:00 2001 From: S4NKALP Date: Tue, 14 Jul 2026 18:45:14 +0545 Subject: [PATCH] refactor: reorganize globalmenu into src/window --- CONTRIBUTING.md | 6 +++--- README.md | 6 +++--- install.sh | 4 ++-- pyproject.toml | 2 +- requirements.txt | 9 --------- 5 files changed, 9 insertions(+), 18 deletions(-) delete mode 100644 requirements.txt diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 813c2ca..aacd31a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -45,9 +45,9 @@ meson compile -C builddir cd ../../../.. # Compile Global Menu shim -cd src/globalmenu +cd src/window/globalmenu gcc -shared -fPIC -O2 -o libmenu_button_shim.so libmenu_button_shim.c $(pkg-config --cflags --libs gtk+-3.0) -ldl -cd ../.. +cd ../../.. # Run uv run start @@ -73,8 +73,8 @@ Modus/ │ │ ├── screencapture/ # Screen capture/recording │ │ ├── desktop/ # Desktop widgets │ │ ├── settings/ # Settings window +│ │ ├── globalmenu/ # macOS global menu bar │ │ └── lock.py # Session lock screen -│ ├── globalmenu/ # macOS global menu bar │ └── styles/ # GTK CSS stylesheets ├── config/ # User-facing config (TOML) │ ├── config.toml # Main settings diff --git a/README.md b/README.md index 451af36..290ab0e 100644 --- a/README.md +++ b/README.md @@ -64,9 +64,9 @@ meson compile -C builddir cd ../../../.. # Compile Global Menu shim -cd src/globalmenu +cd src/window/globalmenu gcc -shared -fPIC -O2 -o libmenu_button_shim.so libmenu_button_shim.c $(pkg-config --cflags --libs gtk+-3.0) -ldl -cd ../.. +cd ../../.. uv run start ``` @@ -89,7 +89,7 @@ shim only for that process: ```bash #!/usr/bin/env bash # ~/.local/bin/modus-launch — GTK3-aware launcher for the global menu shim -SHIM=~/.config/Modus/src/globalmenu/libmenu_button_shim.so +SHIM=~/.config/Modus/src/window/globalmenu/libmenu_button_shim.so BIN="$(command -v "$1")" if [[ -n "$BIN" ]] && readelf -d "$BIN" 2>/dev/null | grep -q 'libgtk-3\.so\.0'; then LD_PRELOAD="$SHIM" "$@" diff --git a/install.sh b/install.sh index 0a500e2..5b45c55 100755 --- a/install.sh +++ b/install.sh @@ -314,8 +314,8 @@ fi progress "Building Global Menu shim" step "Compiling libmenu_button_shim.so..." -SHIM_SRC="$INSTALL_DIR/src/globalmenu/libmenu_button_shim.c" -SHIM_OUT="$INSTALL_DIR/src/globalmenu/libmenu_button_shim.so" +SHIM_SRC="$INSTALL_DIR/src/window/globalmenu/libmenu_button_shim.c" +SHIM_OUT="$INSTALL_DIR/src/window/globalmenu/libmenu_button_shim.so" if [ -f "$SHIM_SRC" ]; then if gcc -shared -fPIC -O2 -o "$SHIM_OUT" "$SHIM_SRC" $(pkg-config --cflags --libs gtk+-3.0) -ldl 2>/dev/null; then success "libmenu_button_shim.so built successfully" diff --git a/pyproject.toml b/pyproject.toml index 1545de4..aec3b3b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -98,7 +98,7 @@ ignore = [ ] [tool.ruff.lint.isort] -known-first-party = ["services", "utils", "shared", "window", "globalmenu"] +known-first-party = ["services", "utils", "shared", "window"] [tool.ruff.lint.per-file-ignores] "src/main.py" = ["E402"] diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 60c2e34..0000000 --- a/requirements.txt +++ /dev/null @@ -1,9 +0,0 @@ - -fabric @ git+https://github.com/Fabric-Development/fabric.git@b7b0f9975f0cf161ccf81c1adfb181230d553f79 -httpx==0.28.1 -pam==0.2.0 -psutil==7.2.2 -ruff==0.15.2 -six==1.17.0 -tomlkit==0.15.0 -pre-commit=4.6.0