Improve winlist.sh's performance and portability

This commit is contained in:
Mid Favila 2021-07-05 23:35:23 -03:00
parent 7fc759c319
commit 108d16071d
2 changed files with 4 additions and 4 deletions

View File

@ -4,7 +4,7 @@ getxid()
{ {
if [ ${x} -gt 0 ] if [ ${x} -gt 0 ]
then then
sed ${x}!d /tmp/winlist.jnk|sed "s/commandante/ /g"|cut -d ' ' -f 1 sed ${x}!d /tmp/winlist.jnk|cut -d ' ' -f 1
else else
exit exit
fi fi
@ -14,7 +14,7 @@ getname()
{ {
if [ ${x} -gt 0 ] if [ ${x} -gt 0 ]
then then
sed ${x}!d /tmp/winlist.jnk|sed "s/commandante/ /g"|sed 's/ */ /g'|cut -d '\t' -f 3 sed ${x}!d /tmp/winlist.jnk |sed -ne "s/.*$(hostname) \(..*\)/\1/p"
else else
exit exit
fi fi

View File

@ -1,5 +1,5 @@
shod.theme: /home/midfavila/.config/xresources/decwin.xpm shod.theme: /home/midfavila/.config/xresources/decwin.xpm
shod.focusButtons: shod.focusButtons: 1
shod.raiseButtons: 1 shod.raiseButtons: 3
shod.modifier: Mod4 shod.modifier: Mod4
shod.class.XTerm.autotab: always shod.class.XTerm.autotab: always