Class: Launchy::Detect::NixDesktopEnvironment::Gnome

Inherits:
Launchy::Detect::NixDesktopEnvironment show all
Defined in:
lib/launchy/detect/nix_desktop_environment.rb

Overview

Gnome desktop environment

Class Method Summary collapse

Methods inherited from Launchy::Detect::NixDesktopEnvironment

browsers, detect, fallback_browsers

Methods included from Launchy::DescendantTracker

#children, #find_child, #inherited

Class Method Details

.browserObject



55
56
57
# File 'lib/launchy/detect/nix_desktop_environment.rb', line 55

def self.browser
  ::Launchy::Argv.new("gnome-open")
end

.is_current_desktop_environment?Boolean

Returns:

  • (Boolean)


50
51
52
53
# File 'lib/launchy/detect/nix_desktop_environment.rb', line 50

def self.is_current_desktop_environment?
  ENV.fetch("GNOME_DESKTOP_SESSION_ID", nil) &&
    Launchy::Application.find_executable("gnome-open")
end