2010-12-09 21:59:12 +00:00
|
|
|
# screenomat
|
2010-12-09 21:36:04 +00:00
|
|
|
|
|
|
|
You like screen, I like screen. Make getting those big multi-command line-running projects
|
2010-12-09 21:59:12 +00:00
|
|
|
even easier to get started up with `screenomat`.
|
2010-12-09 21:36:04 +00:00
|
|
|
|
|
|
|
## How?
|
|
|
|
|
2010-12-09 21:59:12 +00:00
|
|
|
Make a `.screenomat` file in your app and write:
|
2010-12-09 21:36:04 +00:00
|
|
|
|
|
|
|
<pre>
|
|
|
|
session do
|
|
|
|
screen "bundle exec autotest", :title => "autotest"
|
|
|
|
screen "rails c", :title => "dev console"
|
|
|
|
screen "rails s", :title => "dev server"
|
|
|
|
screen "less +F -fr log/test.log", :title => "test log tail"
|
|
|
|
screen! :title => "bash"
|
|
|
|
end
|
|
|
|
</pre>
|
|
|
|
|
|
|
|
Then run:
|
|
|
|
|
2010-12-09 21:59:12 +00:00
|
|
|
screenomat
|
2010-12-09 21:36:04 +00:00
|
|
|
|
|
|
|
_~~whoa~~_
|
|
|
|
|
|
|
|
### More?
|
|
|
|
|
|
|
|
<pre>
|
|
|
|
session :backend do
|
|
|
|
screen "bundle exec autotest", :title => "autotest"
|
|
|
|
screen "less +F -fr log/test.log", :title => "test log tail"
|
|
|
|
screen! :title => "bash"
|
|
|
|
end
|
|
|
|
|
|
|
|
session :frontend do
|
|
|
|
screen "bundle exec autotest", :title => "autotest"
|
|
|
|
screen "rails c", :title => "console"
|
|
|
|
screen "rails s", :title => "server"
|
|
|
|
screen "rake jasmine", :title => "jasmine"
|
|
|
|
screen! :title => "bash"
|
|
|
|
end
|
|
|
|
</pre>
|
|
|
|
|
|
|
|
Then run:
|
|
|
|
|
2010-12-09 21:59:12 +00:00
|
|
|
screenomat backend
|
2010-12-09 21:36:04 +00:00
|
|
|
|
|
|
|
or even:
|
|
|
|
|
2010-12-09 21:59:12 +00:00
|
|
|
screenomat frontend
|
2010-12-09 21:36:04 +00:00
|
|
|
|
|
|
|
## Defaults?
|
|
|
|
|
2010-12-09 21:59:12 +00:00
|
|
|
Like magic `screenomat` bits anywhere? `~/.screenomat` is what you want! Same syntax!
|
2010-12-09 21:36:04 +00:00
|
|
|
|
|
|
|
## Ruby? DRY?
|
|
|
|
|
2010-12-09 21:59:12 +00:00
|
|
|
Just like `Gemfile`, `*.gemspec`, and other modern Ruby things, `.screenomat` is Ruby code. Like
|
2010-12-09 21:36:04 +00:00
|
|
|
DRYing things? You can do it!
|
|
|
|
|
|
|
|
<pre>
|
2010-12-09 21:59:12 +00:00
|
|
|
class Screenomat::DSL::Session
|
2010-12-09 21:36:04 +00:00
|
|
|
def whoa(&block)
|
|
|
|
screen :title => "first"
|
|
|
|
instance_eval(&block)
|
|
|
|
screen :title => "last"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
session :first do
|
|
|
|
whoa do
|
|
|
|
screen "bundle exec autotest", :title => 'autotest'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
session :second do
|
|
|
|
whoa do
|
|
|
|
screen %{echo "cats"}
|
|
|
|
end
|
|
|
|
end
|
|
|
|
</pre>
|
|
|
|
|
|
|
|
## What's left?
|
|
|
|
|
2010-12-09 21:37:27 +00:00
|
|
|
A _bunch_. I write what I need. Feel like adding fun things and/or tests? Fork, hack, pull request. You know the drill.
|