Created
September 6, 2016 17:34
-
-
Save tilpner/ab4e972de3ea1a04f8c68ba1e9e26ad1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extern crate cursive; | |
use std::env; | |
use cursive::prelude::*; | |
fn main() { | |
// Creates the cursive root - required for every application. | |
let mut siv = Cursive::new(); | |
let msg = format!("Hi. Do the borders look broken to you too? | |
It's probably something about the locales...\nYour TERM is {term}, LANG is {lang}.", | |
term = env::var("TERM").unwrap_or("missing".into()), | |
lang = env::var("LANG").unwrap_or("missing".into())); | |
// Creates a dialog with a single "Quit" button | |
siv.add_layer(Dialog::new(TextView::new(msg)) | |
.title("Hi.") | |
.button("Quit", |s| s.quit())); | |
// Starts the event loop. | |
siv.run(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment