From add930db6b2d792598859d3677daac7eb2562bcc Mon Sep 17 00:00:00 2001 From: Aaron Lichtman Date: Tue, 20 Jun 2023 23:56:58 -0700 Subject: [PATCH 1/3] Make tox.ini files use the gear/settings icon --- CHANGELOG.md | 1 + src/theme/icon.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index de3a46f4d..3fd03a2e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fix obsolete Nerd Font icons from [Han Yeong-woo](https://github.com/nix6839) ### Fixed +- Make tox.ini files use the gear/settings icon ([#859](https://github.com/lsd-rs/lsd/pull/859)) - Do not quote filename when piping into another program from [TeamTamoad](https://github.com/TeamTamoad) - Respect `hidden` flag on Windows [#752](https://github.com/Peltoche/lsd/issues/752) - Do not show every file are `executable` (green) on Windows diff --git a/src/theme/icon.rs b/src/theme/icon.rs index ed48cac68..5ca1dfc33 100644 --- a/src/theme/icon.rs +++ b/src/theme/icon.rs @@ -280,7 +280,7 @@ impl IconTheme { ("sudoers", "\u{f023}"), // "" ("sxhkdrc", "\u{e615}"), // "" ("tigrc", "\u{e615}"), // "" - ("tox.ini", "\u{f0320}"), // "󰌠" + ("tox.ini", "\u{e615}"), // "" (".trash", "\u{f1f8}"), // "" ("ts", "\u{e628}"), // "" ("unlicense", "\u{e60a}"), // "" From 8ea79c6817d2e75a286b5a050ecde21442ff14e1 Mon Sep 17 00:00:00 2001 From: bells307 <45540153+bells307@users.noreply.github.com> Date: Wed, 21 Jun 2023 21:20:05 +0300 Subject: [PATCH 2/3] Fixed file size colorizing with `--size=bytes` argument (#856) Fixed incorrect colorizing with `--size=bytes` described in issue #841 --- #### TODO - [x] Use `cargo fmt` - [x] Add changelog entry --------- Co-authored-by: Bells307 --- CHANGELOG.md | 1 + src/meta/size.rs | 19 +++++++++++-------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3fd03a2e0..3465334ac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Handle dereference (-L) with broken symlink from [r3dArch](https://github.com/r3dArch) - Avoid using Clap's deprecated structs and functions [sudame](https://github.com/sudame) - Icon theme with overrides from config [sudame](https://github.com/sudame) +- Incorrect colorizing with `--size=bytes` [bells307](https://github.com/bells307) ## [0.23.1] - 2022-09-13 diff --git a/src/meta/size.rs b/src/meta/size.rs index 9f39b993c..8b66c96e6 100644 --- a/src/meta/size.rs +++ b/src/meta/size.rs @@ -86,12 +86,15 @@ impl Size { ColoredString::new(Colors::default_style(), res) } - fn paint(&self, colors: &Colors, flags: &Flags, content: String) -> ColoredString { - let unit = self.get_unit(flags); - let elem = match unit { - Unit::Byte | Unit::Kilo => &Elem::FileSmall, - Unit::Mega => &Elem::FileMedium, - _ => &Elem::FileLarge, + fn paint(&self, colors: &Colors, content: String) -> ColoredString { + let bytes = self.get_bytes(); + + let elem = if bytes >= GB { + &Elem::FileLarge + } else if bytes >= MB { + &Elem::FileMedium + } else { + &Elem::FileSmall }; colors.colorize(content, elem) @@ -100,7 +103,7 @@ impl Size { pub fn render_value(&self, colors: &Colors, flags: &Flags) -> ColoredString { let content = self.value_string(flags); - self.paint(colors, flags, content) + self.paint(colors, content) } pub fn value_string(&self, flags: &Flags) -> String { @@ -118,7 +121,7 @@ impl Size { pub fn render_unit(&self, colors: &Colors, flags: &Flags) -> ColoredString { let content = self.unit_string(flags); - self.paint(colors, flags, content) + self.paint(colors, content) } pub fn unit_string(&self, flags: &Flags) -> String { From bafc495045ae02be871409d67da04210a7451d9f Mon Sep 17 00:00:00 2001 From: Wei Zhang Date: Thu, 22 Jun 2023 14:32:26 +0800 Subject: [PATCH 3/3] :tada: add zwpaper to code owner (#860) --- CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CODEOWNERS b/CODEOWNERS index c04e87ad7..76aa7ae09 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -1 +1 @@ -* @meain @Peltoche +* @meain @Peltoche @zwpaper