aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--.config/alacritty/alacritty.yml4
-rw-r--r--.config/fish/config.fish34
-rw-r--r--.config/fish/functions/256colors.fish5
-rw-r--r--.config/fish/functions/fish_greeting.fish29
-rw-r--r--.config/fish/functions/mkcd.fish9
-rw-r--r--.gitignore1
-rwxr-xr-xsetup.sh21
7 files changed, 93 insertions, 10 deletions
diff --git a/.config/alacritty/alacritty.yml b/.config/alacritty/alacritty.yml
index cb928db..5554618 100644
--- a/.config/alacritty/alacritty.yml
+++ b/.config/alacritty/alacritty.yml
@@ -419,8 +419,8 @@ colors:
# - (macOS) /bin/bash --login
# - (Linux/BSD) user login shell
# - (Windows) powershell
-#shell:
-# program: /bin/bash
+shell:
+ program: /usr/local/bin/fish
# args:
# - --login
diff --git a/.config/fish/config.fish b/.config/fish/config.fish
new file mode 100644
index 0000000..cdb7b10
--- /dev/null
+++ b/.config/fish/config.fish
@@ -0,0 +1,34 @@
+set -gx LANG 'ja_JP.UTF-8'
+
+set -gx VISUAL vim
+set -gx EDITOR vim
+
+set -gx LD_LIBRARY_PATH "$HOME/Downloads/lib:$HOME/lib:$LD_LIBRARY_PATH"
+
+set -gx PATH "/usr/local/bin:$PATH"
+
+set -gx PATH "$HOME/.cargo/bin:$PATH"
+set -gx PATH "$HOME/bin:$HOME/.local/bin:$PATH"
+
+set -gx PATH "/usr/local/opt/gettext/bin:$PATH"
+
+# To override system-provided Ruby with brewed Ruby
+set -gx PATH "/usr/local/opt/ruby/bin:$PATH"
+
+abbr -a rm rm -i
+abbr -a cp cp -i
+abbr -a mv mv -i
+
+abbr -a e vim
+abbr -a o open
+abbr -a g git
+abbr -a cat bat
+abbr -a find fd
+abbr -a grep rg
+abbr -a ls exa
+abbr -a lsa exa -a
+abbr -a lsl exa -l
+abbr -a lsal exa -al
+abbr -a lsla exa -al
+
+starship init fish | source
diff --git a/.config/fish/functions/256colors.fish b/.config/fish/functions/256colors.fish
new file mode 100644
index 0000000..822447a
--- /dev/null
+++ b/.config/fish/functions/256colors.fish
@@ -0,0 +1,5 @@
+function 256colors
+ for code in (seq 0 255)
+ echo -e '\e[38;05;'$code'm '(printf '%3d' $code)': Test'
+ end
+end
diff --git a/.config/fish/functions/fish_greeting.fish b/.config/fish/functions/fish_greeting.fish
new file mode 100644
index 0000000..0b2d131
--- /dev/null
+++ b/.config/fish/functions/fish_greeting.fish
@@ -0,0 +1,29 @@
+function fish_greeting
+ if [ $COLUMNS -lt 60 ]
+ echo
+ set_color --bold --italic 2188a0; echo ' Hello, World!'
+ set_color normal
+ set_color 166caa; echo ' ~~~~~~~~~~~~~~~~'
+ set_color 556a7d; echo ' ::<>'
+ set_color normal
+ echo
+ return
+ end
+
+ echo
+ set_color --bold
+ set_color 2aa197; echo ' _ _ _ _ __ __ _ _ _'
+ set_color 25949c; echo ' | | | | ___| | | ___ \ \ / /__ _ __| | __| | |'
+ set_color 2188a0; echo ' | |_| |/ _ \ | |/ _ \ \ \ /\ / / _ \| \'__| |/ _` | |'
+ set_color 1d7ea4; echo ' | _ | __/ | | (_) | \ V V / (_) | | | | (_| |_|'
+ set_color 1a75a7; echo ' |_| |_|\___|_|_|\___( ) \_/\_/ \___/|_| |_|\__,_(_)'
+ set_color 166caa; echo ' |/'
+ echo
+ set_color normal
+ set_color 166caa; echo ' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'
+ set_color 556a7d; echo ' ::<> ::<> ::<>'
+ set_color 556a7d; echo ' ::<> ::<> ::<> ::<>'
+ set_color 556a7d; echo ' ::<> ::<> ::<> ::<>'
+ set_color 556a7d; echo ' ::<> ::<> ::<>'
+ echo
+end
diff --git a/.config/fish/functions/mkcd.fish b/.config/fish/functions/mkcd.fish
new file mode 100644
index 0000000..bba3238
--- /dev/null
+++ b/.config/fish/functions/mkcd.fish
@@ -0,0 +1,9 @@
+function mkcd
+ if [ (count $argv) != 1 ]
+ echo "Usage: mkcd DIR"
+ return 1
+ end
+
+ mkdir -p $argv[1]
+ cd $argv[1]
+end
diff --git a/.gitignore b/.gitignore
index 619321f..758f8bb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
+/.config/fish/fish_variables
/.vim/autoload
/.vim/cache
/.vim/plugged
diff --git a/setup.sh b/setup.sh
index d4d8cf1..dd68908 100755
--- a/setup.sh
+++ b/setup.sh
@@ -1,12 +1,17 @@
-#!/bin/sh
+#!/bin/bash
-for name in .gitconfig .vim .vimrc .zshrc
-do
- ln -s -f ~/dotfiles/$name ~/$name
+for name in .gitconfig .vim .vimrc .zshrc; do
+ if [ ! -L ~/$name ]; then
+ ln -s -f ~/dotfiles/$name ~/$name
+ fi
done
-[ -d ~/.config ] || mkdir ~/.config
-for name in alacritty git starship.toml
-do
- ln -s -f ~/dotfiles/.config/$name ~/.config/$name
+if [ ! -d ~/.config ]; then
+ mkdir ~/.config
+fi
+
+for name in alacritty fish git starship.toml; do
+ if [ ! -L ~/.config/$name ]; then
+ ln -s -f ~/dotfiles/.config/$name ~/.config/$name
+ fi
done