Compare commits

...

11 commits

Author SHA1 Message Date
t0xa
a86d3bc789 Polybar: update some things 2025-08-23 17:19:01 +03:00
t0xa
da2e707294 tmux: Add ivideon tmuster script 2025-08-21 10:33:06 +03:00
t0xa
5d72c3c1ba zsh: make some cleaning in config file 2025-08-21 09:39:52 +03:00
a.shalimov
4e49c8892e tmux: new version of config
- Remove theme
- Set some new configs
2025-08-21 09:36:21 +03:00
a.shalimov
8bed8cde21 i3: disable rofi alt-tab binding for now 2025-08-21 09:31:44 +03:00
18e2de10b8 i3: add rofi "alt-tab" binding 2025-08-20 10:59:21 +03:00
c5cf9b4570 Update ubuntu system install script:add pavucontrol to apt for installation 2025-08-17 13:37:18 +03:00
f3d2c44498 Add tmuster for ivideon and update tmux conf 2025-08-15 08:41:59 +03:00
54fc46dd2e Tmux: add tmuster script for ivideon 2025-08-13 11:45:56 +03:00
c183da90f1 Update neovim submodule 2025-08-08 17:20:54 +03:00
185f91c026 Update ubuntu system installation script 2025-08-08 17:20:44 +03:00
9 changed files with 670 additions and 107 deletions

View file

@ -58,6 +58,7 @@ bindsym $mod+Shift+q kill
# start dmenu (a program launcher) # start dmenu (a program launcher)
bindsym $mod+d exec --no-startup-id rofi -show run bindsym $mod+d exec --no-startup-id rofi -show run
# bindsym $mod+s exec --no-startup-id rofi -show
# A more modern dmenu replacement is rofi: # A more modern dmenu replacement is rofi:
# bindcode $mod+40 exec "rofi -modi drun,run -show drun" # bindcode $mod+40 exec "rofi -modi drun,run -show drun"
# There also is i3-dmenu-desktop which only displays applications shipping a # There also is i3-dmenu-desktop which only displays applications shipping a
@ -172,7 +173,7 @@ bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcu
# bindsym Mod1+Shift+t [class="Telegram"] focus # bindsym Mod1+Shift+t [class="Telegram"] focus
# bindsym Mod1+Shift+b [class="Brave-browser"] focus # bindsym Mod1+Shift+b [class="Brave-browser"] focus
bindsym Ctrl+Shift+b exec --no-startup-id sh -c 'i3-msg "[class=\"Brave-browser\"] focus" || brave' bindsym Ctrl+Shift+b exec --no-startup-id sh -c 'i3-msg "[class=\"Brave-browser\"] focus" || brave-browser'
bindsym Ctrl+Shift+o exec --no-startup-id sh -c 'i3-msg "[class=\"obsidian\"] focus" || obsidian' bindsym Ctrl+Shift+o exec --no-startup-id sh -c 'i3-msg "[class=\"obsidian\"] focus" || obsidian'
bindsym $mod+Return exec --no-startup-id sh -c 'i3-msg "[class=\"kitty\"] focus" || ~/.local/kitty.app/bin/kitty' bindsym $mod+Return exec --no-startup-id sh -c 'i3-msg "[class=\"kitty\"] focus" || ~/.local/kitty.app/bin/kitty'
bindsym Ctrl+Shift+t exec --no-startup-id sh -c 'i3-msg "[class=\"Telegram\"] focus" || Telegram' bindsym Ctrl+Shift+t exec --no-startup-id sh -c 'i3-msg "[class=\"Telegram\"] focus" || Telegram'

2
nvim

@ -1 +1 @@
Subproject commit 18cccb3aa5047f0c56f03e46ed311f04bb2f1f04 Subproject commit 80cf245e7952a633e06849406c742831af0ddaac

View file

@ -71,7 +71,7 @@ font-0 = JetBrainsMonoNL Nerd Font Mono;3
; modules-left = i3 xwindow ; modules-left = i3 xwindow
modules-left = i3 modules-left = i3
modules-right = filesystem_root filesystem_home pulseaudio memory cpu xkeyboard date modules-right = filesystem_root pulseaudio memory cpu xkeyboard date
cursor-click = pointer cursor-click = pointer
cursor-scroll = ns-resize cursor-scroll = ns-resize

62
scripts/tmuster_ivideon Executable file
View file

@ -0,0 +1,62 @@
#!/usr/bin/env bash
IVIDEON_ROOT=Backend
PERSONAL_ROOT=Personal
ROOT_PATH="/home/t0xa/Work/root"
change_dir_and_activate_root_env(){
# Get first argument and set True if not provided
local env_activate="${1:-True}"
# Go to project path
tmux send-keys "cd ${ROOT_PATH}" C-m
if [[ "$env_activate" != "False" ]]; then
tmux send-keys "source /home/t0xa/Work/root/venv/bin/activate" C-m
fi
# Clear terminal
tmux send-keys "clear" C-m
}
# Kill IVIDEON_ROOT if existst
tmux kill-ses -t "${IVIDEON_ROOT}"
tmux kill-ses -t "${PERSONAL_ROOT}"
# Create detached sesssion with default IDE window
tmux new-ses -d -s ${IVIDEON_ROOT} -n IDE
# Go to project path
change_dir_and_activate_root_env True
# Split IDE window in half
tmux split-window -v
change_dir_and_activate_root_env False
# Some resizing
tmux resize-pane -D 15
# Create additional windows
# Runners window
tmux new-window -n Lazydocker -t ${IVIDEON_ROOT}
change_dir_and_activate_root_env False
tmux send-keys "lazydocker" C-m
# Git manipulation window
tmux new-window -n Project -t ${IVIDEON_ROOT}
# Go to project directory and acivate env
change_dir_and_activate_root_env False
# Scripts manipulation window
tmux new-window -n Scripts -t ${IVIDEON_ROOT}
# Go to scripts directory
change_dir_and_activate_root_env False
# Bash manipulation window
tmux new-window -n Bash -t ${IVIDEON_ROOT}
change_dir_and_activate_root_env False
# Create new session for personal use
tmux new-ses -d -s ${PERSONAL_ROOT} -n Programming
tmux new-window -n VPN -t ${PERSONAL_ROOT}
# Attach to created workspace
tmux attach -t ${IVIDEON_ROOT}:IDE

View file

