Skip to content

Commit

Permalink
Add n command
Browse files Browse the repository at this point in the history
  • Loading branch information
simonrw committed Jan 22, 2025
1 parent 8a809d7 commit c03056f
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion home/bin/n
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,21 @@ parser = argparse.ArgumentParser(
)
args = parser.parse_args()

cmd = ["nvim", str(NOTES_PATH)]
if "TMUX" in os.environ:
cmd = [
"tmux",
"display-popup",
"-E", # quit pane on exit
"-h",
"95%",
"-w",
"100",
"-T", # pane title
"notes",
"-b", # border style
"rounded",
f"nvim {NOTES_PATH}",
]
else:
cmd = ["nvim", str(NOTES_PATH)]
os.execvp(cmd[0], cmd)

0 comments on commit c03056f

Please sign in to comment.