Sha256: 817192360a71cd17df703aa4de79451a6cf8328f8fb05e91d4644b4ac83ea065
Contents?: true
Size: 1.31 KB
Versions: 7
Compression:
Stored size: 1.31 KB
Contents
#!/usr/bin/env ruby # frozen_string_literal: true require 'optparse' require_relative '../lib/fusuma/plugin/appmatcher.rb' option = {} opt = OptionParser.new opt.on('-l', '--list-applications', 'List applications') do |v| option[:list] = v end opt.on('--version', 'Show version') do |v| option[:version] = v end opt.on('--install-gnome-extension', 'Install GNOME extension for appmatcher') do |v| option[:install_gnome_extension] = v end opt.on('--uninstall-gnome-extension', 'Uninstall GNOME extension for appmatcher') do |v| option[:uninstall_gnome_extension] = v end opt.parse!(ARGV) if option[:install_gnome_extension] require_relative '../lib/fusuma/plugin/appmatcher/gnome_extensions/installer.rb' Fusuma::Plugin::Appmatcher::GnomeExtensions::Installer.new.install return end if option[:uninstall_gnome_extension] require_relative '../lib/fusuma/plugin/appmatcher/gnome_extensions/installer.rb' Fusuma::Plugin::Appmatcher::GnomeExtensions::Installer.new.uninstall return end if option[:list] matcher = Fusuma::Plugin::Appmatcher.backend_klass::Matcher.new puts matcher.running_applications return end if option[:version] puts Fusuma::Plugin::Appmatcher::VERSION return end matcher = Fusuma::Plugin::Appmatcher.backend_klass::Matcher.new puts matcher.active_application
Version data entries
7 entries across 7 versions & 1 rubygems