Skip to content

Commit

Permalink
pid
Browse files Browse the repository at this point in the history
  • Loading branch information
sonnyp committed Aug 15, 2021
1 parent b20cca8 commit f7ec252
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,4 @@ GPLv3 or later. Please see [COPYING](COPYING) file.
## Bookmarks

https://css-tricks.com/understanding-and-manually-improving-svg-optimization/
https://github.com/RazrFalcon/svgcleaner
5 changes: 2 additions & 3 deletions data/re.sonny.OhMySVG.appdata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,11 @@
<summary>Reduce the size of SVGs</summary>
<description>
<p>Oh My SVG let you export unoptimized SVG files into smaller versions.</p>
<p>Under the hood, it uses <a
href="https://github.com/svg/svgo/"
>SVGO</a> to remove or approximate information that is not required for rendering.</p>
<p
>It lets you preview and tweak the parameters to obtain a satisfactory result before saving.</p>
<p
>It removes or approximate information that is not required for rendering.</p>
<p
>Remember that Oh My SVG removes information and metadata that may be useful, do not overwrite your original/source SVG files.</p>
</description>
<url type="homepage">https://github.com/sonnyp/OhMySVG</url>
Expand Down
7 changes: 7 additions & 0 deletions src/util.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import GLib from "gi://GLib";
import Gio from "gi://Gio";
import system from "system";

export function logEnum(obj, value) {
Expand Down Expand Up @@ -37,5 +38,11 @@ export function getSystemInformation({ argv, version }) {
// `PATH: ${GLib.getenv("PATH")}`,
`FLATPAK_ID: ${GLib.getenv("FLATPAK_ID")}`,
`XDG_SESSION_TYPE: ${GLib.getenv("XDG_SESSION_TYPE")}`,
`PID: ${getpid()}`,
];
}

// https://stackoverflow.com/questions/44815538/how-to-get-process-pid-in-gjs
export function getpid() {
return new Gio.Credentials().get_unix_pid();
}

0 comments on commit f7ec252

Please sign in to comment.