@ -0,0 +1,509 @@
#!/bin/bash
set -euo pipefail
echo "Ubuntu installation start"
GIT_USER="${1:-}"
GIT_PASSWORD="${2:-}"
if [ -z "$GIT_USER" ] || [ -z "$GIT_PASSWORD" ]; then
echo "❌ Usage: $0 <GIT_USER> <GIT_PASSWORD>"
exit 1
fi
BASIC_PACKAGES=(
curl
tmux
git
wget
htop
mc
fzf
ripgrep
ca-certificates
rofi
polybar
i3
zsh
python3-venv
python3-pip
fd-find
pavucontrol
)
# ====== INSTALL BRAVE =========
install_nerd_font_jetbrains() {
echo "==> Installing JetBrainsMono Nerd Font..."
set -e
FONT_DIR="$HOME/.local/share/fonts"
FONT_NAME="JetBrainsMono Nerd Font"
FONT_CHECK=$(fc-list | grep -i "JetBrainsMono Nerd Font" || true)
if [[ -n "$FONT_CHECK" ]]; then
echo "$FONT_NAME Alredy installed, skipping"
return
fi
mkdir -p "$FONT_DIR"
TMP_DIR=$(mktemp -d)
cd "$TMP_DIR"
echo "-> Downloading font..."
curl -fLo "JetBrainsMono.zip" https://github.com/ryanoasis/nerd-fonts/releases/latest/download/JetBrainsMono.zip
echo "-> Unpacking to $TMP_DIR..."
unzip -q JetBrainsMono.zip -d "$FONT_DIR"
echo "-> Updading cache..."
fc-cache -fv > /dev/null
echo "Nerd font installed"
}
# ====== INSTALL BRAVE =========
install_brave() {
curl -fsS https://dl.brave.com/install.sh | sh
}
# ====== INSTALL PACKAGES ======
install_apt_packages() {
echo "==> Updating package index..."
sudo apt update
echo "==> Installing required packages..."
sudo apt install -y "${BASIC_PACKAGES[@]}"
}
# ====== GIT CONFIG CLONE ======
pull_configs_from_repo(){
local REPO_URL="https://${GIT_USER}:${GIT_PASSWORD}@git.pro100code.ru/t0xa/configs_collection.git"
mkdir -p "$HOME/Programming"
if [ -d "$HOME/Programming/configs_collection" ]; then
echo "SKIP:CONFIG PULL - Config collection already exists, skipping..."
else
git clone --recurse-submodules "$REPO_URL" "$HOME/Programming/configs_collection"
fi
}
# ====== SYMLINK CONFIGS ======
create_symlink(){
local SOURCE="$1"
local TARGET="$2"
echo "Linking $SOURCE -> $TARGET"
if [ -L "$TARGET" ]; then
if [ "$(readlink "$TARGET")" == "$SOURCE" ]; then
echo "Already linked"
else
echo "Link points elsewhere. Replacing..."
rm "$TARGET"
ln -s "$SOURCE" "$TARGET"
fi
elif [ -e "$TARGET" ]; then
echo "$TARGET exists as file/dir, skipping"
else
ln -s "$SOURCE" "$TARGET"
echo "Linked"
fi
}
create_symlinks_from_configs_collection(){
local BASE="$HOME/Programming/configs_collection"
mkdir -p "$HOME/.config"
mkdir -p "$HOME/.config/kitty"
mkdir -p "$HOME/.config/polybar"
mkdir -p "$HOME/.config/i3"
create_symlink "$BASE/nvim" "$HOME/.config/nvim"
create_symlink "$BASE/tmux/.tmux.conf" "$HOME/.tmux.conf"
create_symlink "$BASE/kitty/themes" "$HOME/.config/kitty/themes"
create_symlink "$BASE/kitty/kitty.conf" "$HOME/.config/kitty/kitty.conf"
create_symlink "$BASE/polybar/config.ini" "$HOME/.config/polybar/config.ini"
create_symlink "$BASE/polybar/launch.sh" "$HOME/.config/polybar/launch.sh"
create_symlink "$BASE/polybar/mocha.ini" "$HOME/.config/polybar/mocha.ini"
rm -f "$HOME/.zshrc"
create_symlink "$BASE/zsh/.zshrc" "$HOME/.zshrc"
create_symlink "$BASE/i3/config" "$HOME/.config/i3/config"
}
# ====== OBSIDIAN ======
install_obsidian() {
local INSTALL_DIR="$HOME/Applications"
local APPIMAGE_URL="https://github.com/obsidianmd/obsidian-releases/releases/download/v1.8.10/Obsidian-1.8.10.AppImage"
local APPIMAGE_PATH="$INSTALL_DIR/Obsidian.AppImage"
if [ -f "$APPIMAGE_PATH" ]; then
echo "SKIP:Obsidian install - Obsidian already installed"
return
fi
mkdir -p "$INSTALL_DIR"
curl -L "$APPIMAGE_URL" -o "$APPIMAGE_PATH"
chmod +x "$APPIMAGE_PATH"
sudo ln -sf "$APPIMAGE_PATH" /usr/local/bin/obsidian
echo "Obsidian installed"
}
# ====== SSH CONFIG ======
add_ssh_host_config() {
local SSH_CONFIG="$HOME/.ssh/config"
local HOST_ENTRY="Host git.pro100code.ru"
local PORT_ENTRY=" Port 2244"
mkdir -p "$HOME/.ssh"
touch "$SSH_CONFIG"
if ! grep -q -E "^Host\s+git\.pro100code\.ru" "$SSH_CONFIG"; then
echo -e "\n$HOST_ENTRY\n$PORT_ENTRY" >> "$SSH_CONFIG"
echo "Host config added"
else
echo "SKIP:SSH git.pro100code setup - Host config already exists..."
fi
}
# ====== SSH KEY ======
generate_ssh_key() {
local EMAIL="pro100ton@gmail.com"
local KEY_PATH="$HOME/.ssh/id_ed25519"
if [ -f "$KEY_PATH" ]; then
echo "SKIP:SSH key generation - SSH key exists"
else
ssh-keygen -t ed25519 -C "$EMAIL" -f "$KEY_PATH" -N ""
echo "SSH key created"
fi
echo "Public key:"
cat "$KEY_PATH.pub"
}
# ====== TPM ======
install_tpm() {
local TPM_DIR="$HOME/.tmux/plugins/tpm"
if [ -d "$TPM_DIR" ]; then
echo "TPM already installed"
else
git clone https://github.com/tmux-plugins/tpm "$TPM_DIR"
fi
}
# ===== INSTALL DOCKER =====
install_docker() {
set -e
echo "==> Begin docker installation"
echo "Installing dependencies..."
# Add Docker's official GPG key:
sudo apt-get update
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
# Add the repository to Apt sources:
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
echo "Adding $USER to docker group..."
sudo usermod -aG docker "$USER"
}
# Config ZSH
config_zsh() {
# Install P10K
local ZSH_CUSTOM="$HOME/.oh-my-zsh/custom"
local P10K_DIR="$ZSH_CUSTOM/themes/powerlevel10k"
echo "Installing Oh my ZSH..."
# rm -rf "$HOME/.oh-my-zsh"
# RUNZSH=no CHSH=no KEEP_ZSHRC=yes sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
#
if [ ! -d "$HOME/.oh-my-zsh" ]; then
echo "Installing Oh My Zsh..."
RUNZSH=no CHSH=no KEEP_ZSHRC=yes sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
else
echo "Oh My Zsh already installed"
fi
# Installing plugins
# zsh-autosuggestions
if [ ! -d "$ZSH_CUSTOM/plugins/zsh-autosuggestions" ]; then
git clone https://github.com/zsh-users/zsh-autosuggestions "$ZSH_CUSTOM/plugins/zsh-autosuggestions"
fi
# zsh-fzf-history-search
if [ ! -d "$ZSH_CUSTOM/plugins/zsh-fzf-history-search" ]; then
git clone https://github.com/joshskidmore/zsh-fzf-history-search "$ZSH_CUSTOM/plugins/zsh-fzf-history-search"
fi
# powerlevel10k
if [ ! -d "$ZSH_CUSTOM/themes/powerlevel10k" ]; then
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git "$ZSH_CUSTOM/themes/powerlevel10k"
fi
# Make ZSH default shell
# if [ "$SHELL" != "/bin/zsh" ]; then
# echo "Changing shell to ZSH..."
# sudo chsh -s /bin/zsh $USER
# fi
local CURRENT_SHELL="$(which zsh)"
if [ "$SHELL" != "$CURRENT_SHELL" ]; then
echo "Changing shell to ZSH..."
sudo chsh -s "$CURRENT_SHELL" "$USER"
echo "!!! REMEMBER TO LOG OUT AND LOG IN AFTER SHELL CHANGE !!!"
fi
}
# ===== Kitty install =====
install_kitty() {
echo "==> Installing kitty terminal..."
set -e
if command -v kitty >/dev/null 2>&1; then
echo "Kitty already installed. Skipping"
return
fi
echo "-> Downloading installation script"
curl -L https://sw.kovidgoyal.net/kitty/installer.sh | sh /dev/stdin
echo "-> Creating symlink to /usr/local/bin/kitty"
sudo ln -sf "$HOME/.local/kitty.app/bin/kitty" /usr/local/bin/kitty
echo "Kitty has been installed!"
}
# ==== Install Neovim from source ====
install_neovim_from_source() {
echo "==> Installing neovim from source..."
set -e
if command -v nvim >/dev/null 2>&1; then
echo "Neovim already installed, skipping..."
return
fi
echo "-> Installing nevoim"
sudo apt update
sudo apt install -y ninja-build gettext cmake unzip curl build-essential
TMP_DIR=$(mktemp -d)
cd "$TMP_DIR"
git clone --depth 1 --branch stable https://github.com/neovim/neovim.git
cd neovim
echo "-> Building neovim..."
make CMAKE_BUILD_TYPE=Release
sudo make install
echo "Neovim has been installed!"
}
install_nodejs() {
echo "==> Installing Node.js and npm..."
set -e
if command -v node >/dev/null 2>&1; then
echo "Node.js is already installed. Skipping."
return
fi
# Download and run NodeSource installation script for LTS version
echo "Adding NodeSource repository for latest LTS version..."
curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
echo "Installing nodejs package..."
sudo apt install -y nodejs
echo "Configurating nevoim dependencies"
npm install -g neovim
echo "Node.js and npm have been successfully installed."
}
install_golang() {
echo "==> Installing Golang"
set -e
if command -v go >/dev/null 2>&1; then
echo "Go is already installed. Skipping."
return
fi
TMP_DIR=$(mktemp -d)
cd "$TMP_DIR"
LATEST_VERSION=$(curl -s https://go.dev/VERSION?m=text | head -n 1)
GO_URL="https://go.dev/dl/${LATEST_VERSION}.linux-amd64.tar.gz"
echo "Downloading $LATEST_VERSION from $GO_URL"
curl -LO "$GO_URL"
# Remove any existing Go installation
echo "Removing any existing Go installation in /usr/local/go"
sudo rm -rf /usr/local/go
# Extract Go archive to /usr/local
echo "Extracting and installing Go to /usr/local..."
sudo tar -C /usr/local -xzf "${LATEST_VERSION}.linux-amd64.tar.gz"
# Add Go to PATH if not already present
if ! grep -q '/usr/local/go/bin' "$HOME/.profile"; then
echo "Adding Go to PATH in ~/.profile..."
echo 'export PATH=$PATH:/usr/local/go/bin' >> "$HOME/.profile"
fi
echo "Go has been successfully installed."
echo "To start using Go, run: source ~/.profile"
}
update_lua(){
echo "==> Installing latest Lua and LuaRocks..."
set -e
if command -v lua >/dev/null 2>&1 && command -v luarocks >/dev/null 2>&1; then
echo "Lua and LuaRocks are already installed. Skipping."
return
fi
echo "Installing build dependencies..."
sudo apt update
sudo apt install -y build-essential curl unzip libreadline-dev
echo "Installing Lua..."
LUA_VERSION="5.1.5" # Neovim needs 5.1
cd /tmp
curl -R -O https://www.lua.org/ftp/lua-${LUA_VERSION}.tar.gz
tar -zxf lua-${LUA_VERSION}.tar.gz
cd lua-${LUA_VERSION}
make linux test
sudo make install
# Verify Lua
if ! command -v lua >/dev/null 2>&1; then
echo "Lua installation failed."
return 1
fi
# Install LuaRocks
echo "Installing LuaRocks..."
cd /tmp
LUAROCKS_VERSION="3.9.2" # Latest for Aug 2025
curl -L https://luarocks.org/releases/luarocks-${LUAROCKS_VERSION}.tar.gz -o luarocks.tar.gz
tar zxpf luarocks.tar.gz
cd luarocks-${LUAROCKS_VERSION}
./configure --with-lua-include=/usr/local/include
make
sudo make install
echo "Lua and LuaRocks successfully installed."
}
additional_commands(){
# Make pritty git log alias
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --"
}
install_lazygit() {
echo "==> Installing lazygit..."
set -e
if command -v lazygit >/dev/null 2>&1; then
echo "lazygit is already installed. Skipping."
return
fi
cd /tmp
echo "Fetching latest lazygit version..."
LAZYGIT_VERSION=$(curl -s https://api.github.com/repos/jesseduffield/lazygit/releases/latest | grep -oP '"tag_name": "\K(.*)(?=")')
echo "Downloading lazygit $LAZYGIT_VERSION..."
curl -Lo lazygit.tar.gz "https://github.com/jesseduffield/lazygit/releases/download/${LAZYGIT_VERSION}/lazygit_${LAZYGIT_VERSION#v}_Linux_x86_64.tar.gz"
echo "Extracting and installing..."
tar xf lazygit.tar.gz lazygit
sudo install lazygit /usr/local/bin/
echo "lazygit has been successfully installed."
}
install_lazydocker() {
echo "==> Installing lazydocker..."
set -e
if command -v lazydocker >/dev/null 2>&1; then
echo "lazydocker is already installed. Skipping."
return
fi
cd /tmp
echo "Fetching latest lazydocker version..."
LAZYDOCKER_VERSION=$(curl -s https://api.github.com/repos/jesseduffield/lazydocker/releases/latest | grep -oP '"tag_name": "\K(.*)(?=")')
echo "Downloading lazydocker $LAZYDOCKER_VERSION..."
curl -Lo lazydocker.tar.gz "https://github.com/jesseduffield/lazydocker/releases/download/${LAZYDOCKER_VERSION}/lazydocker_${LAZYDOCKER_VERSION#v}_Linux_x86_64.tar.gz"
echo "Extracting and installing..."
tar xf lazydocker.tar.gz lazydocker
sudo install lazydocker /usr/local/bin/
echo "lazydocker has been successfully installed."
}
main () {
install_apt_packages
pull_configs_from_repo
add_ssh_host_config
generate_ssh_key
install_golang
install_obsidian
install_tpm
install_brave
create_symlinks_from_configs_collection
install_docker
install_nerd_font_jetbrains
install_kitty
install_neovim_from_source
install_nodejs
install_lazygit
install_lazydocker
update_lua
additional_commands
config_zsh
}
main "$@"

View file

@ -1,14 +1,18 @@
# Base settings
set-option -sa terminal-overrides ",xterm*:Tc" set-option -sa terminal-overrides ",xterm*:Tc"
set -g mouse on set -g mouse on
set -g status-position top
set -g status-style "bg=default"
set -g status-justify absolute-centre
set -g status-left " #S"
set -g status-right ""
set -g window-status-format "#I:#W" # Index and Name
set -g window-status-current-format "#I:#W" # Current window
set -g window-status-current-style "fg=orange bg=default bold"
# List of plugins # List of plugins
set -g @plugin 'tmux-plugins/tpm' set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'christoomey/vim-tmux-navigator' set -g @plugin 'christoomey/vim-tmux-navigator'
# set -g @plugin 'dreamsofcode-io/catppuccin-tmux'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'egel/tmux-gruvbox'
set -g @tmux-gruvbox 'dark' # or 'light'
# Shift Alt vim keys to switch windows # Shift Alt vim keys to switch windows
bind -n M-P previous-window bind -n M-P previous-window
@ -20,21 +24,24 @@ set -g pane-base-index 1
set-window-option -g pane-base-index 1 set-window-option -g pane-base-index 1
set-option -g renumber-windows on set-option -g renumber-windows on
# set vi-mode
set-window-option -g mode-keys vi
# Custom bindings
# Base config
bind r source-file ~/.tmux.conf
# Open panes in the same directory # Open panes in the same directory
bind '"' split-window -v -c "#{pane_current_path}" bind '"' split-window -v -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}" bind % split-window -h -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
# set vi-mode # Keybindings for VI mode
set-window-option -g mode-keys vi
# keybindings
bind-key -T copy-mode-vi v send-keys -X begin-selection bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle
bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel
# Theme
set -g window-status-format "#I:#W" # Index and Name
set -g window-status-current-format "#I:#W" # Current window
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm' run '~/.tmux/plugins/tpm/tpm'
@ -44,5 +51,3 @@ bind-key -r -T prefix C-Down resize-pane -D 10
bind-key -r -T prefix C-Left resize-pane -L 10 bind-key -r -T prefix C-Left resize-pane -L 10
bind-key -r -T prefix C-Right resize-pane -R 10 bind-key -r -T prefix C-Right resize-pane -R 10
# Move status bar to top or bottom
set-option -g status-position bottom

View file

@ -2,3 +2,6 @@
1. Копируем в `~/.` папку, чтобы было: `~/.tmux.conf` 1. Копируем в `~/.` папку, чтобы было: `~/.tmux.conf`
2. Выходим из tmux 2. Выходим из tmux
3. Заходим обратно и выполняем `prefix + I` 3. Заходим обратно и выполняем `prefix + I`
# tmuster_ivideon.sh
Скрипт для запуска окружения tmux для работы с проектами ivideon

65
tmux/tmuster_ivideon.sh Normal file
View file

@ -0,0 +1,65 @@
#!/usr/bin/env bash
IVIDEON_ROOT=Backend
PERSONAL_ROOT=Personal
ROOT_PATH="/home/t0xa/Work/root"
change_dir_and_activate_root_env(){
# Get first argument and set True if not provided
local env_activate="${1:-True}"
# Go to project path
tmux send-keys "cd ${ROOT_PATH}" C-m
if [[ "$env_activate" != "False" ]]; then
tmux send-keys "source /home/t0xa/Work/root/venv/bin/activate" C-m
fi
# Clear terminal
tmux send-keys "clear" C-m
}
# Kill IVIDEON_ROOT if existst
tmux kill-ses -t "${IVIDEON_ROOT}"
tmux kill-ses -t "${PERSONAL_ROOT}"
# Create detached sesssion with default IDE window
tmux new-ses -d -s ${IVIDEON_ROOT} -n IDE
tmux send-keys "nvim bootstrap.py" C-m
# Go to project path
change_dir_and_activate_root_env True
# Split IDE window in half
tmux split-window -v
change_dir_and_activate_root_env False
# Some resizing
tmux resize-pane -D 15
# Create additional windows
# Git manipulation window
tmux new-window -n cloud-env -t ${IVIDEON_ROOT}
# Go to project directory and acivate env
change_dir_and_activate_root_env
tmux send-keys "cd ${ROOT_PATH}/ivideon/tests" C-m
tmux send-keys "clear" C-m
# Scripts manipulation window
tmux new-window -n Scripts -t ${IVIDEON_ROOT}
# Go to scripts directory
change_dir_and_activate_root_env False
# Bash manipulation window
tmux new-window -n Bash -t ${IVIDEON_ROOT}
change_dir_and_activate_root_env False
# Runners window
tmux new-window -n Lazydocker -t ${IVIDEON_ROOT}
change_dir_and_activate_root_env False
tmux send-keys "lazydocker" C-m
# Create new session for personal use
tmux new-ses -d -s ${PERSONAL_ROOT} -n Programming
tmux new-window -n VPN -t ${PERSONAL_ROOT}
# Attach to created workspace
t

View file

@ -5,78 +5,13 @@ if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi fi
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation. # Path to your oh-my-zsh installation.
export ZSH="$HOME/.oh-my-zsh" export ZSH="$HOME/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will # ZSH theme
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
ZSH_THEME="powerlevel10k/powerlevel10k" ZSH_THEME="powerlevel10k/powerlevel10k"
# Set list of themes to pick from when loading at random # Plugins settings
# Setting this variable when ZSH_THEME=random will cause zsh to load
# a theme from this variable instead of looking in $ZSH/themes/
# If set to an empty array, this variable will have no effect.
# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" )
# Uncomment the following line to use case-sensitive completion.
# CASE_SENSITIVE="true"
# Uncomment the following line to use hyphen-insensitive completion.
# Case-sensitive completion must be off. _ and - will be interchangeable.
# HYPHEN_INSENSITIVE="true"
# Uncomment one of the following lines to change the auto-update behavior
# zstyle ':omz:update' mode disabled # disable automatic updates
# zstyle ':omz:update' mode auto # update automatically without asking
# zstyle ':omz:update' mode reminder # just remind me to update when it's time
# Uncomment the following line to change how often to auto-update (in days).
# zstyle ':omz:update' frequency 13
# Uncomment the following line if pasting URLs and other text is messed up.
# DISABLE_MAGIC_FUNCTIONS="true"
# Uncomment the following line to disable colors in ls.
# DISABLE_LS_COLORS="true"
# Uncomment the following line to disable auto-setting terminal title.
# DISABLE_AUTO_TITLE="true"
# Uncomment the following line to enable command auto-correction.
# ENABLE_CORRECTION="true"
# Uncomment the following line to display red dots whilst waiting for completion.
# You can also set it to another string to have that shown instead of the default red dots.
# e.g. COMPLETION_WAITING_DOTS="%F{yellow}waiting...%f"
# Caution: this setting can cause issues with multiline prompts in zsh < 5.7.1 (see #5765)
# COMPLETION_WAITING_DOTS="true"
# Uncomment the following line if you want to disable marking untracked files
# under VCS as dirty. This makes repository status check for large repositories
# much, much faster.
# DISABLE_UNTRACKED_FILES_DIRTY="true"
# Uncomment the following line if you want to change the command execution time
# stamp shown in the history command output.
# You can set one of the optional three formats:
# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
# or set a custom format using the strftime function format specifications,
# see 'man strftime' for details.
# HIST_STAMPS="mm/dd/yyyy"
# Would you like to use another custom folder than $ZSH/custom?
# ZSH_CUSTOM=/path/to/new-custom-folder
# Which plugins would you like to load?
# Standard plugins can be found in $ZSH/plugins/
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=( plugins=(
git git
zsh-autosuggestions zsh-autosuggestions
@ -85,29 +20,7 @@ plugins=(
source $ZSH/oh-my-zsh.sh source $ZSH/oh-my-zsh.sh
# User configuration # Custom aliases
# export MANPATH="/usr/local/man:$MANPATH"
# You may need to manually set your language environment
# export LANG=en_US.UTF-8
# Preferred editor for local and remote sessions
# if [[ -n $SSH_CONNECTION ]]; then
# export EDITOR='vim'
# else
# export EDITOR='mvim'
# fi
# Compilation flags
# export ARCHFLAGS="-arch x86_64"
# Set personal aliases, overriding those provided by oh-my-zsh libs,
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
# For a full list of active aliases, run `alias`.
#
# Example aliases
alias nvimzsh="nvim ~/.zshrc" alias nvimzsh="nvim ~/.zshrc"
# alias ls="ls -l" # alias ls="ls -l"
# alias ohmyzsh="mate ~/.oh-my-zsh" # alias ohmyzsh="mate ~/.oh-my-zsh"
@ -139,3 +52,8 @@ export OBSIDIAN_NOTES_PATH="/home/pro100ton/Documents/t0xa_vault"
bindkey -v bindkey -v
bindkey '^R' fzf_history_search bindkey '^R' fzf_history_search
export PYENV_ROOT="$HOME/.pyenv"
[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init - zsh)"
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh