xiki 0.5.1a → 0.5.3a
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -11
- data/README.markdown +67 -43
- data/bin/xiki +2 -15
- data/etc/command/xiki_command.rb +115 -41
- data/etc/command/xiki_process.rb +3 -7
- data/etc/install/el4r_setup.sh +5 -0
- data/etc/themes/Black_BG.notes +8 -0
- data/etc/themes/Dark_Metal.notes +0 -6
- data/etc/themes/Default.notes +24 -0
- data/etc/themes/Fall_Fonts.notes +6 -0
- data/etc/themes/Light_Gray_BG_Theme.notes +6 -0
- data/etc/themes/Orange_Path.notes +1 -1
- data/etc/themes/Pastel_Fonts.notes +6 -0
- data/etc/themes/Path_Mode_Line.notes +36 -0
- data/etc/themes/Rainbow_Fonts.notes +20 -0
- data/etc/themes/Shiny_Blue.notes +14 -18
- data/etc/themes/Shiny_Green.notes +0 -6
- data/etc/themes/White_BG.notes +5 -0
- data/etc/vim/vim_status.notes +32 -0
- data/etc/vim/xiki.vim +16 -0
- data/etc/wrappers/wrapper.rb +2 -2
- data/etc/www/index.rb +1 -1
- data/etc/www/public/error.html +47 -0
- data/etc/www/sinatra_server.rb +353 -0
- data/etc/www/web_server.rb +0 -252
- data/lib/xiki.rb +94 -26
- data/lib/{block.rb → xiki/block.rb} +0 -0
- data/lib/{bookmarks.rb → xiki/bookmarks.rb} +11 -10
- data/lib/{buffers.rb → xiki/buffers.rb} +10 -10
- data/lib/{clipboard.rb → xiki/clipboard.rb} +2 -2
- data/lib/{code.rb → xiki/code.rb} +3 -7
- data/lib/{code_tree.rb → xiki/code_tree.rb} +3 -3
- data/lib/{color.rb → xiki/color.rb} +4 -14
- data/lib/{console.rb → xiki/console.rb} +6 -0
- data/lib/{control_lock.rb → xiki/control_lock.rb} +5 -1
- data/lib/{control_tab.rb → xiki/control_tab.rb} +3 -1
- data/lib/{core_ext.rb → xiki/core_ext.rb} +7 -3
- data/lib/{cursor.rb → xiki/cursor.rb} +4 -5
- data/lib/{deletes.rb → xiki/deletes.rb} +0 -0
- data/lib/{diff_log.rb → xiki/diff_log.rb} +4 -4
- data/lib/{effects.rb → xiki/effects.rb} +5 -2
- data/lib/{environment.rb → xiki/environment.rb} +0 -0
- data/lib/{file_tree.rb → xiki/file_tree.rb} +34 -24
- data/lib/{files.rb → xiki/files.rb} +15 -5
- data/lib/{hide.rb → xiki/hide.rb} +0 -0
- data/lib/{history.rb → xiki/history.rb} +1 -0
- data/lib/{image.rb → xiki/image.rb} +0 -0
- data/lib/{incrementer.rb → xiki/incrementer.rb} +0 -0
- data/lib/{insert.rb → xiki/insert.rb} +0 -0
- data/lib/{irc.rb → xiki/irc.rb} +0 -0
- data/lib/{key_bindings.rb → xiki/key_bindings.rb} +7 -4
- data/lib/{keys.rb → xiki/keys.rb} +32 -36
- data/lib/{launcher.rb → xiki/launcher.rb} +42 -23
- data/lib/{line.rb → xiki/line.rb} +1 -1
- data/lib/{links.rb → xiki/links.rb} +0 -0
- data/lib/{location.rb → xiki/location.rb} +0 -0
- data/lib/{macros.rb → xiki/macros.rb} +0 -0
- data/lib/{man.rb → xiki/man.rb} +0 -0
- data/lib/{menu.rb → xiki/menu.rb} +62 -11
- data/lib/{merb.rb → xiki/merb.rb} +1 -1
- data/lib/{message.rb → xiki/message.rb} +0 -0
- data/lib/{meths.rb → xiki/meths.rb} +0 -0
- data/lib/{mode.rb → xiki/mode.rb} +0 -0
- data/lib/{move.rb → xiki/move.rb} +1 -1
- data/lib/{notes.rb → xiki/notes.rb} +41 -37
- data/lib/{numbers.rb → xiki/numbers.rb} +0 -0
- data/lib/{ol.rb → xiki/ol.rb} +2 -3
- data/lib/{ol_helper.rb → xiki/ol_helper.rb} +0 -0
- data/lib/{overlay.rb → xiki/overlay.rb} +0 -0
- data/lib/{pause_means_space.rb → xiki/pause_means_space.rb} +2 -2
- data/lib/{php.rb → xiki/php.rb} +0 -0
- data/lib/{projects.rb → xiki/projects.rb} +8 -1
- data/lib/{relinquish_exception.rb → xiki/relinquish_exception.rb} +0 -0
- data/lib/{remote.rb → xiki/remote.rb} +2 -2
- data/lib/{requirer.rb → xiki/requirer.rb} +3 -3
- data/lib/{rest_tree.rb → xiki/rest_tree.rb} +0 -0
- data/lib/{ruby.rb → xiki/ruby.rb} +0 -0
- data/lib/{ruby_console.rb → xiki/ruby_console.rb} +0 -0
- data/lib/{search.rb → xiki/search.rb} +7 -8
- data/lib/{search_term.rb → xiki/search_term.rb} +0 -0
- data/lib/{snippet.rb → xiki/snippet.rb} +0 -0
- data/lib/{specs.rb → xiki/specs.rb} +0 -0
- data/lib/{styles.rb → xiki/styles.rb} +8 -72
- data/lib/{svn.rb → xiki/svn.rb} +0 -0
- data/lib/{text_util.rb → xiki/text_util.rb} +2 -2
- data/lib/{tree.rb → xiki/tree.rb} +40 -32
- data/lib/{tree_cursor.rb → xiki/tree_cursor.rb} +0 -0
- data/lib/{trouble_shooting.rb → xiki/trouble_shooting.rb} +0 -0
- data/lib/{url_tree.rb → xiki/url_tree.rb} +0 -0
- data/lib/{view.rb → xiki/view.rb} +39 -16
- data/lib/xiki/vim/line.rb +8 -0
- data/lib/xiki/vim/tree.rb +9 -0
- data/lib/{window.rb → xiki/window.rb} +0 -0
- data/menus/address_book.rb +6 -4
- data/menus/agenda.rb +3 -3
- data/menus/amazon.rb +2 -2
- data/menus/applescript.rb +21 -10
- data/menus/black.menu +1 -0
- data/menus/bootstrap.rb +2 -7
- data/menus/browser.rb +8 -5
- data/menus/cassandra_db.rb +2 -2
- data/menus/chmod.rb +1 -1
- data/menus/conf.rb +5 -0
- data/menus/cookies.rb +1 -1
- data/menus/css.rb +2 -2
- data/menus/deck.rb +1 -1
- data/menus/dimensions_config.menu +30 -0
- data/menus/dimensions_config.rb +5 -0
- data/menus/docs.rb +33 -34
- data/menus/dotsies.rb +1 -0
- data/menus/emacs.rb +7 -2
- data/menus/firefox.rb +25 -25
- data/menus/git.rb +1 -1
- data/menus/gito.rb +2 -2
- data/menus/headings.rb +3 -3
- data/menus/ip.rb +2 -4
- data/menus/itunes.rb +9 -2
- data/menus/javascript.rb +3 -1
- data/menus/local_storage.rb +4 -4
- data/menus/mac.rb +2 -1
- data/menus/maps.rb +2 -2
- data/menus/models.rb +31 -0
- data/menus/mongo.rb +2 -2
- data/menus/piano.rb +47 -23
- data/menus/r.rb +57 -0
- data/menus/rails.rb +89 -27
- data/menus/redmine.rb +1 -1
- data/menus/sass.rb +1 -1
- data/menus/settings.menu +2 -0
- data/menus/technologies.rb +4 -1
- data/menus/web_interface.rb +58 -0
- data/menus/welcome.menu +18 -0
- data/menus/white.menu +1 -0
- data/menus/youtube.rb +32 -0
- data/spec/code_tree_spec.rb +1 -1
- data/spec/diff_log_spec.rb +4 -4
- data/spec/file_tree_spec.rb +2 -2
- data/spec/line_spec.rb +2 -2
- data/spec/menu_spec.rb +5 -5
- data/spec/ol_spec.rb +3 -3
- data/spec/remote_spec.rb +2 -2
- data/spec/search_spec.rb +2 -2
- data/spec/text_util_spec.rb +1 -1
- data/spec/tree_cursor_spec.rb +3 -3
- data/spec/tree_spec.rb +3 -3
- data/xiki.gemspec +22 -6
- metadata +311 -76
- data/menus/dir.rb +0 -8
data/Gemfile
CHANGED
data/README.markdown
CHANGED
@@ -1,92 +1,116 @@
|
|
1
1
|
# Summary
|
2
|
-
This file
|
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
|
-
##
|
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
|
-
|
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
|
-
|
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
|
-
|
35
|
+
### Step 1: Download Emacs
|
29
36
|
|
30
|
-
|
31
|
-
- Try Aquamacs
|
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
|
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
|
-
|
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
|
-
|
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
|
-
|
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 "
|
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
|
-
|
76
|
+
Themes.use "Default" # Use xiki theme
|
61
77
|
|
62
78
|
|
63
|
-
|
64
|
-
The install is a bit rough at the moment...
|
79
|
+
Be sure to substitute "<xiki dir>" with the actual dir.
|
65
80
|
|
66
|
-
|
67
|
-
|
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
|
-
|
75
|
-
|
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
|
-
|
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
|
-
|
80
|
-
$ sudo apt-get install ruby1.8-dev
|
106
|
+
There's a simple prototype working, though it's not committed yet.
|
81
107
|
|
82
|
-
|
83
|
-
|
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
|
-
|
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
|
-
|
27
|
-
require "
|
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
|
-
|
data/etc/command/xiki_command.rb
CHANGED
@@ -19,11 +19,11 @@ class XikiCommand
|
|
19
19
|
# Called by the 'xiki' shell command
|
20
20
|
def self.run
|
21
21
|
|
22
|
-
|
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
|
42
|
-
`mkfifo -m
|
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 = "#{
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
173
|
-
xiki_process = "#{
|
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
|
data/etc/command/xiki_process.rb
CHANGED
@@ -1,10 +1,6 @@
|
|
1
|
-
|
2
|
-
require '
|
3
|
-
require '
|
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,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"
|