From 9f97d8985e82d3306537331dd8d44ce9b2c0fa0c Mon Sep 17 00:00:00 2001 From: rootniformaticaservice Date: Sat, 1 Apr 2023 00:27:27 -0300 Subject: [PATCH] more fixes. --- wms_shepperd.sh | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/wms_shepperd.sh b/wms_shepperd.sh index 7fb28fe..88b2168 100755 --- a/wms_shepperd.sh +++ b/wms_shepperd.sh @@ -5,9 +5,9 @@ . $HOME/.config/wms/wms_var NAMES="$HOME/.config/wms/wms_names" # disponible names -FLAG=$1 # input -FW=$(pfw) # focused window id -AMW=$(lsw) # all maped windows +FLAG=$1 # input +FW=$(pfw) # focused window id +AMW=$(lsw) # all maped windows usage() { echo "usage: @@ -19,25 +19,24 @@ wms_shepperd.sh [ -a, -r, -t ] -t) togle" } -name() { - $XMENU < $NAMES -} - # create atom in focused window add_focused() { - if [ -n "name" ]; then - atomx WM_HERD="$(name) $FW" $FW + name=$(printf "$($XMENU < $NAMES)") + if [ -n "$ name " ]; then + atomx WM_HERD="$ name $FW" $FW + else + exit 0 fi } # create atom in all maped windows add_all() { - name=$(printf $(name)) + name=$(printf "$($XMENU < $NAMES)") for wid in $AMW; do if [ -n "$name" ]; then atomx WM_HERD="$name $wid" $wid else - atomx WM_HERD="no_name $wid" $wid + exit 0 fi done }