truncate the final project line

This commit is contained in:
Daylin Morgan 2024-11-14 17:23:11 -06:00
parent 62ca20fd9b
commit 4781865071
Signed by: daylin
GPG key ID: 950D13E9719334AD
3 changed files with 4 additions and 2 deletions

View file

@ -69,6 +69,8 @@ proc display(s: State, p: Project): Bbstring =
# will fail without clip! # will fail without clip!
result.add p.tmuxinfo.bb("faint") result.add p.tmuxinfo.bb("faint")
result.truncate(state.buffer.width - 5)
func addLine(b: var Buffer, text: string) = func addLine(b: var Buffer, text: string) =
b.buffer.add (" " & text).alignLeft(b.width) & "\n" b.buffer.add (" " & text).alignLeft(b.width) & "\n"

View file

@ -34,7 +34,6 @@ template cmd(tmux: Tmux, args: string) =
let code = execCmd "tmux " & args let code = execCmd "tmux " & args
if code != 0: if code != 0:
tmuxError(args) tmuxError(args)
# discard tmux.cmdGet args
proc toSession(s: string): TmuxSession = proc toSession(s: string): TmuxSession =
let ss = s.split(":", 1) let ss = s.split(":", 1)

View file

@ -1,6 +1,7 @@
# tsm todo's # tsm todo's
- [x] add message about new keybind Ctrl+E - [x] add message about new keybind Ctrl+E
- [ ] add open session info as faint text -> "session: 2 windows (created ......)" - [-] add open session info as faint text -> "session: 2 windows (created ......)"
- include this info for the configured but open sessions too
<!-- generated with <3 by daylinmorgan/todo --> <!-- generated with <3 by daylinmorgan/todo -->