fixed auto sync with calcurse hooks and added general purpose i3 scratchpad to auto launch after closure
parent
c0194b9119
commit
330097f4e7
@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
# checks if instance of arg 1 exists, will show it if it does
|
||||
exists=$(i3-msg "[instance=$1] scratchpad show" 2>&1 | grep ERROR)
|
||||
if [ -n "$exists" ] ; then
|
||||
# creating it then showing
|
||||
if [ -z "$1" ] ; then
|
||||
echo "Missing class in arg 1" >&2
|
||||
exit 1
|
||||
elif [ -z "$2" ] ; then
|
||||
echo "Missing command to launch application in arg 2" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# runs remaining commands and shows
|
||||
${@:2} 2>&1 1>/dev/null &
|
||||
sleep 1
|
||||
# lets application load then shows it on scratchpad
|
||||
i3-msg "[instance=$1] scratchpad show" 1>/dev/null
|
||||
fi
|
Loading…
Reference in New Issue