Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .config/efm-langserver/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ languages:
yaml:
lint-command: 'yamllint -f parsable -'
lint-stdin: true
lint-format:
lint-formats:
- '%f:%l:%c: %m'
5 changes: 2 additions & 3 deletions .config/nvim/coc-settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"coc.preferences.formatOnSave": true,
"coc.preferences.useQuickfixForLocations": true,
"explorer.icon.enableNerdfont": true,
"rust-analyzer.updates.channel": "nightly",
"rust-analyzer.updates.channel": "stable",
"tsserver.log": "verbose",
"tsserver.trace.server": "verbose",
"yaml.format.enable": true,
Expand All @@ -72,6 +72,5 @@
"python.venvPath": ".",
"python.formatting.provider": "ruff",
"python.linting.ruffEnabled": true,
"biome.requireConfiguration": false,
"clangd.path": "~/dotfiles/.config/coc/extensions/coc-clangd-data/install/19.1.2/clangd_19.1.2/bin/clangd"
"biome.requireConfiguration": false
}
2 changes: 1 addition & 1 deletion .config/nvim/lua/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ require('lazy').setup({
config = function()
vim.keymap.set('n', '<space>n', '<cmd>NeotermToggle<CR>', { noremap = true })
require('neoterm').setup {
positon = 'fullscreen',
position = 'fullscreen',
noinsert = false
}
end
Expand Down
12 changes: 1 addition & 11 deletions .config/wezterm/.wezterm.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,7 @@ local config = {
}
}

if wezterm.target_triple == 'x86_64-pc-windows-msvc' then
config.default_domain = 'WSL:Arch'
config.wsl_domains = {
{
name = 'WSL:Arch',
distribution = 'Arch',
username = 'coil398',
default_cwd = '/home/coil398'
}
}
elseif wezterm.target_triple == 'aarch64-apple-darwin' or wezterm.target_triple == 'x64_64-apple-darwin' then
if wezterm.target_triple == 'aarch64-apple-darwin' or wezterm.target_triple == 'x64_64-apple-darwin' then
config.font_size = 13.0
end

Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/shellcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: ShellCheck

on:
push:
pull_request:

jobs:
shellcheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install ShellCheck
run: |
sudo apt-get update
sudo apt-get install -y shellcheck
- name: Run ShellCheck
run: |
set -e
shopt -s globstar nullglob || true
files=(etc/**/*.sh bin/**/*)
# Fallback if bashisms are not available
if [ ${#files[@]} -eq 0 ]; then
files=$(find etc bin -type f -name "*.sh" 2>/dev/null || true)
fi
echo "Linting: ${files[@]}"
shellcheck -S warning ${files[@]}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
!/.config/efm-langserver/
!/.config/alacritty/
!/.config/procs/
!/.config/wezterm/
!/.config/coc/
/node_modules/
.DS_Store
.node-version
Expand Down
4 changes: 2 additions & 2 deletions .tmux/.tmux.conf
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ set -g status-left-length 40
set -g status-left "#[fg=green]Session: #S #[fg=yellow]#I #[fg=cyan]#P"
## 右パネルを設定する
set -g status-right-length 150
set -g status-right "#[fg=white] #($TMUX_PLUGIN_MANAGER_PATH/tmux-mem-cpu-load/tmux-mem-cpu-load --interval 1 --averages-count 0) #[fg=red]#(cpu_temp) #[fg=green]#(get_gpu_temp 2) #[fg=yellow]#(wifi)#[default] #(get_battery -t) #[fg=blue] #(get_sound_device) #[fg=magenta] #(get_volume)#[fg=cyan][%Y-%m-%d(%a) %H:%M:%S]"
set -g status-right "#[fg=white] #($TMUX_PLUGIN_MANAGER_PATH/tmux-mem-cpu-load/tmux-mem-cpu-load --interval 1 --averages-count 0 || echo '-') #[fg=red]#(cpu_temp || echo '-') #[fg=green]#(get_gpu_temp 2 || echo '-') #[fg=yellow]#(wifi || echo '-')#[default] #(get_battery -t || echo '-') #[fg=blue] #(get_sound_device || echo '-') #[fg=magenta] #(get_volume || echo '-')#[fg=cyan][%Y-%m-%d(%a) %H:%M:%S]"
## リフレッシュの間隔を設定する(デフォルト 15秒)
set -g status-interval 1
set -g status-interval 5
## ウィンドウリストの位置を中心寄せにする
set -g status-justify centre
## ヴィジュアルノーティフィケーションを有効にする
Expand Down
12 changes: 7 additions & 5 deletions .zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,16 @@ export PATH="$HOME/.cargo/bin:$PATH"

export PATH="$HOME/.bin:$PATH"

# krew
export PATH="${KWER_ROOT:-$HOME/.krew}/bin:$PATH"
# krew: fix env var name (KREW_ROOT)
export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH"

fpath=($HOME/.zsh/completion $fpath)

# anyenv
export PATH="$HOME/.anyenv/bin:$PATH"
eval "$(anyenv init -)"
# anyenv: guard initialization when not installed
if command -v anyenv >/dev/null 2>&1; then
export PATH="$HOME/.anyenv/bin:$PATH"
eval "$(anyenv init -)"
fi

# Go
export GOPATH="$HOME/go"
Expand Down
25 changes: 22 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
My best dotfiles.

curl -fsSL https://raw.githubusercontent.com/coil398/dotfiles/master/etc/init.sh | sh
My best dotfiles.

- Install: `curl -fsSL https://raw.githubusercontent.com/coil398/dotfiles/master/etc/init.sh | sh`

Notes
- Do not commit absolute, machine-specific symlinks in the repo (e.g., `nvim -> /Users/...`).
- To link Neovim config on your machine, run one of:
- `sh etc/link.sh` (links dotfiles, including `.config` contents)
- `ln -snfv "$PWD/.config/nvim" "$HOME/.config/nvim"`

Baseline
- Linux baseline is Ubuntu; prefer apt-based tooling.
- Avoid hardcoding WSL distributions or user-specific settings in config files.

Prerequisites
- Ubuntu: `sudo apt update && sudo apt install -y git curl neovim tmux shellcheck`
- macOS: install Homebrew, then `brew install git curl neovim tmux shellcheck`

Keybindings
- tmux: prefix is `C-q` (Ctrl+q). Reload config: `prefix + r`.
- Neovim: toggle terminal (neoterm) with `<space>n`; Telescope is included, common mappings follow defaults (`<leader>ff`, etc., if configured).
- coc.nvim: format on save/type is enabled; check `:CocConfig` for language settings.
22 changes: 12 additions & 10 deletions etc/link.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
#!/bin/sh

set -eu

DOT_DIRECTORY="${HOME}/dotfiles"
cd ${DOT_DIRECTORY}
cd "$DOT_DIRECTORY"

for f in .??*
do
[[ ${f} = ".git" ]] && continue
[[ ${f} = ".gitignore" ]] && continue
[[ ${f} = ".DS_Store" ]] && continue
ln -snfv ${DOT_DIRECTORY}/${f} ${HOME}/${f}
for f in .??*; do
[ "$f" = ".git" ] && continue
[ "$f" = ".gitignore" ] && continue
[ "$f" = ".DS_Store" ] && continue
ln -snfv "$DOT_DIRECTORY/$f" "$HOME/$f"
done
ln -s ${DOT_DIRECTORY}/.tmux/.tmux.conf $HOME/.tmux.conf
if [[ `uname` = "Darwin" ]];then
ln -s ${DOT_DIRECTORY}/.tmux/.tmux.conf.mac $HOME/.tmux.conf.mac

ln -snfv "$DOT_DIRECTORY/.tmux/.tmux.conf" "$HOME/.tmux.conf"
if [ "$(uname)" = "Darwin" ]; then
ln -snfv "$DOT_DIRECTORY/.tmux/.tmux.conf.mac" "$HOME/.tmux.conf.mac"
fi
echo 'Deploy dotfiles completed.'
4 changes: 2 additions & 2 deletions etc/load.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bash
#!/usr/bin/env bash

export PLATFORM

Expand Down Expand Up @@ -245,7 +245,7 @@ log_fail() {
logging ERROR "$1" 1>&2
}

log_fail() {
log_warn() {
logging WARN "$1"
}

Expand Down
21 changes: 17 additions & 4 deletions etc/set.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,20 @@ case "${OS}" in
;;
esac

mv $HOME/.enhancd $HOME/dotfiles/.enhancd
mv $HOME/.cache $HOME/dotfiles/.cache
rm -rf $HOME/.config
sh $HOME/.config/nvim/init.sh
mv "$HOME/.enhancd" "$HOME/dotfiles/.enhancd" 2>/dev/null || true
mv "$HOME/.cache" "$HOME/dotfiles/.cache" 2>/dev/null || true

# Make setup non-destructive: avoid removing the entire ~/.config
# If ~/.config exists and is not a symlink, back it up once with a timestamp
if [ -e "$HOME/.config" ] && [ ! -L "$HOME/.config" ]; then
backup_dir="$HOME/.config.backup.$(date +%Y%m%d%H%M%S)"
echo "Backing up ~/.config to ${backup_dir}"
mv "$HOME/.config" "$backup_dir"
fi

# If this repo provides a ~/.config directory, link it when no link exists
if [ -d "$HOME/dotfiles/.config" ] && [ ! -L "$HOME/.config" ]; then
ln -s "$HOME/dotfiles/.config" "$HOME/.config"
fi

sh "$HOME/.config/nvim/init.sh"
1 change: 0 additions & 1 deletion nvim

This file was deleted.

Loading