mirror of
https://github.com/alrayyes/server-dotfiles
synced 2023-11-14 15:56:25 +00:00
Added fish support
This commit is contained in:
parent
720b495e76
commit
17d2e02bbb
21
README.org
21
README.org
@ -12,8 +12,12 @@
|
||||
- [[#theme][Theme]]
|
||||
- [[#plugin-manager][Plugin Manager]]
|
||||
- [[#plugins][Plugins]]
|
||||
- [[#fish][Fish]]
|
||||
- [[#theme-1][Theme]]
|
||||
- [[#package-manager][Package Manager]]
|
||||
- [[#packages][Packages]]
|
||||
- [[#neovim][Neovim]]
|
||||
- [[#theme-1][Theme]]
|
||||
- [[#theme-2][Theme]]
|
||||
- [[#plugin-manager-1][Plugin Manager]]
|
||||
- [[#plugins-1][Plugins]]
|
||||
- [[#general][General]]
|
||||
@ -34,6 +38,7 @@ A repository of my personal server configuration files.
|
||||
- [[http://www.gnu.org/software/stow/][stow]]
|
||||
|
||||
* Applications
|
||||
- [[https://github.com/alacritty/alacritty][alacritty]]
|
||||
- [[https://the.exa.website/][exa]]
|
||||
- [[https://git-scm.com/][git]]
|
||||
- [[https://gnupg.org/][gnupg]]
|
||||
@ -61,6 +66,20 @@ A repository of my personal server configuration files.
|
||||
- [[https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/vi-mode][vi-mode]]
|
||||
- [[https://github.com/zsh-users/zsh-autosuggestions][zsh-autosuggestions]]
|
||||
- [[https://github.com/zsh-users/zsh-syntax-highlighting][zsh-syntax-highlighting]]
|
||||
|
||||
* Fish
|
||||
*** Theme
|
||||
- [[https://github.com/oh-my-fish/theme-bobthefish][bobthefish]]
|
||||
*** Package Manager
|
||||
- [[https://github.com/oh-my-fish/oh-my-fish][oh-my-fish]]
|
||||
*** Packages
|
||||
- [[https://github.com/patrickf3139/Colored-Man-Pages][colored-man-pages]]
|
||||
- [[https://github.com/oh-my-fish/plugin-extract][extract]]
|
||||
- [[https://github.com/jethrokuan/fzf][fzf]]
|
||||
- [[https://github.com/oh-my-fish/plugin-gi][gi]]
|
||||
- [[https://github.com/oh-my-fish/plugin-git-flow][git-flow]]
|
||||
- [[https://github.com/oh-my-fish/plugin-sudope.git][sudope]]
|
||||
- [[https://github.com/oh-my-fish/plugin-wttr][wttr]]
|
||||
|
||||
* Neovim
|
||||
** Theme
|
||||
|
65
fish/.config/omf/init.fish
Normal file
65
fish/.config/omf/init.fish
Normal file
@ -0,0 +1,65 @@
|
||||
function fish_greeting
|
||||
neofetch
|
||||
end
|
||||
|
||||
function path_if_exists
|
||||
if [ -d "$argv" ]
|
||||
set PATH $PATH "$argv"
|
||||
end
|
||||
end
|
||||
|
||||
# Add paths
|
||||
path_if_exists ~/.config/yarn/global/node_modules/.bin
|
||||
path_if_exists ~/.local/bin
|
||||
path_if_exists ~/.emacs.d/bin
|
||||
|
||||
# Set GPG TTY
|
||||
set GPG_TTY (tty)
|
||||
|
||||
# pkg editor
|
||||
set -g VISUAL "nvim"
|
||||
|
||||
# editor
|
||||
set -g EDITOR "nvim"
|
||||
|
||||
# bobthefish
|
||||
set -g theme_nerd_fonts yes
|
||||
set -g theme_color_scheme gruvbox
|
||||
|
||||
# sudope
|
||||
set -g sudope_sequence \e\e
|
||||
|
||||
# nvim alias
|
||||
alias v="nvim"
|
||||
alias sv="sudo nvim"
|
||||
|
||||
# ls alias
|
||||
alias ls="exa"
|
||||
alias l="exa -al"
|
||||
|
||||
# vifm alias
|
||||
alias vifm="vifmrun"
|
||||
|
||||
# Set fzf keybindings here for now as they don't work with stable version of omf https://github.com/jethrokuan/fzf/issues/109
|
||||
bind \co '__fzf_find_file'
|
||||
bind \cr '__fzf_reverse_isearch'
|
||||
bind \ec '__fzf_cd'
|
||||
bind \eC '__fzf_cd --hidden'
|
||||
bind \eO '__fzf_open'
|
||||
bind \eo '__fzf_open --editor'
|
||||
|
||||
if bind -M insert >/dev/null 2>/dev/null
|
||||
bind -M insert \co '__fzf_find_file'
|
||||
bind -M insert \cr '__fzf_reverse_isearch'
|
||||
bind -M insert \ec '__fzf_cd'
|
||||
bind -M insert \eC '__fzf_cd --hidden'
|
||||
bind -M insert \eO '__fzf_open'
|
||||
bind -M insert \eo '__fzf_open --editor'
|
||||
end
|
||||
|
||||
if set -q FZF_COMPLETE
|
||||
bind \t '__fzf_complete'
|
||||
if bind -M insert >/dev/null 2>/dev/null
|
||||
bind -M insert \t '__fzf_complete'
|
||||
end
|
||||
end
|
30
install
30
install
@ -1,20 +1,30 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
function mkdir_if_not_exist() {
|
||||
if [ ! -d "$1" ]; then
|
||||
echo "Creating $1"
|
||||
mkdir -p "$1"
|
||||
fi
|
||||
}
|
||||
|
||||
mkdir_if_not_exist ~/.config/nvim
|
||||
mkdir_if_not_exist ~/.config/fish
|
||||
mkdir_if_not_exist ~/.config/omf
|
||||
mkdir_if_not_exist ~/.terminfo
|
||||
|
||||
# Create nvim config directory if it doesn't exist
|
||||
if [ ! -d ~/.config/nvim ]; then
|
||||
echo "Creating ~/.config/nvim"
|
||||
mkdir -p ~/.config/nvim
|
||||
fi
|
||||
|
||||
for d in $(ls -d */ | cut -f1 -d '/'); do
|
||||
echo "Linking $d..."
|
||||
(stow $d)
|
||||
done
|
||||
|
||||
# Install zplug if it doesn't exist yet
|
||||
if [ ! -d ~/.zplug ]; then
|
||||
echo "Installing zplug"
|
||||
curl -sL --proto-redir -all,https https://raw.githubusercontent.com/zplug/installer/master/installer.zsh | zsh
|
||||
if [ -f /usr/bin/zsh ]; then
|
||||
# Install zplug if it doesn't exist yet
|
||||
if [ ! -d ~/.zplug ]; then
|
||||
echo "Installing zplug"
|
||||
curl -sL --proto-redir -all,https https://raw.githubusercontent.com/zplug/installer/master/installer.zsh | zsh
|
||||
fi
|
||||
fi
|
||||
|
||||
# Install vim plugins & requirements
|
||||
@ -29,3 +39,7 @@ if [ ! -d ~/.config/nvim/plugged ]; then
|
||||
fi
|
||||
# Install nvim pluugins
|
||||
nvim +PlugInstall +qall
|
||||
|
||||
if [ -f /usr/bin/fish ]; then
|
||||
./install.fish
|
||||
fi
|
||||
|
25
install.fish
Executable file
25
install.fish
Executable file
@ -0,0 +1,25 @@
|
||||
#!/usr/bin/env fish
|
||||
|
||||
function install_omf_package_if_not_exist
|
||||
if test (omf list | grep -c "$argv") -eq 0
|
||||
omf install "$argv"
|
||||
end
|
||||
end
|
||||
|
||||
# Install oh-my-fish if it isn't installed
|
||||
if [ ! -d ~/.local/share/omf ]
|
||||
curl -L https://get.oh-my.fish | fish
|
||||
end
|
||||
|
||||
# Install oh-my-fish plugins
|
||||
install_omf_package_if_not_exist bobthefish
|
||||
install_omf_package_if_not_exist colored-man-pages
|
||||
install_omf_package_if_not_exist extract
|
||||
install_omf_package_if_not_exist fzf
|
||||
install_omf_package_if_not_exist gi
|
||||
install_omf_package_if_not_exist git-flow
|
||||
install_omf_package_if_not_exist sudope
|
||||
install_omf_package_if_not_exist wttr
|
||||
|
||||
# Update fish completions (auto generated from man pages)
|
||||
fish_update_completions
|
BIN
terminfo/.terminfo/a/alacritty
Normal file
BIN
terminfo/.terminfo/a/alacritty
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user