Skip to content

sasakiy84/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dotfiles

セットアップ

以下のコマンドをプロンプトに張り付けて実行する

cat << "EOF" | bash
#!/bin/bash
git clone --bare https://github.com/sasakiy84/dotfiles.git $HOME/.cfg
function config {
   /usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME $@
}
mkdir -p .config-backup
config checkout
if [ $? = 0 ]; then
  echo "Checked out config.";
  else
    echo "Backing up pre-existing dot files.";
    config checkout 2>&1 | egrep "\s+\." | awk {'print $1'} | xargs -I{} mv {} .config-backup/{}
fi;
config checkout
config config status.showUntrackedFiles no

EOF

その後、以下を実行

$ chmod +x setup_shell.sh && ./setup_shell.sh
$ exec $SHELL -l

aquaによるパッケージの追加

$ aqua g -i
$ aqua i --all --only-link
$ config add -u
$ config commit -m "add package"
$ config push

設定ファイルの追加

# 適切なファイルを追加したあとに
$ config add file_path
$ config commit -m "add settings"
$ config push

TODOs

  • aquaを利用してバージョンアップに追従する

WSLで新しい環境を作る

windowsユーザーの場合、WSLを利用して新しい環境を気軽に作成できる。以下、ubuntuの例で説明する。 適当な場所にwslフォルダを作成し、コマンドライン上でそのなかに入る。 また、ここから、ubuntuのファイルをダウンロードしてwslフォルダのなかに入れておく。22.04は、ubuntu-jammy-wsl-amd64-wsl.rootfs.tar.gzというファイル。

その後、以下のようなコマンドを実行すれば環境が作成される。

wsl --import ubuntu22.04-test ./ubuntu22.04-test ./ubuntu-jammy-wsl-amd64-wsl.rootfs.tar.gz

wsl -l -vで作成された環境を確認できる。また、wsl -d ubuntu22.04-testでログインできる。

削除方法は以下の通り

wsl --unregister ubuntu22.04-test

参考

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published