import{promises as o}from"fs";import i from"path";import{e as d}from"./index-B8MOUWcP.mjs";import f from"./package-uaSG8XjZ.mjs";import{e as n}from"./fs-xattr-D9kndW7T.mjs";import{app as l}from"electron";import"./_commonjsHelpers-CLLqo0NO.mjs";import"child_process";import"os";import"assert";import"events";import"buffer";import"stream";import"util";import"crypto";import"./constants-DED7MIJj.mjs";import"url";import u from"node:module";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"4.2.860"}}catch{}})();try{(function(){var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="dc1ddb24-f165-4108-91bb-8494f20b2107",e._sentryDebugIdIdentifier="sentry-dbid-dc1ddb24-f165-4108-91bb-8494f20b2107")})()}catch{}const C=import.meta.filename,g=import.meta.dirname,j=u.createRequire(import.meta.url),b=`[Desktop Entry]
Name=${n.APP_NAME}
Exec=${process.env.APPIMAGE} %u
Type=Application
Terminal=false
Comment=${f.description}
Categories=Network;Chat;
MimeType=x-scheme-handler/beeper;
StartupWMClass=${n.APP_NAME}
StartupNotify=true
`;async function q(){const e=`${n.APP_NAME}.desktop`,t=`${l.getPath("home")}/.local/share/applications/`,a=`${l.getPath("home")}/.local/share/icons`,p=i.join(t,e),c=i.join(t,"beepertexts.desktop");try{await o.mkdir(t,{recursive:!0}),await o.mkdir(a,{recursive:!0});try{await o.rm(c,{force:!0})}catch(m){logger.warn(m)}await o.writeFile(p,b,"utf-8");const r=i.resolve(g,"..","app-icons","Beeper Squared.png"),s=`${a}/beeper.png`;await o.copyFile(r,s),await d("/usr/bin/desktop-file-install",["--dir",t,"--set-icon",s,p]),await d("xdg-mime",["default",e,"x-scheme-handler/beeper"])}catch(r){Sentry.captureException(r),logger.error(r)}}const noopFunc=function(){};export{noopFunc as registerLinuxConfig};
//# sourceMappingURL=linux-CvVdFEWU.mjs.map
