diff options
author | ensa <psii@riseup.net> | 2020-07-08 15:32:24 -0700 |
---|---|---|
committer | ensa <psii@riseup.net> | 2020-07-08 15:32:24 -0700 |
commit | eec480ccb22f3166d723befc9522e8a25eabf8c1 (patch) | |
tree | 28ec200089f6d5797a06590defcb1c4ccf254c7c /bin/catgirl-open.sh | |
parent | 4606fd8469199d5497b4b2fa4ea74d237ec9688b (diff) | |
download | cfg-eec480ccb22f3166d723befc9522e8a25eabf8c1.tar.gz |
catgirl-open.sh simplified, lh now handles stdin
bin/ bar.sh: doesn't specify width (defaults to display width) bother: incorrectly used last, now uses tail uses : instead of true (telling the shell to do nothing) catgirl-open.sh: tabbed now called with -c, network chosen before invoking tabbed just tests xprop instead of hacky $? handling comm-sel: no longer specifies config directory for cordless (cordless does this correctly now) lh: if no arguments are given, set $1 to standard input. turned actual link handling into a loop, lh can now be sent multiple links and handle them all in sequence.
Diffstat (limited to 'bin/catgirl-open.sh')
-rwxr-xr-x | bin/catgirl-open.sh | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/bin/catgirl-open.sh b/bin/catgirl-open.sh index 76673ec..3783422 100755 --- a/bin/catgirl-open.sh +++ b/bin/catgirl-open.sh @@ -12,20 +12,20 @@ choosenet() { } runtabbed() { - tabbed -fdn comm -r 2 $TERMINAL -into '' -e catgirl $(choosenet) >"$xidfile" & + network=$(choosenet) + tabbed -cdn comm -r 2 $TERMINAL -into '' -e catgirl $network >"$xidfile" & } if [ ! -r "$xidfile" ]; then runtabbed else - xid=$(<"$xidfile") - xprop -id "$xid" >/dev/null 2>&1 - if [ $? -gt 0 ]; + xid=$(cat "$xidfile") + if xprop -id "$xid" >/dev/null 2>&1 then - runtabbed - else $TERMINAL -into "$xid" -e catgirl $(choosenet) >/dev/null 2>&1 & + else + runtabbed fi fi |