~q3cpma/dotfiles

bb399ff681997eb4c992921583815a33b478c9e0 — q3cpma 1 year, 9 months ago 32fe22a
Use POSIX tools instead of pgrep (cont)
1 files changed, 1 insertions(+), 1 deletions(-)

M .config/mpv/scripts/redshift_toggle.lua
M .config/mpv/scripts/redshift_toggle.lua => .config/mpv/scripts/redshift_toggle.lua +1 -1
@@ 9,7 9,7 @@ end
rs_enabled = true

function rs_toggle()
	os.execute("pkill -USR1 -x redshift")
	os.execute("pid=$(ps -a -o comm=,pid= | sed -n 's#^redshift[[:blank:]]\{1,\}##p'); [ $pid ] && kill $pid")
	mp.msg.log("info", (rs_enabled and "Dis" or "Reen") .. "abling redshift")
	rs_enabled = not rs_enabled
end