feat: update work template
add tmux window rename.
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
import atexit
|
||||
import os
|
||||
import shutil
|
||||
import subprocess
|
||||
|
||||
from pydantic_settings import (
|
||||
CliApp,
|
||||
)
|
||||
@@ -5,6 +10,20 @@ from pydantic_settings import (
|
||||
from .cli import PlanCli
|
||||
|
||||
|
||||
def name_tmux_window(name: str) -> None:
|
||||
"""Pin the active tmux window name (kept while $EDITOR runs)."""
|
||||
if not os.environ.get("TMUX") or not shutil.which("tmux"):
|
||||
return
|
||||
# rename-window turns off automatic-rename for the window; restore on exit.
|
||||
subprocess.run(["tmux", "rename-window", name], check=False)
|
||||
atexit.register(
|
||||
lambda: subprocess.run(
|
||||
["tmux", "set-window-option", "automatic-rename", "on"], check=False
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
def cli():
|
||||
name_tmux_window("plan")
|
||||
app = CliApp()
|
||||
app.run(PlanCli)
|
||||
|
||||
@@ -4,10 +4,7 @@ import sys
|
||||
from pathlib import Path
|
||||
|
||||
from pydantic import Field, computed_field
|
||||
from pydantic_settings import (
|
||||
CliImplicitFlag,
|
||||
CliPositionalArg,
|
||||
)
|
||||
from pydantic_settings import CliImplicitFlag, CliPositionalArg
|
||||
|
||||
from plan.commands.base import Base
|
||||
from plan.repository import PlanRepository
|
||||
|
||||
@@ -1,55 +1,18 @@
|
||||
```bash
|
||||
cat ~/.plan/{{ today }}.md | pandoc -t pdf -V geometry:margin=.5in - | lp -o sides=two-sided-long-edge.plan -o number-up=4
|
||||
```
|
||||
|
||||
# .plan: {{ today }}
|
||||
|
||||
## todo
|
||||
|
||||
- chore:
|
||||
- workout:
|
||||
- job:
|
||||
- comm:
|
||||
- buy:
|
||||
|
||||
## meals
|
||||
|
||||
- breakfast: oatmeal
|
||||
- lunch: leftovers
|
||||
- dinner: curry
|
||||
- review open prs/issues.
|
||||
- post #data schema.
|
||||
- solve problems.
|
||||
|
||||
## schedule
|
||||
|
||||
- 5:00: sleep.
|
||||
- 6:00: breakfast.
|
||||
- 7:00: walk.
|
||||
- 8:00: meeting.
|
||||
- 9:00: code.
|
||||
- 10:00: code.
|
||||
- 9:00: continue.
|
||||
- 10:00: meet.
|
||||
- 11:00: walk.
|
||||
- 12:00: lunch.
|
||||
- 1:00: code.
|
||||
- 2:00: code.
|
||||
- 12:00: eat.
|
||||
- 1:00: continue.
|
||||
- 3:00: walk.
|
||||
- 4:00: code.
|
||||
- 5:30: trailhead.
|
||||
- 6:00: cook.
|
||||
- 7:00: dinner.
|
||||
- 8:00: wind down.
|
||||
- 9:00: read.
|
||||
- 10:00: sleep.
|
||||
|
||||
## groceries
|
||||
|
||||
- milk.
|
||||
- oatmeal.
|
||||
- lx.
|
||||
- passionfruit.
|
||||
- spinach.
|
||||
- bananas.
|
||||
- chicken.
|
||||
- crackers.
|
||||
- cheese.
|
||||
- apples.
|
||||
- bread.
|
||||
|
||||
- 4:00: continue.
|
||||
- 5:00: yield.
|
||||
|
||||
Reference in New Issue
Block a user