Name | Modified | Size | Downloads / Week |
---|---|---|---|
Parent folder | |||
README.md | 2024-11-24 | 23.9 kB | |
README.html | 2024-11-24 | 32.6 kB | |
_wezterm.lua | 2024-11-18 | 19.7 kB | |
wezterm-launch | 2024-11-18 | 5.7 kB | |
upd | 2024-11-01 | 37.4 kB | |
fonts.conf | 2024-10-27 | 21.9 kB | |
alacritty.toml | 2024-10-27 | 10.6 kB | |
_Xresources | 2024-02-05 | 5.5 kB | |
_tmux.conf | 2023-12-08 | 15.0 kB | |
_vimrc | 2023-08-06 | 11.5 kB | |
_Xmodmap | 2023-08-06 | 280 Bytes | |
_xprofile | 2023-08-06 | 1.5 kB | |
_inputrc | 2023-08-06 | 2.9 kB | |
_nanorc | 2023-08-06 | 12.8 kB | |
_screenrc | 2023-08-06 | 1.9 kB | |
Totals: 15 Items | 203.3 kB | 22 |
Support Files
These are files I use along with the Extreme Ultimate .bashrc (SourceForge does not allow files to start with a period so you will need to rename them, and all these should go into your home directory).
File | Description |
---|---|
.inputrc |
The configuration file for GNU Readline and sets addition options |
.nanorc |
My configuration file for the nano editor (you may need to remove an include line towards the end if you get an error because the source code highlighting is not installed) |
.screenrc |
The configuation file for GNU screen |
.tmux.conf |
A highly customized configuration file for Tmux terminal multiplexer with a beautiful status bar (See more information below) |
.vimrc |
My configuration file for the vim editor |
.wezterm.lua |
My configuration file for the WezTerm terminal application |
.Xmodmap |
This file remaps keys (this example remaps and swaps CAPS LOCK and Right-CTRL ) |
.xprofile |
Allows you to execute commands and settings at the beginning of the X user session before the window manager is started |
.Xresources |
Allows you to set up terminal options and color schemes for XTerm and UXTerm |
alacritty.toml |
My configuration file for the Alacritty terminal application |
fonts.conf |
My configuration for font settings located in ~/.config/fontconfig/fonts.conf |
upd |
My smart update script for distos based on Arch Linux that detects and updates the Arch repo, AUR, Flatpak, Snap, TLDR, DidYouMean, Git repos, Micro plugins, Distrobox containers, and Wine |
wezterm-launch |
Opens a new WezTerm window or tab with any given parameters, and opens a new tab in WezTerm instead of launching another instance |
TMUX Configuration Overview
"Unleashing the full potential of the terminal, one config at a time." — Me 🚀
This section outlines the key bindings and settings configured in this .tmux.conf
file.
General Configuration
- Terminal Scrollbars: Use terminal's scrollbars by adjusting overflow settings
- Scrollback History: Set to 100,000 lines
- Command Delay: Reduced to 1ms
- Key Repeat Time: Set to 600ms for repeating actions on held keys
- Focus Event Reporting: Enabled for better terminal synchronization
- Path Retention: Retains current path in new panes and windows
- Window and Pane Numbering: Starts at 1, more intuitive
- Window Renumbering: Automatic renumbering on window closure
- Toggle Window:
a
key to toggle between the last most recent window and back - Next Window:
Tab
key to move to next window - Previous Window:
Shift-Tab
orBTab
to move to previous window - Resize Behavior: Aggressive resize and visual activity notifications
- True Color Support: Enabled for tmux (requires tmux >= 2.2)
- Status Bar: Sensibly but deeply customized, light weight, self contained, cross platform, visually appealing, and helpful status bar
- Mouse Mode: Toggle with
M
, scroll with wheel, pane selection - Scrolling Behavior: Custom bindings for mouse wheel actions
- Copy Mode: Vim keybindings in copy mode
- Clipboard Copy: Integration with system clipboard tools (
xclip
,xsel
,wl-copy
,pbcopy
, etc.)
Key Bindings
- Prefix: Kept
CTRL-b
but also addedCTRL-a
as aPREFIX
key - Process View: Pressing ` opens
htop
in a new split window - Man Page Lookup:
CTRL-m
to search and display man pages - Status Bar Toggle:
s
key to toggle the status bar - Detach:
d
to detach,CTRL-d
to choose a client - Buffer Operations: Various keys (
v
,V
,C-v
) for buffer operationsv
: Paste most recent copied item.V
: Show list of copied item buffers in tmux.C-v
: Select from copied items to paste.
- Pane and Window Creation: Keys (
c
,%
,"
,|
,-
,g
,G
,T
) for creating and arranging panes and windows - Pane Synchronization:
+
to add all and synchronize panes - Window and Session Selection:
'
for windows,"
for sessions - Zoom:
b
for toggling zoom of the current pane. - Resize: While constantly holding down the modifier key, the arrow keys will resize the current pane.
- Joining Panes:
j
andJ
for joining panes - Home and End Keys: Custom bindings for Home and End in copy mode
- Editing Configuration:
CTRL-e
to edit.tmux.conf
with available editor - Copy Mode: Vim keybindings in copy mode
- Clipboard Copy: Integration with system clipboard tools (
xclip
,xsel
,wl-copy
,pbcopy
, etc.)
Nearly all the original default keys still work in Tmux by design to make it easier to work on other systems. The additional new key bindings to provide additional functionality are marked in the first column with a ✓.
N | Keybinding | Description |
---|---|---|
✓ | CTRL-a |
Use either C-a or C-b as the default PREFIX key |
- | PREFIX C-Down |
Resize pane down |
- | PREFIX C-Left |
Resize pane left |
- | PREFIX C-Right |
Resize pane right |
- | PREFIX C-Up |
Resize pane up |
- | PREFIX C-b |
Send prefix |
- | PREFIX C-o |
Rotate window |
- | PREFIX C-z |
Suspend client |
✓ | PREFIX CTRL+Alt+Down |
Move the current tab (window) to the far left end |
✓ | PREFIX CTRL+Alt+Left |
Move the current tab (window) to the right |
✓ | PREFIX CTRL+Alt+Right |
Move the current tab (window) to the left |
✓ | PREFIX CTRL+Alt+Up |
Move the current tab (window) to the far right end |
✓ | PREFIX CTRL-a |
Pass C-a to the current application (usually Select All) |
✓ | PREFIX CTRL-d |
Choose a client to detach |
✓ | PREFIX CTRL-e |
Edit the Tmux configuration file and then reload settings |
✓ | PREFIX CTRL-h |
Show the Extreme Ultimate .bashrc README file in a new pane |
✓ | PREFIX CTRL-l |
Clear screen and the buffer history |
✓ | PREFIX CTRL-m |
Prompt for keyword and open a man page for it in a new pane |
✓ | PREFIX CTRL-v |
Choose which buffer to paste from |
- | PREFIX Down |
Select pane down (repeated) |
- | PREFIX Left |
Select pane left (repeated) |
- | PREFIX M-1 |
Select even horizontal layout |
- | PREFIX M-2 |
Select even vertical layout |
- | PREFIX M-3 |
Select main horizontal layout |
- | PREFIX M-4 |
Select main vertical layout |
- | PREFIX M-5 |
Select tiled layout |
- | PREFIX M-Down |
Resize pane down by 5 (repeated) |
- | PREFIX M-Left |
Resize pane left by 5 (repeated) |
- | PREFIX M-Right |
Resize pane right by 5 (repeated) |
- | PREFIX M-Up |
Resize pane up by 5 (repeated) |
- | PREFIX M-n |
Next window (all) |
- | PREFIX M-o |
Rotate window (down) |
- | PREFIX M-p |
Previous window (all) |
- | PREFIX Page Up |
Copy mode (up) |
- | PREFIX Right |
Select pane right (repeated) |
✓ | PREFIX Shift-Tab |
Switch to the most recently accessed window |
- | PREFIX Space |
Next layout |
✓ | PREFIX Tab |
Switch to the next available window |
- | PREFIX Up |
Select pane up (repeated) |
- | PREFIX D |
Choose client |
✓ | PREFIX G |
Split the pane into a grid of 4 panes (vertical resize) |
✓ | PREFIX J |
Send pane to another pane (show the numbers with CTRL-w) |
- | PREFIX L |
Switch client (last) |
✓ | PREFIX M |
Toggle the mouse on and off |
✓ | PREFIX S |
Toggle the status bar on and off |
✓ | PREFIX T |
Make the current window the first window |
✓ | PREFIX V |
List paste buffers |
✓ | PREFIX a |
Switch most recent windows |
✓ | PREFIX c |
Create a new window now opens using the current path |
- | PREFIX d |
Detach client |
- | PREFIX f |
Find window prompt |
✓ | PREFIX g |
Split the pane into a grid of 4 panes (horizontal resize) |
✓ | PREFIX h |
Show the Extreme Ultimate .bashrc help file in a new pane |
- | PREFIX i |
Display message |
✓ | PREFIX j |
Join panes (show the numbers with CTRL-w) |
- | PREFIX l |
Last window |
- | PREFIX n |
Next window |
- | PREFIX o |
Select pane |
- | PREFIX p |
Previous window |
- | PREFIX q |
Display visible indicator of each pane |
✓ | PREFIX r |
Reload the .tmux.conf configuration file |
- | PREFIX s |
Choose tree |
- | PREFIX t |
Clock mode |
✓ | PREFIX v |
Paste from the top paste buffer |
- | PREFIX w |
Choose window |
- | PREFIX x |
Confirm before killing pane |
- | PREFIX z |
Toggle zoom (make a pane full screen) |
- | PREFIX 0 -9 |
Select window by number (0-9) |
✓ | PREFIX _ /Del |
Delete buffer |
✓ | PREFIX - |
Split the window vertically (keeping the current path) |
✓ | PREFIX | /\ |
Split the window horizontally (keeping the current path) |
- | PREFIX ! |
Break pane |
- | PREFIX " |
Split window |
- | PREFIX # |
List buffers |
- | PREFIX $ |
Rename session prompt |
- | PREFIX % |
Split window horizontally |
- | PREFIX & |
Confirm before killing window |
- | PREFIX ' |
Select window by index |
- | PREFIX ( |
Switch client (previous) |
- | PREFIX ) |
Switch client (next) |
✓ | PREFIX + |
Synchronize panes (on/off) |
- | PREFIX , |
Rename window prompt |
- | PREFIX . |
Move window prompt |
- | PREFIX : |
Command prompt |
- | PREFIX ; |
Last pane |
✓ | PREFIX < |
Swap the current pane left |
- | PREFIX = |
Choose buffer |
✓ | PREFIX > |
Swap the current pane right |
- | PREFIX ? |
List keys |
- | PREFIX [ |
Copy mode |
- | PREFIX ] |
Paste buffer |
- | PREFIX { |
Swap pane with previous |
- | PREFIX } |
Swap pane with next |
- | PREFIX ~ |
Show messages |
✓ | CTRL+Alt+Down |
Swap the pane down (no modifier) |
✓ | CTRL+Alt+Left |
Swap the pane left (no modifier) |
✓ | CTRL+Alt+Right |
Swap the pane right (no modifier) |
✓ | CTRL+Alt+Up |
Swap the pane up (no modifier) |
✓ | ENTER |
Copy selection to OS clipboard when in copy mode |
✓ | Mouse Selection | Copy selection to OS clipboard (in copy mode, mouse drag) |
Characters left for bindings:
These are the keys available (
PREFIX+Key
) and excludes all the default bindings already present. Does not include additional modifier combinations.
k
u
y
A
B
C
E
F
H
I
K
N
O
P
Q
R
U
W
X
Y
Z
Tmux in Desktop Terminals
To automatically open Tmux within desktop terminals (such as Alacritty, Konsole, or XFCE Terminal) and manage their sessions effectively:
- Utilize the provided scripts: Instead of directly launching terminal program binaries, call these scripts (with the full path) instead.
- Single Tmux session: Using these scripts guarantees that only one terminal instance is loaded, as all instances share the same Tmux session. This prevents the confusion of having multiple terminals displaying identical content.
- Initial script run: When you execute the script for the first time, it will launch your terminal with Tmux already loaded. Typically, the Tmux session is named after the user.
- Additional terminal instances: Running the script again to launch another terminal instance will seamlessly add a new tab to your existing Tmux session (I put the status bar at the top to give the appearance of Tmux windows as tabs). This behavior resembles Konsole's behavior with
konsole --new-tab
but it employs Tmux instead. - Optional
xdotool
orwmctrl
integration: While not mandatory, if either of these is installed, the terminal window will also be brought to the forefront and focused automatically.
Save and execute the provided script file(s) to launch your terminal. For example, edit the menu items and change the program to /your-path/tmux-alacritty
instead of alacritty
. You can also make the full path to the script the default terminal.
Alacritty - GPU-accelerated terminal based on performance
Note: Alacritty appears to fit and support Tmux the best out of most of the popular terminals - especially with keys like Home and End and Shift or Control and Home and End for moving around and selection using the keybinds of modern editors and IDEs.
#!/bin/sh
# Check if Alacritty is running...
if pidof -x -q "alacritty" > /dev/null; then
# If Tmux is running...
if tmux info > /dev/null 2>&1; then
# Create a new tab in the current session
tmux new-window
fi
# If xdotool is installed...
if command -v xdotool > /dev/null; then
# Activate and focus the Alacritty window
xdotool windowactivate $(xdotool search --class "Alacritty" | tail -n 1)
# Check if wmctrl is installed...
elif command -v wmctrl > /dev/null; then
# Bring Alacritty to the front by matching its window class
wmctrl -x -a "Alacritty"
fi
else # Alacritty is not running...
# Get the passed in or default session name
if [ -n "${_TMUX_LOAD_SESSION_NAME}" ]; then
_TMUX_SESSION_NAME="${_TMUX_LOAD_SESSION_NAME}"
elif [ "$(tmux list-sessions 2> /dev/null | wc -l)" -gt 0 ]; then
_TMUX_SESSION_NAME="$(tmux ls -F "#{session_name}" | head -n 1)"
else
_TMUX_SESSION_NAME="$(whoami)"
fi
# Check if a directory is provided as a parameter
if [ -n "${1}" ] && [ -d "${1}" ]; then
# Change into that directory first
cd "${1}"
fi
# Start Alacritty
exec alacritty -T "Terminal" -e tmux -u new-session -A -s "${_TMUX_SESSION_NAME}"
fi
Kitty - Fast, feature-rich, GPU based terminal emulator
https://sw.kovidgoyal.net/kitty/
#!/bin/sh
# Check if kitty is running...
if pidof -x -q "kitty" > /dev/null; then
# If Tmux is running...
if tmux info > /dev/null 2>&1; then
# Create a new tab in the current session
tmux new-window
fi
# If xdotool is installed...
if command -v xdotool > /dev/null; then
# Activate and focus the kitty window
xdotool windowactivate $(xdotool search --class "kitty" | tail -n 1)
# Check if wmctrl is installed...
elif command -v wmctrl > /dev/null; then
# Bring kitty to the front by matching its window class
wmctrl -x -a "kitty"
fi
else # kitty is not running...
# Get the passed in or default session name
if [ -n "${_TMUX_LOAD_SESSION_NAME}" ]; then
_TMUX_SESSION_NAME="${_TMUX_LOAD_SESSION_NAME}"
elif [ "$(tmux list-sessions 2> /dev/null | wc -l)" -gt 0 ]; then
_TMUX_SESSION_NAME="$(tmux ls -F "#{session_name}" | head -n 1)"
else
_TMUX_SESSION_NAME="$(whoami)"
fi
# Check if a directory is provided as a parameter
if [ -n "${1}" ] && [ -d "${1}" ]; then
# Change into that directory first
cd "${1}"
fi
# Start kitty
exec kitty -T "Terminal" -e tmux -u new-session -A -s "${_TMUX_SESSION_NAME}"
fi
Konsole - KDE default terminal
#!/bin/sh
# Check if Konsole is running...
if pidof -x -q "konsole" > /dev/null; then
# If Tmux is running...
if tmux info > /dev/null 2>&1; then
# Create a new tab in the current session
tmux new-window
fi
# If xdotool is installed...
if command -v xdotool > /dev/null; then
# Activate and focus the Konsole window
xdotool windowactivate $(xdotool search --class "konsole" | tail -n 1)
# Check if wmctrl is installed...
elif command -v wmctrl > /dev/null; then
# Bring Konsole to the front by matching its window class
wmctrl -x -a "konsole"
fi
else # Konsole is not running...
# Get the passed in or default session name
if [ -n "${_TMUX_LOAD_SESSION_NAME}" ]; then
_TMUX_SESSION_NAME="${_TMUX_LOAD_SESSION_NAME}"
elif [ "$(tmux list-sessions 2> /dev/null | wc -l)" -gt 0 ]; then
_TMUX_SESSION_NAME="$(tmux ls -F "#{session_name}" | head -n 1)"
else
_TMUX_SESSION_NAME="$(whoami)"
fi
# Check if a directory is provided as a parameter
if [ -n "${1}" ] && [ -d "${1}" ]; then
# Start Konsole and set tmux to the specified directory
konsole --hide-menubar --hide-tabbar -e tmux -u new-session -A -c "${1}" -s "${_TMUX_SESSION_NAME}"
else
# Start Konsole without changing the directory
konsole --hide-menubar --hide-tabbar -e tmux -u new-session -A -s "${_TMUX_SESSION_NAME}"
fi
fi
WezTerm - GPU-accelerated terminal emulator and multiplexer written in Rust
https://wezfurlong.org/wezterm/index.html
#!/bin/sh
# Check if WezTerm is running...
if pidof -x -q "wezterm" > /dev/null; then
# If Tmux is running...
if tmux info > /dev/null 2>&1; then
# Create a new tab in the current session
tmux new-window
fi
# If xdotool is installed...
if command -v xdotool > /dev/null; then
# Activate and focus the WezTerm window
xdotool windowactivate $(xdotool search --class "org.wezfurlong.wezterm" | tail -n 1)
# Check if wmctrl is installed...
elif command -v wmctrl > /dev/null; then
# Bring WezTerm to the front by matching its window class
wmctrl -x -a "org.wezfurlong.wezterm"
fi
else # Alacritty is not running...
# Get the passed in or default session name
if [ -n "${_TMUX_LOAD_SESSION_NAME}" ]; then
_TMUX_SESSION_NAME="${_TMUX_LOAD_SESSION_NAME}"
elif [ "$(tmux list-sessions 2> /dev/null | wc -l)" -gt 0 ]; then
_TMUX_SESSION_NAME="$(tmux ls -F "#{session_name}" | head -n 1)"
else
_TMUX_SESSION_NAME="$(whoami)"
fi
# Check if a directory is provided as a parameter
if [ -n "${1}" ] && [ -d "${1}" ]; then
# Change into that directory first
cd "${1}"
fi
# Start WezTerm
exec wezterm -e tmux -u new-session -A -s "${_TMUX_SESSION_NAME}"
fi
XFCE Terminal - Xfce default terminal
https://docs.xfce.org/apps/terminal/start
#!/bin/sh
# Check if XFCE Terminal is running...
if pidof -x -q "xfce4-terminal" > /dev/null; then
# If Tmux is running...
if tmux info > /dev/null 2>&1; then
# Create a new tab in the current session
tmux new-window
fi
# If xdotool is installed...
if command -v xdotool > /dev/null; then
# Activate and focus the XFCE Terminal window
xdotool windowactivate $(xdotool search --class "Xfce4-terminal" | tail -n 1)
# Check if wmctrl is installed...
elif command -v wmctrl > /dev/null; then
# Bring XFCE Terminal to the front by matching its window class
wmctrl -x -a "Xfce4-terminal"
fi
else # XFCE Terminal is not running...
# Get the default session name
if [ -n "${_TMUX_LOAD_SESSION_NAME}" ]; then
_TMUX_SESSION_NAME="${_TMUX_LOAD_SESSION_NAME}"
elif [ "$(tmux list-sessions 2> /dev/null | wc -l)" -gt 0 ]; then
_TMUX_SESSION_NAME="$(tmux ls -F "#{session_name}" | head -n 1)"
else
_TMUX_SESSION_NAME="$(whoami)"
fi
# Check if a directory is provided as a parameter
if [ -n "${1}" ] && [ -d "${1}" ]; then
# Start XFCE Terminal and set tmux to the specified directory
xfce4-terminal --working-directory="${1}" --command="tmux -u new-session -A -s ${_TMUX_SESSION_NAME}" --title='Terminal'
else
# Start XFCE Terminal without changing the directory
xfce4-terminal --command="tmux -u new-session -A -s ${_TMUX_SESSION_NAME}" --title='Terminal'
fi
fi
I would have created scripts for Tilix or Terminator, but the split screen features are already handled by Tmux and are redundant.
If you wish to connect to a server that has Tmux already running, and you don't want to run Tmux on the server inside of Tmux locally, use the tmd command from Extreme Ultimate .bashrc function like this:
tmd ssh user@server
Or create an alias:
alias ssh1='tmd ssh user@server'
alias ssh2='tmd ssh -X -p 1234 user@server' # enable X11 forwarding and specify port
Just know that there is a bug where older versions of Tmux don't recognize Alacritty and give an error:
open terminal failed: missing or unsuitable terminal: alacritty
But you can fix this by specifying the TERM
environment variable like this:
/usr/bin/alacritty -e ssh -t user@myserver 'export TERM=xterm-256color; bash'
So the alias should look like this:
alias myserver='/usr/bin/alacritty --title "MyServer (SSH)" -e ssh -t user@myserver "export TERM=xterm-256color; bash" >/dev/null 2>&1 & disown'
Just put your server information instead of "myserver". You can even specify a window title so you always know what it is.
I recommend turning on the auto-loading of Tmux for your TTY and SSH sessions. See the Configuration section in the Extreme Ultimate .bashrc readme file where you can set these options in your configuration or environment files:
# Automatically launch TMUX terminal multiplexer in local, TTY, or SSH sessions
# https://github.com/tmux/tmux/wiki
# Since TMUX is pre-installed on most systems, these must be enabled here
_TMUX_LOAD_TTY=true
_TMUX_LOAD_SSH=true
_TMUX_LOAD_LOCAL=false
If you use drop down terminals like Yakuake, Tilda, or Guake, just set _TMUX_LOAD_LOCAL=true
since we don't need to worry about multiple instances of the terminal since there is only one.