pyratelog

personal blog
git clone git://git.pyratebeard.net/pyratelog.git
Log | Files | Refs | README

commit b52e377c5c37ba4ebd5eaf61d0d6c551b8234d29
parent 2c9b72b3bd6543b26e3b726bd06031280224d6ae
Author: pyratebeard <root@pyratebeard.net>
Date:   Sun,  3 Dec 2023 23:25:36 +0000

dot_dot_dot

Diffstat:
Mentry/dot_dot_dot.md | 31++++++-------------------------
1 file changed, 6 insertions(+), 25 deletions(-)

diff --git a/entry/dot_dot_dot.md b/entry/dot_dot_dot.md @@ -10,46 +10,27 @@ Over time I would modify or improve my dotfiles, but I wouldn't always push the This is a pain. So I have decided to spend some time improving things so I can stick to my main branch on all devices. -#### [2240ff5ac739912b1c352ed97217b886ab0fb422](https://git.pyratebeard.net/dotfiles/commit/2240ff5ac739912b1c352ed97217b886ab0fb422.html){target="_blank" rel="noreferrer"} -One of the first things I changed is the `pinentry` command in my _gpg-agent.conf_. I like the minimalism of `pinentry-tty` but it isn't available on all systems. - -To get around this I changed my _gpg-agent.conf_ to point to a wrapper script, `pinentry-select` -``` -#!/bin/sh -PE="" -BIN="/usr/bin" - -for p in pinentry-tty pinentry-curses pinentry ; do - command -v ${BIN}/${p} >/dev/null && PE="${BIN}/${p}" - break -done - -exec ${PE} "$@" -``` - -This script checks which command is available and sets it to the first one found. - #### [b78637c91813483f9a9b80899c4f5d9ede5c14ed](https://git.pyratebeard.net/dotfiles/commit/b78637c91813483f9a9b80899c4f5d9ede5c14ed.html){target="_blank" rel="noreferrer"} -On my servers I don't tend to need GPG but my zsh config includes running `keychain` to set up ssh and gpg agents when a terminal is started. I modified my _keychain.zsh_ file to only run if `keychain` is installed. +On my servers I don't tend to need GPG but my zsh config includes running `keychain` to set up gpg agent when a terminal is started. I modified my _keychain.zsh_ file to only run if `keychain` is installed. #### [8af62ecd9c7e44a77a11541b558fe1ca069a6e14](https://git.pyratebeard.net/dotfiles/commit/8af62ecd9c7e44a77a11541b558fe1ca069a6e14.html){target="_blank" rel="noreferrer"} My zsh setup also includes a script which starts `tmux` on the first terminal opened and then runs my custom `ahoy` script. Again, I don't want or need this on my servers so I modified it not to run over ssh. -#### [056f2d6ddfdab3b9345bd8dd7b65430defa8f0e2](TK){target="_blank" rel="noreferrer"} +My `ahoy` script works well on my main system but needs work to run without errors on my laptop. Mainly ignoring backups local to my PC and mail. + +#### [056f2d6ddfdab3b9345bd8dd7b65430defa8f0e2](https://git.pyratebeard.net/dotfiles/commit/056f2d6ddfdab3b9345bd8dd7b65430defa8f0e2.html){target="_blank" rel="noreferrer"} My (current) zsh prompt is pretty minimal, showing `──── ─` on the left then the filepath and git branch details on the right. For my servers I changed the prompt to show the hostname. Now I have configured the prompt to automatically change to the hostname if connecting over `ssh`. This is actually much nicer as my prompt was the same on my laptop and phone and sometimes I forgot if I was still in an `ssh` session. For [a while](20221020-shell_shocked.html){target="_blank" rel="noreferrer"} now I have been making use of the terminal buffer in `vim` and have also set a different colour prompt for that. -#### [9aa4aee5b7a121c0af42de4bf730e8f23e8166f8](TK){target="_blank" rel="noreferrer"} +#### [9aa4aee5b7a121c0af42de4bf730e8f23e8166f8](https://git.pyratebeard.net/dotfiles/commit/9aa4aee5b7a121c0af42de4bf730e8f23e8166f8.html){target="_blank" rel="noreferrer"} This one is probably good practice anyway. Switching all my `#!/bin/bash` crashbangs to `#!/usr/bin/env bash` because some systems, like the BSDs use a different filepath for `bash`. -#### [58fa110b56b090fbb378a16ad8df5a812588a20b](TK){target="_blank" rel="noreferrer"} +#### [58fa110b56b090fbb378a16ad8df5a812588a20b](https://git.pyratebeard.net/dotfiles/commit/58fa110b56b090fbb378a16ad8df5a812588a20b.html){target="_blank" rel="noreferrer"} Aliases are important, there were a couple of changes required here. First some systems use `doas` instead of `sudo` so I put in a check for `doas` and if it exists I alias it to `sudo`. That way all my aliases that are configured to use `sudo` don't break. My shutdown function also had to be modified to work on any platform, so I switched to directly calling `halt`. things still to change * tmux status - battery * iip alias breaks things on openbsd -* herbstluftwm urxvt needs LANG on openbsd for some reason -* mario urxvt needs LANG on openbsd for some reason * openbsd autocompletion dircolors ?? * openbsd {chpwd_auto_cd,aliases} ls has no --color option