Giter Site home page Giter Site logo

consular's People

Contributors

aaronjensen avatar achiurizo avatar anirvan avatar bobthecow avatar elia avatar gregsherrid avatar gunn avatar jondot avatar kulesa avatar kyriacos avatar levelbossmike avatar maxmeyer avatar mcmire avatar mrgossett avatar nesquena avatar pcg79 avatar rcorre avatar recurser avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

consular's Issues

A ability to set the terminal theme

I normally ser a diffrerent theme when I'm SSHing to the server.
it should be possible to set the theme of the tab through apple script, but I'm quite a newbie in apple script, so I guess you guy could help me in this case.

Define projects in ruby, modify with terminal arguments

Defining projects in ruby could give us a heap of flexibility. Allowing commands to be modified by console arguments is something that would be very awkward otherwise.

Below is my idea of a very nice project definition.
To open the project with two tabs - "main", and "log", and in the development environment:
terminitor start mewzet --tabs ml -e production

~/.terminitor/mewzet.rb:
opts = Trollop::options do
opt :tabs, "Specify which tabs to open - m => main, l => log, i => irb", :short => 't', :default => "mli"
opt :environment, "The rails environment", :short => 'e', :default => "development"
end

def mtab (name, opt)
  return unless opts["tabs"].include? opt
  tab name do
    # we usually want to start from the projects root:
    run "cd /Users/Arthur/Work/mewzet.com/current"
    yield
  end
end

window "Mewzet Project" do
  mtab "main", "m" do
    run "gitx"
    run "mate ."
    # get passenger warmed up:
    run "touch tmp/restart.txt; curl mewzet.local > /dev/null"
  end

  mtab "log", "l" do
    run "tail -f log/#{opts['environment']}.log"
  end

  mtab "irb", "i" do
    run "irb -e #{opts['environment']}"
  end

Note that this all become possible with nesquena's "New sexy dsl syntax" - http://github.com/achiu/terminitor/issues#issue/15

The extra features of my project - all tabs cd to the same dir, the rails environment can be specified, and we can choose which tabs to open - are all defined in my project.

rb-appscript error with when "terminator init" is run

When I attempted to run "terminator init", with Mac OS X - Terminal, I received an error with rb-appscript-0.5.3. Upon updating that gem to 0.6, everything worked fine. It seems line 20 of terminator.gemspec needs to be:
s.add_dependency "rb-appscript", "~>0.6"

bounds settings not working in iTerm2

The bounds settings in following snippet work fine for me in Terminal, but not in iTerm. Here the bounds have no effect:

window :name => "1", :bounds => [0,1060, 630, 1600]  do
  run "cd ~/myProject/"
  run "mvim"
end

window :name => "2" do
  run "cd ~/myProject/"
  run "rails server"
end

Extensible Adapters for Terminal Manipulation

Support linux tab opening through separate script, make Mac OS X terminal controller into an Adapter.

class MacTerminal < AbstractTerminal
class DebianTerminal < AbstractTerminal

to make this easy to extend.

blocking support

I have a number of tabs that are dependent on the completion of a set of commands in tab 1 (a git pull and a rake db:migrate, for example). It would be great if I could have the other tabs wait for the completion of every command in tab 1.

I'd be happy to build this out, but I wasn't sure if you had a design strategy in mind.

Add ability to define callback run before each tab

The way I've found I use terminitor is that I have a project that lives in a certain directory. If I want to open multiple tabs, I have to put "cd /path/to/project" as the first command for each tab. It would be nice if I could specify that once, perhaps something like:

before do
  run "cd /path/to/project"
end
tab "one" do
  run "padrino start -p 3000"
end
tab "two" do
  run "compass compile"
end

It could even work within windows...

window do
  before { ... }
  tab { ... }
  tab { ... }
end

New sexy dsl syntax

Improve our syntax to use ruby for a better dsl description of tabs and windows:

# ~/.terminitor/foo.rb
setup do
   # setup here for cold run
end

window "foo" do
  tab "bar" do
    run "cd /foo/bar/baz"
  end

  tab "baz" do
    run "gitx"
  end
end

Add support for a cold setup now

Allow a cold task to be run that is an intial setup:

define cold task to clone or setup a git repo:

 $ terminitor project --cold

will execute a setup

updating to 0.2.0 breaks workflow

