1
0
Fork 0
mirror of https://git.sr.ht/~nixgoat/vento synced 2024-11-21 14:23:05 +00:00

Compare commits

...

2 commits

Author SHA1 Message Date
Lux Aliaga 5a0988d2c6
manifest: Bump version to v1.1.2
I don't really have more changes to add to Vento after this, so I guess
I'll push these changes to a new release. Have fun!
2022-11-07 18:21:02 -03:00
Lux Aliaga 833669af3c
item: Add slot to take/drop messages
To be more consistent with undo messages, I've added the slot in which
items are involved to take and drop messages. Simple as that.
2022-11-07 18:18:25 -03:00
3 changed files with 23 additions and 6 deletions

2
Cargo.lock generated
View file

@ -592,7 +592,7 @@ checksum = "c4f5b37a154999a8f3f98cc23a628d850e154479cd94decf3414696e12e31aaf"
[[package]] [[package]]
name = "vento" name = "vento"
version = "1.1.1" version = "1.1.2"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"colored", "colored",

View file

@ -1,6 +1,6 @@
[package] [package]
name = "vento" name = "vento"
version = "1.1.1" version = "1.1.2"
edition = "2021" edition = "2021"
readme = "README.md" readme = "README.md"

View file

@ -90,10 +90,19 @@ pub fn take(file: &String, slot: &str, message: bool) -> Result<()> {
if message { if message {
println!( println!(
"✅ {} {} {} ", "✅ {} {} {} {} {} {} {}",
"Took".green(), "Took".green(),
&filename.bold(), &filename.bold(),
format!("from {}", &sourcelocation.to_str().unwrap()).green() "from".green(),
&sourcelocation.to_str().unwrap(),
"to".green(),
match slot {
"active" => slot.green(),
"inactive" => slot.blue(),
_ => slot.red(),
}
.bold(),
"slot".green()
); );
} }
@ -168,10 +177,18 @@ pub fn drop(file: &String, slot: &str, dest: PathBuf, message: bool) -> Result<(
if message { if message {
println!( println!(
"✅ {} {} {} ", "✅ {} {} {} {} {} {}",
"Dropped".green(), "Dropped".green(),
&file.bold(), &file.bold(),
format!("into {}", &destpath.to_str().unwrap()).green() "from".green(),
match slot {
"active" => slot.green(),
"inactive" => slot.blue(),
_ => slot.red(),
}
.bold(),
"slot into".green(),
&destpath.to_str().unwrap()
); );
}; };