Adding Fixed SH Script For Acctive Window

This commit is contained in:
snxraven 2021-09-23 19:44:45 -04:00
parent 573c74ba5b
commit 471c22cfd2
1 changed files with 10 additions and 0 deletions

10
linux.sh Normal file
View File

@ -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