Skip to main content

Tmux Dash

The point of this project was to have an easily configurable dashboard for tmux which would sit on window 0; essentially, it would have a todo list, various clocks, things of that nature.

There are a couple of alternatives, the one that really comes up often if you're googling around the phrases "terminal" and "dashboard" is wtfutil, my core issue with this is that the module selection is a little limited, I'm also not a big fan of the way it looks and configuration available doesn't really help that.

The other project of a similar nature is tmuxinator but I didn't want to use it as a binary replacement for tmux itself. I also wanted a config which is more focused on a specific layout, for which specific splits are defined for each pane.

Usage

From within a tmux session run this script and either use the default config ($HOME/.config/tmux-dash/config.yml) or specify a config file with the -c option.

Next is to specify a tmux session, this can be done with the session id with -i or session name with -n. Alternativley, if you are within a tmux session, specify nothing and tmux-dash will pick up on your $TMUX environment variable.

Configuration

A sample configuration could be:

  dashboard:
    number: 0
    vim-pane:
      command: vim
      split: null
    htop:
      command: htop
      split: 
        direction: horz
        width: 40
    head:
      command: "watch tail /var/log/pacman.log"
      split:
        from: vim-pane

This will create a window, numbered 0. In it will be vim in the first pane, creating no split (split: null), a horizontal split of width 40 containing an instance of htop, finally, splitting vertically from the pane marked vim-pane watching a log.

So, something like this,

  +-------------------+--------+
  |                   |        |
  |                   |        |
  |        Vim        |        |
  |                   |        |
  |                   |        |
  +-------------------+  Htop  |
  |                   |        |
  |                   |        |
  |   watch tail...   |        |
  |                   |        |
  |                   |        |
  +-------------------+--------+

Note here that ordering is important, same as setting up a window regularly in tmux. So if you create two panes, a and b, then split a horizontally, you have two on the top, one on the bottom. However, create a and b horizontally, then split a vertically, you get two on the left and one on the right.

The splits are literally made in the order they appear in the Yaml, and so, to reiterate, ordering is important.

The meta config would look something like the following:

  <window name>:
    number: <window number>
    <pane id>:
      [command: <command>]
      [module: <module>]
      split: (null|
        [direction: (horz|vert)]
        [from: <pane id>]
        [width: <char width>]
        [height: <char height>])
    <pane 2 id>:
      ...
  <window 2 name>:
    ...

Dependencies

Literally just the one, aside from Python3, is libtmux.

Additional Info

module refers to what you may find as an empty directory, these are to come, or for anyone who finds this to populate with scripts/binaries, its sole purpose is to put things that you may not necessarily want on your path, kind of pointless but hey.

The only thing that I wouldn't advise it setting up a configuration and not taking into account the fact that the script is running in a particular pane, obviously, that module/command won't be launched.

Hopefully, there's more to come.

Release files for tmux-dash 0.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for tmux-dash 0.0.7
File Interpreter ABI Platform
tmux_dash-0.0.7-py3-none-any.whl Python 3 none any Details

Release files / tmux_dash-0.0.7-py3-none-any.whl

Download URL tmux_dash-0.0.7-py3-none-any.whl
Size 12.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e0f024abd6956b32ceb4dc342f12e7038cd2549293b27c1b9bc092879ebd440e
BLAKE2b-256 checksum
How to use checksums
33c301ec176cb74b12cdae010a43eb7854fecc5d61fab437d3bcd0120b25d765
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.8.1

Release history Release notifications | RSS feed

This release

0.0.7 This release

1 release file

0.0.6

1 release file

0.0.5

1 release file

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page