Module: BackupParadise::Tab
- Defined in:
- lib/backup_paradise/tab/tab.rb
Overview
BackupParadise::Tab
Class Method Summary collapse
-
.rename_tab(i = :mrxvt, optional_title = 'Backup', use_this_program_to_rename_tabs = :mrxvt) ⇒ Object
# === BackupParadise::Tab.rename_tab.
-
.set_konsole_tab_title(i) ⇒ Object
# === BackupParadise::Tab.set_konsole_tab_title ========================================================================= #.
-
.set_mrxvt_tab_title(i) ⇒ Object
# === BackupParadise::Tab.set_mrxvt_tab_title ========================================================================= #.
Class Method Details
.rename_tab(i = :mrxvt, optional_title = 'Backup', use_this_program_to_rename_tabs = :mrxvt) ⇒ Object
#
BackupParadise::Tab.rename_tab
This method does some additional checks before invoking the method set_mrxvt_tab_title. set_konsole_tab_title() may work, if the user at hand has the roebe gem installed (aka, on my home system).
#
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/backup_paradise/tab/tab.rb', line 28 def self.rename_tab( i = :mrxvt, optional_title = 'Backup', # <- This is the new title. use_this_program_to_rename_tabs = :mrxvt ) case i.to_sym # case tag # ======================================================================= # # === :konsole # # This is the default. # ======================================================================= # when :konsole, :default set_konsole_tab_title(optional_title) # ======================================================================= # # === :mrxvt # ======================================================================= # when :mrxvt set_mrxvt_tab_title(optional_title) # Defined in this module here. # ======================================================================= # # === :blank # # This entry point re-sets the title of the terminal tab again to # empty. # ======================================================================= # when :blank case use_this_program_to_rename_tabs when :konsole set_konsole_tab_title(optional_title) when :mrxvt set_mrxvt_tab_title(optional_title) end end end |
.set_konsole_tab_title(i) ⇒ Object
#
BackupParadise::Tab.set_konsole_tab_title
#
78 79 80 81 82 83 84 85 |
# File 'lib/backup_paradise/tab/tab.rb', line 78 def self.set_konsole_tab_title(i) if Object.const_defined? :Roebe begin require 'roebe/classes/kde/kde_konsole.rb' rescue LoadError; end Roebe.rename_konsole_title_to(i, :be_quiet) end end |
.set_mrxvt_tab_title(i) ⇒ Object
#
BackupParadise::Tab.set_mrxvt_tab_title
#
66 67 68 69 70 71 72 73 |
# File 'lib/backup_paradise/tab/tab.rb', line 66 def self.set_mrxvt_tab_title(i) if Object.const_defined? :Roebe begin require 'roebe/classes/mrxvt_options.rb' rescue LoadError; end Roebe::MrxvtOptions.set_title(i) end end |