[bin] Manually add static SWAYSOCK to externally called executables
This commit is contained in:
parent
ccd4e965fa
commit
ede1d846df
|
@ -3,6 +3,7 @@
|
|||
set -eo pipefail
|
||||
|
||||
BROWSER=qutebrowser
|
||||
SWAYSOCK="/run/user/1000/sway-ipc.sock"
|
||||
|
||||
if ! pgrep $BROWSER > /dev/null; then
|
||||
echo "Opening a new instance of ${BROWSER}"
|
||||
|
|
|
@ -8,7 +8,7 @@ if [[ "${NAME}" != '"ZSA Technology Labs Inc ErgoDox EZ Shine Keyboard"' ]] &&
|
|||
exit 0
|
||||
fi;
|
||||
|
||||
SWAYSOCK=/run/user/$(id -u)/sway-ipc.$(id -u).$(pgrep -x sway).sock
|
||||
SWAYSOCK=/run/user/$(id -u)/sway-ipc.sock
|
||||
DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/$(id -u)/bus"
|
||||
export SWAYSOCK
|
||||
export DBUS_SESSION_BUS_ADDRESS
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
set -eo pipefail
|
||||
|
||||
export SWAYSOCK=/run/user/1000/sway-ipc.sock
|
||||
|
||||
# Strip file:// protocol as file -b will handle this
|
||||
argument=$(echo $1 | sed "s|file://||")
|
||||
url_regex='^(https?|alfaview|mailto|ftp):/?/?.*'
|
||||
|
|
Loading…
Reference in New Issue