f*** performance; readability!
This commit is contained in:
parent
c0deb9d71d
commit
88b0833a27
1 changed files with 3 additions and 6 deletions
9
scrnl
9
scrnl
|
@ -4,10 +4,7 @@
|
||||||
from os import environ
|
from os import environ
|
||||||
import os.path as path
|
import os.path as path
|
||||||
import subprocess as sp
|
import subprocess as sp
|
||||||
|
import sys
|
||||||
# import like this makes the code run 1ms faster xD
|
|
||||||
from sys import exit as sysexit
|
|
||||||
from sys import argv as sysargv
|
|
||||||
|
|
||||||
SCRIPT_FILENAME = path.basename(__file__)
|
SCRIPT_FILENAME = path.basename(__file__)
|
||||||
HOME = environ["HOME"]
|
HOME = environ["HOME"]
|
||||||
|
@ -29,7 +26,7 @@ def kctl(*args):
|
||||||
print(f"Wrapped options form {SCRIPT_FILENAME}:")
|
print(f"Wrapped options form {SCRIPT_FILENAME}:")
|
||||||
print(" list list all available profiles")
|
print(" list list all available profiles")
|
||||||
|
|
||||||
sysexit(completed.returncode)
|
sys.exit(completed.returncode)
|
||||||
|
|
||||||
|
|
||||||
def list_profiles(config_path=CFG["config_path"]):
|
def list_profiles(config_path=CFG["config_path"]):
|
||||||
|
@ -41,7 +38,7 @@ def list_profiles(config_path=CFG["config_path"]):
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
arguments = sysargv[1:]
|
arguments = sys.argv[1:]
|
||||||
match arguments[0]:
|
match arguments[0]:
|
||||||
case "list":
|
case "list":
|
||||||
list_profiles()
|
list_profiles()
|
||||||
|
|
Loading…
Add table
Reference in a new issue