Personal dotfiles. Install via curl -Lks https://bit.ly/2Jlynh5 | /bin/bash -x
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Redirect embed fixer links

james7132 a3fe0fb3 958f237e

+28 -8
+28 -8
.local/bin/xdg-open
··· 1 - #!/usr/bin/env bash 1 + #!/usr/bin/env python 2 2 3 - if ! command -v handlr >/dev/null 2>&1; then 4 - handlr open "$@" 5 - elif [[ -e /etc/NIXOS ]]; then 6 - /run/current-system/sw/bin/xdg-open "$@" 7 - else 8 - /usr/bin/xdg-open "$@" 9 - fi 3 + import pathlib 4 + import shutil 5 + import subprocess 6 + import subprocess 7 + import sys 8 + 9 + REWRITES = [ 10 + ("https://fxtwitter.com", "https://nitter.net"), 11 + ("https://stupidpenisx.com", "https://nitter.net"), 12 + ("https://girlcockx.com", "https://nitter.net"), 13 + ("https://x.com", "https://nitter.net"), 14 + ("https://twitter.com", "https://nitter.net"), 15 + ("https://fixupx.com", "https://nitter.net"), 16 + ("https://fixvx.com", "https://nitter.net"), 17 + ] 18 + 19 + args = sys.argv[1:] 20 + if args[0].startswith('https://'): 21 + for before, after in REWRITES: 22 + args[0] = args[0].replace(before, after) 23 + 24 + if shutil.which('handlr') is not None: 25 + subprocess.Popen(["handlr", "open"] + args) 26 + elif pathlib.path('/etc/NIXOS').exists(): 27 + subprocess.Popen(["/run/current-system/sw/bin/xdg-open"] + args) 28 + else: 29 + subprocess.Popen(["/usr/bin/xdg-open"] + args)