You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
296 B
12 lines
296 B
#!/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
|
|
|