This commit is contained in:
Izaya 2019-02-09 13:36:32 +11:00
parent c6249a218f
commit 08dc2dc1ff

12
sitewb.lua Executable file
View File

@ -0,0 +1,12 @@
#!/usr/bin/env lua
local tA = {...}
local default = "firefox"
local programs = {
["youtube.com"]="mpv",
["www.youtube.com"]="mpv"}
for k,v in pairs(tA) do
local domain = v:match("https?://(.-)/")
local program = programs[domain] or default
os.execute(string.format("%s %s",program, v))
end