Script to open a specific program based on domain provided
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

#!/usr/bin/env lua
local tA = {...}
local default = "firefox"
local programs = {
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))