blob: 3783422929c3f29da7f3a61ed82c2d8869dc310a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#!/bin/sh
# script for tabbing together catgirl instances, similar to surf-open.sh
. ~/etc/shrc
xidfile="$XDG_CACHE_HOME/catgirl/tabbed-catgirl.xid"
choosenet() {
for network in $(ls $HOME_ETC/catgirl/*.conf|sed 's/.*\///');
do
printf '%s\n' $network;
done | dmenu -p "choose network:"
}
runtabbed() {
network=$(choosenet)
tabbed -cdn comm -r 2 $TERMINAL -into '' -e catgirl $network >"$xidfile" &
}
if [ ! -r "$xidfile" ];
then
runtabbed
else
xid=$(cat "$xidfile")
if xprop -id "$xid" >/dev/null 2>&1
then
$TERMINAL -into "$xid" -e catgirl $(choosenet) >/dev/null 2>&1 &
else
runtabbed
fi
fi
|