Skip to content

Commit 87106c4

Browse files
committed
refactor: zsh path and tmux
1 parent 64debdc commit 87106c4

File tree

7 files changed

+29
-20
lines changed

7 files changed

+29
-20
lines changed

.config/task/taskrc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ uda.size.type=string
5555
uda.size.label=Size
5656
uda.size.values=S,M,L,XL,XXL
5757

58-
priority.values=P1,P2,P3,P4,P5
59-
priority.default=P2
58+
uda.priority.values=P1,P2,P3,P4,P5
59+
uda.priority.default=P2
6060

6161
urgency.uda.size.s.coefficient=0.0
6262
urgency.uda.size.m.coefficient=0.2

.config/tmux/tmux.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
set -g set-titles on
2-
set-environment -g PATH "/opt/homebrew/bin:/bin:/usr/bin"
32

43
# mouse mode on
54
set -g mouse on
@@ -44,6 +43,7 @@ tmux-plugins/tmux-resurrect \
4443
tmux-plugins/tmux-continuum \
4544
tmux-plugins/tmux-sensible \
4645
fcsonline/tmux-thumbs \
46+
alberti42/tmux-fzf-links \
4747
'
4848

4949
set -g pane-active-border-style bg=color0

.config/zsh/fzf/scripts.zsh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,9 @@ zr() {
3838
[ -n "$dir" ] && z "$dir"
3939
}
4040

41+
fd() {
42+
preview="git diff $@ --color=always -- {-1}"
43+
git diff $@ --name-only | fzf -m --ansi --preview $preview
44+
}
4145

4246

.zprofile

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
#!/usr/bin/env zsh
22

3-
# Additional PATH entries
3+
if [ -n "$HOMEBREW_PREFIX" ] && [ -x "$HOMEBREW_PREFIX/bin/brew" ]; then
4+
eval "$($HOMEBREW_PREFIX/bin/brew shellenv)"
5+
fi
6+
47
path=(
5-
$HOME/.local/bin
6-
$HOME/.cargo/bin
7-
$HOME/.opencode/bin
8+
/usr/local/sbin
9+
/usr/sbin
10+
/sbin
811
$path
912
)
1013

.zshenv

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#!/usr/bin/env zsh
22

3+
# Deduplicate PATH entries
4+
typeset -U path
5+
36
# Platform detection
47
case "$(uname -s)" in
58
Darwin)
@@ -22,10 +25,12 @@ case "$(uname -s)" in
2225
;;
2326
esac
2427

25-
# Initialize Homebrew environment if it exists
26-
if [ -n "$HOMEBREW_PREFIX" ] && [ -x "$HOMEBREW_PREFIX/bin/brew" ]; then
27-
eval "$($HOMEBREW_PREFIX/bin/brew shellenv)"
28-
fi
28+
path=(
29+
$HOME/.local/bin
30+
$HOME/.cargo/bin
31+
$HOME/.opencode/bin
32+
$path
33+
)
2934

3035
# Dynamically detect dotfiles directory from this file's location
3136
# This works both locally and in CI where the repo path may differ

.zshrc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,8 @@ fi
5757

5858
# End profiling
5959
# zprof
60-
export PATH="$HOME/.local/bin:$PATH"
60+
61+
62+
# task2habitica Habitica credentials
63+
export HABITICA_USER_ID="8d0152d8-a4b3-4bf3-8636-519a0a18404d"
64+
export HABITICA_API_KEY="7c20e2b9-225f-4e73-8578-f343c2b39829"

install.sh

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -169,18 +169,11 @@ install_homebrew() {
169169
if [ -d /home/linuxbrew/.linuxbrew ]; then
170170
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
171171

172-
# Add to shell profiles
172+
# Add to shell profiles (only .profile, since .zshenv handles zsh via HOMEBREW_PREFIX)
173173
# shellcheck disable=SC2016
174174
if ! grep -q "linuxbrew" "$HOME/.profile" 2>/dev/null; then
175175
echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> "$HOME/.profile"
176176
fi
177-
178-
if [ -f "$HOME/.zshrc" ]; then
179-
# shellcheck disable=SC2016
180-
if ! grep -q "linuxbrew" "$HOME/.zshrc"; then
181-
echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> "$HOME/.zshrc"
182-
fi
183-
fi
184177
fi
185178
;;
186179
esac

0 commit comments

Comments
 (0)