vte.cr v0.1.0
Crystal VTE bindings
VTE is a GTK library that provides a GTK Widget for terminal emulators.
Installation
-
Add the dependency to your
shard.yml
:dependencies: vte: github: hugopl/vte.cr
-
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
- Fork it (https://github.com/hugopl/vte.cr/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
Contributors
- Hugo Parente Lima - creator and maintainer
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