From 471c22cfd22a2c7fc8f9f287a2663f072afae281 Mon Sep 17 00:00:00 2001 From: snxraven Date: Thu, 23 Sep 2021 19:44:45 -0400 Subject: [PATCH] Adding Fixed SH Script For Acctive Window --- linux.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 linux.sh diff --git a/linux.sh b/linux.sh new file mode 100644 index 0000000..9ee3e60 --- /dev/null +++ b/linux.sh @@ -0,0 +1,10 @@ +# replace this linux.sh with the one packaged with node-active-window + len=$(echo -n "$(xdotool getwindowfocus getwindowname)" | wc -m) + max_len=70 + if [ "$len" -gt "$max_len" ];then + echo -n "$(xdotool getwindowfocus getwindowname | cut -c 1-$max_len)..." + else + echo -n "$(xdotool getwindowfocus getwindowname)" + fi + +