💾 Archived View for ait.place › dot › bin › test.py.txt captured on 2022-07-16 at 13:51:09.

View Raw

More Information

-=-=-=-=-=-=-

#!/bin/python
import os
import pyperclip

MyTerm = os.environ["TERMINAL"]

def usewmctrl(this, isterm = False):
    beforeor = 'wmctrl -a ' + this + ' || '
    if isterm is True:
        return beforeor + MyTerm + ' -t ' + this + ' -e ' + this
    else:
        return beforeor + this

urlsubs = {
"www.twitter.com": "www.nitter.cc",
"www.reddit.com": "www.libredd.it",
"www.youtube.com": "www.invidious.xyz",
"www.instagram.com": "www.bibliogram.art",
}

def rewrite(meme):
    if meme in urlsubs:
        return urlsubs.get(meme)

        try:
            request.redirect(request.request_url)
        except:
            pass

MyEmail = usewmctrl(os.environ["BROWSER"])

#print(pyperclip.paste())
print(rewrite("twitter.com"))

#os.system(MyEmail)