All Projects β†’ ivaaaan β†’ Smug

ivaaaan / Smug

Licence: mit
A session manager for tmux written in Go

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Labels

Projects that are alternatives of or similar to Smug

Axiom
The dynamic infrastructure framework for everybody! Distribute the workload of many different scanning tools with ease, including nmap, ffuf, masscan, nuclei, meg and many more!
Stars: ✭ 2,424 (+1112%)
Mutual labels:  tmux
.dotfiles
πŸŽ† Arch Linux with i3 / nvim / tmux / urxvt / zsh / ...
Stars: ✭ 167 (-16.5%)
Mutual labels:  tmux
Fast Ide
πŸ•ΊFast Integrated Development Environment 😻
Stars: ✭ 181 (-9.5%)
Mutual labels:  tmux
Tmux Bash Completion
Tmux bash completion
Stars: ✭ 153 (-23.5%)
Mutual labels:  tmux
Tmux 1password
πŸ”‘ Access your 1Password login items within tmux!
Stars: ✭ 167 (-16.5%)
Mutual labels:  tmux
Powerline
Powerline is a statusline plugin for vim, and provides statuslines and prompts for several other applications, including zsh, bash, tmux, IPython, Awesome and Qtile.
Stars: ✭ 12,989 (+6394.5%)
Mutual labels:  tmux
Dotfiles
Dotfiles (macOS, stow, brew, yabai, nvim, kitty, tmux)
Stars: ✭ 146 (-27%)
Mutual labels:  tmux
Tmux Onedark Theme
A dark tmux color scheme inspired by Atom's One Dark syntax theme.
Stars: ✭ 183 (-8.5%)
Mutual labels:  tmux
Tmux Gitbar
Git in your tmux status bar
Stars: ✭ 167 (-16.5%)
Mutual labels:  tmux
Dotfiles
My [NeoVim + Tmux + Fish Shell] Setup /w install scripts
Stars: ✭ 180 (-10%)
Mutual labels:  tmux
Vimux
easily interact with tmux from vim
Stars: ✭ 1,980 (+890%)
Mutual labels:  tmux
Sendcode
Send code and text to macOS and Linux Terminals, iTerm, ConEmu, Cmder, Tmux, Terminus; R (RStudio), Julia, IPython.
Stars: ✭ 166 (-17%)
Mutual labels:  tmux
Dotfiles
πŸ”© Dotfiles for bash, zsh, tmux, emacs, vim, etc
Stars: ✭ 175 (-12.5%)
Mutual labels:  tmux
Dotfiles
πŸ“ My dotfiles for macOS using Fish/Zsh, Neovim, and Tmux
Stars: ✭ 151 (-24.5%)
Mutual labels:  tmux
Gitmux
πŸ’» Git in your tmux status bar
Stars: ✭ 180 (-10%)
Mutual labels:  tmux
Tmux Tilish
Plugin which makes tmux work and feel like i3wm
Stars: ✭ 149 (-25.5%)
Mutual labels:  tmux
Dotfiles
vim, zsh, git, homebrew, nvm, neovim - my whole world
Stars: ✭ 2,217 (+1008.5%)
Mutual labels:  tmux
Dotfiles
My dotfiles: Experimental, ongoing configuration files, development environment and scripts for various Unix-like systems, text-based command-line applications and interfaces.
Stars: ✭ 185 (-7.5%)
Mutual labels:  tmux
Teamocil
There's no I in Teamocil. At least not where you think. Teamocil is a simple tool used to automatically create windows and panes in tmux with YAML files.
Stars: ✭ 2,179 (+989.5%)
Mutual labels:  tmux
Neovim Config
Neovim configuration
Stars: ✭ 180 (-10%)
Mutual labels:  tmux

Smug - tmux session manager

Actions Status Go Report Card

Inspired by tmuxinator and tmuxp.

Smug automates your tmux workflow. You can create a single configuration file, and Smug will create all the required windows and panes from it.

gif

The configuration used in this GIF can be found here.

Installation

Download from the releases page

Download the latest version of Smug from the releases page and then run:

mkdir smug && tar -xzf smug_0.1.0_Darwin_x86_64.tar.gz -C ./smug && sudo mv smug/smug /usr/local/bin && rm -rf smug

Don't forget to replace smug_0.1.0_Darwin_x86_64.tar.gz with the archive that you've downloaded.

Git

Prerequisite Tools

Fetch from GitHub

The easiest way is to clone Smug from GitHub and install it using go-cli:

cd /tmp
git clone https://github.com/ivaaaan/smug.git
cd smug
go install

Usage

smug <command> [<project>] [-f, --file <file>] [-w, --windows <window>]... [-a, --attach] [-d, --debug]

Options:

-f, --file A custom path to a config file
-w, --windows List of windows to start. If session exists, those windows will be attached to current session.
-a, --attach Force switch client for a session
-d, --debug Print all commands to ~/.config/smug/smug.log

Examples

To create a new project, or edit an existing one in the $EDITOR:

[email protected]:~$ smug new project

[email protected]:~$ smug edit project

To start/stop a project and all windows, run:

[email protected]:~$ smug start project

[email protected]:~$ smug stop project

When you already have a running session, and you want only to create some windows from the configuration file, you can do something like this:

[email protected]:~$ smug start project:window1

[email protected]:~$ smug start project:window1,window2

[email protected]:~$ smug start project -w window1

[email protected]:~$ smug start project -w window1 -w window2

[email protected]:~$ smug stop project:window1

[email protected]:~$ smug stop project -w window1 -w window2

Also, you are not obliged to put your files in the ~/.config/smug directory. You can use a custom path in the -f flag:

[email protected]:~$ smug start -f ./project.yml

[email protected]:~$ smug stop -f ./project.yml

[email protected]:~$ smug start -f ./project.yml -w window1 -w window2

Configuration

Configuration files stored in the ~/.config/smug directory in the YAML format, e.g ~/.config/smug/your_project.yml.

Examples

Example 1

session: blog

root: ~/Developer/blog

before_start:
  - docker-compose -f my-microservices/docker-compose.yml up -d # my-microservices/docker-compose.yml is a relative to `root`

stop:
  - docker stop $(docker ps -q)

windows:
  - name: code
    root: blog # a relative path to root
    manual: true # you can start this window only manually, using the -w arg
    layout: main-vertical
    commands:
      - docker-compose start
    panes:
      - type: horizontal
        root: .
        commands:
          - docker-compose exec php /bin/sh
          - clear

  - name: infrastructure
    root: ~/Developer/blog/my-microservices
    layout: tiled
    panes:
      - type: horizontal
        root: .
        commands:
          - docker-compose up -d
          - docker-compose exec php /bin/sh
          - clear

Example 2

session: blog

root: ~/Code/blog

before_start:
  - docker-compose up -d

stop:
  - docker-compose stop

windows:
  - name: code
    layout: main-horizontal
    commands:
      - $EDITOR app/dependencies.php
    panes:
      - type: horizontal
        commands:
          - make run-tests
  - name: ssh
    commands:
      - ssh -i ~/keys/blog.pem [email protected]
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].