From a6b93d3a2fa4460fab4788fc3a7711c135f68e92 Mon Sep 17 00:00:00 2001 From: thek4n Date: Fri, 15 Nov 2024 10:11:49 +0300 Subject: [PATCH] t script style --- home/user/.local/bin/t | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/home/user/.local/bin/t b/home/user/.local/bin/t index 1eec06a..2a69626 100755 --- a/home/user/.local/bin/t +++ b/home/user/.local/bin/t @@ -75,8 +75,8 @@ get_notes_with_indexes() { note_name="$(basename -- "${note}")" if ${_TO_SHOW:-false}; then - if [ "${#note_name}" -gt "$(($(tput cols)/2))" ]; then - note_name="$(echo "${note_name}" | cut -c -$(($(tput cols)/2-4)) )..." + if [ "${#note_name}" -gt "$(($(tput cols)-12))" ]; then + note_name="$(echo "${note_name}" | colrm $(($(tput cols)-12)))..." fi fi