xiki 0.5.1a → 0.5.3a

Sign up to get free protection for your applications and to get access to all the features.
Files changed (148) hide show
  1. data/Gemfile +1 -11
  2. data/README.markdown +67 -43
  3. data/bin/xiki +2 -15
  4. data/etc/command/xiki_command.rb +115 -41
  5. data/etc/command/xiki_process.rb +3 -7
  6. data/etc/install/el4r_setup.sh +5 -0
  7. data/etc/themes/Black_BG.notes +8 -0
  8. data/etc/themes/Dark_Metal.notes +0 -6
  9. data/etc/themes/Default.notes +24 -0
  10. data/etc/themes/Fall_Fonts.notes +6 -0
  11. data/etc/themes/Light_Gray_BG_Theme.notes +6 -0
  12. data/etc/themes/Orange_Path.notes +1 -1
  13. data/etc/themes/Pastel_Fonts.notes +6 -0
  14. data/etc/themes/Path_Mode_Line.notes +36 -0
  15. data/etc/themes/Rainbow_Fonts.notes +20 -0
  16. data/etc/themes/Shiny_Blue.notes +14 -18
  17. data/etc/themes/Shiny_Green.notes +0 -6
  18. data/etc/themes/White_BG.notes +5 -0
  19. data/etc/vim/vim_status.notes +32 -0
  20. data/etc/vim/xiki.vim +16 -0
  21. data/etc/wrappers/wrapper.rb +2 -2
  22. data/etc/www/index.rb +1 -1
  23. data/etc/www/public/error.html +47 -0
  24. data/etc/www/sinatra_server.rb +353 -0
  25. data/etc/www/web_server.rb +0 -252
  26. data/lib/xiki.rb +94 -26
  27. data/lib/{block.rb → xiki/block.rb} +0 -0
  28. data/lib/{bookmarks.rb → xiki/bookmarks.rb} +11 -10
  29. data/lib/{buffers.rb → xiki/buffers.rb} +10 -10
  30. data/lib/{clipboard.rb → xiki/clipboard.rb} +2 -2
  31. data/lib/{code.rb → xiki/code.rb} +3 -7
  32. data/lib/{code_tree.rb → xiki/code_tree.rb} +3 -3
  33. data/lib/{color.rb → xiki/color.rb} +4 -14
  34. data/lib/{console.rb → xiki/console.rb} +6 -0
  35. data/lib/{control_lock.rb → xiki/control_lock.rb} +5 -1
  36. data/lib/{control_tab.rb → xiki/control_tab.rb} +3 -1
  37. data/lib/{core_ext.rb → xiki/core_ext.rb} +7 -3
  38. data/lib/{cursor.rb → xiki/cursor.rb} +4 -5
  39. data/lib/{deletes.rb → xiki/deletes.rb} +0 -0
  40. data/lib/{diff_log.rb → xiki/diff_log.rb} +4 -4
  41. data/lib/{effects.rb → xiki/effects.rb} +5 -2
  42. data/lib/{environment.rb → xiki/environment.rb} +0 -0
  43. data/lib/{file_tree.rb → xiki/file_tree.rb} +34 -24
  44. data/lib/{files.rb → xiki/files.rb} +15 -5
  45. data/lib/{hide.rb → xiki/hide.rb} +0 -0
  46. data/lib/{history.rb → xiki/history.rb} +1 -0
  47. data/lib/{image.rb → xiki/image.rb} +0 -0
  48. data/lib/{incrementer.rb → xiki/incrementer.rb} +0 -0
  49. data/lib/{insert.rb → xiki/insert.rb} +0 -0
  50. data/lib/{irc.rb → xiki/irc.rb} +0 -0
  51. data/lib/{key_bindings.rb → xiki/key_bindings.rb} +7 -4
  52. data/lib/{keys.rb → xiki/keys.rb} +32 -36
  53. data/lib/{launcher.rb → xiki/launcher.rb} +42 -23
  54. data/lib/{line.rb → xiki/line.rb} +1 -1
  55. data/lib/{links.rb → xiki/links.rb} +0 -0
  56. data/lib/{location.rb → xiki/location.rb} +0 -0
  57. data/lib/{macros.rb → xiki/macros.rb} +0 -0
  58. data/lib/{man.rb → xiki/man.rb} +0 -0
  59. data/lib/{menu.rb → xiki/menu.rb} +62 -11
  60. data/lib/{merb.rb → xiki/merb.rb} +1 -1
  61. data/lib/{message.rb → xiki/message.rb} +0 -0
  62. data/lib/{meths.rb → xiki/meths.rb} +0 -0
  63. data/lib/{mode.rb → xiki/mode.rb} +0 -0
  64. data/lib/{move.rb → xiki/move.rb} +1 -1
  65. data/lib/{notes.rb → xiki/notes.rb} +41 -37
  66. data/lib/{numbers.rb → xiki/numbers.rb} +0 -0
  67. data/lib/{ol.rb → xiki/ol.rb} +2 -3
  68. data/lib/{ol_helper.rb → xiki/ol_helper.rb} +0 -0
  69. data/lib/{overlay.rb → xiki/overlay.rb} +0 -0
  70. data/lib/{pause_means_space.rb → xiki/pause_means_space.rb} +2 -2
  71. data/lib/{php.rb → xiki/php.rb} +0 -0
  72. data/lib/{projects.rb → xiki/projects.rb} +8 -1
  73. data/lib/{relinquish_exception.rb → xiki/relinquish_exception.rb} +0 -0
  74. data/lib/{remote.rb → xiki/remote.rb} +2 -2
  75. data/lib/{requirer.rb → xiki/requirer.rb} +3 -3
  76. data/lib/{rest_tree.rb → xiki/rest_tree.rb} +0 -0
  77. data/lib/{ruby.rb → xiki/ruby.rb} +0 -0
  78. data/lib/{ruby_console.rb → xiki/ruby_console.rb} +0 -0
  79. data/lib/{search.rb → xiki/search.rb} +7 -8
  80. data/lib/{search_term.rb → xiki/search_term.rb} +0 -0
  81. data/lib/{snippet.rb → xiki/snippet.rb} +0 -0
  82. data/lib/{specs.rb → xiki/specs.rb} +0 -0
  83. data/lib/{styles.rb → xiki/styles.rb} +8 -72
  84. data/lib/{svn.rb → xiki/svn.rb} +0 -0
  85. data/lib/{text_util.rb → xiki/text_util.rb} +2 -2
  86. data/lib/{tree.rb → xiki/tree.rb} +40 -32
  87. data/lib/{tree_cursor.rb → xiki/tree_cursor.rb} +0 -0
  88. data/lib/{trouble_shooting.rb → xiki/trouble_shooting.rb} +0 -0
  89. data/lib/{url_tree.rb → xiki/url_tree.rb} +0 -0
  90. data/lib/{view.rb → xiki/view.rb} +39 -16
  91. data/lib/xiki/vim/line.rb +8 -0
  92. data/lib/xiki/vim/tree.rb +9 -0
  93. data/lib/{window.rb → xiki/window.rb} +0 -0
  94. data/menus/address_book.rb +6 -4
  95. data/menus/agenda.rb +3 -3
  96. data/menus/amazon.rb +2 -2
  97. data/menus/applescript.rb +21 -10
  98. data/menus/black.menu +1 -0
  99. data/menus/bootstrap.rb +2 -7
  100. data/menus/browser.rb +8 -5
  101. data/menus/cassandra_db.rb +2 -2
  102. data/menus/chmod.rb +1 -1
  103. data/menus/conf.rb +5 -0
  104. data/menus/cookies.rb +1 -1
  105. data/menus/css.rb +2 -2
  106. data/menus/deck.rb +1 -1
  107. data/menus/dimensions_config.menu +30 -0
  108. data/menus/dimensions_config.rb +5 -0
  109. data/menus/docs.rb +33 -34
  110. data/menus/dotsies.rb +1 -0
  111. data/menus/emacs.rb +7 -2
  112. data/menus/firefox.rb +25 -25
  113. data/menus/git.rb +1 -1
  114. data/menus/gito.rb +2 -2
  115. data/menus/headings.rb +3 -3
  116. data/menus/ip.rb +2 -4
  117. data/menus/itunes.rb +9 -2
  118. data/menus/javascript.rb +3 -1
  119. data/menus/local_storage.rb +4 -4
  120. data/menus/mac.rb +2 -1
  121. data/menus/maps.rb +2 -2
  122. data/menus/models.rb +31 -0
  123. data/menus/mongo.rb +2 -2
  124. data/menus/piano.rb +47 -23
  125. data/menus/r.rb +57 -0
  126. data/menus/rails.rb +89 -27
  127. data/menus/redmine.rb +1 -1
  128. data/menus/sass.rb +1 -1
  129. data/menus/settings.menu +2 -0
  130. data/menus/technologies.rb +4 -1
  131. data/menus/web_interface.rb +58 -0
  132. data/menus/welcome.menu +18 -0
  133. data/menus/white.menu +1 -0
  134. data/menus/youtube.rb +32 -0
  135. data/spec/code_tree_spec.rb +1 -1
  136. data/spec/diff_log_spec.rb +4 -4
  137. data/spec/file_tree_spec.rb +2 -2
  138. data/spec/line_spec.rb +2 -2
  139. data/spec/menu_spec.rb +5 -5
  140. data/spec/ol_spec.rb +3 -3
  141. data/spec/remote_spec.rb +2 -2
  142. data/spec/search_spec.rb +2 -2
  143. data/spec/text_util_spec.rb +1 -1
  144. data/spec/tree_cursor_spec.rb +3 -3
  145. data/spec/tree_spec.rb +3 -3
  146. data/xiki.gemspec +22 -6
  147. metadata +311 -76
  148. data/menus/dir.rb +0 -8
