diff --git a/wms_value.sh b/wms_value.sh index d528501..a3c4ee3 100755 --- a/wms_value.sh +++ b/wms_value.sh @@ -1,11 +1,17 @@ #!/bin/sh -. /tmp/wms_var +# check if there is variable file in /tmp for source. if it's not there, copy it +if [ -f /tmp/wms_var ]; then + . /tmp/wms_var +else + cp $HOME/.config/wms/wms_var /tmp/wms_var + . /tmp/wms_var +fi -FLAG=$1 -RID=$(lsw -r) # root window id -FW=$(pfw) -WMSVAR="/tmp/wms_var" +FLAG=$1 # input +RID=$(lsw -r) # root window id +FW=$(pfw) # focused window +WMSVAR="/tmp/wms_var" # variable temporary file usage() { cat<