commit
9a2473da12
4 changed files with 44 additions and 1 deletions
23
bin/install.sh
Normal file → Executable file
23
bin/install.sh
Normal file → Executable file
|
@ -1 +1,22 @@
|
||||||
ln -s (pwd)/dotfiles/fish/config.fish ~/.config/fish/config.fish
|
#!/usr/bin/bash
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
# =========================================================
|
||||||
|
# check executing location
|
||||||
|
# =========================================================
|
||||||
|
if [ ! -d "bin" -a ! -d "dotfiles" ]; then
|
||||||
|
echo "Wrong execution location"
|
||||||
|
echo "Please run this script on dotfiles root folder."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# =========================================================
|
||||||
|
# links
|
||||||
|
# =========================================================
|
||||||
|
ln -sf $(pwd)/dotfiles/fish/config.fish ~/.config/fish/config.fish
|
||||||
|
ln -sf $(pwd)/dotfiles/starship/starship.toml ~/.config/starship.toml
|
||||||
|
ln -sf $(pwd)/dotfiles/tmux.conf ~/.tmux.conf
|
||||||
|
|
||||||
|
|
||||||
|
ln -sf $(pwd)/dotfiles/nvim/init.lua ~/.config/nvim/init.lua
|
||||||
|
|
2
bin/install_ubuntu.sh
Normal file
2
bin/install_ubuntu.sh
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
#!/usr/bin/bash -euo
|
||||||
|
|
|
@ -19,10 +19,29 @@ if status is-interactive
|
||||||
source ~/.opam/opam-init/init.fish > /dev/null 2> /dev/null; or true
|
source ~/.opam/opam-init/init.fish > /dev/null 2> /dev/null; or true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# starship
|
||||||
|
starship init fish | source
|
||||||
|
|
||||||
|
function set_win_title
|
||||||
|
echo -ne "\033]0; (basename "$PWD") \007"
|
||||||
|
end
|
||||||
|
set starship_precmd_uesr_func "set_win_title"
|
||||||
|
|
||||||
|
# keychain
|
||||||
|
set -x SHELL fish
|
||||||
|
keychain --eval --quiet -Q id_rsa, id_ed25519 | source
|
||||||
|
set -x SHELL bash
|
||||||
|
|
||||||
|
# opam
|
||||||
|
# source ~/.opam/opam-init/init.fish > /dev/null 2> /dev/null; or true
|
||||||
|
opam env --shell fish | source
|
||||||
|
|
||||||
# key bindings
|
# key bindings
|
||||||
bind \b backward-kill-word
|
bind \b backward-kill-word
|
||||||
|
|
||||||
|
|
||||||
|
# env
|
||||||
|
set -x LESS '-i -r -M -R -S -W -z-4 -x4'
|
||||||
# save fish log to my custom file
|
# save fish log to my custom file
|
||||||
set -gx my_fish_history "$HOME/my_fish_history.txt"
|
set -gx my_fish_history "$HOME/my_fish_history.txt"
|
||||||
function save_myhistory --on-event fish_prompt -d "Save custom shell log to $my_fish_history"
|
function save_myhistory --on-event fish_prompt -d "Save custom shell log to $my_fish_history"
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
--print("init.lua loaded")
|
||||||
-----------------------------------------------------------
|
-----------------------------------------------------------
|
||||||
-- basic configurations
|
-- basic configurations
|
||||||
vim.o.number = true
|
vim.o.number = true
|
||||||
|
|
Loading…
Reference in a new issue