fish: automatically connect to screen

This commit is contained in:
Marcel Kapfer 2017-08-10 09:37:04 +02:00
parent 60a1c2b3e6
commit ff9a01ddc6

View file

@ -55,3 +55,14 @@ end
if [ -z $GOPATH ] if [ -z $GOPATH ]
set -Ux GOPATH ~/.go set -Ux GOPATH ~/.go
end end
# Attach the autoscreen screen session if StumpWM is running
# and it's not already in use.
if test $DESKTOP_SESSION = "stumpwm"
if screen -list | grep -q "No Sockets"
screen -dmS autoscreen
exec screen -r
else if screen -list | grep -Eq "\.autoscreen.*Detached"
exec screen -r
end
end