Class: Roebe::KdeKonsole

Inherits:
Base show all
Defined in:
lib/roebe/classes/kde/kde_konsole/help.rb,
lib/roebe/classes/kde/kde_konsole/run.rb,
lib/roebe/classes/kde/kde_konsole/menu.rb,
lib/roebe/classes/kde/kde_konsole/misc.rb,
lib/roebe/classes/kde/kde_konsole/reset.rb,
lib/roebe/classes/kde/kde_konsole/constants.rb,
lib/roebe/classes/kde/kde_konsole/initialize.rb,
lib/roebe/classes/kde/kde_konsole/kde_konsole.rb

Overview

Roebe::KdeKonsole.new

Constant Summary collapse

DEFAULT_TITLE =
#

DEFAULT_TITLE

Designate which title we will use by default.

#
'.'
ARRAY_ALL_ICONS =
#

ARRAY_ALL_ICONS

All icons should be registered here.

#
%w(

  --weather-snow
  --weather-snow-rain
  --emblem-important
  --emblem-mounted
  --emblem-warning
  --mail-mark-important
  --document-import
  --view-certificate-import
  --folder-important
  --media-optical-audio
  --audio-input-microphone
  --audio-x-generic
  --audio-headphones

  --face-angel
  --face-embarrassed
  --face-kiss
  --face-laugh
  --face-plain
  --face-raspberry
  --face-sad
  --face-smile-big
  --face-smile
  --face-surprise
  --face-uncertain
  --face-wink

)

Constants inherited from Base

Base::COLOURS, Base::HOME_DIRECTORY_OF_USER_X, Base::N, Base::NAMESPACE

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#actions, #append_this_onto_that_file, #append_what_into, #be_silent, #be_verbose?, #beautiful_url, #burlywood, #call_next, #chdir, #cheerful_guy, #cliner, #complex_esystem, #convert_global_env, #copy_directory, #copy_file, #cornflowerblue, #create_directory, #crimson, #current_month?, #current_time?, #current_year?, #cyan, #darkcyan, #darkgreen, #darkkhaki, #darkslateblue, #deeppink, #delete_symlink, #do_not_use_the_base_colours, #do_use_the_base_colours, #e, #ecomment, #editor_to_use?, #efancy, #eimp, #emphasis, #ensure_main_encoding, #ensure_utf_encoding, #eparse, #erev, #esteelblue, #etomato, #ewarn, #exit_program, #firebrick, #get_current_day, #get_current_month, #get_files_and_directories, #get_files_from, #get_german_name_for_this_weekday, #gold, #green, #grey, #hh_mm_ss, #hh_mm_ss_day_month_year, #home_dir?, #home_directory_of_user_x?, #infer_the_namespace, #internal_hash?, #is_a_directory?, #is_a_file?, #is_a_jpg_file?, #is_an_image_file?, #is_archive?, #is_audio_file?, #is_in_studium_dir?, #is_multimedia_file?, #is_on_roebe?, #is_on_windows?, #is_studium_available?, #is_symlink?, #is_this_a_ruby_file?, #is_video_file?, #iso_encoding?, #le, #left_colour, #lightblue, #lightgreen, #lightseagreen, #lightsteelblue, #lime, #limegreen, #localhost_to_data, #log_directory?, #main_encoding?, #mediumorchid, #mediumpurple, #mediumseagreen, #mediumslateblue, #mediumspringgreen, #mediumturquoise, #mkdir_p, #mv, #n_days_in_this_month, #n_pages_in_this_pdf_file?, #namespace?, #no_file_exists_at, #ogrey, #olive, #olivedrab, #open_in_browser, #opne, #opnesystem, #opnn, #orange, #orchid, #orev, #palegoldenrod, #palevioletred, #pink, #powderblue, #programs_dir?, #project_base_dir?, #random_html_colour, #rds, #read_file_in_iso_encoding, #read_file_via_the_default_encoding, #read_lines_via_iso_encoding, #readlines_with_main_encoding, #red, #register_sigint, #remove, #remove_directory, #remove_file, #rename_kde_konsole_tab, #replace_localhost_with_data, #report_pwd, #require_rescue, #reset_the_internal_hash, #return_all_directories_from_this_directory, #return_all_files_from_this_directory, #return_current_directory, #return_dd_mm_yyyy, #return_file_or_directory_of, #return_files_from_pwd, #return_last_part_of_the_current_directory, #return_utc, #rev, #right_arrow?, #right_colour, #roebe_log_directory?, #rosybrown, #royalblue, #ruby_base_directory?, #run_in_background, #run_rcfiles_then_run_ata_via_qdbus, #sandybrown, #sdir, #seagreen, #set_be_verbose, #set_xorg_buffer, #sfancy, #sfile, #silent_redirection?, #simp, #simple_esystem, #skyblue, #slateblue, #slategray, #springgreen, #steelblue, #string_italic, #swarn, #symlink, #teal, #temp_dir?, #to_camelcase, #to_counted_hash, #tomato, #touch, #try_to_require_the_beautiful_url_gem, #try_to_require_the_html_template, #try_to_require_the_open_gem, #try_to_require_the_program_information_gem, #try_to_require_the_xorg_buffer, #use_colours?, #verbose_truth, #weekday?, #word_wrap, #write_what_into, #yellow

Methods included from Base::CommandlineArguments

#append_onto_the_commandline_arguments, #clear_commandline_arguments, #commandline_arguments_as_string?, #commandline_arguments_without_leading_hyphens?, #first_argument?, #first_argument_without_leading_hyphens?, #has_an_argument_been_passed?, #remove_hyphened_arguments_from_the_commandline_arguments, #return_commandline_arguments_with_leading_hyphens, #second_argument?, #set_commandline_arguments

Constructor Details

#initialize(commandline_arguments = nil, run_already = true) ⇒ KdeKonsole

#

initialize

#


14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/roebe/classes/kde/kde_konsole/initialize.rb', line 14

def initialize(
    commandline_arguments = nil,
    run_already           = true
  )
  reset
  set_commandline_arguments(
    commandline_arguments
  )
  # ======================================================================= #
  # === Handle blocks next
  # ======================================================================= #
  if block_given?
    yielded = yield
    case yielded
    when :be_quiet,
         :be_silent
      @be_verbose = false
    end
  end
  case run_already
  when :do_not_run_yet
    run_already = false
  end
  run if run_already
end

Class Method Details

.[](title = '') ⇒ Object

#

Roebe::KdeKonsole[]

#


192
193
194
# File 'lib/roebe/classes/kde/kde_konsole/misc.rb', line 192

def self.[](title = '')
  new(title)
end

Instance Method Details

#clear_kde_konsole_tab_iconObject

#

clear_kde_konsole_tab_icon

#


178
179
180
# File 'lib/roebe/classes/kde/kde_konsole/misc.rb', line 178

def clear_kde_konsole_tab_icon
  e "\e]32;\a"
end

#commandline_arguments?Boolean

#

commandline_arguments?

#

Returns:

  • (Boolean)


108
109
110
# File 'lib/roebe/classes/kde/kde_konsole/misc.rb', line 108

def commandline_arguments?
  @commandline_arguments
end

#do_not_change_the_titleObject Also known as: do_not_rename_tab

#

do_not_change_the_title

#


81
82
83
# File 'lib/roebe/classes/kde/kde_konsole/misc.rb', line 81

def do_not_change_the_title
  @internal_hash[:make_use_of_the_title] = false
end

#do_use_unicodeObject

#

do_use_unicode

#


185
186
187
# File 'lib/roebe/classes/kde/kde_konsole/misc.rb', line 185

def do_use_unicode
  ENV['LC_ALL'] = 'en_US.utf8'
end

#ensure_that_a_proper_title_is_setObject

#

ensure_that_a_proper_title_is_set

#


88
89
90
91
92
93
94
95
96
# File 'lib/roebe/classes/kde/kde_konsole/misc.rb', line 88

def ensure_that_a_proper_title_is_set
  unless title?
    if commandline_arguments?.empty?
      set_title(:default_title)
    else
      set_title(joined_commandline_arguments)
    end
  end
end

#important_notificationObject

#

important_notification

#


