GithubHelp home page GithubHelp logo

alex1701c / tmuxrunner Goto Github PK

View Code? Open in Web Editor NEW
8.0 3.0 3.0 285 KB

Krunner plugin to start and attach to tmux sessions

License: GNU Lesser General Public License v3.0

CMake 7.87% Shell 3.35% C++ 88.78%
krunner kde tmux cplusplus qt5 addon terminal utility

tmuxrunner's Introduction

TmuxRunner

The plugin gets triggered by the word tmux. After that you can search for a session. If the name does not exist it shows an option to create a new session with the specified name. After the name you can add the initial path. But instead of typing out frequently used paths you can use the shortcuts: Each shortcut has to start with a $ and gets replaced with the value. You can use absolute paths and relative ones, but if you want to reference a directory in your home folder you can just type the folder name. For example Downloads/Bluetooth gets interpreted as /home/USER/Downloads/Bluetooth.
Shortcuts can be created/deleted in the config dialog.

Furthermore you can change the terminal you want tmux to be launched in. The default options are: Konsole, Yakuake, Terminator and Simple Terminal. You can also define a custom terminal. In case you want to use one terminal emulator for the mist time and another sometimes you can set one as default and select the other for the action (like instance Yakuake in the config screenshot). Now you can switch between these two the terminals just by Enter(default) or Shift+Enter(action).

If you want to change the terminal for just one command you can add a flag to the end of the statement. The flags start with a - and is followed by the lowercase start letter if the option. For example -y opens it in Yakuake and -c opens it with your custom terminal.

The option "Show create options for partly matches" allows you to create a session even if any existing session starts with the query.

Additionally this plugin supports tmuxinator by letting you create new sessions with parameters/options and attach to existing. You can also combine this with the terminal flags as explained above.

Required Dependencies

Debian/Ubuntu:
sudo apt install cmake extra-cmake-modules build-essential libkf5runner-dev libkf5textwidgets-dev qtdeclarative5-dev gettext libkf5notifications-dev libkf5kcmutils-dev wmctrl tmux

openSUSE:
sudo zypper install cmake extra-cmake-modules libQt5Widgets5 libQt5Core5 libqt5-qtlocation-devel ki18n-devel ktextwidgets-devel kconfigwidgets-devel kservice-devel krunner-devel gettext-tools knotifications-devel kcmutils-devel tmux wmctrl

Fedora:
sudo dnf install cmake extra-cmake-modules kf5-ki18n-devel kf5-kservice-devel kf5-krunner-devel kf5-ktextwidgets-devel gettext kf5-knotifications-devel kf5-kcmutils-devel tmux wmctrl

Archlinux(Manjaro):
sudo pacman -S cmake extra-cmake-modules knotifications kcmutils tmux wmctrl

Build instructions

The easiest way to install is:
curl https://raw.githubusercontent.com/alex1701c/TmuxRunner/master/install.sh | bash

Or you can do it manually:

git clone https://github.com/alex1701c/TmuxRunner
cd TmuxRunner
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DKDE_INSTALL_QTPLUGINDIR=$(kf5-config --qt-plugins) ..
make -j$(nproc)
sudo make install
# Optional for yakuake support
sudo curl https://raw.githubusercontent.com/aplatanado/yakuake-session/master/yakuake-session -o /usr/bin/yakuake-session
sudo chmod +x /usr/bin/yakuake-session

Restart KRunner to load the runner (in a terminal type: kquitapp5 krunner;kstart5 krunner )

Configuration

  1. Search for "Plasma Search" in Krunner
  2. open system settings entry
  3. search for "tmux" in the search field

alternatively, run

kcmshell5 plasmasearch --args tmuxrunner

Screenshots

Simple command and Yakuake as action

Simple command

Search sessions

Search sessions

Create session using name, shortcut and flag

Create session

Config dialog, custom option launches tmux in Konsole tabs instead of new window

Configure plugin

Tmuxinator overview

Configure plugin

Tmuxinator create session with arguments and options

Configure plugin

tmuxrunner's People

Contributors

alex1701c avatar octoshrimpy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

tmuxrunner's Issues

custom terminal option not selectable

regardless of choice, the custom option remains greyed out and cannot be selected.

I'd like to open it with Kitty, as that is my default-set terminal.

another option would be to use the user defaults, as set in defaults or $TERM

image

How to open config dialog?

The readme mentions it, but does not specify how to open settings for it. I'd like to change the default term to Kitty.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.