File tree 15 files changed +217
-79
lines changed
15 files changed +217
-79
lines changed Original file line number Diff line number Diff line change 7
7
url = https://github.com/tmux-plugins/tpm
8
8
[submodule "todo.actions.d/graph "]
9
9
path = todo.actions.d/graph
10
- url = https://github.com/Bassmann/todo.txt-graph.git
10
+ url = https://github.com/timpulver/todo.txt-graph.git
11
+ [submodule "todo.actions.d/due "]
12
+ path = todo.actions.d/due
13
+ url = https://github.com/rebeccamorgan/due.git
14
+ [submodule "local/opt/fzf-git "]
15
+ path = local/opt/fzf-git
16
+ url = https://github.com/junegunn/fzf-git.sh.git
Original file line number Diff line number Diff line change 46
46
source /usr/local/share/fzf/shell/completion.bash
47
47
fi
48
48
49
+ if [ -f " $HOME /.local/opt/fzf-git/fzf-git.sh" ]; then
50
+ source " $HOME /.local/opt/fzf-git/fzf-git.sh"
51
+ fi
52
+
49
53
# ##################
50
54
# NODE.JS - NVM #
51
55
# ##################
@@ -124,8 +128,6 @@ alias diff='diff --color=auto'
124
128
alias grep=' grep --color=auto'
125
129
alias mutt=' neomutt'
126
130
alias sudo=' sudo '
127
- alias htop=' TERM=xterm-256color htop'
128
- alias ssh=' TERM=xterm-256color ssh'
129
131
alias monerod=" monerod --data-dir ${XDG_DATA_HOME} /bitmonero"
130
132
131
133
git-recursive-pull () {
@@ -213,6 +215,28 @@ if [[ $OSTYPE == 'darwin'* ]]; then
213
215
fi
214
216
215
217
218
+ function git-worktree() {
219
+ if [ ${#* } -lt 2 ]; then
220
+ 2>&1 echo " Usage: git-worktree JIRA-NNN short-name"
221
+ return 1
222
+ fi
223
+ local ticket orig_branch new_branch
224
+ ticket=" $1 "
225
+ new_branch=$2
226
+ orig_branch=" $( git rev-parse --abbrev-ref HEAD) "
227
+ new_dir=../" $( basename " $PWD " ) " -" $new_branch "
228
+ git fetch origin " $orig_branch "
229
+ git worktree add " $new_dir " -B " $USER /$ticket -$new_branch "
230
+ if [ -f .envrc ]; then
231
+ cp .envrc " $new_dir /.envrc"
232
+ direnv allow " $new_dir "
233
+ fi
234
+ if [ -f user.bazelrc ]; then
235
+ cp user.bazelrc " $new_dir /user.bazelrc"
236
+ fi
237
+ }
238
+
239
+
216
240
# ##############
217
241
# dark mode #
218
242
# ##############
Original file line number Diff line number Diff line change @@ -25,6 +25,12 @@ function smtp_pass() {
25
25
_query_keychain " $kind " -pass " $from "
26
26
}
27
27
28
+ function smtp_user() {
29
+ local kind=" $1 "
30
+ local from=" $2 "
31
+ _query_keychain " $kind " -username " $from " | sed ' s#\\\\#\\#g'
32
+ }
33
+
28
34
function query_command() {
29
35
local kind=" $1 "
30
36
local from=" $2 "
Original file line number Diff line number Diff line change 5
5
import platform
6
6
7
7
8
- def get_pass ( kind , account ):
8
+ def get_entry ( typ , kind , account ):
9
9
if platform .uname ().system == "Darwin" :
10
- return check_output (f"security find-generic-password -w -s '{ kind } -pass ' -a '{ account } '" , shell = True ).splitlines ()[0 ]
10
+ return check_output (f"security find-generic-password -w -s '{ kind } -{ typ } ' -a '{ account } '" , shell = True ).splitlines ()[0 ]
11
11
else :
12
- return check_output (f"secret-tool lookup { kind } -pass '{ account } '" , shell = True ).splitlines ()[0 ]
12
+ return check_output (f"secret-tool lookup { kind } -{ typ } '{ account } '" , shell = True ).splitlines ()[0 ]
13
+
14
+ def get_pass (kind , account ):
15
+ return get_entry ('pass' , kind , account )
16
+
17
+ def get_user (kind , account ):
18
+ return get_entry ('username' , kind , account )
13
19
14
20
if __name__ == '__main__' :
15
21
print (get_pass (sys .argv [1 ], sys .argv [2 ]))
Original file line number Diff line number Diff line change @@ -9,16 +9,18 @@ duration = 100
9
9
[env ]
10
10
# TERM = "xterm-256color"
11
11
12
- [font .bold_italic ]
13
- family = " Menlo"
14
- style = " Bold Italic"
12
+ # [font.bold_italic]
13
+ # family = "Menlo"
14
+ # style = "Bold Italic"
15
+ [font ]
16
+ size = 12
15
17
16
18
[font .normal ]
17
19
family = " Fira Code"
18
20
style = " Medium"
19
21
20
22
[font .offset ]
21
- y = -1
23
+ y = 0
22
24
23
25
[[keyboard .bindings ]]
24
26
action = " CreateNewWindow"
Original file line number Diff line number Diff line change 1
1
# shellcheck disable=SC2034
2
+
3
+ if infocmp alacritty > /dev/null; then
4
+ export TERM=alacritty
5
+ fi
6
+
2
7
# export XDG_SESSION_TYPE=wayland
3
8
export XDG_DATA_HOME=" $HOME /.local/share"
4
9
export XDG_CONFIG_HOME=" $HOME /.config"
26
31
fi
27
32
28
33
export PATH=" $HOME /bin:$HOME /.local/bin/:$PATH "
34
+ export PATH=" $HOME /.local/share/cargo/bin:$PATH "
29
35
30
36
export GOPATH=" $XDG_DATA_HOME /go"
31
37
Original file line number Diff line number Diff line change 65
65
autostash = true
66
66
67
67
[tag ]
68
- forceSignAnnotated = true
69
- gpgSign = true
68
+ ; forceSignAnnotated = true
69
+ ; gpgSign = true
70
70
71
71
[tig ]
72
72
ignore-space = yes
Original file line number Diff line number Diff line change 1
1
[credential ]
2
- helper = git-credential-libsecret
2
+ helper = /usr/libexec/git-core/ git-credential-libsecret
3
3
4
4
# vim: set ft=gitconfig:
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ always-display-description yes
4
4
auto-reload yes
5
5
bookmark-autopilot yes
6
6
bookmark-cmd "printf '%s\t%s\t%s\t%s\n' >> $HOME/Documents/Notes/bookmarks.txt"
7
- browser "xdg- open %u"
7
+ browser "open %u"
8
8
download-full-page yes
9
9
feed-sort-order lastupdated
10
10
notify-always yes
@@ -44,7 +44,7 @@ highlight feedlist "[N ]*\\([0-9/]+\\) " white
44
44
highlight articlelist "^[0-9 ]{4} " green
45
45
highlight articlelist "\\(([0-9 ]{2}[0-9]\.?|[0-9]\\.[0-9]K|[ 0-9]{2}\\.[0-9])\\) " white
46
46
47
- macro o set browser "mpv %u" ; open-in-browser ; set browser "xdg- open %u"
48
- macro d set browser "youtube-dl %u" ; open-in-browser ; set browser "xdg- open %u"
47
+ macro o set browser "mpv %u" ; open-in-browser ; set browser "open %u"
48
+ macro d set browser "youtube-dl %u" ; open-in-browser ; set browser "open %u"
49
49
50
50
# vim: set ft=conf:
Original file line number Diff line number Diff line change @@ -36,30 +36,36 @@ if grep -iqE "$(echo "${SSH_VARS[@]}" | md5sum)" /tmp/tmux-ssh-settings.md5; the
36
36
fi
37
37
echo " ${SSH_VARS[@]} " | md5sum > /tmp/tmux-ssh-settings.md5
38
38
39
+ monitor_bell=" $( tmux show-option -gv monitor-bell) "
40
+ tmux set-option -g monitor-bell off
41
+
39
42
# Check every pane for the running command and try to update the environment variables
40
43
for pane in $( tmux list-panes -a -F ' #{pane_id}' ) ; do
41
44
variables=$( for var in " ${! SSH_VARS[@]} " ; do
42
45
printf " %s=\" %s\" " " $var " " ${SSH_VARS[$var]} "
43
46
done)
44
47
bash_cmd=" export $variables "
45
48
46
- if ! is_bash; then
47
- log " not bash: $( pane_cmd) "
49
+ log " $( tmux display -t " $pane " -p " #{window_index}.#{pane_index}" ) command: $( pane_cmd) "
48
50
51
+ if is_bash; then
52
+ nop
53
+ else
49
54
if is_vim; then
50
55
commands=$( for var in " ${! SSH_VARS[@]} " ; do
51
56
printf " let \$ %s=\" %s\" | " " $var " " ${SSH_VARS[$var]} "
52
57
done)
53
- tmux send-keys -t " $pane " Escape " :${commands% |* } | call histdel(':', '.*SSH_.*')" Enter
54
- sleep 0.5
58
+ tmux send-keys -t " $pane " Escape Escape " :${commands% |* } | call histdel(':', '.*SSH_.*')" Enter
59
+ # sleep 0.5
55
60
fi
56
61
57
62
# If not in a shell, then background the app (C-z) and bring to the foreground after
58
- tmux send-keys -t " $pane " C-z C-c
63
+ tmux send-keys -t " $pane " C-z
64
+ sleep 0.1
65
+ tmux send-keys -t " $pane " C-c
59
66
bash_cmd+=" ; fg"
60
- sleep 1.0
61
67
fi
62
68
63
69
tmux send-keys -t " $pane " C-u " $bash_cmd " Enter
64
70
done
65
-
71
+ tmux set-option -g monitor-bell " $monitor_bell "
Original file line number Diff line number Diff line change @@ -38,13 +38,12 @@ bind -T copy-mode-vi v send-keys -X begin-selection
38
38
bind -T copy-mode-vi C-v send-keys -X rectangle-toggle
39
39
40
40
set -g history-limit 128000
41
- # set -g xterm-keys on
42
41
set -g focus-events on
43
42
44
43
set -g set-clipboard on
45
44
46
45
# Slimux integration
47
- is_vim=' echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?x?)(diff)?$"'
46
+ is_vim=' echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?x?|git )(diff)?$"'
48
47
bind -n C-h if-shell " $is_vim " " send-keys C-h" " select-pane -L"
49
48
bind -n C-j if-shell " $is_vim " " send-keys C-j" " select-pane -D"
50
49
bind -n C-k if-shell " $is_vim " " send-keys C-k" " select-pane -U"
Original file line number Diff line number Diff line change 98
98
path : config/rtorrent/rtorrent.rc
99
99
$XDG_DATA_HOME/terminfo :
100
100
path : local/share/terminfo
101
+ $HOME/.local/opt/fzf-git :
102
+ path : local/opt/fzf-git
101
103
$XDG_CONFIG_HOME/tmux/tmux.conf :
102
104
path : config/tmux/tmux.conf
103
105
$XDG_CONFIG_HOME/tmux/fix-ssh.sh :
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ set trash = +Trash
10
10
set ssl_starttls = no
11
11
set ssl_force_tls = no
12
12
set smtp_pass = "`~/bin/mutt_helpers.sh smtp_pass owa '$from'`"
13
+ set smtp_user = "`~/bin/mutt_helpers.sh smtp_user owa '$from'`"
13
14
# set smtp_url = "<see muttrc.local>"
14
15
15
16
# Addressbook
You can’t perform that action at this time.
0 commit comments