-
Star
(129)
You must be signed in to star a gist -
Fork
(21)
You must be signed in to fork a gist
-
-
Save egel/b7beba6f962110596660 to your computer and use it in GitHub Desktop.
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
import sublime_plugin | |
import subprocess | |
from time import sleep | |
import sys | |
cl = lambda line: subprocess.Popen(line, shell=True, stdout=subprocess.PIPE).communicate()[0].strip() | |
log = lambda message: sys.stderr.write("Log: %s\n" % message) | |
sublimeMainWindowTitle = " - Sublime Text (UNREGISTERED)" | |
class LicenseWindowKiller(sublime_plugin.EventListener): | |
def seek_n_close(self): | |
sublimePid = int(cl("""wmctrl -lp | grep "%s" | awk '{print $3}'""" % sublimeMainWindowTitle).decode()) | |
if sublimePid: | |
sublimeMainWindowId = cl("""wmctrl -lp | grep "%s" | awk '{print $1}'""" % sublimeMainWindowTitle).decode() | |
sublimeSecondWindowId = cl("""wmctrl -lp | grep %s | awk '{ids[$1]++}{for (id in ids){if (id != "%s"){printf id}}}'""" % (sublimePid, sublimeMainWindowId)).decode() | |
if sublimeSecondWindowId: | |
sublimeSecondWindowTitle = cl("""wmctrl -lp | grep %s | awk '{print $5}'""" % sublimeSecondWindowId).decode() | |
if not sublimeSecondWindowTitle: | |
cl("wmctrl -i -c %s" % sublimeSecondWindowId) | |
return True | |
return False | |
def on_pre_save_async(self, *args): | |
seek = True | |
counter = 10 | |
while seek: | |
sleep(.5) | |
counter -= 1 | |
if counter < 0: | |
seek = False | |
seek = not self.seek_n_close() |
For a working windows version and instructions on how to install sublime plugins:
https://gist.github.com/DinleyH/e222834ddb3533d59fd7cafccf612f07
Hi guyz! This thing removes that UNREGISTERED Annoying bullcrapp? I dont know how to use this script, no stubid proof readme or howto do this i find for it...? Is it possibru to someone guide me where to find, and what to search to work this out?
Or suggest me pls alternatives?
Code, or VSCodium? Or what should be annoyance free? And know functions what Sublime text knows?
I think this shaming thing with UNREGISTERED is distgusting... need to puke
You guys can look into this thread for a simpler one line solution, it works with the latest build:
https://gist.github.com/skoqaq/3f3e8f28e23c881143cef9cf49d821ff
Argus-Khan, thank you this worked for me!
Here is a working windows version: it works by closing the dialog box the moment it appears. its instant more or less, I never see the box anymore.
Windowkill.py
`import sublime_plugin
import ctypes
import time
TARGET_CLASS_NAME = "#32770"
class DialogBoxKiller(sublime_plugin.EventListener):
`
FYI this also works with SFTP.