bump
This commit is contained in:
parent
85571584eb
commit
ea74014351
4 changed files with 16 additions and 8 deletions
|
|
@ -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}"}
|
||||
|
|
|
|||
|
|
@ -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 = []
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
5
.zshrc
5
.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
|
||||
|
|
|
|||
Loading…
Reference in a new issue