Skip to content

Rust library to help write Tip tooltips

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

hobofan/tippytap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tippytap

Tippytap is a Rust library to help you write tooltips for Tip, the "programmable tooltip that can be used with any Mac OS app".

Installation

Via cargo-edit:

cargo add tippytap

Example program

main.rs

use tippytap::prelude::*;

pub fn sci_hub_tooltip(input: &TipInput) -> TipUrlLine {
    TipUrlLine {
        label: "SciHub".to_owned(),
        value: format!("https://sci-hub.tw/{}", input.args[0]),
    }
}

fn main() {
    let input = TipInput::from_args();

    let output = vec![
        TipTextLine {
            value: format!("Input {}", input),
        }
        .into(),
        sci_hub_tooltip(&input).into(),
    ];
    print_tooltips(&output);
}

About

Rust library to help write Tip tooltips

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages