cura works much better on xwayland

This commit is contained in:
Emmet 2024-05-29 20:20:55 -05:00
parent 03111e3461
commit c73893b5a5
2 changed files with 20 additions and 1 deletions

View file

@ -96,7 +96,24 @@
mpv
yt-dlp
blender-hip
cura
# cura is moderately broken on wayland, so use xwayland
(pkgs.cura.overrideAttrs (oldAttrs: {
postInstall = oldAttrs.postInstall + ''cp -rf ${(pkgs.makeDesktopItem {
name = "com.ultimaker.cura";
icon = "cura-icon";
desktopName = "Cura";
exec = "env QT_QPA_PLATFORM=xcb ${pkgs.cura}/bin/cura %F";
tryExec = "env QT_QPA_PLATFORM=xcb ${pkgs.cura}/bin/cura";
terminal = false;
type = "Application";
categories = ["Graphics"];
mimeTypes = ["model/stl" "application/vnd.ms-3mfdocument" "application/prs.wavefront-obj"
"image/bmp" "image/gif" "image/jpeg" "image/png" "text/x-gcode" "application/x-amf"
"application/x-ply" "application/x-ctm" "model/vnd.collada+xml" "model/gltf-binary"
"model/gltf+json" "model/vnd.collada+xml+zip"];
})}/share/applications $out/share'';
}))
(pkgs.writeShellScriptBin "curax" ''env QT_QPA_PLATFORM=xcb ${pkgs.cura}/bin/cura'')
curaengine_stable
openscad
(stdenv.mkDerivation {

View file

@ -87,6 +87,8 @@ ext xopp~, has blender, X, flag f = xournalpp "$@" &>/dev/null
ext helio, has helio, X, flag f = helio "$@" &>/dev/null
ext kdenlive, has kdenlive-accel, X, flag f = kdenlive-accel "$@" &>/dev/null
ext flp, has flstudio, X, flag f = flstudio "$@" &>/dev/null
ext 3mf, has curax, X, flag f = curax "$@" &>/dev/null
ext 3mf, has cura, X flag f = cura "$@" &>/dev/null
#--------------------------------------------
# Scripts