Autostart apps, powermenu on Super+Shift+E, tmux and sysadmin shell helpers
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
# Sysadmin helpers. Tools that are not installed are skipped silently.
|
||||
|
||||
# --- systemd / logs / network ---
|
||||
alias sc='systemctl'
|
||||
alias scu='systemctl --user'
|
||||
alias jc='journalctl'
|
||||
alias jcf='journalctl -f'
|
||||
alias jce='journalctl -p err -b' # errors since boot
|
||||
alias ports='ss -tulpn' # listening sockets
|
||||
alias myip='curl -s ifconfig.me; echo'
|
||||
alias df='df -hT -x tmpfs -x devtmpfs'
|
||||
alias free='free -h'
|
||||
alias dnfu='sudo dnf upgrade --refresh'
|
||||
|
||||
# --- safer defaults ---
|
||||
alias cp='cp -iv'
|
||||
alias mv='mv -iv'
|
||||
alias mkdir='mkdir -pv'
|
||||
|
||||
# --- nicer replacements, enabled when installed ---
|
||||
if command -v eza >/dev/null; then
|
||||
alias ls='eza --icons --group-directories-first'
|
||||
alias ll='eza -lah --icons --group-directories-first --git'
|
||||
alias lt='eza --tree --level=2 --icons'
|
||||
else
|
||||
alias ll='ls -lah --color=auto'
|
||||
fi
|
||||
command -v bat >/dev/null && alias cat='bat --paging=never --style=plain'
|
||||
command -v zoxide >/dev/null && eval "$(zoxide init zsh)"
|
||||
if command -v fzf >/dev/null; then
|
||||
for f in /usr/share/fzf/shell/key-bindings.zsh /usr/share/fzf/shell/completion.zsh; do [ -r "$f" ] && source "$f"; done
|
||||
export FZF_DEFAULT_OPTS='--height=40% --layout=reverse --border --color=bg+:#3b4261,fg+:#c0caf5,hl:#bb9af7,hl+:#bb9af7,pointer:#ff9e64,prompt:#7dcfff'
|
||||
fi
|
||||
|
||||
# --- tmux: attach to "main" or create it ---
|
||||
tm() { tmux new-session -A -s "${1:-main}"; }
|
||||
@@ -0,0 +1,53 @@
|
||||
# Меняем префикс на Ctrl+A
|
||||
unbind C-b
|
||||
set -g prefix C-a
|
||||
bind C-a send-prefix
|
||||
|
||||
# Включаем поддержку мыши (чтобы скроллить и кликать по панелям как в GUI!)
|
||||
set -g mouse on
|
||||
|
||||
# ---------- Usability ----------
|
||||
set -g base-index 1 # windows and panes start at 1
|
||||
setw -g pane-base-index 1
|
||||
set -g renumber-windows on
|
||||
set -g escape-time 10 # no lag on Esc (vim)
|
||||
set -g history-limit 50000
|
||||
set -g focus-events on
|
||||
set -g set-clipboard on # copy from tmux into the system clipboard (OSC52, kitty)
|
||||
set -g default-terminal "tmux-256color"
|
||||
set -ag terminal-overrides ",xterm-kitty:RGB"
|
||||
setw -g aggressive-resize on
|
||||
|
||||
# Splits in the current directory, intuitive keys
|
||||
bind | split-window -h -c "#{pane_current_path}"
|
||||
bind - split-window -v -c "#{pane_current_path}"
|
||||
bind c new-window -c "#{pane_current_path}"
|
||||
unbind '"'
|
||||
unbind %
|
||||
|
||||
# Vim-style pane navigation / resize
|
||||
bind h select-pane -L
|
||||
bind j select-pane -D
|
||||
bind k select-pane -U
|
||||
bind l select-pane -R
|
||||
bind -r H resize-pane -L 5
|
||||
bind -r J resize-pane -D 5
|
||||
bind -r K resize-pane -U 5
|
||||
bind -r L resize-pane -R 5
|
||||
|
||||
# Reload config
|
||||
bind r source-file ~/.tmux.conf \; display-message "tmux.conf reloaded"
|
||||
|
||||
# ---------- Look (Tokyo Night, matches kitty) ----------
|
||||
set -g status-position top
|
||||
set -g status-interval 5
|
||||
set -g status-style "bg=#1f2335,fg=#a9b1d6"
|
||||
set -g status-left-length 30
|
||||
set -g status-left "#[bg=#bb9af7,fg=#11111b,bold] #S #[bg=#1f2335,fg=#bb9af7] "
|
||||
set -g status-right-length 60
|
||||
set -g status-right "#[fg=#7dcfff]#{?client_prefix,PREFIX ,}#[fg=#a9b1d6]#H #[fg=#565f89]| #[fg=#a9b1d6]%d.%m %H:%M "
|
||||
setw -g window-status-format " #I:#W "
|
||||
setw -g window-status-current-format "#[bg=#3b4261,fg=#c0caf5,bold] #I:#W "
|
||||
set -g pane-border-style "fg=#3b4261"
|
||||
set -g pane-active-border-style "fg=#bb9af7"
|
||||
set -g message-style "bg=#bb9af7,fg=#11111b"
|
||||
Reference in New Issue
Block a user