after an upgrade to 0.2.0 termitor fails loding this workflow:

tab "echo 'mongod and redis'", "mongod &", "redis-server &"
tab "echo 'a2b_seo server'", "cd ~/Documents/rails/a2b_seo_mfg/", "rails s -p 4002"
tab "echo 'a2b_seo console'", "cd ~/Documents/rails/a2b_seo_mfg/", "rails c"

tab "a2bapi" do
run "cd ~/Documents/rails/a2b_seo_mfg/"
run "mate ."
run "open http://localhost:4002/mitfahrgelegenheit"
run "rake log:clear"
run "ls"
run "git st"
end

terminitor-0.2.0/lib/terminitor/abstract_core.rb:31:in `run_in_window': undefined method `each_pair' for nil:NilClass (NoMethodError)
from /Users/nofail/.rvm/gems/ruby-1.9.2-p0/gems/terminitor-0.2.0/lib/terminitor/abstract_core.rb:21:in `process!'
from /Users/nofail/.rvm/gems/ruby-1.9.2-p0/gems/terminitor-0.2.0/lib/terminitor/runner.rb:30:in `execute_core'
from /Users/nofail/.rvm/gems/ruby-1.9.2-p0/gems/terminitor-0.2.0/lib/terminitor/cli.rb:13:in `start'
from /Users/nofail/.rvm/gems/ruby-1.9.2-p0/gems/thor-0.14.3/lib/thor/task.rb:22:in `run'
from /Users/nofail/.rvm/gems/ruby-1.9.2-p0/gems/thor-0.14.3/lib/thor/invocation.rb:118:in `invoke_task'
from /Users/nofail/.rvm/gems/ruby-1.9.2-p0/gems/thor-0.14.3/lib/thor.rb:246:in `dispatch'
from /Users/nofail/.rvm/gems/ruby-1.9.2-p0/gems/thor-0.14.3/lib/thor/base.rb:389:in `start'
from /Users/nofail/.rvm/gems/ruby-1.9.2-p0/gems/terminitor-0.2.0/bin/terminitor:3:in `<top (required)>'
from /Users/nofail/.rvm/gems/ruby-1.9.2-p0/bin/terminitor:19:in `load'
from /Users/nofail/.rvm/gems/ruby-1.9.2-p0/bin/terminitor:19:in `<main>'

bash started without --login

When I first set up Terminitor for my project, most commands didn't work because /usr/local/bin wasn't in the PATH. I found out that this was because Terminitor starts $SHELL in new tabs, and $SHELL points to /bin/bash, but calling /bin/bash starts Bash in non-login mode which doesn't read the contents of /etc/profile, only /bin/bash --login causes this file to load. I've fixed it by setting SHELL="/bin/bash --login" in .bash_profile, but I'm wondering if there isn't a better way to do this from inside Terminitor... If not, then maybe it's worth adding that to the docs? I suppose there must be more people than just me that have this problem.

Ability to close tab

DSL should have command to close current tab (or ability to send keystrokes).

In my workflow I'm creating new window and I want to close current active window.

How to set title of a tab

Hi,

I try to use terminitor with iTerm2. I could not find how to set the title of a tab. I've tried:

tab :name => "console" do
  run "rails console"
end

but without success, the new tab is titled with the default tab title "Shell".

Terminal prompt changes

When I run terminitor start project all of my tabs/windows open correctly but the prompts are garbled with content like: "% \e]2;terminal\a" and "% \e]2;resque\a" etc.

I'm using zsh and I think it has to do with my terminal color setup. Anyone know how to fix this?

Add ability to share projects

We should be able to share our projects online and allows other people to download and easily execute the project workflows others created.

"Dvorak - Qwerty Cmd" keyboard layout problem on OS X

While executing terminitor open for a Termfile specifying multiple windows and tabs on OS X with the keyboard layout set to "Dvorak - Qwerty Cmd" only the very last window or tab specified remains open. All other windows and tabs execute but then immediately close.

Workaround: switch to "U.S." keyboard (System Preferences > Language & Text > Input Sources) and run terminitor open then switch back to "Dvorak - Qwerty Cmd".

Execution delay

Being able to delay the execution of some commands would be awesome. An example is delaying my command to open Firefox to my rails app ( open -a /Applications/Firefox.app 'http://raidfive.local:3000' ) for a few seconds until my rails server has been most likely started up fully. I'm not sure if this is possible, but just a suggestion.

Error when one of the windows is miniaturized

I wanted to set up 2 windows, one of them miniaturized. But all tabs opened in the same window, and I saw the error below in the first tab where I had run the command.

Error setting 'miniaturized = true' on app("/Applications/Utilities/Terminal.app").windows.ID(5177).tabs[1]
CommandError
OSERROR: -1728
MESSAGE: Can't get reference.
OFFENDING OBJECT: app("/Applications/Utilities/Terminal.app").windows.ID(5177).tabs[1].miniaturized
COMMAND: app("/Applications/Utilities/Terminal.app").windows.ID(5177).tabs[1].miniaturized.set(true)

This is what my Termfile looks like.

https://gist.github.com/709828

The terminator executable is not created after installation

I just tried to install terminator (gem install terminator) and it actually worked normally. But when I try to use it, the terminator command is not found. I am using the latest version of rvm (HEAD) and I tried to install terminator with ruby 1.9.2 and ruby 1.8.6. I never got any error messages. When I look at the gemdir, the terminator executable is not present in the bin directory, but all the other files are present in the other directories (cache, doc, gems and specifications). I am using Mac OS X 10.6.5 and Terminal Version 2.1.1 (273).

undefined method 'tabs' on Ruby 1.9.2

This only happens occasionally - and when I rerun the command, it works properly.

/Users/nicholaswyoung/.rvm/gems/ruby-1.9.2-p0/gems/terminitor-0.0.5/lib/terminitor/runner.rb:55:in open_tab': undefined methodtabs' for 1..1:Range (NoMethodError)
from /Users/nicholaswyoung/.rvm/gems/ruby-1.9.2-p0/gems/terminitor-0.0.5/lib/terminitor/runner.rb:19:in block in do_project' from /Users/nicholaswyoung/.rvm/gems/ruby-1.9.2-p0/gems/terminitor-0.0.5/lib/terminitor/runner.rb:15:ineach'
from /Users/nicholaswyoung/.rvm/gems/ruby-1.9.2-p0/gems/terminitor-0.0.5/lib/terminitor/runner.rb:15:in do_project' from /Users/nicholaswyoung/.rvm/gems/ruby-1.9.2-p0/gems/terminitor-0.0.5/lib/terminitor.rb:20:instart'
from /Users/nicholaswyoung/.rvm/gems/ruby-1.9.2-p0/gems/thor-0.14.2/lib/thor/task.rb:22:in run' from /Users/nicholaswyoung/.rvm/gems/ruby-1.9.2-p0/gems/thor-0.14.2/lib/thor/invocation.rb:118:ininvoke_task'
from /Users/nicholaswyoung/.rvm/gems/ruby-1.9.2-p0/gems/thor-0.14.2/lib/thor.rb:246:in dispatch' from /Users/nicholaswyoung/.rvm/gems/ruby-1.9.2-p0/gems/thor-0.14.2/lib/thor/base.rb:389:instart'
from /Users/nicholaswyoung/.rvm/gems/ruby-1.9.2-p0/gems/terminitor-0.0.5/bin/terminitor:3:in <top (required)>' from /Users/nicholaswyoung/.rvm/gems/ruby-1.9.2-p0/bin/terminitor:19:inload'
from /Users/nicholaswyoung/.rvm/gems/ruby-1.9.2-p0/bin/terminitor:19:in `

'

Extract Adapters for Terminal Manipulation

Refactor terminal manipulation to use an adapter. Allow easy contributions for other platforms. Add a guide for adding a new adapter.

class AbstractTerminal; end;
class MacTerminal; end;
class DebianTerminal; end;
# ...

command not found: /Users/rap/.terminitor/foo.yml

Terminitor returns the same command-not-found error with every shell that I've tried on my Mac:

    [~] terminitor open foo
            skip  .terminitor/foo.yml
    /Users/me/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/1.8/erb.rb:719: command not found:      /Users/me/.terminitor/foo.yml

I can't figure out what it's trying to do? I had problems with my first terminitor setup file (same error) so I copied the foo.yml file verbatim as a test. Same error both times. It cites the name of the file in the command-not-found error.

I don't understand the 'skip' line in the output?

Add a list task

We need to add a 'list' task that prints out available commands to run.

terminitor list

Allow hotkeys to be called on windows

Note that this is tied to the feature request for the ability to create windows and not just tabs.

When a new window is created the ability to call a hotkey on the new window is very desirable. If you use SizeUp or another layout management application, being able to call a hotkey on individual terminal windows to put two stacked terminals on the left and one large terminal on the right, for instance, would be massively cool and functional. It is part of my "set up my terminal for this project" routine, and automating it would relieve a pretty ugly pain point I have when organizing my project workspace.

XDG Base Directory Standard

I would like to encourage you to support the XDG base directory standard (http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html). The upshot of which means using ~/.config/terminator/ instead of ~/.terminator/. (Of course backward compatibility can be maintained).

I try to encourage projects to use XDG whenever it applies. It a good standard that's becoming increasing popular and has a number of benefits, in particular uncluttering our home directories of all those dot files.

Add fetch command for running cold from a Termfile

Add a fetch command that takes a github username and github repo and runs the cold and instructions from the termfile

terminitor fetch achiu rack_recaptcha

and this can download the Termfile from the repo and download and execute cold and instructions.

default window tab will not accept 'run' commands

window("name") do
run "ls"
end

This fails, complaining about << not being able to be used on a hash.

I believe the @_context or @_old_context is not being set correctly when a window is created.

Am I just "doing it wrong"?

If I add a tab on the window it works -- but I just want to execute code in the new window, nothing more.

Odd number of arguments for Hash

Howdy! I just downloaded 0.3.1 and got this error when running terminitor start PROJ:

/Library/Ruby/Gems/1.8/gems/terminitor-0.3.1/lib/terminitor/abstract_core.rb:40:in `[]': odd number of arguments for Hash (ArgumentError)

