Skip to content

Commit

Permalink
tmux updates with cpu tracking and some cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
joeyagreco committed Feb 25, 2025
1 parent 408c49c commit 4f867f9
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .tmux.conf
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ set -g @white "#FFFFFF"
###########

# refresh status bar every n seconds
set -g status-interval 10
set -g status-interval 3

# Start windows and panes at 1, not 0
# you can't 1 index sessions. why? that's a great question.
Expand Down Expand Up @@ -146,7 +146,7 @@ bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel
set -g status-right-length 100
set -g status-style "bg=#{@purple},fg=#{@teal}"
# e.g. '84% • Monday May 27 • 4:34 PM'
set -g status-right "#(~/scripts/bash/battery.sh) • %A %B %-e • %-I:%M %p "
set -g status-right "#(~/scripts/bash/cpu.sh) • #(~/scripts/bash/battery.sh) • %A %B %-e • %-I:%M %p "

# Show session name and window number on the bottom left
# max length of side
Expand Down
7 changes: 7 additions & 0 deletions scripts/bash/cpu.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

# get current cpu usage
# top -l 1 | grep -E "^CPU" | grep -Eo '[^[:space:]]+%' | head -1

echo -n ""
top -l 1 | grep -E "^CPU" | grep -Eo '[^[:space:]]+%' | head -1
3 changes: 2 additions & 1 deletion zsh/aliases.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ alias gitf='git fetch --all'
alias emptycommit='git commit --allow-empty --no-verify -m '\''empty commit'\'' && git push'
# [g]it[c]ommit[n]o[v]erify
alias gcnv="git commit --no-verify"
# list the n most recent git branches
# list the 10 most recent git branches
# [g]it[r]ecent[b]ranches
alias grb="git for-each-ref --sort=-committerdate refs/heads/ --format='%(refname:short)' | head -n 10"
# push to branch that only exists locally and set upstream
Expand All @@ -85,4 +85,5 @@ alias gpu='git push --set-upstream origin $(git rev-parse --abbrev-ref HEAD)'
# list commits on current branch that have not been pushed to remote
# [g]it[c]ommits[r]emote
alias gcr='git log @{u}..HEAD'
# [g]it[c]ommit[p]ush
alias gcp='git commit -am "quick commit" && git push'
3 changes: 0 additions & 3 deletions zsh/sourcing.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,6 @@ zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}'
setopt NO_CASE_GLOB
setopt EXTENDED_GLOB

# # enable tab completion
# autoload -U compinit promptinit

# no duplicates in terminal command history
setopt HIST_IGNORE_DUPS

Expand Down

0 comments on commit 4f867f9

Please sign in to comment.