Compare commits

..

No commits in common. "96cd1d56130a6858605e2a8480445a656c06ef37" and "2cb03748d03eb78644df830f400182842dc8fa8d" have entirely different histories.

2 changed files with 3 additions and 3 deletions

View File

@ -48,7 +48,7 @@ These lovely utilities are often already available on many `sway` setups.
order += "run_watch screenrecord"
run_watch screenrecord {
pidfile = "/run/user/1000/screenrecord.pid"
pidfile = "/var/run/user/1000/screenrecord.pid"
format = "🎥"
format_down = ""
}

View File

@ -23,11 +23,11 @@
#
# Author Lorenzo Cogotti, The DoubleFourteen Code Forge
pidfile="$XDG_RUNTIME_DIR/screenrecord.pid"
pidfile="/var/run/user/$(id -u)/screenrecord.pid"
filename="$(xdg-user-dir VIDEOS)/ScreenCast_$(date +%F_%T).mp4"
isrunning() {
pid=$(2>/dev/null <"$pidfile")
pid=$(cat "$pidfile" 2>/dev/null)
test $? && kill -s 0 -- "$pid" 2>/dev/null
return $?
}