aboutsummaryrefslogtreecommitdiff
path: root/.local
diff options
context:
space:
mode:
authorPatrick Spek <p.spek@tyil.nl>2020-04-05 11:29:03 +0200
committerPatrick Spek <p.spek@tyil.nl>2021-08-14 11:59:35 +0200
commit54b04c4a5f6e70c77296d3611f60e4aa1271ec0d (patch)
treee31ce0ec9e77be3ffb4c3d18447b7251c5c0c267 /.local
parent159b6d3ea0878df425015b31561b80b32fb25575 (diff)
Twitter bad
Diffstat (limited to '.local')
-rwxr-xr-x.local/bin/open3
1 files changed, 3 insertions, 0 deletions
diff --git a/.local/bin/open b/.local/bin/open
index 66d58f6..0ba1c32 100755
--- a/.local/bin/open
+++ b/.local/bin/open
@@ -50,6 +50,9 @@ multi sub cmd (HttpUrl $t where *.hostname.ends-with('slack.com')) { "chromium-b
multi sub cmd (HttpUrl $t where *.hostname.ends-with('zaaksysteem.net')) { "chromium-browser '$t'" }
multi sub cmd (HttpUrl $t where *.hostname.ends-with('zaaksysteem.nl')) { "chromium-browser '$t'" }
+# Rewrite bad site to good site
+multi sub cmd (HttpUrl $t is copy where *.hostname eq "twitter.com") { callwith(URL.new(|$t.Hash, hostname => 'nitter.net')) }
+
# All other URLs should be opened with the preferred browser.
multi sub cmd (HttpUrl $t) { "%*ENV<BROWSER> '$t'" }