Enhance shell widgets, tmux status, and git colors
- Add frecency scoring + git status boost to ^E edit widget - Add network latency indicator to tmux status bar (wifi/wired detection, 10s cache) - Add powerline separators between tmux status sections - Swap git status colors: modified=bluish grey, untracked=amber (prompt, gitconfig, widget) - Remove bold from feature branch name in prompt - Add gw (git show) and gdm (diff against default branch) aliases Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -145,7 +145,7 @@ _dots_git_info_sync() {
|
||||
elif [[ "$branch" == (main|master) ]]; then
|
||||
branch_pill="${_dots_pc[dark_bg]}${_dots_pc[dark]}(${_dots_pc[grey]}${branch}${_dots_pc[reset]}${_dots_pc[dark_bg]}${_dots_pc[dark]})${_dots_pc[reset]}"
|
||||
else
|
||||
branch_pill="${_dots_pc[dark_bg]}${_dots_pc[dark]}(${_dots_pc[purple]}${_dots_pc[bold]}${branch}${_dots_pc[reset]}${_dots_pc[dark_bg]}${_dots_pc[dark]})${_dots_pc[reset]}"
|
||||
branch_pill="${_dots_pc[dark_bg]}${_dots_pc[dark]}(${_dots_pc[purple]}${branch}${_dots_pc[reset]}${_dots_pc[dark_bg]}${_dots_pc[dark]})${_dots_pc[reset]}"
|
||||
fi
|
||||
local info="$branch_pill"
|
||||
|
||||
@@ -156,11 +156,11 @@ _dots_git_info_sync() {
|
||||
sep=" "
|
||||
fi
|
||||
if (( unstaged )); then
|
||||
dirty+="${sep}${_dots_pc[orange]}~${unstaged}"
|
||||
dirty+="${sep}${_dots_pc[grey]}~${unstaged}"
|
||||
sep=" "
|
||||
fi
|
||||
if (( untracked )); then
|
||||
dirty+="${sep}${_dots_pc[grey]}?${untracked}"
|
||||
dirty+="${sep}${_dots_pc[orange]}?${untracked}"
|
||||
fi
|
||||
|
||||
local arrows=""
|
||||
|
||||
@@ -53,10 +53,10 @@ _dots_load_keybindings() {
|
||||
for (f in git) printf "100000\t%s\t%s\n", clr(git[f]), f
|
||||
}
|
||||
function clr(st) {
|
||||
if (st ~ /^\?\?/) return "\033[90m?\033[0m"
|
||||
if (st ~ /^\?\?/) return "\033[33m?\033[0m"
|
||||
if (st ~ /^R/) return "\033[36mR\033[0m"
|
||||
if (st ~ /^A/) return "\033[32mA\033[0m"
|
||||
if (st ~ /M/) return "\033[33mM\033[0m"
|
||||
if (st ~ /M/) return "\033[38;5;103mM\033[0m"
|
||||
return "\033[90m~\033[0m"
|
||||
}' /dev/null 2>/dev/null | sort -rn | cut -f2-
|
||||
rg --files --hidden --glob '!.git' 2>/dev/null | awk '{print " \t" $0}'
|
||||
|
||||
Reference in New Issue
Block a user