YYXWGZLB6ZBEPIM5ZSOUVR7RU6RLQ65CZ4W2YELHD5OUJYDH6E5AC
SWJWUKPJXUHJBS7LVSZTK6EEID4UZ4AYZMGI6RTSRK2KHWIC7HRQC
MOEXIJAVCTHVLSMKDNX54QLKBWKOC6SG6N6S3B73QWLYL2NWXLWAC
L3I4GC7R74HPQS3VCQ44UTBAKKBOW6UDVXV2EF7XSWH7H2Z3RRJQC
FBQOBNZ6JJQXSHYQK7MCFA4U7NBNB47FXED7Y7HPRTOQVXJFIAGAC
XIHPYOWDLQY2MVMVUQPH23O3TBALRG4G2CHSLWSCAYMY5NVJ32WQC
IFBRAMVLQ4Z6BAEMWDIXD2V5HSZK4DHRWYZNB32IBY7ZRTNZJVCQC
WWO4T3TSJAX5YJCVXLZEOQVI3KEBI6TVBRBSWVC44FGZCSYCVUQAC
MQKD76RYJOC3SJ4EPKQRQFV7A2BRJAHAI4VMMLR4EKV4B3EV5YTQC
O53GR2OQHGRKAVJT2RVPRHYFB54W5LM4DQYT7EYVGKU7HDK5CJJQC
JYSIHNS67XTGAR4HN7ZHWFMGGYSK5IY6J6EHO4YUZOR7UMMWAORQC
fn truncate_title(title: &str) -> String {
let fix_char_len = 45;
let mut title = title.to_owned();
if let Some((w, _)) = term_size::dimensions() {
if fix_char_len < w {
let new_width = w - fix_char_len;
title.truncate(new_width);
} else {
title.truncate(10)
}
} else {
title.truncate(40);
}
title
}