199
200
201
# File 'lib/roebe/classes/kde/kde_konsole/misc.rb', line 199

def important_notification
  use_this_icon('emblem-important')
end

#joined_commandline_argumentsObject

#

joined_commandline_arguments

#


101
102
103
# File 'lib/roebe/classes/kde/kde_konsole/misc.rb', line 101

def joined_commandline_arguments
  commandline_arguments?.join(' ').strip
end

#make_use_of_the_title?Boolean

#

make_use_of_the_title?

#

Returns:

  • (Boolean)


74
75
76
# File 'lib/roebe/classes/kde/kde_konsole/misc.rb', line 74

def make_use_of_the_title?
  @internal_hash[:make_use_of_the_title]
end
#

menu (menu tag)

#


14
15
16
17
18
19
20
21
22
23
24
25
26
27
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
# File 'lib/roebe/classes/kde/kde_konsole/menu.rb', line 14

def menu(
    i = @commandline_arguments
  )
  if i.is_a? Array
    i.each {|entry| menu(entry) }
  else
    if i.to_s.encoding.to_s == 'US-ASCII'
      i = ensure_main_encoding(i.to_s)
    end
    case i # case tag
    # ===================================================================== #
    # === rti --absolute
    # ===================================================================== #
    when /^-?-?absolute$/i
      set_title(
        return_pwd
      )
    # ===================================================================== #
    # === rti --short-pwd
    # ===================================================================== #
    when /^-?-?short(-|_)?pwd$/i,
         /^-?-?short(-|_)?path$/i,
         /^-?-?short$/i,
         /^-?-?only(-|_)?last$/i
      set_title(
        return_last_part_of_the_current_directory # Only get the last part.
      )
    
    # ===================================================================== #
    # === rti --weather-snow
    # === rti --weather-snow-rain
    # === rti --emblem-important
    # === rti --mail-mark-important
    # === rti --document-import
    # === rti --view-certificate-import
    # === rti --folder-important
    # === rti --media-optical-audio
    # === rti --audio-input-microphone
    # === rti --audio-x-generic
    # === rti --audio-headphones
    #
    # All entries that are registered in the above check-point should
    # also be registered in a CONSTANT Array. This allows us to
    # pick a random entry. Do not forget to update that Array whenever
    # a new entry is used here.
    # ===================================================================== #
    when /^-?-?weather(-|_)?snow$/i,                 # === rti --weather-snow
         /^-?-?weather(-|_)?snow(-|_)?rain$/i,       # === rti --weather-snow-rain
         /^-?-?emblem(-|_)?important$/i,             # === rti --emblem-important
         /^-?-?emblem(-|_)?mounted$/i,               # === rti --emblem-mounted
         /^-?-?emblem(-|_)?warning$/i,               # === rti --emblem-warning
         /^-?-?important$/i,                         # === rti --important
         /^-?-?mounted$/i,                           # === rti --mounted
         /^-?-?warning$/i,                           # === rti --warning
         /^-?-?mail(-|_)?mark(-|_)?important$/i,     # === rti --mail-mark-important
         /^-?-?document(-|_)?import$/i,              # === rti --document-import
         /^-?-?view(-|_)?certificate(-|_)?import$/i, # === rti --view-certificate-import
         /^-?-?folder(-|_)?important$/i,             # === rti --folder-important
         /^-?-?media(-|_)?optical(-|_)?audio$/i,     # === rti --media-optical-audio
         /^-?-?audio(-|_)?input(-|_)?microphone$/i,  # === rti --audio-input-microphone
         /^-?-?audio(-|_)?x(-|_)?generic$/i,         # === rti --audio-x-generic
         /^-?-?audio(-|_)?headphones$/i,             # === rti --audio-headphones
         /^-?-?headphones$/i,                        # === rti --headphones
         /^-?-?utilities(-|_)?terminal$/i,           # === rti --utilities-terminal
         /^-?-?terminal$/i                           # === rti --terminal
      use_this_icon(i) # <- Sanitize it here.
      do_not_change_the_title
    # ===================================================================== #
    # === rti --no-icon
    # ===================================================================== #
    when /^-?-?no(-|_)?icon$/i,
         /^-?-?clear(-|_)?icons?$/i
      clear_kde_konsole_tab_icon
      do_not_change_the_title
    # ===================================================================== #
    # === rti --dialog-warning
    # ===================================================================== #
    when /^-?-?dialog(-|_)warning$/i
      set_title(
        use_this_icon(i)
      )
    # ===================================================================== #
    # === rti --snowman
    # ===================================================================== #
    when /^-?-?snowman$/i
      set_title(Roebe.snowman)
    # ===================================================================== #
    # === rti --image=/path/to/the/image.png
    # === rti --use-this-image=/path/to/the/image.png
    # === rti /home/x/data/images/pretty/Susanne_01.jpg
    # === rti --use-this-image=/home/x/data/images/pretty/Susanne_01.jpg
    # ===================================================================== #
    when /^-?-?image=(.+)$/i,                   # $1
         /^-?-?use(-|_)?this(-|_)?image=(.+)$/i # $3
      match = $1.to_s.dup
      match = $3.to_s.dup if $3
      use_this_icon(match)
      do_not_change_the_title
    # ===================================================================== #
    # === rti --kde-icon2
    # ===================================================================== #
    when /^-?-?kde(-|_)?icon(\d+)$/i
      _ = $2.to_s.dup.to_i
      use_this_icon(
        ARRAY_ALL_ICONS[_ - 1]
      )
      do_not_change_the_title
    # ===================================================================== #
    # === rti --random-icon
    # ===================================================================== #
    when /^-?-?random(-|_)?icon$/i
      _ = ARRAY_ALL_ICONS.sample
      use_this_icon(_)
      do_not_change_the_title
    # ===================================================================== #
    # === This entry point is for the emote/ subdirectory
    #
    # Invocation examples can be seen to the right hand side below.
    # ===================================================================== #
    when /^-?-?face(-|_)angel$/i,         # === rti --face-angel
         /^-?-?face(-|_)embarrassed$/i,   # === rti --face-embarassed
         /^-?-?face(-|_)kiss$/i,          # === rti --face-kiss
         /^-?-?face(-|_)laugh$/i,         # === rti --face-laugh
         /^-?-?face(-|_)plain$/i,         # === rti --face-plain
         /^-?-?face(-|_)raspberry$/i,     # === rti --face-raspberry
         /^-?-?face(-|_)sad$/i,           # === rti --face-sad
         /^-?-?face(-|_)smile(-|_)big$/i, # === rti --face-smile-big
         /^-?-?face(-|_)smile$/i,         # === rti --face-smile
         /^-?-?face(-|_)surprise$/i,      # === rti --face-surprise
         /^-?-?face(-|_)uncertain$/i,     # === rti --face-uncertain
         /^-?-?face(-|_)wink$/i           # === rti --face-wink
      use_this_icon(i)
      do_not_change_the_title
    # ===================================================================== #
    # === rti --return-important-notification
    # ===================================================================== #
    when /^-?-?return(-|_)important(-|_)notification$/i
      set_title(
        return_this_icon('folder-important')
      )
    # ===================================================================== #
    # === rti --important-notification
    # ===================================================================== #
    when /^-?-?important(-|_)notification$/i
      set_title(
        use_this_icon('folder-important')
      )
    # ===================================================================== #
    # === rti --warning
    # ===================================================================== #
    when /^-?-?warning$/i
      use_this_icon(i)
    # ===================================================================== #
    # === rti --waiting
    # ===================================================================== #
    when /^-?-?waiting$/i
      use_this_icon(i)
    # ===================================================================== #
    # === --help
    # ===================================================================== #
    when /^-?-?help$/
      show_help
      exit
    # ===================================================================== #
    # === --verbose
    # ===================================================================== #
    when /^-?-?verbose$/,
         /^-?-?be( |_|-)?verbose$/
      set_be_verbose
    else # else tag
      # =================================================================== #
      # A path can be given to an existing file:
      #
      #   rti $MY_DATA/IMG/NJOY/InTheRain.jpg
      #
      # =================================================================== #
      if i and File.exist?(i) and File.file?(i)
        do_not_rename_tab
        use_this_icon(i)
      # else
      #   e 'Unsure what to do with '+steelblue(i)+'.'
      end
    end
  end
end

#rename_konsole_title(be_verbose = be_verbose?, , use_which_mode = :non_qdbus_mode) ⇒ Object

#

rename_konsole_title

This is the main workhorse method for this class.

The (optional) argument tells us whether we will be verbose or whether we will be not verbose.

There are at the least two ways how to change the title of a KDE konsole tab:

(1) Make use of "qdbus".
(2) Make use of echo -ne.
#


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
62
63
64
65
66
67
68
69
# File 'lib/roebe/classes/kde/kde_konsole/misc.rb', line 34

def rename_konsole_title(
    be_verbose     = be_verbose?,
    use_which_mode = :non_qdbus_mode
  )
  text_to_show = input?
  # ======================================================================= #
  # Next, we will modify the text that is shown in some cases. These
  # cases will be handled in the following clause.
  #
  # Currently these only include <- and ->, which will be replaced with
  # the corresponding Unicode variants ← and →.
  # ======================================================================= #
  if try_to_replace_ascii_arrows? and
    (
      text_to_show.include?('<-') or text_to_show.include?('->')
    )
    text_to_show.gsub!(/\<-/, '')
    text_to_show.gsub!(/-\>/, '')
  end
  case use_which_mode
  # ======================================================================= #
  # === :default
  # ======================================================================= #
  when :default, # <- This is presently the default variant.
        :non_qdbus_mode
    _ = "\e]30;#{text_to_show}\a"
    e _
  # ======================================================================= #
  # === :qdbus_mode
  # ======================================================================= #
  when :qdbus_mode
    _ = 'qdbus org.kde.konsole $KONSOLE_DBUS_SESSION setTitle 1 "'+text_to_show+'"'
    e _ if be_verbose
    system _
  end
