fix: cinnamon hotkeys problem (#28)

* chore: revert "fix: revert "fix: cinnamon hotkeys problem (#24)" (#26)"

This reverts commit cd17d9d6b1.

* fix: installment not registering keys
This commit is contained in:
dashio
2025-12-15 23:22:45 -03:00
committed by GitHub
parent cd17d9d6b1
commit fb764e3510
16 changed files with 255 additions and 344 deletions

View File

@@ -1,31 +1,13 @@
#!/bin/bash
# Wrapper script for win11-clipboard-history
# Cleans environment to avoid Snap library conflicts
# Forces X11/XWayland for better window positioning support
# Binary location
BINARY="/usr/lib/win11-clipboard-history/win11-clipboard-history-bin"
# Force X11/XWayland for better window positioning support
# Set GDK_BACKEND=x11 for window positioning support, but inherit full environment
# to avoid issues with DBus, display variables, etc.
# Wayland restricts cursor_position() and set_position() for security
# XWayland allows these operations while still running on Wayland session
WEBKIT_DISABLE_COMPOSITING_MODE=1
# Always use clean environment to avoid library conflicts from Snap, Flatpak, etc.
exec env -i \
HOME="$HOME" \
USER="$USER" \
SHELL="$SHELL" \
TERM="$TERM" \
DISPLAY="${DISPLAY:-:0}" \
XAUTHORITY="$XAUTHORITY" \
WAYLAND_DISPLAY="$WAYLAND_DISPLAY" \
XDG_RUNTIME_DIR="$XDG_RUNTIME_DIR" \
XDG_SESSION_TYPE="$XDG_SESSION_TYPE" \
XDG_CURRENT_DESKTOP="$XDG_CURRENT_DESKTOP" \
XDG_SESSION_CLASS="$XDG_SESSION_CLASS" \
DBUS_SESSION_BUS_ADDRESS="$DBUS_SESSION_BUS_ADDRESS" \
PATH="/usr/local/bin:/usr/bin:/bin" \
LANG="${LANG:-en_US.UTF-8}" \
LC_ALL="${LC_ALL:-}" \
GDK_BACKEND="x11" \
"$BINARY" "$@"
export GDK_BACKEND="x11"
exec "$BINARY" "$@"