vte.cr v0.1.0

Crystal bindings for VTE library

Crystal VTE bindings

VTE is a GTK library that provides a GTK Widget for terminal emulators.

Installation

  1. Add the dependency to your shard.yml:

    dependencies:
      vte:
        github: hugopl/vte.cr
    
  2. Run shards install

Usage

require "vte"

class App < Gtk::Application
  @[GObject::Virtual]
  def activate
    window = Gtk::ApplicationWindow.new(self)
    window.title = "Basic Terminal"
    window.set_default_size(1024, 480)

    terminal = Vte::Terminal.new
    terminal.feed("Crystal VTE bindings! 🎉️")

    window.child = terminal
    window.present
  end
end

exit(BasicTerminalApp.new.run)

To spawn a process, e.g. bash, use the Terminal#spawn_async method, see examples/basic_terminal.cr.

Contributing

  1. Fork it (https://github.com/hugopl/vte.cr/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

Repository

vte.cr

Owner
Statistic
  • 2
  • 0
  • 0
  • 1
  • 1
  • 9 months ago
  • June 4, 2023
License

MIT License

Links
Synced at

Fri, 10 May 2024 15:40:50 GMT

Languages