revert xembed-sni-proxy and tray click workarounds

XTest click forwarding doesn't work under Hyprland's XWayland,
making the tray icon non-interactive. Remove the derivation,
startup handler, container window rule, and click workarounds.

Keeps the workspace filter fix (hide special workspaces from bar).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
rope 2026-06-04 14:36:06 +01:00
parent 8510ea5c4f
commit ab322e545c

View file

@ -4,41 +4,6 @@ let
isMacbook = config.networking.hostName == "FredOS-Macbook";
isGaming = !isMacbook;
xembed-sni-proxy = pkgs.stdenv.mkDerivation {
pname = "xembed-sni-proxy";
version = "unstable-2026-01-22";
src = pkgs.fetchFromGitHub {
owner = "BLumia";
repo = "xembed-sni-proxy";
rev = "c3afbd4c1d26a19622cd7c2cae3db3d35fdd0d33";
hash = "sha256-cxEOrPUPtNTFSgH8hsbft/1dmPsXhONQgFnOWuzFfTk=";
};
postPatch = ''
substituteInPlace CMakeLists.txt \
--replace-fail 'set_package_properties(XCB PROPERTIES TYPE REQUIRED)' ""
'';
nativeBuildInputs = with pkgs; [
cmake
pkg-config
kdePackages.extra-cmake-modules
qt6.wrapQtAppsHook
];
buildInputs = with pkgs; [
qt6.qtbase
kdePackages.kwindowsystem
xorg.libX11
xorg.libxcb
xorg.xcbutil
xorg.xcbutilimage
xorg.xcbutilwm
xorg.libXtst
];
};
in
{
config = lib.mkIf (lib.elem config.networking.hostName [ "FredOS-Gaming" "FredOS-Macbook" ]) {
@ -273,7 +238,6 @@ in
hl.exec_cmd("hyprctl setcursor Bibata-Modern-Ice 24")
hl.exec_cmd("swayosd-server")
${lib.optionalString isMacbook ''hl.exec_cmd("hypridle")''}
${lib.optionalString isGaming ''hl.exec_cmd("${xembed-sni-proxy}/bin/xembedsniproxy")''}
end)
-- Animation curve and definitions
@ -286,11 +250,6 @@ in
hl.animation({ leaf = "workspaces", enabled = true, speed = 1, bezier = "snap" })
-- Window rules
-- Hide xembed-sni-proxy container window (classless, titleless floating window).
hl.window_rule({
match = { class = "^$", title = "^$", float = true },
workspace = "special silent",
})
-- Battle.net tray icon leaks as a tiny floating XWayland window.
hl.window_rule({
match = { class = "steam_app_0", title = "^$", float = true },
@ -490,10 +449,6 @@ in
'';
nmcli = "${pkgs.networkmanager}/bin/nmcli";
powerprofilesctl = "${pkgs.power-profiles-daemon}/bin/powerprofilesctl";
focusTrayWindow = pkgs.writeShellScript "focus-tray-window" ''
addr=$(hyprctl clients -j | ${pkgs.jq}/bin/jq -r '.[] | select(.class=="steam_app_0" and .title!="") | .address' | head -1)
[ -n "$addr" ] && hyprctl eval "hl.dispatch(hl.dsp.focus({window = \"address:$addr\"}))"
'';
in {
"quickshell/qmldir" = {
onChange = qsRestart;
@ -1155,11 +1110,6 @@ in
color: Theme.base05
}
Process {
id: trayFocusProc
command: ["${focusTrayWindow}"]
}
MouseArea {
anchors.fill: parent
hoverEnabled: true
@ -1191,7 +1141,6 @@ in
anchors.fill: parent
acceptedButtons: Qt.LeftButton | Qt.RightButton
onClicked: (event) => {
if (event.button === Qt.RightButton) {
if (modelData.hasMenu) {
bar.toggleDropdown(contextMenu, function() {
let pos = parent.mapToItem(bar.contentItem, parent.width / 2, 0);
@ -1199,23 +1148,8 @@ in
contextMenu.trayItem = modelData;
menuOpener.menu = modelData.menu;
});
} else {
modelData.secondaryActivate();
}
} else {
if (modelData.onlyMenu && modelData.hasMenu) {
bar.toggleDropdown(contextMenu, function() {
let pos = parent.mapToItem(bar.contentItem, parent.width / 2, 0);
contextMenu.dropdownX = pos.x;
contextMenu.trayItem = modelData;
menuOpener.menu = modelData.menu;
});
} else {
modelData.activate();
if (!modelData.hasMenu) {
trayFocusProc.running = true;
}
}
}
}
}