Skip to content

Commit cb6872e

Browse files
committed
zsh: make ubuntu compatible
1 parent d143c3a commit cb6872e

4 files changed

Lines changed: 79 additions & 24 deletions

File tree

ghostty/config

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
theme = light:Atom One Light,dark:Terafox
22

3+
font-size = 10
4+
35
background-blur-radius = 40
46
background-opacity = 0.84
57

@@ -13,8 +15,6 @@ window-padding-color = background
1315
mouse-hide-while-typing = true
1416
copy-on-select = clipboard
1517

16-
macos-titlebar-style = hidden
17-
1818
# keybinds
1919
keybind = global:super+grave_accent=toggle_quick_terminal
2020

@@ -41,6 +41,12 @@ keybind = ghostty/escape=deactivate_key_table
4141
keybind = ghostty/catch_all=ignore
4242
keybind = ctrl+g=activate_key_table:ghostty
4343
#
44+
# decorations
45+
macos-titlebar-style = hidden
46+
window-decoration = none
47+
48+
keybind = super+shift+t=toggle_window_decorations
49+
#
4450
# fullscreen
4551
keybind = ctrl+enter=unbind
4652
keybind = ctrl+shift+enter=unbind

opencode/config.json

Lines changed: 41 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"npx",
99
"chrome-devtools-mcp@latest",
1010
"--executablePath",
11-
"$HOME/Applications/Chromium.app/Contents/MacOS/Chromium"
11+
"/snap/bin/chromium"
1212
],
1313
"enabled": false
1414
},
@@ -65,8 +65,14 @@
6565
"output": 65535
6666
},
6767
"modalities": {
68-
"input": ["text", "image", "pdf"],
69-
"output": ["text"]
68+
"input": [
69+
"text",
70+
"image",
71+
"pdf"
72+
],
73+
"output": [
74+
"text"
75+
]
7076
},
7177
"variants": {
7278
"low": {
@@ -84,8 +90,14 @@
8490
"output": 65536
8591
},
8692
"modalities": {
87-
"input": ["text", "image", "pdf"],
88-
"output": ["text"]
93+
"input": [
94+
"text",
95+
"image",
96+
"pdf"
97+
],
98+
"output": [
99+
"text"
100+
]
89101
},
90102
"variants": {
91103
"minimal": {
@@ -109,8 +121,14 @@
109121
"output": 64000
110122
},
111123
"modalities": {
112-
"input": ["text", "image", "pdf"],
113-
"output": ["text"]
124+
"input": [
125+
"text",
126+
"image",
127+
"pdf"
128+
],
129+
"output": [
130+
"text"
131+
]
114132
}
115133
},
116134
"antigravity-claude-sonnet-4-6-thinking": {
@@ -120,8 +138,14 @@
120138
"output": 64000
121139
},
122140
"modalities": {
123-
"input": ["text", "image", "pdf"],
124-
"output": ["text"]
141+
"input": [
142+
"text",
143+
"image",
144+
"pdf"
145+
],
146+
"output": [
147+
"text"
148+
]
125149
},
126150
"variants": {
127151
"low": {
@@ -143,8 +167,14 @@
143167
"output": 64000
144168
},
145169
"modalities": {
146-
"input": ["text", "image", "pdf"],
147-
"output": ["text"]
170+
"input": [
171+
"text",
172+
"image",
173+
"pdf"
174+
],
175+
"output": [
176+
"text"
177+
]
148178
},
149179
"variants": {
150180
"low": {

zsh/secondary.zsh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ if type fzf &>/dev/null; then
6262
fi
6363
fi
6464

65-
local fzf_share="/usr/share/fzf" # Linux
65+
local fzf_share="/usr/share/doc/fzf/examples" # Linux
6666
if [[ $(uname -s) == 'Darwin' ]]; then
6767
# Use hardcoded path to avoid slow brew --prefix call
6868
fzf_share="/opt/homebrew/opt/fzf/shell" # MacOS

zsh/zshrc.zsh

Lines changed: 29 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,33 @@ _add_to_path "$HOME/.local/bin"
4040
# To make Homebrew's completions available
4141
# https://docs.brew.sh/Shell-Completion#configuring-completions-in-zsh
4242
# Note: brew shellenv is slow (~100-300ms), so we manually set the essentials
43-
if [[ -d "/opt/homebrew" ]]; then
44-
export HOMEBREW_PREFIX="/opt/homebrew"
45-
export HOMEBREW_CELLAR="/opt/homebrew/Cellar"
46-
export HOMEBREW_REPOSITORY="/opt/homebrew"
47-
fpath+=("/opt/homebrew/share/zsh/site-functions")
48-
# HOMEBREW_SHELLENV_PREFIX is set for compatibility
49-
export HOMEBREW_SHELLENV_PREFIX="/opt/homebrew"
50-
fi
43+
_setup_homebrew() {
44+
local homebrew_root=0
45+
46+
if [[ $(uname -s) == 'Darwin' ]]; then
47+
homebrew_root='/opt/homebrew'
48+
elif [[ $(uname -s) == 'Linux' ]]; then
49+
homebrew_root='/home/linuxbrew/.linuxbrew'
50+
fi
51+
52+
if [[ -d $homebrew_root ]]; then
53+
# --- Homebrew Setup (ARM/M1+ only)
54+
# Add Homebrew paths first (needed for macOS, no-op on Linux if paths don't exist)
55+
_add_to_path "$homebrew_root/bin"
56+
_add_to_path "$homebrew_root/sbin"
57+
58+
export HOMEBREW_PREFIX="$homebrew_root"
59+
export HOMEBREW_CELLAR="$homebrew_root/Cellar"
60+
export HOMEBREW_REPOSITORY="$homebrew_root"
61+
# HOMEBREW_SHELLENV_PREFIX is set for compatibility
62+
export HOMEBREW_SHELLENV_PREFIX="$homebrew_root"
63+
64+
fpath+=("$homebrew_root/share/zsh/site-functions")
65+
66+
eval "$($homebrew_root/bin/brew shellenv)"
67+
fi
68+
}
69+
_setup_homebrew
5170
# Homebrew Setup ---
5271

5372
# Function to check if zsh completion cache needs regeneration
@@ -88,7 +107,7 @@ _source_if_exists "$Z_CONFIG_DIR/plugins/zsh-autosuggestions/zsh-autosuggestions
88107
# True lazy loading for syntax highlighting - load on first edit
89108
zsh-syntax-highlighting-lazy-load() {
90109
unset -f $0
91-
source "$Z_CONFIG_DIR/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
110+
_source_if_exists "$Z_CONFIG_DIR/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
92111
}
93112

94113
autoload -Uz add-zsh-hook
@@ -151,7 +170,7 @@ _source_if_exists "$Z_CONFIG_DIR/secondary.zsh"
151170
if command -v ng &>/dev/null; then
152171
source <(ng completion script)
153172
fi
154-
173+
155174
# Docker completion styles
156175
zstyle ":completion:*:*:docker:*" option-stacking yes
157176
zstyle ":completion:*:*:docker-*:*" option-stacking yes

0 commit comments

Comments
 (0)