Function DesktopEntry.showIn
Check if desktop file should be shown in menu of specific desktop environment.
bool showIn
(
string desktopEnvironment
) @trusted;
Parameters
Name | Description |
---|---|
desktopEnvironment | Name of desktop environment, usually detected by XDG_CURRENT_DESKTOP variable. |
See Also
Example
auto df = new DesktopFile();
df .notShowIn = ["GNOME", "MATE"];
assert(df .showIn("KDE"));
assert(df .showIn("awesome"));
assert(df .showIn(""));
assert(!df .showIn("GNOME"));
df .onlyShowIn = ["LXDE", "XFCE"];
assert(df .showIn("LXDE"));
assert(df .showIn("XFCE"));
assert(!df .showIn(""));
assert(!df .showIn("awesome"));
assert(!df .showIn("KDE"));
assert(!df .showIn("MATE"));