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]]
|
- [[#theme][Theme]]
|
||||||
- [[#plugin-manager][Plugin Manager]]
|
- [[#plugin-manager][Plugin Manager]]
|
||||||
- [[#plugins][Plugins]]
|
- [[#plugins][Plugins]]
|
||||||
- [[#neovim][Neovim]]
|
- [[#fish][Fish]]
|
||||||
- [[#theme-1][Theme]]
|
- [[#theme-1][Theme]]
|
||||||
|
- [[#package-manager][Package Manager]]
|
||||||
|
- [[#packages][Packages]]
|
||||||
|
- [[#neovim][Neovim]]
|
||||||
|
- [[#theme-2][Theme]]
|
||||||
- [[#plugin-manager-1][Plugin Manager]]
|
- [[#plugin-manager-1][Plugin Manager]]
|
||||||
- [[#plugins-1][Plugins]]
|
- [[#plugins-1][Plugins]]
|
||||||
- [[#general][General]]
|
- [[#general][General]]
|
||||||
@ -34,6 +38,7 @@ A repository of my personal server configuration files.
|
|||||||
- [[http://www.gnu.org/software/stow/][stow]]
|
- [[http://www.gnu.org/software/stow/][stow]]
|
||||||
|
|
||||||
* Applications
|
* Applications
|
||||||
|
- [[https://github.com/alacritty/alacritty][alacritty]]
|
||||||
- [[https://the.exa.website/][exa]]
|
- [[https://the.exa.website/][exa]]
|
||||||
- [[https://git-scm.com/][git]]
|
- [[https://git-scm.com/][git]]
|
||||||
- [[https://gnupg.org/][gnupg]]
|
- [[https://gnupg.org/][gnupg]]
|
||||||
@ -62,6 +67,20 @@ A repository of my personal server configuration files.
|
|||||||
- [[https://github.com/zsh-users/zsh-autosuggestions][zsh-autosuggestions]]
|
- [[https://github.com/zsh-users/zsh-autosuggestions][zsh-autosuggestions]]
|
||||||
- [[https://github.com/zsh-users/zsh-syntax-highlighting][zsh-syntax-highlighting]]
|
- [[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
|
* Neovim
|
||||||
** Theme
|
** Theme
|
||||||
- [[https://github.com/morhetz/gruvbox][gruvbox]]
|
- [[https://github.com/morhetz/gruvbox][gruvbox]]
|
||||||
|
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
|
22
install
22
install
@ -1,21 +1,31 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Create nvim config directory if it doesn't exist
|
function mkdir_if_not_exist() {
|
||||||
if [ ! -d ~/.config/nvim ]; then
|
if [ ! -d "$1" ]; then
|
||||||
echo "Creating ~/.config/nvim"
|
echo "Creating $1"
|
||||||
mkdir -p ~/.config/nvim
|
mkdir -p "$1"
|
||||||
fi
|
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
|
||||||
|
|
||||||
for d in $(ls -d */ | cut -f1 -d '/'); do
|
for d in $(ls -d */ | cut -f1 -d '/'); do
|
||||||
echo "Linking $d..."
|
echo "Linking $d..."
|
||||||
(stow $d)
|
(stow $d)
|
||||||
done
|
done
|
||||||
|
|
||||||
|
if [ -f /usr/bin/zsh ]; then
|
||||||
# Install zplug if it doesn't exist yet
|
# Install zplug if it doesn't exist yet
|
||||||
if [ ! -d ~/.zplug ]; then
|
if [ ! -d ~/.zplug ]; then
|
||||||
echo "Installing zplug"
|
echo "Installing zplug"
|
||||||
curl -sL --proto-redir -all,https https://raw.githubusercontent.com/zplug/installer/master/installer.zsh | zsh
|
curl -sL --proto-redir -all,https https://raw.githubusercontent.com/zplug/installer/master/installer.zsh | zsh
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# Install vim plugins & requirements
|
# Install vim plugins & requirements
|
||||||
if [ ! "$(pip list --user | grep 'pynvim' | wc -l)" -ge 1 ]; then
|
if [ ! "$(pip list --user | grep 'pynvim' | wc -l)" -ge 1 ]; then
|
||||||
@ -29,3 +39,7 @@ if [ ! -d ~/.config/nvim/plugged ]; then
|
|||||||
fi
|
fi
|
||||||
# Install nvim pluugins
|
# Install nvim pluugins
|
||||||
nvim +PlugInstall +qall
|
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