Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions bin/imv-mailcap
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash
# Pipe URL directly to imv
exec curl -s "$1" | imv -
3 changes: 3 additions & 0 deletions chawan/auto.mailcap
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Chawan auto-executed mailcap entries
# Images
image/*; imv-mailcap %u
22 changes: 22 additions & 0 deletions chawan/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,28 @@ scripting = true
# Enable images
images = true

# Enable cookies and save them to disk (REQUIRED for login functionality)
cookie = "save"

# Enable referer header (some sites require this for security)
referer-from = true

# Auto-accept redirects without confirmation
meta-refresh = "always"

[display]
# Set image display mode (auto, sixel, or kitty)
image-mode = "sixel"

# Custom search engine using just-bangs-lite
[[omnirule]]
match = '^jb:'
substitute-url = '(x) => "https://tristanhavelick.com/just-bangs-lite/?q=" + encodeURIComponent(x.replace(/^jb:/, ""))'

# Rebind C-k to use just-bangs-lite as default search
[page]
'C-k' = '() => pager.load("jb:")'

# Open current URL in default browser (press Esc then o)
# Use single quotes to protect shell special chars, escape any single quotes in URL
'M-o' = "() => pager.extern(\"xdg-open '\" + String(pager.buffer.url).replace(/'/g, \"'\\\\''\" ) + \"'\")"
1 change: 1 addition & 0 deletions chawan/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
# Create chawan config directory and symlink config
mkdir -p "$HOME/.config/chawan"
ln -svf "$DOTFILES_HOME/chawan/config.toml" "$HOME/.config/chawan/config.toml"
ln -svf "$DOTFILES_HOME/chawan/auto.mailcap" "$HOME/.config/chawan/auto.mailcap"
6 changes: 5 additions & 1 deletion zsh/core.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@ elif command_exists nvim; then
fi

# Browser detection - use first available
if command_exists firefox; then
if command_exists cha; then
export BROWSER=cha
elif command_exists zen-browser; then
export BROWSER=zen-browser
elif command_exists firefox; then
export BROWSER=firefox
elif command_exists chrome; then
export BROWSER=chrome
Expand Down