mirror of
https://github.com/DictXiong/dotfiles.git
synced 2026-11-05 19:48:15 +08:00
Compare commits
36 Commits
main
...
41cb0fe549
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
41cb0fe549 | ||
|
|
f67ed12e49 | ||
| 5c23484d61 | |||
|
|
5ced7027b6 | ||
|
|
ca64866db9 | ||
|
|
e3dad6d9cc | ||
|
|
aa5c2e86b6 | ||
| 8660bf2f02 | |||
| cac108d5ac | |||
| 5e7c3293ae | |||
| 6fa601c458 | |||
| b891e4ed07 | |||
| 7e33f92e51 | |||
| 3e425f45e0 | |||
| e9e8a5fede | |||
| 74bffde6cf | |||
| b170d06d9a | |||
| cb70dc7cdc | |||
| 9cf6d65692 | |||
| a7074fc940 | |||
| 4e3ce4f9d9 | |||
| ed98a56e05 | |||
| e79b092054 | |||
| f45f7e415c | |||
| 9f1bc8f0fb | |||
| ee44717891 | |||
| d283671f25 | |||
| bdef3b52d1 | |||
| c86cc85e24 | |||
| 426e97c10e | |||
| e1f0ec0ebc | |||
| 8dbb310e02 | |||
| 8865dee1e9 | |||
| 65d690f47c | |||
| ecf652ad7b | |||
| 86670306af |
@@ -31,9 +31,8 @@ bind r source-file ~/.tmux.conf \; display-message "tmux.conf reloaded"
|
|||||||
bind m run 'old=$(tmux show -gv mouse); new="off"; if [ "$old" = "off" ]; then new="on"; fi; tmux set -g mouse $new && tmux display-message toggle\ mouse\ mode\ $new'
|
bind m run 'old=$(tmux show -gv mouse); new="off"; if [ "$old" = "off" ]; then new="on"; fi; tmux set -g mouse $new && tmux display-message toggle\ mouse\ mode\ $new'
|
||||||
## prefix C-x: pane sync
|
## prefix C-x: pane sync
|
||||||
bind C-x set-window-option synchronize-panes\; display-message "synchronize-panes is now #{?pane_synchronized,on,off}"
|
bind C-x set-window-option synchronize-panes\; display-message "synchronize-panes is now #{?pane_synchronized,on,off}"
|
||||||
## tmux 3.6+: copy selection without jumping to the end
|
## prevent jumping to end after mouse selection
|
||||||
bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-selection
|
bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-selection -x
|
||||||
bind -T copy-mode MouseDragEnd1Pane send-keys -X copy-selection
|
|
||||||
## F12: passthru
|
## F12: passthru
|
||||||
bind -T root F12 set prefix None \; set key-table off \; set status-bg red \; refresh-client -S
|
bind -T root F12 set prefix None \; set key-table off \; set status-bg red \; refresh-client -S
|
||||||
bind -T off F12 set -u prefix \; set -u key-table \; set -u status-bg \; refresh-client -S
|
bind -T off F12 set -u prefix \; set -u key-table \; set -u status-bg \; refresh-client -S
|
||||||
|
|||||||
59
README.md
59
README.md
@@ -1,58 +1 @@
|
|||||||
# dotfiles
|
# dotfiles
|
||||||
|
|
||||||
My personal shell environment and command-line tools, mainly for Linux and
|
|
||||||
NixOS systems.
|
|
||||||
|
|
||||||
It includes configurations for zsh, tmux, Vim, Git, and SSH, together with a
|
|
||||||
few utility scripts used across my machines.
|
|
||||||
|
|
||||||
## Highlights
|
|
||||||
|
|
||||||
- `riot`: an SSH wrapper with host presets, jump hosts, port forwarding, tmux
|
|
||||||
sessions, and optional GPG agent forwarding.
|
|
||||||
- `sagt`: an SSH/GPG agent manager with support for PIV, 1Password, and
|
|
||||||
OpenPGP smart cards.
|
|
||||||
- zsh aliases and completions for the bundled tools.
|
|
||||||
- tmux and Vim configurations with plugin setup.
|
|
||||||
- automatic updates with selectable `main`, `dev`, and `latest` channels.
|
|
||||||
|
|
||||||
## Installation
|
|
||||||
|
|
||||||
Quick install:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
curl -fsSL https://dotfiles.cn | bash
|
|
||||||
```
|
|
||||||
|
|
||||||
Alternatively, clone the repository so the installer can be reviewed first:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
git clone https://github.com/DictXiong/dotfiles.git ~/dotfiles
|
|
||||||
~/dotfiles/install.sh -a
|
|
||||||
```
|
|
||||||
|
|
||||||
The installer adds small source/include entries to the existing zsh, tmux,
|
|
||||||
Vim, and Git configuration files instead of replacing them entirely.
|
|
||||||
|
|
||||||
## Useful commands
|
|
||||||
|
|
||||||
```sh
|
|
||||||
riot --help # show the SSH wrapper manual
|
|
||||||
sagt # start or reuse an ssh-agent
|
|
||||||
sagt gpg # use gpg-agent as SSH agent
|
|
||||||
sagt gpg-pin # cache the smart-card signature PIN
|
|
||||||
dfs update # update dotfiles from the selected channel
|
|
||||||
dfs config # edit machine-specific settings
|
|
||||||
```
|
|
||||||
|
|
||||||
## Configuration
|
|
||||||
|
|
||||||
Machine-specific settings can be placed in:
|
|
||||||
|
|
||||||
```text
|
|
||||||
~/.config/dotfiles/env
|
|
||||||
~/.config/riot-config.sh
|
|
||||||
```
|
|
||||||
|
|
||||||
This is a personal dotfiles repository. Review the configuration, SSH keys,
|
|
||||||
and installation script before using it on another machine.
|
|
||||||
@@ -255,10 +255,6 @@ prepare_gpg_forwarding() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# A pre-existing multiplex master cannot apply this connection's -R
|
|
||||||
# forwarding request. Put this first because OpenSSH keeps the first
|
|
||||||
# value for repeated options, and force a dedicated connection.
|
|
||||||
SSH_OPTIONS=("-o" "ControlMaster=no" "${SSH_OPTIONS[@]}")
|
|
||||||
SSH_OPTIONS+=(
|
SSH_OPTIONS+=(
|
||||||
# The probe already removed the old socket. Do not let the main SSH
|
# The probe already removed the old socket. Do not let the main SSH
|
||||||
# connection unlink a path recreated during the gap between them.
|
# connection unlink a path recreated during the gap between them.
|
||||||
|
|||||||
@@ -127,7 +127,6 @@ grep -Fq 'ARG=-T' "$MOCK_SSH_LOG"
|
|||||||
! grep -Fq 'ARG=RequestTTY=' "$MOCK_SSH_LOG"
|
! grep -Fq 'ARG=RequestTTY=' "$MOCK_SSH_LOG"
|
||||||
grep -Fq 'ARG=StreamLocalBindUnlink=no' "$MOCK_SSH_LOG"
|
grep -Fq 'ARG=StreamLocalBindUnlink=no' "$MOCK_SSH_LOG"
|
||||||
grep -Fq "ARG=$MOCK_REMOTE_SOCKET:$MOCK_LOCAL_SOCKET" "$MOCK_SSH_LOG"
|
grep -Fq "ARG=$MOCK_REMOTE_SOCKET:$MOCK_LOCAL_SOCKET" "$MOCK_SSH_LOG"
|
||||||
grep -Fq 'ARG=ControlMaster=no' "$MOCK_SSH_LOG"
|
|
||||||
[[ ! -e "$MOCK_REMOTE_SOCKET" ]]
|
[[ ! -e "$MOCK_REMOTE_SOCKET" ]]
|
||||||
|
|
||||||
echo 'riot gpg forwarding tests passed'
|
echo 'riot gpg forwarding tests passed'
|
||||||
|
|||||||
Reference in New Issue
Block a user