This is probably a 1.8.6 thing, so, I apologize, that's just what I have. Anyways here's the failing line in abstract_core.rb:

window_options = Hash[window_options.to_a + tab_options.to_a] # safe merge

My project file looks like this:

window do
  before "cd ~/code/work/mandelbrot/advertiser"

  tab "rails s"
  tab "ls"
  tab "tail -f log/test.log"
  tab "spork"
  tab "rake jasmine"
end

So, that line in abstract_core.rb above evaluates to:

window_options = Hash[[]]

which is causing the "odd number of arguments" error. If I change that line to

window_options = Hash[*(window_options.to_a + tab_options.to_a)] # safe merge

then it seems to work.

undefined method `do_script' for nil:NilClass (NoMethodError)

I'm using a very simple Ruby DSL but always get this:

/Library/Ruby/Gems/1.8/gems/terminitor-0.1.0/lib/terminitor/cores/mac_core.rb:18:in execute_command': undefined methoddo_script' for nil:NilClass (NoMethodError)
from /Library/Ruby/Gems/1.8/gems/terminitor-0.1.0/lib/terminitor/abstract_core.rb:34:in run_in_window' from /Library/Ruby/Gems/1.8/gems/terminitor-0.1.0/lib/terminitor/abstract_core.rb:33:ineach'
from /Library/Ruby/Gems/1.8/gems/terminitor-0.1.0/lib/terminitor/abstract_core.rb:33:in run_in_window' from /Library/Ruby/Gems/1.8/gems/terminitor-0.1.0/lib/terminitor/abstract_core.rb:30:ineach_pair'
from /Library/Ruby/Gems/1.8/gems/terminitor-0.1.0/lib/terminitor/abstract_core.rb:30:in run_in_window' from /Library/Ruby/Gems/1.8/gems/terminitor-0.1.0/lib/terminitor/abstract_core.rb:21:inprocess!'
from /Library/Ruby/Gems/1.8/gems/terminitor-0.1.0/lib/terminitor/runner.rb:21:in send' from /Library/Ruby/Gems/1.8/gems/terminitor-0.1.0/lib/terminitor/runner.rb:21:inexecute_core'
from /Library/Ruby/Gems/1.8/gems/terminitor-0.1.0/lib/terminitor/cli.rb:13:in start' from /Library/Ruby/Gems/1.8/gems/thor-0.14.1/lib/thor/task.rb:22:insend'
from /Library/Ruby/Gems/1.8/gems/thor-0.14.1/lib/thor/task.rb:22:in run' from /Library/Ruby/Gems/1.8/gems/thor-0.14.1/lib/thor/invocation.rb:118:ininvoke_task'
from /Library/Ruby/Gems/1.8/gems/thor-0.14.1/lib/thor.rb:246:in dispatch' from /Library/Ruby/Gems/1.8/gems/thor-0.14.1/lib/thor/base.rb:389:instart'
from /Library/Ruby/Gems/1.8/gems/terminitor-0.1.0/bin/terminitor:3
from /usr/bin/terminitor:19:in `load'
from /usr/bin/terminitor:19