end

#resetObject

#

reset (reset tag)

#


14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/roebe/classes/kde/kde_konsole/reset.rb', line 14

def reset
  super()
  infer_the_namespace
  # ======================================================================= #
  # === @title
  # ======================================================================= #
  @title = nil
  # ======================================================================= #
  # === @be_verbose
  # ======================================================================= #
  @be_verbose = true # Ensure that it is true.
  # ======================================================================= #
  # === @internal_hash
  #
  # This Hash can be used for configuration options for class
  # Roebe::KdeKonsole.
  # ======================================================================= #
  @internal_hash = {}
  # ======================================================================= #
  # === :make_use_of_the_title
  # ======================================================================= #
  @internal_hash[:make_use_of_the_title] = true
  # ======================================================================= #
  # === :try_to_replace_ascii_arrows
  # ======================================================================= #
  @internal_hash[:try_to_replace_ascii_arrows] = true
end

#return_important_notificationObject Also known as: important

#

return_important_notification

Do note that “important” is an alias to this method which could change at some later moment in time. I needed to have this as the “main” alias so that I can use it from other projects.

#


210
211
212
213
# File 'lib/roebe/classes/kde/kde_konsole/misc.rb', line 210

def return_important_notification
  # return_this_icon('folder-important')
  return_this_icon('emblem-important')
end

#return_this_icon(i) ⇒ Object

#

return_this_icon

This method is useful to return the String for a specific icon that can be shown in a KDE konsole tab (on the left side of it).

#


240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
# File 'lib/roebe/classes/kde/kde_konsole/misc.rb', line 240

def return_this_icon(i)
  i = i.dup
  # ======================================================================= #
  # Next do a little bit sanitizing.
  # ======================================================================= #
  case i # case tag
  # ======================================================================= #
  # === rti --warning
  # ======================================================================= #
  when /^-?-?warning$/i
    i = 'emblem-warning'
  # ======================================================================= #
  # === rti --mounted
  # ======================================================================= #
  when /^-?-?mounted$/i
    i = 'emblem-mounted'
  # ======================================================================= #
  # === rti --important
  # ======================================================================= #
  when /^-?-?important$/i
    i = 'emblem-important'
  # ======================================================================= #
  # === rti --terminal
  # ======================================================================= #
  when /^-?-?terminal$/i
    i = 'utilities-terminal'
  # ======================================================================= #
  # === rti --headphones
  # ======================================================================= #
  when /^-?-?headphones$/i
    i = 'audio-headphones'
  end
  if i.start_with? '--'
    i[0,2] = ''
  end
  "\033]32;#{i}\007"
