Skip to content

Commit

Permalink
Update close_chrome.py
Browse files Browse the repository at this point in the history
  • Loading branch information
onemanbuilds committed Jan 21, 2021
1 parent 96eccdc commit 090f17d
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions close_chrome.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
from os import system,name
from sys import stdout

def SetTitle(title_name:str):
system("title {0}".format(title_name))
def SetTitle(title:str):
if name == 'posix':
stdout.write(f"\x1b]2;{title}\x07")
elif name in ('ce', 'nt', 'dos'):
system(f'title {title}')
else:
stdout.write(f"\x1b]2;{title}\x07")

def clear():
if name == 'posix':
Expand All @@ -11,7 +17,9 @@ def clear():
else:
print("\n") * 120

SetTitle('One Man Builds Chrome Killer')
SetTitle('[One Man Builds Chrome Killer]')
clear()
system('color 2 & taskkill /F /IM chrome.exe /T')
print('')
print('PRESS ANY KEY TO EXIT...')
system('pause > nul')

0 comments on commit 090f17d

Please sign in to comment.