data/Gemfile CHANGED
@@ -1,13 +1,3 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- gem 'ruby2ruby'
4
- gem 'ParseTree'
5
- gem 'httparty'
6
- gem 'activesupport'
7
- gem 'method_source'
8
- gem 'net-ssh'
9
- gem 'net-ssh'
10
- gem 'rspec'
11
- gem 'memcached'
12
- gem 'el4r'
13
-
3
+ gemspec
data/README.markdown CHANGED
@@ -1,92 +1,116 @@
1
1
  # Summary
2
- This file tells how to install Xiki. See http://xiki.org for a description of Xiki.
3
-
4
- Either install as a gem, or install from github.
2
+ This file shows how to install Xiki. See http://xiki.org for a description of Xiki.
5
3
 
6
4
  # Install Xiki
7
5
 
6
+ Either install as a gem, or install from github.
7
+
8
8
  ## As a gem
9
9
 
10
- $ gem install xiki
10
+ $ sudo gem install xiki --pre
11
11
 
12
- ## From github
12
+ ## Or, from github
13
13
 
14
14
  $ git clone git@github.com:trogdoro/xiki.git
15
15
  $ cd xiki
16
+ $ gem install bundler
16
17
  $ bundle install --system
17
18
  $ cp <xiki dir>/etc/command/xiki_wrapper /usr/local/bin/xiki
18
19
  $ chmod 755 /usr/local/bin/xiki
19
20
 
20
- # Verify the 'xiki' command works
21
+ If you don't have permission, to run some of the commands put "sudo" at the beginning of the command.
22
+
23
+ # Verify the 'xiki' shell command works
21
24
 
22
25
  $ xiki
23
26
 
24
- # Configure Emacs to use Xiki
27
+ It should delay slightly the first time, but be fast subsequent times. If you run into errors and then fix them, you'll want to run the "xiki restart" command.
28
+
29
+ # Configure your editor to use Xiki
30
+
31
+ ## Emacs
25
32
 
26
33
  If you're going to use Xiki with Emacs, do these steps:
27
34
 
28
- ## Step 1: Download Emacs
35
+ ### Step 1: Download Emacs
29
36
 
30
- ### On Mac:
31
- - Try Aquamacs 1.9.1 if you're new to emacs (it's more mac-like)
37
+ #### On Mac:
38
+ - Try Aquamacs if you're new to emacs (it's more mac-like)
32
39
  - http://aquamacs.org/download-classic.shtml
40
+ - works well with rvm, because it loads .bash_login
33
41
  - Or
34
- - http://emacsformacosx.com/emacs-builds/Emacs-22.3-i386-10.5.7.dmg
35
- - Note: newer mac versions (after 22) have a bug that makes communicating with processes 1000 times slower. Til this is fixed stick with the above versions.
42
+ - http://emacsformacosx.com
36
43
 
