summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKyohei Uto <im@kyoheiu.dev>2022-10-26 05:56:28 +0900
committerKyohei Uto <im@kyoheiu.dev>2022-10-26 05:56:28 +0900
commitbef463475b0dfb1421886cabab0f5e7d1c47d0e1 (patch)
treea10ac37b7336d14b61aecf4b0fd621d97c17425f /src
parent30c326066607f46a78dd713eaaa1a2f1082ce274 (diff)
remove bat detection
Diffstat (limited to 'src')
-rw-r--r--src/layout.rs3
-rw-r--r--src/state.rs6
2 files changed, 1 insertions, 8 deletions
diff --git a/src/layout.rs b/src/layout.rs
index 6b30a01..a701fe8 100644
--- a/src/layout.rs
+++ b/src/layout.rs
@@ -33,7 +33,6 @@ pub struct Layout {
pub preview_start_row: u16,
pub preview_width: u16,
pub has_chafa: bool,
- pub has_bat: bool,
pub is_kitty: bool,
}
@@ -46,7 +45,7 @@ pub enum PreviewType {
Binary,
}
-#[derive(Debug)]
+#[derive(Debug, PartialEq)]
pub enum Split {
Vertical,
Horizontal,
diff --git a/src/state.rs b/src/state.rs
index 9c5d152..95b64a3 100644
--- a/src/state.rs
+++ b/src/state.rs
@@ -83,7 +83,6 @@ impl State {
make_layout(column, config.use_full_width, config.item_name_length);
let has_chafa = check_chafa();
- let has_bat = check_bat();
let is_kitty = check_kitty_support();
Ok(State {
@@ -119,7 +118,6 @@ impl State {
preview_start_row: row + 2,
preview_width: column - 1,
has_chafa,
- has_bat,
is_kitty,
},
show_hidden: session.show_hidden,
@@ -1045,10 +1043,6 @@ fn check_chafa() -> bool {
.is_ok()
}
-fn check_bat() -> bool {
- std::process::Command::new("bat").arg("-h").output().is_ok()
-}
-
// Check if the terminal is Kitty or not
fn check_kitty_support() -> bool {
if let Ok(term) = std::env::var("TERM") {