{"id":18878267,"url":"https://github.com/uriel1998/tdab","last_synced_at":"2025-04-14T18:32:09.091Z","repository":{"id":147177487,"uuid":"301562078","full_name":"uriel1998/tdab","owner":"uriel1998","description":"Create side and top bars in tmux easily, along with a \"devour\" style command.","archived":false,"fork":false,"pushed_at":"2024-09-28T15:14:27.000Z","size":3717,"stargazers_count":13,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-28T07:21:43.811Z","etag":null,"topics":["bash","tmux"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/uriel1998.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-10-05T23:15:03.000Z","updated_at":"2024-09-28T15:14:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"b20ff28e-8934-4245-a168-4d73e7b7fce1","html_url":"https://github.com/uriel1998/tdab","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uriel1998%2Ftdab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uriel1998%2Ftdab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uriel1998%2Ftdab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uriel1998%2Ftdab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/uriel1998","download_url":"https://codeload.github.com/uriel1998/tdab/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248936848,"owners_count":21186114,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bash","tmux"],"created_at":"2024-11-08T06:25:31.372Z","updated_at":"2025-04-14T18:32:09.084Z","avatar_url":"https://github.com/uriel1998.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tmux-devours-a-bar\n\nCreate side and top bars in tmux easily, along with a \"devour\" style command.\n\n![TDAB logo](https://github.com/uriel1998/tdab/raw/master/tdab-open-graph.png \"logo\")\n\n![TDAB demo](https://raw.githubusercontent.com/uriel1998/tdab/master/tdab_example.gif \"demo\")\n\nYou can see a larger version of the demo with the [included MKV file](https://github.com/uriel1998/tdab/blob/master/tdab_example.mkv?raw=true).\n\n## Contents\n 1. [About](#1-about)\n 2. [License](#2-license)\n 3. [Prerequisites](#3-prerequisites)\n 4. [Installation](#4-installation)\n 5. [Usage](#5-usage)\n 6. [Examples](#6-examples)\n\n***\n\n## 1. About\n\nThese three scripts (called `TDAB` for short) will create side or top bars \n(or a \"devour\" style new pane) that run a command inside tmux.  See the image \nabove to get an idea of what this means.  \n\nThe name is a play on \"A *blank* walks into a bar\", because puns.\n\n## 2. License\n\nThis project is licensed under the MIT License. For the full license, see `LICENSE`.\n\n## 3. Prerequisites\n\n* tmux\n* bash\n* bc\n\nThese scripts will *probably* work in other shells, but I don't know for sure.\n\n## 4. Installation\n\nClone or download the repository.  Put the scripts (or symlinks to the scripts) \nin your `$PATH`.  (In the example above, I've symlinked them to `sidebar`, \n`topbar`, and `devour`.)  \n\n### Tip for `Devour`\n\nI find a binding like the following *very* useful when using `devour`:\n\n`bind-key -n C-/ select-pane -R \\;\\`\n`resize-pane -Z`\n\nThis will allow you to cycle among the zoomed panes - and will zoom each as you \ngo through it.  Very nice for programs like [emojin](https://github.com/peterjschroeder/emojin). \n\n## 5. Usage\n\n`SCRIPTNAME [--offset NUMBER] [--hold] [program to run]`\n\nFor example, `tmux-sidebar.sh man man` will show you the man page for man in \nthe sidebar.  \n\n**The optional command line arguments are POSITIONAL.** \n\nResizing the bars can be done with the command line argument --offset which is \nexpressed in the percentage of the screen you want for the *main* window. This \nmust be the first and second argument used. For example, to have a main window \ntaking up 90% of the screen, you would use\n\n`tmux-topbar.sh --offset 90 man man`\n\nThis works by resizing the *larger* pane from the center line. \n\nIf the *second* argument is either `-h` or `--hold` then TDAB will pause after \nexecuting the program and wait for you to hit a key (necessary for programs that \nexit immediately, which triggers the pane closing). \n\nIf you run the scripts outside of tmux, it will just run the command.\n\n### tmux_devour.sh\n\nLaunch a process in a new pane, zoom the pane, kill the pane when done.\n\n### tmux_sidebar.sh\n\nCreate a sidebar (e.g. for reading manpages) and kill when done.\n\n### tmux_topbar.sh\n\nCreate a vertical split and kill when done.\n\n## 6. Examples\n\nAside from invoking on the command line, I've found a couple of short wrapper scripts \nreally make a difference, particularly if you want a specific setup.\n\nTo call your editor in a new, full-screen pane (leaving the initial pane alone):\n\n`/home/steven/bin/tmux_devour.sh /usr/bin/micro \"${@}\"`\n\nTo bring up [my address book searcher](https://github.com/uriel1998/ppl_virdirsyncer_addysearch) in a small topbar when I'm working in the \nmain window:\n\n`/home/steven/bin/tmux_topbar.sh --offset 80 pplsearch -c`\n\nTo bring up newsboat, with a sidebar showing a cheat sheet of things I forget using \n[rich-cli](https://github.com/Textualize/rich-cli), then closing it when I'm done.\n\n\n```\n/home/steven/bin/tmux_sidebar.sh rich -m /home/steven/cheatsheet/newsboat.md --pager \nnewsboat\nsidebarpid=$(ps aux | grep \"rich -m /home/steven/cheatsheet/newsboat.md\" | grep -v grep | awk '{print $2}')\nkill $sidebarpid\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Furiel1998%2Ftdab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Furiel1998%2Ftdab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Furiel1998%2Ftdab/lists"}