37
- ### On Linux:
44
+ #### On Linux:
38
45
 
39
46
  $ sudo apt-get install emacs
40
47
 
48
+ #### On Windows:
49
+
50
+ We just patched el4r, so there's a chance Xiki might work in windows.
51
+
52
+ - Skip the 'xiki' shell command step
53
+ - Maybe try this emacs? http://ourcomments.org/Emacs/EmacsW32.html
41
54
 
42
- ## Step 2: Do extra EmacsRuby (el4r) steps
43
55
 
44
- $ gem contents el4r | grep setup.rb # To see which dir to cd to in the next step
45
- $ cd /Library/Ruby/Gems/1.8/gems/el4r-1.0.4/
46
- $ ruby setup.rb
47
- $ cd bin/
48
- $ ruby -S el4r-rctool -p
49
- $ sudo ruby -S el4r-rctool -i
56
+ ### Step 2: EmacsRuby (el4r) setup
50
57
 
51
- ## Step 3: Require Xiki in EmacsRuby's config
58
+ $ cd <xiki dir>
59
+ $ sudo bash etc/install/el4r_setup.sh
60
+
61
+ If you're using rvm, the sudo may not be necessary.
62
+
63
+ If you're using the xiki gem, you can paste this for the above cd:
64
+
65
+ $ cd `dirname \`gem contents xiki | grep Gemfile\``
66
+
67
+ ### Step 3: Require Xiki in EmacsRuby's config
52
68
  Sample configuration:
53
69
 
54
70
  ~/.el4r/init.rb:
55
- $LOAD_PATH.unshift "/projects/xiki/lib"
71
+ $LOAD_PATH.unshift "<xiki dir>/lib"
56
72
  require 'xiki'
57
73
  Xiki.init
58
74
 
59
75
  KeyBindings.keys # Use default key bindings
60
- Styles.use_xiki_color_scheme # Use xiki's color scheme
76
+ Themes.use "Default" # Use xiki theme
61
77
 
62
78
 
63
- ## Trouble-shooting
64
- The install is a bit rough at the moment...
79
+ Be sure to substitute "&lt;xiki dir&gt;" with the actual dir.
65
80
 
66
- - If you get an error (and you probably will)
67
- - If you got partially through the load
68
- - you will be able to use these keys to trouble-shoot:
69
- - Option-l to reload xiki and .emacs
70
- - also use this when you see "el4r-instance is dead"
71
- - Option-e to look at the latest error
72
- - It will be Command instead of Option if you're not using Aquamacs
81
+ ### If you get an error
82
+ If you got partially through the load...
73
83
 
74
- - Or you can manually restart emacs (or reload .emacs) and look at the log
75
- - Named something like: /tmp/el4r......log
84
+ - You may be able to use these keys to trouble-shoot:
85
+ - Option+e to look at the latest error in the log
86
+ - Option+l to reload xiki and .emacs
87
+ - also use this when you see "el4r-instance is dead"
88
+ - If you can't use the keys, look at the log
89
+ - Named something like: /tmp/el4r......log
76
90
  - Go to the end and search backward for the last error
