-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.fish
85 lines (73 loc) · 2.71 KB
/
config.fish
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# Platform agnostic configuration
## Remove fish default greeting
set fish_greeting
## Set blinking cursor
set fish_cursor_default block blink
## Vi keybindings
fish_vi_key_bindings
## Fundle
### Install Fundle if not present
if not functions -q fundle; eval (curl -sfL https://git.io/fundle-install); end
### Plugins
fundle plugin 'oh-my-fish/theme-agnoster'
fundle plugin 'jethrokuan/z'
fundle plugin 'PatrickF1/fzf.fish'
fundle plugin 'Gazorby/fish-abbreviation-tips'
fundle plugin 'danhper/fish-fastdir'
fundle plugin 'danhper/fish-ssh-agent'
fundle plugin 'meaningful-ooo/sponge'
fundle init
## Abbreviations
abbr --add --global g git;
abbr --add --global l 'exa'
abbr --add --global ls 'exa -l --sort=modified'
abbr --add --global la 'exa -la --sort=modified'
abbr --add --global find 'fd'
abbr --add --global cat 'bat'
abbr --add --global less 'bat'
abbr --add --global grep 'rg'
abbr --add --global rg 'rg -pS -M 200'
abbr --add --global src 'source ~/.config/fish/config.fish'
abbr --add --global whip 'dig TXT +short o-o.myaddr.l.google.com @ns1.google.com'
## Environment variables
### Set default user to hide hostname in prompt
set -x DEFAULT_USER o
### Set locale
set -x LC_ALL 'en_US.UTF-8'
### Editor
set -x EDITOR 'hx'
### Use fd as default command for fzf
set -x FZF_DEFAULT_COMMAND 'fd --type file --follow --hidden --exclude .git'
set -x FZF_CTRL_T_COMMAND '$FZF_DEFAULT_COMMAND'
### Set bat default color scheme
set -x BAT_THEME ansi
# Platform specific configuration
switch (uname)
case Darwin ## Mac
### Abbreviatons
abbr --add --global log 'tail /var/log/system.log'
abbr --add --global mrpi 'mosh rpi4'
abbr --add --global wt 'webtorrent --blocklist "https://list.iblocklist.com/?list=ydxerpxkpcfqjaybcssw&fileformat=p2p&archiveformat=gz" -o ~/Downloads/ download'
### Environment variables
#### Prevent ._* files from being written
set -x COPYFILE_DISABLE 'true'
#### No insecure redirect for homebrew
set -x HOMEBREW_NO_INSECURE_REDIRECT 'true'
#### Disable homebrew analytics
set -x HOMEBREW_NO_ANALYTICS 1
## Kryptco
set -x GPG_TTY (tty)
## Secretive SSH Agent
set -x SSH_AUTH_SOCK /Users/o/Library/Containers/com.maxgoedjen.Secretive.SecretAgent/Data/socket.ssh
### Paths
# Homebrew
fish_add_path /opt/homebrew/bin
case Linux ## Linux
### Abbreviations
abbr --add --global log 'tail /var/log/syslog'
abbr --add --global yt 'yt-dlp -S ext -o "/media/rpool/video/Short/%(title)s.%(ext)s"'
abbr --add --global temp 'echo "RPI4 CPU temperature is" (expr (cat /sys/class/thermal/thermal_zone0/temp) / 1000) "degrees celcius"'
### Environment variables
end
### Byobu config
status --is-login; and status --is-interactive; and exec byobu-launcher