Last active
June 5, 2026 15:13
-
Star
(130)
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.
Auto-remove Sublime's license popup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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() |
@Argus-Khan it works for me thnx
Link is dead but can be found here.
One liner is below but does not work in Ubuntu 26.04 build 4200
sudo perl -pi -e 's/\x80\x79\x05\x00\x0F\x94\xC2/\xC6\x41\x05\x01\xB2\x00\x90/' /opt/sublime_text/sublime_text
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@Argus-Khan it works for me thnx