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 (
|
from pydantic_settings import (
|
||||||
CliApp,
|
CliApp,
|
||||||
)
|
)
|
||||||
@@ -5,6 +10,20 @@ from pydantic_settings import (
|
|||||||
from .cli import PlanCli
|
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():
|
def cli():
|
||||||
|
name_tmux_window("plan")
|
||||||
app = CliApp()
|
app = CliApp()
|
||||||
app.run(PlanCli)
|
app.run(PlanCli)
|
||||||
|
|||||||
@@ -4,10 +4,7 @@ import sys
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
from pydantic import Field, computed_field
|
from pydantic import Field, computed_field
|
||||||
from pydantic_settings import (
|
from pydantic_settings import CliImplicitFlag, CliPositionalArg
|
||||||
CliImplicitFlag,
|
|
||||||
CliPositionalArg,
|
|
||||||
)
|
|
||||||
|
|
||||||
from plan.commands.base import Base
|
from plan.commands.base import Base
|
||||||
from plan.repository import PlanRepository
|
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 }}
|
# .plan: {{ today }}
|
||||||
|
|
||||||
## todo
|
## todo
|
||||||
|
|
||||||
- chore:
|
- review open prs/issues.
|
||||||
- workout:
|
- post #data schema.
|
||||||
- job:
|
- solve problems.
|
||||||
- comm:
|
|
||||||
- buy:
|
|
||||||
|
|
||||||
## meals
|
|
||||||
|
|
||||||
- breakfast: oatmeal
|
|
||||||
- lunch: leftovers
|
|
||||||
- dinner: curry
|
|
||||||
|
|
||||||
## schedule
|
## schedule
|
||||||
|
|
||||||
- 5:00: sleep.
|
- 9:00: continue.
|
||||||
- 6:00: breakfast.
|
- 10:00: meet.
|
||||||
- 7:00: walk.
|
|
||||||
- 8:00: meeting.
|
|
||||||
- 9:00: code.
|
|
||||||
- 10:00: code.
|
|
||||||
- 11:00: walk.
|
- 11:00: walk.
|
||||||
- 12:00: lunch.
|
- 12:00: eat.
|
||||||
- 1:00: code.
|
- 1:00: continue.
|
||||||
- 2:00: code.
|
|
||||||
- 3:00: walk.
|
- 3:00: walk.
|
||||||
- 4:00: code.
|
- 4:00: continue.
|
||||||
- 5:30: trailhead.
|
- 5:00: yield.
|
||||||
- 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.
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user