end

#runObject

#

run (run tag)

#


14
15
16
17
18
19
20
# File 'lib/roebe/classes/kde/kde_konsole/run.rb', line 14

def run
  menu
  if make_use_of_the_title?
    ensure_that_a_proper_title_is_set
    rename_konsole_title
  end
end

#set_title(i = DEFAULT_TITLE) ⇒ Object Also known as: set_use_this_as_title, set_input

#

set_title

This method can be used to set the title that we wish to use for the current KDE konsole tab.

Note that input such as :snowman, will be assumed to be for the Unicode snowman.

For a good overview of nice unicode symbols, have a look at:

http://jrgraphix.net/r/Unicode/2600-26FF
#


133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
# File 'lib/roebe/classes/kde/kde_konsole/misc.rb', line 133

def set_title(i = DEFAULT_TITLE)
  i = i.join(' ').strip if i.is_a? Array
  case i
  when :default, :default_title, nil
    i = DEFAULT_TITLE
  end
  i = DEFAULT_TITLE if i.empty?
  if i.is_a? Symbol
    i = ":#{i}" # Make it appear symbol-like.
  end
  i = i.to_s.dup
  # ======================================================================= #
  # Next, handle Unicode Symbols. We assume that these are Strings at
  # this point, starting with ':', such as ':snowman'.
  # ======================================================================= #
  if i.start_with? ':'
    i = ::Roebe.map_input_to_unicode_symbol(i)
  end
  case i # case tag
  # ======================================================================= #
  # === rti LAST_NAME_ONLY
  # ======================================================================= #
  when /^LAST_?NAME_?ONLY/
    if return_pwd.include? HOME_OF_THE_USER_CALLED_X
      i = return_last_part_of_the_current_directory
    end
  # ======================================================================= #
  # === rti PWD_LAST
  # ======================================================================= #
  when /^PWD_?LAST/,
       /^-?-?short(-|_)?pwd$/i
    i = return_last_part_of_the_current_directory # Only get the last part.
  # ======================================================================= #
  # === PWD
  # ======================================================================= #
  when 'PWD'
    i = return_current_directory
  end
  @title = i
end

#show_helpObject

#

show_help (help tag)

To invoke this from the commandline, try:

rti --help
#


19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/roebe/classes/kde/kde_konsole/help.rb', line 19

def show_help
  help_string = <<-EOF

#{grey}The following options are documented/available for #{sfancy('class Roebe::KdeKonsole')}#{grey}:

--be-verbose  # show the command that is to be used
--random-icon # use a random icon for a KDE Konsole tab
--absolute    # use the absolute path (aka "pwd") for the current working directory

EOF
  
  e help_string
end

#title?Boolean Also known as: input?

#

title?

#

Returns:

  • (Boolean)


115
116
117
# File 'lib/roebe/classes/kde/kde_konsole/misc.rb', line 115

def title?
  @title
end

#try_to_replace_ascii_arrows?Boolean

#

try_to_replace_ascii_arrows?

#

Returns:

  • (Boolean)


15
16
17
# File 'lib/roebe/classes/kde/kde_konsole/misc.rb', line 15

def try_to_replace_ascii_arrows?
  @internal_hash[:try_to_replace_ascii_arrows]
end

#use_terminal_iconObject

#

use_terminal_icon

#


218
219
220
# File 'lib/roebe/classes/kde/kde_konsole/misc.rb', line 218

def use_terminal_icon
  use_this_icon('--terminal')
end

#use_this_icon(i) ⇒ Object

#

use_this_icon

Note that this method here will instantly “display” the result, aka apply this icon onto the commandline. If you only need to return the String for it, use the method called return_this_icon().

#


229
230
231
232
# File 'lib/roebe/classes/kde/kde_konsole/misc.rb', line 229

def use_this_icon(i)
  use_this_path = return_this_icon(i)
  e use_this_path
end