Class: RosettAi::Thor::Tasks::Desktop
- Inherits:
-
Thor
- Object
- Thor
- RosettAi::Thor::Tasks::Desktop
- Defined in:
- lib/rosett_ai/thor/tasks/desktop.rb
Overview
Thor task for launching desktop applications.
Instance Method Summary collapse
-
#gtk4 ⇒ void
Launch the GTK4 desktop application.
-
#status ⇒ String
Return the current status.
Instance Method Details
#gtk4 ⇒ void
This method returns an undefined value.
Launch the GTK4 desktop application.
34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/rosett_ai/thor/tasks/desktop.rb', line 34 def gtk4 require_desktop_gems! unless RosettAi::Desktop::Gtk4App.available? msg = "#{t('unavailable')}\n#{t('install_adwaita')}\n#{t('install_pkg')}" raise ::Thor::Error, msg end app = RosettAi::Desktop::Gtk4App.new exit_code = app.run(ARGV) exit exit_code end |
#status ⇒ String
Return the current status.
59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/rosett_ai/thor/tasks/desktop.rb', line 59 def status require_desktop_gems! gtk4_available = RosettAi::Desktop::Gtk4App.available? dbus_running = check_dbus_service if tty_output? print_status_tty(gtk4_available, dbus_running) else print_status_json(gtk4_available, dbus_running) end end |