Set tab name

It would be very useful if the tab name were set to the same name defined in the workspace file. You can do this by setting PS1:
PS1=$PS1"\e]2;Tab Name Here\a"

This preserves the user's current prompt setting while setting the title. I'm putting that as the first line in the workflow for now:

  • tab1
    • PS1=$PS1"\e]2;tab1\a"
    • echo 'tab1'
  • tab2
    • PS1=$PS1"\e]2;tab2\a"
    • echo 'tab2'

Ability to add split panes in iTerm

It would be awesome if there was a way of creating new split panes within iTerm 2 in addition to tabs. Something like the following would be cool but I feel it might be clobbering your lovely syntax.

tab :split => "vertically" do 
    pane "gitx"
    pane "ls" 
end 

Building native extensions error on Ubuntu

~ $ gem install terminitor
Building native extensions.  This could take a while...
ERROR:  Error installing terminitor:
ERROR: Failed to build gem native extension.
/home/roman/.rvm/rubies/ree-1.8.7-head/bin/ruby extconf.rb
create /home/roman/.rvm/gems/ree-1.8.7-head@rails3/gems/rb-appscript-0.6.1/src/osx_ruby.h ...
create /home/roman/.rvm/gems/ree-1.8.7-head@rails3/gems/rb-appscript-0.6.1/src/osx_intern.h ...
creating Makefile

make
Makefile:184: warning: overriding commands for target `/home/roman/.rvm/gems/ree-1.8.7-head@rails3/gems/rb-appscript-0.6.1/lib'
Makefile:182: warning: ignoring old commands for target `/home/roman/.rvm/gems/ree-1.8.7-head@rails3/gems/rb-appscript-0.6.1/lib'
gcc -I. -I/home/roman/.rvm/rubies/ree-1.8.7-head/lib/ruby/1.8/x86_64-linux -I/home/roman/.rvm/rubies/ree-1.8.7-head/lib/ruby/1.8/x86_64-linux -Isrc   -fPIC -g -O2  -Wall  -c src/SendThreadSafe.c
In file included from src/SendThreadSafe.c:75:0:
src/SendThreadSafe.h:73:53: fatal error: ApplicationServices/ApplicationServices.h: No such file or directory
compilation terminated.
make: *** [SendThreadSafe.o] Error 1

Gem files will remain installed in /home/roman/.rvm/gems/ree-1.8.7-head@rails3/gems/rb-appscript-0.6.1 for inspection.   
Results logged to /home/roman/.rvm/gems/ree-1.8.7-head@rails3/gems/rb-appscript-0.6.1/./gem_make.out

Allow people to create a terminit script for their project

People should be able create a Termfile which contains the script to execute to setup development of their particular project. A bundler for local development.

For instance, a project 'foo' is in a git repo. A new developer can do this:

$ git clone git://path/to/foo.git
$ bundle install
$ terminitor start

and bundler will install dependencies and terminitor would start the preferred local development for that project in your terminal (open up gitx, start autotest, open default text editor, etc)

Allow the creation of new windows, not just tabs

Just like the title suggests it would be nice to allow the user to create a set of windows and not just tabs. I've forked the project and will try to whip something up, but until you receive a pull request please consider adding this functionality.

Note that this is related to a feature request allowing you to call a hotkey on a new window in order to automatically lay out new windows using something like SizeUp.

Open tabs in the order they were defined

When terminitor opens tabs I would prefer that they open in the same order that I define them in the termfile (I'm just particular like that). I notice that tabs are stored in a hash in dsl.rb, so probably in Ruby 1.9 the tabs are opened in order, but in 1.8 that's not the case. So probably all that needs to happen is to change it to an OrderedHash (can we include only that from ActiveSupport?).

pause a command before previous completes

i started rails server in one tab and autotest in another.
But autotest fails because server isn't started.

So, is there any way to pause the second command from firing for few seconds so that rails server is started?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.