From b97ad28c4abd09cafe36f4e656df48d0a3735e30 Mon Sep 17 00:00:00 2001 From: Jesse Hitch Date: Tue, 20 Dec 2022 14:13:11 +0100 Subject: [PATCH] move more out of .w3m and into ~/.config/w3m --- .config/bash/alias.sh | 2 +- .config/w3m/config | 8 +++-- {.w3m => .config/w3m}/keymap | 0 .config/w3m/mailcap | 4 +++ README.md | 65 +++++++++++++++++++----------------- 5 files changed, 45 insertions(+), 34 deletions(-) rename {.w3m => .config/w3m}/keymap (100%) create mode 100644 .config/w3m/mailcap diff --git a/.config/bash/alias.sh b/.config/bash/alias.sh index 4d56fd8..66742f7 100644 --- a/.config/bash/alias.sh +++ b/.config/bash/alias.sh @@ -44,7 +44,7 @@ alias sixel='img2sixel' alias todo="$EDITOR ~/todo.md" # this is so that w3m uses the correct XDG config location -alias w3m="w3m -config ~/.config/w3m/config" +alias w3m="w3m -sixel -config ~/.config/w3m/config" # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ls ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # # lsd instead of ls for colors/icons diff --git a/.config/w3m/config b/.config/w3m/config index cd6eda6..822ded0 100644 --- a/.config/w3m/config +++ b/.config/w3m/config @@ -1,5 +1,7 @@ -mailcap ~/.w3m/mailcap -auto_image TRUE +keymap_file ~/.config/w3m/keymap +mailcap ~/.config/w3m/mailcap display_image 1 -confirm_qq false +auto_image true +ext_image_viewer display_link 1 +confirm_qq false diff --git a/.w3m/keymap b/.config/w3m/keymap similarity index 100% rename from .w3m/keymap rename to .config/w3m/keymap diff --git a/.config/w3m/mailcap b/.config/w3m/mailcap new file mode 100644 index 0000000..61a2817 --- /dev/null +++ b/.config/w3m/mailcap @@ -0,0 +1,4 @@ +image/jpg; /usr/local/bin/img2sixel '%s' +image/jpeg; /usr/local/bin/img2sixel '%s' +image/gif; /usr/local/bin/img2sixel '%s' +image/png; /usr/local/bin/img2sixel '%s'; nametemplate=%s.png diff --git a/README.md b/README.md index 93ee588..d009462 100644 --- a/README.md +++ b/README.md @@ -62,21 +62,21 @@ These directories/files are installed to your home directory. - [`~/.config/bash/path.sh`](.config/bash/path.sh) - [`~/.config/bash/minimal.sh`](.config/bash/minimal.sh) - [`~/.config/bash/text_editing.sh`](.config/bash/text_editing.sh) - + ## [`~/.config/bash/alias.sh`](.config/bash/alias.sh) a config file to organize all our BASH aliases - + ## [`~/.config/bash/completion.sh`](.config/bash/completion.sh) enable tab completion - + ## [`~/.config/bash/history.sh`](.config/bash/history.sh) - sets history to be in `~/.local/state/bash/history` - sets default history size - don't log duplicate history lines - + ## [`iterm2_shell_integration.sh`](.config/bash/iterm2_shell_integration.sh) sets up [iterm2] shell stuff - + ## [`~/.config/bash/text_editing.sh`](.config/bash/text_editing.sh) sets either [neovim] or [vim] as your text editor @@ -84,12 +84,12 @@ These directories/files are installed to your home directory. kubernetes defaults: - set pathing for [`krew`][krew], a plugin manager for [`kubectl`][kubectl]. - helpful sensible aliases such as: `kg` for `kubectl get` - + ## [`~/.config/bash/path.sh`](.config/bash/path.sh) - set [XDG base directory spec] - set pathing for golang and python - set pathing for home brew - + ## [`~/.config/bash/text_editing.sh`](.config/bash/text_editing.sh) - fix how less handles non-text input files - change the default colors for less used in man pages @@ -166,12 +166,12 @@ These directories/files are installed to your home directory. - +
hyper
- + File: [`~/.config/hyper/.hyper.js`](.config/hyper/.hyper.js) Sensible defaults for the [hyper](https://hyper.is) terminal emulator. @@ -467,8 +467,8 @@ These directories/files are installed to your home directory.
- - + +
tmux @@ -483,6 +483,30 @@ These directories/files are installed to your home directory.
+
+ .w3m + +
+ + Files: + - [`~/.w3m/config`](.w3m/config) + - [`~/.w3m/keymap`](.w3m/keymap) + - [`~/.w3m/mailcap`](.w3m/mailcap) + + Files for the [w3m] terminal based web browser. + + [`~/.w3m/config`](.w3m/config) sets: + - set default mailcap file for MIME types + - always display images + - set the default keymap file (for mapping keys) + - quit without asking + + [`~/.w3m/keymap`](.w3m/keymap) sets key bindings. + + [`~/.w3m/mailcap`](.w3m/mailcap) is supposed to set default MIMEtypes for w3m but does not :shrug: +
+ +
@@ -580,25 +604,6 @@ These directories/files are installed to your home directory. -
- .w3m - -
- - Files: - - [`~/.w3m/keymap`](.w3m/keymap) - - [`~/.w3m/config`](.w3m/config) - - Files for the [w3m] terminal based web browser. This config sets: - - set default mailcap for MIME types - - always display images - - quit without asking if we hit `qq` - - use vim like key bindings - -
- -
-
.bash_profile, .bashrc