From ea74014351bb8c10c5bc4e4e01a621b33da4e112 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Doma=C5=84ski?= Date: Fri, 20 Mar 2026 15:52:55 +0100 Subject: [PATCH] bump --- .config/aliasrc/programs | 3 +++ .config/scriptrc/gen_aliases.py | 13 +++++++++---- .config/tmux/tmux.conf | 3 +++ .zshrc | 5 +---- 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/.config/aliasrc/programs b/.config/aliasrc/programs index 1561b03..3629a38 100755 --- a/.config/aliasrc/programs +++ b/.config/aliasrc/programs @@ -50,3 +50,6 @@ cpy() { py -c "import sys, pyperclip; pyperclip.copy(sys.stdin.read().strip())"; hlst() { history | tail --lines=1 | cut -d " " -f 4-; } lstc() { lst | cpy; } hlstc() { hlst | cpy; } + +# tmux +tmuxssn() {tmux display-message -p "#{session_name}:#{window_index}.#{pane_index}"} diff --git a/.config/scriptrc/gen_aliases.py b/.config/scriptrc/gen_aliases.py index f825e5a..50c49af 100644 --- a/.config/scriptrc/gen_aliases.py +++ b/.config/scriptrc/gen_aliases.py @@ -9,7 +9,11 @@ ENDING_DIRS = [".git", ".svn", ".hg", ".venv"] def subdirs(path): - return [d for d in os.listdir(path) if not d.startswith(".") and os.path.isdir(os.path.join(path, d))] + return [ + d + for d in os.listdir(path) + if not d.startswith(".") and os.path.isdir(os.path.join(path, d)) + ] def gen_aliases(dirs, prefix="", subpath=""): @@ -30,7 +34,9 @@ def gen_aliases(dirs, prefix="", subpath=""): aliases[prefix + d.lower()] = os.path.join(subpath, d) break - if all([dd == d or not dd.lower().startswith(k) for dd in dirs]) and not which(prefix + k): + if all( + [dd == d or not dd.lower().startswith(k) for dd in dirs] + ) and not which(prefix + k): aliases[prefix + k] = os.path.join(subpath, d) break @@ -59,11 +65,10 @@ def process_dir(path, prefix="", depth=0): def gen_alias(alias_name, path): - cmd = f"cd {path}" + cmd = f'cd {path} && [ -n "$TMUX" ] && tmux rename-session {alias_name}' return "alias {}='{}'".format(alias_name, cmd) - print("Generating aliases...") ALIASES = [] diff --git a/.config/tmux/tmux.conf b/.config/tmux/tmux.conf index e93e3f8..1969e60 100644 --- a/.config/tmux/tmux.conf +++ b/.config/tmux/tmux.conf @@ -71,6 +71,9 @@ set -g @plugin 'tinted-theming/base16-tmux' set -g @colors-base16 'ocean' +set -g status-left "[#{session_name}] " +set -g window-status-current-format "#I:#W [#{pane_index}/#{window_panes}]" +set -g window-status-format "#I:#W [#{pane_index}/#{window_panes}]" run '~/.tmux/plugins/tpm/tpm' # set vi-mode diff --git a/.zshrc b/.zshrc index 6727118..31b7083 100755 --- a/.zshrc +++ b/.zshrc @@ -25,7 +25,7 @@ NEWLINE=$'\n' PS1="%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[magenta]%}@%{$fg[blue]%}%M %{$fg[magenta]%}%(6~|...%3~|%~)%{$fg[red]%}]%{$fg[magenta]%}%-50(l:$ :$NEWLINE -> )%{$reset_color%}%b" # exports - local bin, python, brew -export PATH="$HOME/.local/bin:$HOME/.bin:$HOME/.cargo/bin:${HOME}/go/bin/:/opt/homebrew/bin:$PATH:$PATH" +export PATH="$HOME/.local/bin:$HOME/.bin:$HOME/.cargo/bin:${HOME}/go/bin/:/opt/homebrew/bin:$PATH:$HOME/.local/share/nvim/mason/bin:$HOME/.opencode/bin:$PATH" zstyle ':vcs_info:*' enable git hg svn zstyle ':vcs_info:*' check-for-changes true @@ -232,6 +232,3 @@ if [ -f "$HOME/.config/.env" ]; then fi export STM32_PRG_PATH=/Applications/STMicroelectronics/STM32Cube/STM32CubeProgrammer/STM32CubeProgrammer.app/Contents/MacOs/bin - -# opencode -export PATH=/Users/doman/.opencode/bin:$PATH