77
- - probably contains ":Error:"
91
+ - probably contains ":Error:"
92
+ - Restart emacs (or reload .emacs) manually to reload
93
+ - See "Issues Loading Xiki" buffer (under "Window" menu bar menu)
94
+
95
+
96
+ ## Vim
97
+
98
+ Vim support is very partially implemented, but should be pretty
99
+ straight-forward to implement. It turns out vim is very easy to
100
+ extend using ruby. See this file to try it out:
101
+
102
+ ./etc/vim/vim_status.notes
103
+
104
+ ## CodeMirror
78
105
 
79
- - If you get a "can't find header dir for ruby" error
80
- $ sudo apt-get install ruby1.8-dev
106
+ There's a simple prototype working, though it's not committed yet.
81
107
 
82
- - If you run into trouble installing EmacsRuby
83
- - See: http://www.rubyist.net/~rubikitch/computer/el4r/index.en.html
84
- - Click on 'Download / Install / Setup' link
108
+ ## Other editors
109
+ Are you in the bay area and savvy at extending your editor (vim, sublime, textmate, rubymine)? Ping me on the google group and we'll get together and pair on making a Xiki extension for it.
85
110
 
86
111
 
87
- ## Google group
88
- Join the google group for help with installing, or to chat about whatever or
89
- share your ideas:
112
+ # Google group
113
+ Join the google group for help with installing, or to chat about whatever or share your ideas:
90
114
 
91
115
  http://groups.google.com/group/xiki
92
116
 
data/bin/xiki CHANGED
@@ -16,31 +16,18 @@
16
16
  require 'rubygems'
17
17
 
18
18
  # Generate with correct path (see below)
19
- # xiki_dir = "/projects/xiki/"
20
19
  xiki_dir = File.expand_path "#{File.dirname(__FILE__)}/.."
21
- # p "xiki_dir: #{xiki_dir.inspect}"
22
20
 
23
- # $:.unshift xiki_dir #.sub(/\/$/, '')
24
21
  $:.unshift "#{xiki_dir}/lib" #.sub(/\/$/, '')
25
22
 
26
- # require "#{xiki_dir}/ol"
27
- require "ol"
28
- # Ol.line
29
- require "core_ext"
23
+ require "xiki/ol"
24
+ require "xiki/core_ext"
30
25
 
31
26
  $:.unshift "#{xiki_dir}/etc/command"
32
- # $:.unshift "#{xiki_dir}etc/command/stubs"
33
27
 
34
28
  require "xiki_command.rb"
35
- # load "xiki_command.rb"
36
29
 
37
30
  result = XikiCommand.run
38
31
  puts result if result != ""
39
32
 
40
33
  exit 0
41
-
42
- # TODO: Start with template, and when installing, change:
43
- # - #!.. line to: result of: `which ruby`
44
- # - xiki_dir to: Xiki.dir
45
-
46
-
@@ -19,11 +19,11 @@ class XikiCommand
19
19
  # Called by the 'xiki' shell command
20
20
  def self.run
21
21
 
22
- xiki_root = File.expand_path "#{File.dirname(__FILE__)}/../.."
22
+ xiki_dir = File.expand_path "#{File.dirname(__FILE__)}/../.."
23
23
  argv = ARGV
24
24
 
25
25
  if argv.empty?
26
- puts self.usage
26
+ puts "#{self.usage}\n"
27
27
  @@dont_show_output = true
28
28
  argv = ['start'] # So it continues on and starts server
29
29
  elsif argv.length == 1 && ['status', 'stop', 'restart'].member?(argv[0])
@@ -38,8 +38,8 @@ class XikiCommand
38
38
  wasnt_running = false
39
39
 
40
40
  begin
41
- `mkfifo -m 666 /tmp/xikirequest` if ! File.exists?("/tmp/xikirequest") # Always create first, so they have to be pipes and can't be files
42
- `mkfifo -m 666 /tmp/xikiresponse` if ! File.exists?("/tmp/xikiresponse")
41
+ `mkfifo -m 600 /tmp/xikirequest` if ! File.exists?("/tmp/xikirequest") # Always create first, so they have to be pipes and can't be files
42
+ `mkfifo -m 600 /tmp/xikiresponse` if ! File.exists?("/tmp/xikiresponse")
43
43
 
44
44
  # Try writing to pipe...
45
45
 
@@ -83,7 +83,7 @@ class XikiCommand
83
83
  pid_orig = Process.pid
84
84
 
85
85
  @@initial_request = path
86
- xiki_process = "#{xiki_root}/etc/command/xiki_process.rb"
86
+ xiki_process = "#{xiki_dir}/etc/command/xiki_process.rb"
87
87
  Daemons.run xiki_process, :ARGV=>['start'], :monitor=>false, :multiple=>false, :dir_mode=>:normal, :dir=>"/tmp/", :log_dir=>"/tmp/", :log_output=>true
88
88
 
89
89
  # Aparently this line never gets reached
@@ -94,7 +94,7 @@ class XikiCommand
94
94
  process_succeeded = true
95
95
 
96
96
  rescue Exception=>e
97
- puts "- service couldn't start!"
97
+ puts "- service couldn't start!:#{e.message}\n#{e.backtrace.join("\n")}\n\n"
98
98
  end
99
99
  end
100
100
 
@@ -126,51 +126,74 @@ class XikiCommand
126
126
  # old IO.select ["/tmp/xikiresponse"]
127
127
 
128
128
  response = response.gets # will block if there's nothing in the pipe
129
-
130
129
  response.strip!
131
130
  response.gsub! "\036", "\n" # Escape linebreaks as 036 char (record separator)
132
- response = "" if @@dont_show_output
133
- response
131
+ return "" if @@dont_show_output
132
+ self.add_coloring response
134
133
  end
135
134
  end
136
135
  end
137
136
 
138
137
  def self.usage
139
- %`
140
- > Summary
141
- This command runs xiki menus, which come from simple files
142
- found in ~/menus/.
143
-
144
- > Show all menus
145
- % xiki all
146
-
147
- > Examples
148
- Call 'ip' menu
149
- % xiki ip
150
- % xiki animals
151
- % xiki tables
152
-
153
- > Open 'ip' menu in emacs
154
- % xiki -e ip
155
-
156
- > Run under current dir
157
- % xiki -e @git
158
-
159
- > Service
160
- Xiki automatically runs a service in the backgroundto keep
161
- things fast.
162
-
163
- % xiki # With no args, it starts the service.
164
- % xiki status
165
- % xiki stop
166
- % xiki restart
167
- `.unindent
138
+ txt = %`
139
+ > Summary
140
+ The 'xiki' shell command is mostly meant to be called by programs
141
+ that want to interface with xiki. But it is sometimes useful for
142
+ people to call it directly. Example usages:
143
+
144
+ $ xiki ip
145
+ $ xiki docs/faq
146
+
147
+ > Setting up your editor
148
+ The most common way to use Xiki is from a text editor. For
149
+ example, typing "tables" on any blank line and double-clicking on
150
+ it (or typing control-enter or command-enter) to browse and update
151
+ your mysql database.
152
+
153
+ See this file for help setting up your editor:
154
+
155
+ $xiki/README.markdown
156
+
157
+ > Service
158
+ The 'xiki' shell command automatically runs a service in the
159
+ backgroundto keep things fast.
160
+
161
+ % xiki status
162
+ % xiki stop
163
+ % xiki restart
164
+
165
+ > Interfaces
166
+ Xiki can be used from...
167
+ - A text editor
168
+ - The 'xiki' shell command
169
+ - The http://xiki/ url in your browser (experimental)
170
+
171
+ For more information type:
172
+
173
+ $ xiki docs
174
+
175
+ > Google Group
176
+ Join the google group for help with installing, or just to chat or
177
+ share your ideas:
178
+
179
+ http://groups.google.com/group/xiki/
180
+
181
+ > Troubleshooting
182
+ Be sure to run this command to install required gems:
183
+
184
+ % bundle install
185
+
186
+ Also see $xiki/README.markdown
187
+
188
+ `.unindent
189
+
190
+ self.add_coloring txt
168
191
  end
169
192
 
170
193
  def self.ctrl action
171
194
  require 'daemons'
172
- xiki_root = File.expand_path "#{File.dirname(__FILE__)}/../.."
173
- xiki_process = "#{xiki_root}/etc/command/xiki_process.rb"
195
+ xiki_dir = File.expand_path "#{File.dirname(__FILE__)}/../.."
196
+ xiki_process = "#{xiki_dir}/etc/command/xiki_process.rb"
174
197
  Daemons.run xiki_process, :ARGV=>[action], :dir_mode=>:normal, :dir=>"/tmp/", :log_dir=>"/tmp/", :log_output=>true
175
198
  ""
176
199
  end
@@ -193,5 +216,56 @@ class XikiCommand
193
216
  nil
194
217
  end
195
218
 
196
- end
197
219
 
220
+ def self.add_coloring txt
221
+ return txt if ! STDOUT.tty?
222
+ txt.gsub!(/.+/) do |line|
223
+ case line
224
+ when /^(>) (.+)/
225
+ "#{self.heading_bracket $1} #{self.bold $2}"
226
+ when /^http:\/\/.+/
227
+ "#{self.url $&}"
228
+ when /^.+\/$/
229
+ "#{self.path $&}"
230
+ when /^( *- )(.*!)$/
231
+ "#{self.bullet $1}#{self.exclamation $2}"
232
+ when /^( *)(- )(.+: )(.+)/
233
+ "#{$1}#{self.bullet $2}#{self.label $3}#{$4}"
234
+ when /^( *)(- )(.+)/
235
+ "#{$1}#{self.bullet $2}#{$3}"
236
+
237
+ else
238
+ line
239
+ end
240
+ end
241
+
242
+ txt << "\n" # Add extra linebreak, but only when in console
243
+ txt
244
+ end
245
+
246
+ def self.colorize txt, color_code
247
+ "\e[#{color_code}m#{txt}\e[0m"
248
+ end
249
+ def self.bullet txt
250
+ self.colorize txt, "1;31" # Red # colorize("1;91") # Red
251
+ end
252
+ def self.label txt
253
+ self.colorize txt, "1;33" # Yellow
254
+ end
255
+ def self.path txt
256
+ colorize(txt, "1;90")
257
+ end
258
+ def self.url txt
259
+ colorize(txt, "1;36") # Cyan
260
+ end
261
+ def self.heading_bracket txt
262
+ colorize(txt, "0;37")
263
+ end
264
+ def self.bold txt
265
+ colorize(txt, "1")
266
+ end
267
+ def self.exclamation txt
268
+ colorize(txt, "1;32") # Green
269
+ end
270
+
271
+ end
@@ -1,10 +1,6 @@
1
- # Don't hard-code, generate with script? - or use __file path xiki env var!
2
- require '/projects/xiki/lib/ol'
3
- require 'core_ext'
4
-
5
- require 'menu'
6
-
7
- require 'launcher'
1
+ require 'xiki/core_ext'
2
+ require 'xiki/menu'
3
+ require 'xiki/launcher'
8
4
 
9
5
  Xiki.init
10
6
 
@@ -0,0 +1,5 @@
1
+ cd `dirname \`gem contents trogdoro-el4r | grep setup.rb\``
2
+ ruby setup.rb
3
+ cd bin/
4
+ ruby -S el4r-rctool -p
5
+ ruby -S el4r-rctool -i
@@ -0,0 +1,8 @@
1
+ $el.set_face_background :trailing_whitespace, "#333333"
2
+
3
+ Styles.define :default, :bg=>'151515', :fg=>'fff'
4
+ Styles.define :fringe, :bg=>'151515', :fg=>'111111'
5
+
6
+ Styles.minibuffer_prompt :size=>110, :face=>"Monaco", :fg=>"#bbb"
7
+ Styles.minibuffer :size=>110, :face=>"Monaco"
8
+ Styles.echo_area :size=>110, :face=>"Monaco"