summaryrefslogtreecommitdiff
path: root/scripts/Scripts/open_rel
diff options
context:
space:
mode:
authorJulian T <julian@jtle.dk>2022-03-29 09:28:55 +0200
committerJulian T <julian@jtle.dk>2022-03-29 09:29:20 +0200
commit616296c9bc1bd8bea80470ccf89a38c969147081 (patch)
treebfb3f40b3d0a59babf65f2444a452584cd5a6490 /scripts/Scripts/open_rel
parent5742dbdfb4184385d96699d6d0d626abee4549dd (diff)
i3 colors and open_rel
Diffstat (limited to 'scripts/Scripts/open_rel')
-rwxr-xr-xscripts/Scripts/open_rel8
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/Scripts/open_rel b/scripts/Scripts/open_rel
index 6d68c41..a71df0a 100755
--- a/scripts/Scripts/open_rel
+++ b/scripts/Scripts/open_rel
@@ -24,7 +24,7 @@ def launch_term(command=None, directory=None):
sp.run(run)
-def decide_and_run(title: str, do_shell=True):
+def decide_and_run(title: str, alt=False):
if title.startswith("fish "):
launch_term(directory=title[5:])
elif (m := re.search(".*client\d*@\[(\d*)\] - Kakoune", title)):
@@ -36,7 +36,7 @@ def decide_and_run(title: str, do_shell=True):
if folder is None:
folder = shell_file
shell_file = None
- if do_shell:
+ if alt:
command = "nix-shell" + (f" {shell_file}" if shell_file else "")
else:
command = None
@@ -47,8 +47,8 @@ def decide_and_run(title: str, do_shell=True):
if __name__ == "__main__":
parser = argparse.ArgumentParser()
- parser.add_argument("--shell", "-s", action="store_true")
+ parser.add_argument("--alt", "-a", action="store_true", help="Alternative action")
args = parser.parse_args()
title = get_window_title()
- decide_and_run(title, args.shell)
+ decide_and_run(title, args.alt)