Class: Launchy::Detect::NixDesktopEnvironment
- Inherits:
-
Object
- Object
- Launchy::Detect::NixDesktopEnvironment
- Extended by:
- Launchy::DescendantTracker
- Defined in:
- lib/launchy/detect/nix_desktop_environment.rb
Overview
Detect the current desktop environment for *nix machines Currently this is Linux centric. The detection is based upon the detection used by xdg-open from portland.freedesktop.org/
Defined Under Namespace
Classes: Gnome, Kde, NotFound, NotFoundError, Xdg, Xfce
Class Method Summary collapse
- .browsers ⇒ Object
-
.detect ⇒ Object
Detect the current *nix desktop environment.
- .fallback_browsers ⇒ Object
Methods included from Launchy::DescendantTracker
children, find_child, inherited
Class Method Details
.browsers ⇒ Object
25 26 27 |
# File 'lib/launchy/detect/nix_desktop_environment.rb', line 25 def self.browsers [ browser, fallback_browsers ].flatten end |
.detect ⇒ Object
Detect the current *nix desktop environment
If the current dekstop environment be detected, the return NixDekstopEnvironment::Unknown
15 16 17 18 19 |
# File 'lib/launchy/detect/nix_desktop_environment.rb', line 15 def self.detect found = find_child( :is_current_desktop_environment? ) Launchy.log("Current Desktop environment not found. #{Launchy.}") unless found return found end |