summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorCanop <cano.petrole@gmail.com>2021-11-06 20:13:35 +0100
committerCanop <cano.petrole@gmail.com>2021-11-06 20:13:35 +0100
commit335c2847d57ad8b89141da9060fe11524f29b9f4 (patch)
tree355f59efd236e1b68c627592b9caeab36fbc776f /src
parenta1f36d003b0bab7d24207900c4c53b7656576996 (diff)
upgrade terminal-clipboard to fix a problem on X11
Diffstat (limited to 'src')
-rw-r--r--src/filesystems/filesystems_state.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/filesystems/filesystems_state.rs b/src/filesystems/filesystems_state.rs
index aba110b..41ed07f 100644
--- a/src/filesystems/filesystems_state.rs
+++ b/src/filesystems/filesystems_state.rs
@@ -324,8 +324,6 @@ impl PanelState for FilesystemState {
cw.queue_g_string(&styles.default, format!("{:^width$}", "type", width = w_type))?;
cw.queue_char(border_style, '│')?;
}
- cw.queue_g_string(&styles.default, "size".to_string())?;
- cw.queue_char(border_style, '│')?;
if e_use {
cw.queue_g_string(&styles.default, format!(
"{:^width$}", if wc_use > 4 { "usage" } else { "use" }, width = wc_use
@@ -334,6 +332,8 @@ impl PanelState for FilesystemState {
}
cw.queue_g_string(&styles.default, "free".to_string())?;
cw.queue_char(border_style, '│')?;
+ cw.queue_g_string(&styles.default, "size".to_string())?;
+ cw.queue_char(border_style, '│')?;
cw.queue_g_string(&styles.default, "mount point".to_string())?;
cw.fill(border_style, &SPACE_FILLING)?;
//- horizontal line
@@ -409,9 +409,6 @@ impl PanelState for FilesystemState {
// size, used, free
if let Some(stats) = mount.stats.as_ref().filter(|s| s.size() > 0) {
let share_color = super::share_color(stats.use_share());
- // size
- cw.queue_g_string(txt_style, format!("{:>4}", file_size::fit_4(mount.size())))?;
- cw.queue_char(border_style, '│')?;
// used
if e_use {
cw.queue_g_string(txt_style, format!("{:>4}", file_size::fit_4(stats.used())))?;
@@ -432,10 +429,10 @@ impl PanelState for FilesystemState {
share_style.set_fg(share_color);
cw.queue_g_string(&share_style, format!("{:>4}", file_size::fit_4(stats.available())))?;
cw.queue_char(border_style, '│')?;
- } else {
// size
- cw.repeat(txt_style, &SPACE_FILLING, w_size)?;
+ cw.queue_g_string(txt_style, format!("{:>4}", file_size::fit_4(mount.size())))?;
cw.queue_char(border_style, '│')?;
+ } else {
// used
if e_use {
cw.repeat(txt_style, &SPACE_FILLING, wc_use)?;
@@ -444,6 +441,9 @@ impl PanelState for FilesystemState {
// free
cw.repeat(txt_style, &SPACE_FILLING, w_free)?;
cw.queue_char(border_style, '│')?;
+ // size
+ cw.repeat(txt_style, &SPACE_FILLING, w_size)?;
+ cw.queue_char(border_style, '│')?;
}
// mount point
let s = &mount.info.mount_point.to_string_lossy();