commit 0f97304b20d7d7c461cf92bcdc749c134e22c81f
parent 627a7f1a021cd657e4eec2550e884eafff134ff2
Author: Tomas Nemec <nemi@skaut.cz>
Date: Wed, 22 Sep 2021 07:25:21 +0200
update
Diffstat:
M | sfopen | | | 18 | ++++++++++-------- |
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/sfopen b/sfopen
@@ -3,13 +3,15 @@
local url = arg[1]
function open(format) os.execute(string.format(format, url)) end
-if string.find(url, "youtube") then
- open("setsid -f mpv %s")
-elseif string.find(url, "reddit") then
- url = string.gsub(url, "www.reddit.com", "libredd.it")
- open(os.getenv("BROWSER") .. " --new-window %s")
-elseif string.find(url, "https") then
- open(os.getenv("BROWSER") .. " --new-window %s")
+if string.find(url, 'youtube') then
+ open('setsid -f mpv %s')
+elseif string.find(url, 'odysee') then
+ open('setsid -f mpv %s')
+elseif string.find(url, 'reddit') then
+ url = string.gsub(url, 'www.reddit.com', 'libredd.it')
+ open(os.getenv('BROWSER') .. ' --new-window %s')
+elseif string.find(url, 'https') then
+ open(os.getenv('BROWSER') .. ' --new-window %s')
else
- open("xdg-open %s")
+ open('xdg-open %s')
end