My dotfiles

Add `fish` config

+78
+1
.chezmoidata.toml
··· 1 + editor = "hx"
+51
dot_config/private_fish/config.fish.tmpl
··· 1 + {{ $brewPath := lookPath "brew" }} 2 + {{ if $brewPath -}} 3 + # Set up Homebrew. 4 + set -x HOMEBREW_NO_INSTALL_CLEANUP 1 5 + set -x HOMEBREW_NO_ANALYTICS 1 6 + eval ({{ $brewPath | quote }} shellenv) 7 + {{ end -}} 8 + 9 + # Add directories to path. 10 + fish_add_path --global {{ joinPath .chezmoi.homeDir ".cargo/bin" | quote }} 11 + fish_add_path --global {{ joinPath .chezmoi.homeDir ".local/bin" | quote }} 12 + 13 + # Set XDG data directories. 14 + set -x XDG_CACHE_HOME {{ joinPath .chezmoi.homeDir ".cache" | quote }} 15 + set -x XDG_CONFIG_HOME {{ joinPath .chezmoi.homeDir ".config" | quote }} 16 + set -x XDG_DATA_HOME {{ joinPath .chezmoi.homeDir ".local/share" | quote }} 17 + set -x XDG_STATE_HOME {{ joinPath .chezmoi.homeDir ".local/state" | quote }} 18 + 19 + {{ $editorName := .editor | default "vi" -}} 20 + {{ $editorPath := lookPath $editorName -}} 21 + {{ if $editorPath -}} 22 + set -x EDITOR {{ $editorPath | quote }} 23 + {{ end -}} 24 + 25 + {{ $batPath := lookPath "bat" }} 26 + {{ if $batPath -}} 27 + # Configure 'bat'. 28 + alias cat bat 29 + set -x MANPAGER "sh -c 'col -bx | bat -l man -p'" 30 + set -x MANROFFOPT "-c" 31 + set -x BAT_PAGER "less -FIKMFRS" 32 + {{ end -}} 33 + 34 + # Set default less options. 35 + set -x SYSTEMD_LESS FIKMRS 36 + 37 + {{ $jjPath := lookPath "jj" }} 38 + {{ if $jjPath -}} 39 + # Enable JJ completions. 40 + COMPLETE=fish {{ $jjPath | quote }} | source 41 + {{ end -}} 42 + 43 + {{ $gioPath := lookPath "gio" }} 44 + {{ if $gioPath -}} 45 + # Disable rm if the trash is enabled. 46 + alias ts "{{ $gioPath }} trash" 47 + function rm 48 + echo "'rm' is disabled. use 'ts' to move items to trash, or 'command rm' to use rm." 49 + return 1 50 + end 51 + {{ end -}}
+20
dot_config/private_fish/functions/clip.fish
··· 1 + function clip 2 + if test $XDG_SESSION_TYPE = x11 3 + if ! command --query xclip 4 + echo -e "Error: `xclip` must be installed to copy on an X11 session" 5 + return 1 6 + end 7 + 8 + command xclip -selection c 9 + else if test $XDG_SESSION_TYPE = wayland 10 + if ! command --query wl-copy 11 + echo -e "Error: `wl-clipboard` must be installed to copy on a Wayland session" 12 + return 1 13 + end 14 + 15 + command wl-copy 16 + else 17 + echo -e "Error: Unknown session type `$XDG_SESSION_TYPE`" 18 + return 1 19 + end 20 + end
+3
dot_config/private_fish/functions/edit.fish
··· 1 + function edit 2 + flatpak run --file-forwarding org.gnome.TextEditor @@ $argv @@ 3 + end
+3
dot_config/private_fish/functions/fish_greeting.fish
··· 1 + function fish_greeting 2 + systemctl --user list-units --quiet --state=failed 3 + end