Migrate from .stow-rename to --dotfiles
This commit is contained in:
parent
2cd7ee3bf7
commit
f309f3a7a6
20 changed files with 0 additions and 2 deletions
|
@ -1,25 +0,0 @@
|
|||
#!/bin/zsh
|
||||
|
||||
# The arguments should be a command to run in qutebrowser. If no arguments are
|
||||
# provided, then :open -w is run by default.
|
||||
cmd=($@)
|
||||
(( $# < 1 )) && cmd=(:open -w)
|
||||
|
||||
# There should only be one qutebrowser socket, but just in case we only take
|
||||
# the first result we find.
|
||||
sockets=( ${TMPDIR}qutebrowser/ipc*(N) )
|
||||
SOCKET=$sockets[1]
|
||||
|
||||
if [[ -w $SOCKET ]]; then
|
||||
# We have a legit socket. Let's send the commands to qutebrowser. Yay!
|
||||
jo target_arg=null protocol_version=1 cwd=$PWD "args[]=$cmd" | socat - UNIX-CONNECT:$SOCKET
|
||||
else
|
||||
# No socket. Let's start qutebrowser!
|
||||
open -a qutebrowser.app
|
||||
# If we were given commands to run, we still wanna run them once qutebrowser
|
||||
# starts, so wait a little while and then re-exec this script.
|
||||
if (( $# )); then
|
||||
sleep 5
|
||||
exec qtb "$@"
|
||||
fi
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue