npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

colson-tmux

v1.0.23

Published

Colson Tmux: Tmux + ZSH for Software Engineers!

Downloads

509

Readme

Tmux Configuration with Zsh Goodness (colson-tmux npm)

Unlock the full potential of your terminal with this meticulously crafted tmux configuration, accompanied by a versatile Zsh script for effortlessly launching websites and applications. 🔥

Installation through NPM

Ensure Tmux is installed on your machine!
Tmux leader key-> Ctrl + Space

$ npx colson-tmux
$ cd ~/.config/tmux
$ nvim .

Navigate to tmux.conf
Execute this command in normal mode!

<leader> + shit + i

Restart terminal to load Tmux!

$ zshrl
$ tmuxrl

If you've already installed this before then for the latest pull, do:

$ npx colson-tmux@latest

NOTE: Read the documentation below for indepth wisdom on proper installation and uses!

Table of Contents

Features

  1. Enhanced Tmux Configuration: Elevate your terminal experience with a comprehensive tmux setup tailored for efficiency.
  2. Web and App Launcher: Seamlessly launch websites and applications through an intuitive Zsh script.
  3. Plugin Management with TPM: Utilizes Tmux Plugin Manager (TPM) for hassle-free tmux plugin management.
  4. Catppuccin Theme: Elevate aesthetics with the visually pleasing Catppuccin theme.

Screenshots

✨ New Look (Colson TMUX)

colson tmux

colson tmux

colson tmux

colson tmux

colson tmux

colson tmux

colson tmux

colson tmux

💎 Old Look (Colson TMUX)

colson tmux

tmux colson

tmux colson

tmux colson

Prerequisites

Before diving in, ensure you have the following prerequisites:

  • tmux: Ensure tmux is installed on your system.
  • fzf: Install the fuzzy finder tool for interactive selection.

Getting Started

Installation

  1. Begin by installing TPM (Tmux Plugin Manager):

    git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
  2. Clone this repository into your home directory:

    git clone https://github.com/colson0x1/colson-tmux ~/.config/tmux
  3. Reload your tmux environment to apply the configuration:

    tmux source-file ~/.config/tmux/tmux.conf
  4. Make the goto.sh script executable:

    chmod +x ~/.config/tmux/goto.sh
  5. Add .zshrc to root on your machine:

    cat ~/.config/tmux/.zshrc >> ~/.zshrc
  6. Restart your Terminal.

    $ source ~/.zshrc
    $ zshrl
    $ tmuxrl
  7. You're all set! Launch websites and applications using goto.sh.

    <leader>+o

    NOTE: Leader in tmux is: Ctrl+Space

Install Tmux Plugins

  1. Open tmux:
    tmux
  2. Navigate to the tmux directory:
    cd ~/.config/tmux
  3. Use Neovim to open the configuration:
    nvim .
  4. Go to tmux.conf:
    leader+shift+i
    (Note: Leader key is Ctrl+Space, so use Ctrl+Space and Shift+i)

Usage

  • Leader Key: ctrl+space
  • Window Switching: Shift+Alt+j and Shift+Alt+k
  • Horizontal Split: leader + -
  • Vertical Split: leader + |
  • Launch Websites and Apps: leader + o

NOTE: Make sure fzf is installed on your machine for <leader> + o to work!!

$ sudo pacman -S fzf

Customization

Tailor your tmux configuration and the list of websites and applications in goto.sh to match your preferences. Dive into the endless possibilities of customization and make your terminal truly yours. Additionally, explore the power of Zsh with a rich set of aliases and Git shortcuts in the included .zshrc file.


🔥 Alias/Command for Engineers

This package also provides configurations and command aliases for Tmux, Zsh, Git, Docker, Kubernetes, and other development tools, aiming to improve software development productivity.

Zsh & Tmux Commands

| Alias/Command | Description | | ---------------------------------------------- | ------------------------------------ | | tl | List all tmux sessions | | ts [session_name] | Start a new tmux session | | ta [session_name] | Attach to an existing tmux session | | tk [session_name] | Kill a tmux session | | tr [current_session_name] [new_session_name] | Rename existing tmux session | | tc [session_name] | Switch between sessions | | nv | Open Neovim in the current directory | | nvv | Open Neovim with sudo privileges | | cl | Clear the terminal screen | | tmuxrl | Reload the tmux configuration | | zshrl | Reload the Zsh configuration | | vim | Alias for opening Neovim |

Tmux Specific Commands

| Command/Binding | Description | | ---------------------- | ------------------------------------------------------------------------------- | | <leader> + - | Split the current pane horizontally | | <leader> + \| | Split the current pane vertically | | Shift+Alt+J | Move to the next window | | Shift+Alt+K | Move to the previous window | | <leader> + r | Rename current window | | <leader> + n | Switch to next window | | <leader> + p | Switch to previous window | | <leader> + s | Switch sessions | | <leader> + shift + S | Save tmux sessions (tmux-resurrect) even after machine restarts | | <leader> + shift + R | Restore the last saved tmux session (tmux-resurrect) even after restarting | | <leader> + o | Trigger the custom goto.sh script for opening websites and apps from terminal | | <Ctrl> + d | Close current window | | <leader> + d | Exit Tmux sesion |

Git Aliases

| Alias/Command | Description | | ------------------------------- | ---------------------------------------------- | | gst | Show the current git status | | gd | Show the git diff | | ga | Stage all changes | | gaf [file1] [file2] .. | Stage specific files | | gc [message] | Commit changes with a message | | gpm | Push changes to the main branch | | gpmf | Force push changes to the main branch | | gl | Show a readable git log | | gg | Show a colorful and condensed git log | | gunt | Show untracked files | | gcan | Amend the last commit with same commit message | | gcam [message] | Amend the last commit with new commit message | | gcb [branch_name] | Create and checkout a new branch | | gco [branch_name] | Switch to an existing branch | | grh | Reset the current branch to the latest commit | | grh1 | Reset the last branch to the latest commit | | gs | Abbreviated git status | | gb | List branches sorted by most recent commit | | gd [fileName or path to file] | Show the git diff for a specific file | | gds | Side-by-side git diff | | gwd | Show a colorful word-diff | | gp | Push the current branch | | gpl | Pull the latest changes from the remote | | gf | Fetch changes from the remote | | gsmst | Check the status of all submodules | | gasm | Stage all changes, including submodules | | gr <branch-name> | Git rebase | | gri <branch-name> | Interactive rebase |

Add vimdiff as default for diff!

$ git config --global diff.tool vimdiff
$ git config --global difftool.prompt false

Now, gds works :)

+ Also make Git use main as the default branch as opposed to classic master convention!

$ git config --global init.defaultBranch main

Docker Aliases

| Alias/Command | Description | | ----------------- | --------------------------------------------------- | | d | Alias for Docker | | dps | List Docker containers | | di | List Docker images | | db [tag] | Build a Docker image with a tag | | dr [container] | Run a Docker container | | dex [container] | Execute a command inside a running Docker container | | dst [container] | Stop a running Docker container | | drm [container] | Remove a Docker container | | drmi [image] | Remove a Docker image |

Kubernetes Aliases

| Alias/Command | Description | | ----------------- | -------------------------------------------- | | k | Alias for kubectl | | kgp | Get all Kubernetes pods | | kgs | Get all Kubernetes services | | kga | Get all Kubernetes resources | | kd [resource] | Describe a Kubernetes resource | | kdel [resource] | Delete a Kubernetes resource | | kaf [file] | Apply a Kubernetes configuration from a file | | kl [pod] | Show logs of a Kubernetes pod | | ke [pod] | Execute a command inside a Kubernetes pod | | kns [namespace] | Switch Kubernetes namespace |

Development Tool Aliases

| Alias/Command | Description | | ------------- | --------------------------------------------- | | cra | Create a new React app using Create React App | | cva | Create a new VITE app | | cna | Create a new Next.js app | | bun | Run Bun package manager |

Miscellaneous

| Alias/Command | Description | | ------------------------- | ------------------------------- | | gcloud | Google Cloud SDK configuration | | eval "$(ng completion)" | Load Angular CLI autocompletion | | bindkey -v | Enable Vim key bindings in Zsh |


Concurrent Services Execution with one go!

cd ~
mkdir -p ~/bin

Refactor commands in the services-start-command.txt file which is located at ~/.config/tmux!

Make start-services.sh executable!

cd ~/.config/tmux
chmod +x start-services.sh
cp start-services.sh ~/bin/start-services
zshrl

Uses:

Here, <session-name> is the name of the Tmux session that will be created (or attached to, if it already exists). And services-start-commands.txt is the text file that contains the list of commands to run in separate windows inside the Tmux session!

ss <session-name> <services-start-commands-file>

services start -> ss="~/.config/tmux/start-services.sh"

services start commands -> ssc="~/.config/tmux/services-start-commands.txt"

Manual Execution!

cd ~/.config/tmux
chmod +x start-services.sh
zshrl
# Restart the Terminal
cd ~/.config/tmux
./start-services.sh <session-name> <command-file-txt-path>
# Example
./start-services.sh TYPEMUSE ~/.config/tmux/services-start-commands.txt

Command File Example

services-start-command.txt

cd ~/prod/TYPEMUSE/typemuse-web && pnpm dev
cd ~/prod/TYPEMUSE/typemuse-web && pnpm web:dev:tunnel
cd ~/prod/TYPEMUSE/auth-service && pnpm start:dev
cd ~/prod/TYPEMUSE/game-service && pnpm start:dev
cd ~/prod/TYPEMUSE/leaderboard-service && pnpm start:dev
cd ~/prod/TYPEMUSE/messaging-service && go run .
cd ~/prod/TYPEMUSE/payment-service && pnpm start:dev
cd ~/prod/TYPEMUSE/transaction-service && go run .
cd ~/prod/TYPEMUSE/social-network-service && pnpm start:dev
cd ~/prod/TYPEMUSE/react-native-app && pnpm start:dev
cd ~/prod/TYPEMUSE/electron-desktop-app && pnpm start:dev
cd ~/prod/TYPEMUSE/admin-service && pnpm start:dev
cd ~/prod/TYPEMUSE/dashboard-service && pnpm start:dev
cd ~/prod/TYPEMUSE/notification-service && pnpm start:dev
cd ~/prod/TYPEMUSE/multiplayer-service && pnpm start:dev
cd ~/prod/TYPEMUSE/account-service && pnpm start:dev
cd ~/prod/TYPEMUSE/order-service && pnpm start:dev
cd ~/prod/TYPEMUSE/subscription-service && pnpm start:dev
cd ~/prod/TYPEMUSE/event-bus-service && pnpm start:dev

Concurrency in Action!!

NOTE: Make sure you have done this first!

cd ~/.config/tmux
chmod +x start-services.sh

Now restart the terminal and use the pattern below!

ss -> Start Services

ssc -> Start Services Commands

ss <session-name> ssc

EXAMPLE:

ss TYPEMUSE ssc

Peace!