Created
November 26, 2025 16:05
-
-
Save shirozatou/6004922d84d95e6e8d63be852275c1fa to your computer and use it in GitHub Desktop.
Rebuild archlinux kwin with 3-fingers gesture overview instead of 4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| REPO=https://gitlab.archlinux.org/archlinux/packaging/packages/kwin.git | |
| set -euo pipefail | |
| DIR=$(mktemp -d) | |
| trap 'rm -rf "$DIR"' EXIT | |
| git clone --depth=1 -b $(pacman -Q kwin | cut -d' ' -f2) "$REPO" "$DIR" | |
| cd "$DIR" | |
| # 3-fingers gesture for overview | |
| if grep -vq '^prepare()' PKGBUILD; then | |
| cat >> PKGBUILD <<'EOF' | |
| prepare() { | |
| cd "${pkgname}-${pkgver}" | |
| sed -iE '/addTouchpadSwipeGesture/s/4/3/g' src/plugins/overview/overvieweffect.cpp | |
| } | |
| EOF | |
| else | |
| echo 'TODO: edit prepare' | |
| exit 1 | |
| fi | |
| # Remove kdoctools. | |
| sed -i '/^\s*makedepends=(/,/)/{/kdoctools/d}' PKGBUILD | |
| # PKGBUILD is edited, build now. | |
| makepkg -si --skippgpcheck |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment