Merge pull request #2 from js0ny/chezmoi

Use `chezmoi` and `home-manager` to organise dotfiles repo
This commit is contained in:
js0ny 2025-10-20 04:00:43 +01:00 committed by GitHub
commit 7d8e0b1211
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
541 changed files with 11948 additions and 15196 deletions

1
.chezmoiroot Normal file
View file

@ -0,0 +1 @@
home

18
.gitignore vendored
View file

@ -1,9 +1,12 @@
# Log # Log
*.log *.log
# Private Files # fish
*private* dot_config/fish/fish_variables
.private.env.* dot_config/fish/completions
dot_config/fish/functions/br.fish
dot_config/fish/functions/dotenv.fish
# Test files # Test files
test/ test/
@ -29,8 +32,6 @@ tools/nushell/
.venv/ .venv/
gitconfig
# Lock files # Lock files
lazy-lock.json lazy-lock.json
@ -38,10 +39,11 @@ lazy-lock.json
# Emacs # Emacs
*.elc *.elc
common/**/*current*
**/current.*
default.target.wants default.target.wants
nvim-healthcheck.txt nvim-healthcheck.txt
private_pid
private_security
private_fish_variables

View file

@ -1,45 +0,0 @@
test:
echo "DOTFILES={{DOTFILES}}"
echo "XDG_CONFIG_HOME={{XDG_CONFIG_HOME}}"
echo "XDG_DATA_HOME={{XDG_DATA_HOME}}"
check:
@just check_shell
format:
@just format_shell
[private]
[unix]
check_shell:
shellcheck -x -s sh --severity=error **/*.sh platforms/mac/yabairc
shellcheck -x -s bash --severity=error **/*.bash tools/bash/* **/*.bashrc
[private]
[unix]
format_shell:
shfmt -w -i 2 -ci -bn -p **/*.sh
shfmt -w -i 2 -ci -bn -ln bash **/*.bash platforms/mac/sketchybar/sketchybarrc
# Ignore syntax errors in zsh files
shfmt -w -i 2 -ci -bn -ln bash **/*.zsh tools/zsh/**/* **/zshrc || true
[private]
check_info:
shellcheck -x -s sh **/*.sh platforms/mac/yabairc
shellcheck -x -s bash **/*.bash tools/bash/* scripts/*.{sh,zsh,bash} **/*.bashrc
[private]
init:
git remote add github git@github.com:js0ny/dotfiles.git
git remote add codeberg git@codeberg.org:js0ny/dotfiles.git
[private]
push:
git push github master
git push codeberg master
[private]
pull:
git pull github master

View file

@ -1,26 +0,0 @@
# Sudo and coreutils are required
LN := \
if os_family() == "windows" {
"sudo ln -sf"
} else {
"ln -sf"
}
CLIP := \
if os() == "windows" { "clip.exe" } \
else if os() == "linux" { "wl-copy" } \
else if os() == "macos" { "pbcopy" } \
else { "" }
CURL := \
if os() == "windows" { "Invoke-WebRequest" } \
else if os() == "linux" { "curl -L" } \
else if os() == "macos" { "curl -L" } \
else { "" }
CURL_OUT := \
if os() == "windows" { "-OutFile" } \
else if os() == "linux" { "-o" } \
else if os() == "macos" { "-o" } \
else { "" }

View file

@ -1,52 +0,0 @@
ideavim:
{{LN}} {{DOTFILES}}/common/ideavimrc {{XDG_CONFIG_HOME}}/ideavim/ideavimrc
git clone https://github.com/MarcoIeni/intellimacs {{join(home_directory(), ".local/share/intellimacs")}} --depth 1
lsd:
-mkdir {{XDG_CONFIG_HOME}}/lsd
{{LN}} {{DOTFILES}}/common/lsd.yaml {{XDG_CONFIG_HOME}}/lsd/config.yaml
bat:
mkdir -p "$(bat --config-dir)/themes"
wget -P "$(bat --config-dir)/themes" https://github.com/catppuccin/bat/raw/main/themes/Catppuccin%20Latte.tmTheme
wget -P "$(bat --config-dir)/themes" https://github.com/catppuccin/bat/raw/main/themes/Catppuccin%20Frappe.tmTheme
wget -P "$(bat --config-dir)/themes" https://github.com/catppuccin/bat/raw/main/themes/Catppuccin%20Macchiato.tmTheme
wget -P "$(bat --config-dir)/themes" https://github.com/catppuccin/bat/raw/main/themes/Catppuccin%20Mocha.tmTheme
{{LN}} {{DOTFILES}}/common/bat.config.dark {{DOTFILES}}/common/bat.config
{{LN}} {{DOTFILES}}/common/bat.config {{XDG_CONFIG_HOME}}/bat/config
[unix]
neovide:
which neovide
-mkdir -p {{XDG_CONFIG_HOME}}/neovide
{{LN}} {{DOTFILES}}/platforms/{{OS}}/neovide.toml {{XDG_CONFIG_HOME}}/neovide/config.toml
[linux]
readline:
mkdir -p {{XDG_CONFIG_HOME}}/readline
{{LN}} {{DOTFILES}}/common/inputrc {{XDG_CONFIG_HOME}}/readline/inputrc
[unix]
rtorrent:
mkdir -p {{XDG_CONFIG_HOME}}/rtorrent
{{LN}} {{DOTFILES}}/common/rtorrent.rc {{XDG_CONFIG_HOME}}/rtorrent/rtorrent.rc
mkdir -p {{XDG_DATA_HOME}}/rtorrent/session
mkdir -p {{XDG_DATA_HOME}}/rtorrent/watch
starship:
{{LN}} {{DOTFILES}}/common/starship.toml {{XDG_CONFIG_HOME}}/starship.toml
[unix]
vim:
mkdir -p {{XDG_DATA_HOME}}/vim/after
mkdir -p {{XDG_STATE_HOME}}/vim/{backup,swap,undo,view}
mkdir -p {{XDG_CONFIG_HOME}}/vim/
ln -sf {{DOTFILES}}/common/vimrc {{XDG_CONFIG_HOME}}/vim/vimrc
[windows]
vim:
New-Item -ItemType SymbolicLink -Path $HOME/_vimrc -Value {{DOTFILES}}/common/vim.noxdg.vimrc

View file

@ -1,61 +0,0 @@
[linux]
systemd:
{{LN}} {{DOTFILES}}/platforms/{{OS}}/systemd {{XDG_CONFIG_HOME}}/systemd
[linux]
keyd:
-which keyd || sudo pacman -S keyd --noconfirm || sudo apt install keyd --yes || @just build_keyd
sudo mkdir /etc/keyd/
sudo cp {{DOTFILES}}/platforms/linux/keyd/default.conf /etc/keyd/default.conf
mkdir -p {{XDG_CONFIG_HOME}}/keyd
{{LN}} {{DOTFILES}}/platforms/linux/keyd/app.conf {{XDG_CONFIG_HOME}}/keyd/app.conf
sudo systemctl enable --now keyd.service
[linux]
[private]
build_keyd:
git clone https://github.com/rvaiya/keyd $HOME/.local/build/keyd
cd $HOME/.local/build/keyd && make && sudo make install
[linux]
flatpak:
flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
[linux]
swaylock:
mkdir -p {{XDG_CONFIG_HOME}}/swaylock
{{LN}} {{DOTFILES}}/platforms/linux/swaylock {{XDG_CONFIG_HOME}}/swaylock/config
[linux]
dunst:
mkdir -p {{XDG_CONFIG_HOME}}/dunst
{{LN}} {{DOTFILES}}/platforms/linux/dunstrc {{XDG_CONFIG_HOME}}/dunst/dunstrc
[linux]
hypr:
{{LN}} {{DOTFILES}}/platforms/linux/hypr/hyprland/dark.conf {{DOTFILES}}/platforms/linux/hypr/hyprland/current.conf
{{LN}} {{DOTFILES}}/platforms/linux/hypr {{XDG_CONFIG_HOME}}/hypr
[linux]
rofi:
{{LN}} {{DOTFILES}}/platforms/linux/rofi/dark.rasi {{DOTFILES}}/platforms/linux/rofi/current.rasi
{{LN}} {{DOTFILES}}/platforms/linux/rofi {{XDG_CONFIG_HOME}}/rofi
[linux]
waybar:
{{LN}} {{DOTFILES}}/platforms/linux/waybar {{XDG_CONFIG_HOME}}/waybar
{{LN}} {{DOTFILES}}/platforms/linux/waybar/dark.css {{DOTFILES}}/platforms/linux/waybar/current.css
[linux]
hyprland:
@just hypr
@just dunst
@just swaylock
@just rofi
[linux]
fcitx:
[ -d {{XDG_CONFIG_HOME}}/fcitx5 ] && mv {{XDG_CONFIG_HOME}}/fcitx {{XDG_CONFIG_HOME}}/fcitx5.bak
{{LN}} {{DOTFILES}}/platforms/linux/fcitx5 {{XDG_CONFIG_HOME}}/fcitx5

View file

@ -1,15 +0,0 @@
uv:
uv init {{XDG_DATA_HOME}}/uvenv
cd {{XDG_DATA_HOME}}/uvenv
uv venv
uv add -r {{DOTFILES}}/bootstrap/components/requirements.txt
vivaldi:
{{CURL}} https://github.com/catppuccin/vivaldi/releases/download/1.0.0-ctpv2/Catppuccin.Latte.Lavender.zip {{CURL_OUT}} "$HOME/Downloads/vivaldi-light.zip" # Catppuccin Latte Lavender
{{CURL}} https://github.com/catppuccin/vivaldi/releases/download/1.0.0-ctpv2/Catppuccin.Mocha.Lavender.zip {{CURL_OUT}} "$HOME/Downloads/vivaldi-dark.zip" # Catppuccin Mocha Lavender
zotero:
{{CURL}} https://github.com/syt2/zotero-addons/releases/download/V1.8.1/zotero-addons.xpi {{CURL_OUT}} "$HOME/Downloads/zotero-addons.xpi"

View file

@ -1,69 +0,0 @@
[unix]
kitty:
which kitty
{{LN}} {{DOTFILES}}/tools/kitty {{XDG_CONFIG_HOME}}/kitty
neovim:
which nvim
{{LN}} {{DOTFILES}}/tools/nvim {{XDG_CONFIG_HOME}}/nvim
nvim --headless +checkhealth +"w nvim-healthcheck.txt" +qall
nvim:
@just neovim
[linux]
bash:
{{LN}} {{DOTFILES}}/tools/bash {{XDG_CONFIG_HOME}}/bash
sudo cp {{DOTFILES}}/tools/bash/xdg-compat.sh /etc/profile.d/xdg-compat.sh
[unix]
fish:
{{LN}} {{DOTFILES}}/tools/fish {{XDG_CONFIG_HOME}}/fish
{{CURL}} https://raw.githubusercontent.com/SpaceAceMonkey/dotenv-for-fish/refs/heads/main/dotenv.fish {{CURL_OUT}} "{{DOTFILES}}/tools/fish/functions/dotenv.fish"
[unix]
screen:
{{LN}} {{DOTFILES}}/tools/screen {{XDG_CONFIG_HOME}}/screen
[unix]
tmux:
{{LN}} {{DOTFILES}}/tools/tmux {{XDG_CONFIG_HOME}}/tmux
thunderbird:
{{CURL}} https://github.com/wshanks/tbkeys/releases/download/v2.4.0/tbkeys.xpi {{CURL_OUT}} "$HOME/Downloads/tbkeys.xpi"
{{CURL}} https://github.com/htyxyt/htyxyt-immersive-translate-Thunderbird/releases/download/thunderbird-v1.14.8/immersive-translate-Thunderbird.v1.14.8.xpi {{CURL_OUT}} "$HOME/Downloads/immersive-translate-Thunderbird.xpi"
{{CURL}} https://raw.githubusercontent.com/catppuccin/thunderbird/refs/heads/main/themes/mocha/mocha-lavender.xpi {{CURL_OUT}} "$HOME/Downloads/thunderbird-dark.xpi"
cat {{DOTFILES}}/tools/thunderbird/tbkeys.json | {{CLIP}}
wezterm:
which wezterm
{{LN}} {{DOTFILES}}/tools/wezterm {{XDG_CONFIG_HOME}}/wezterm
yazi:
which yazi || cargo install --locked yazi-fm yazi-cli
-ya pack -a llanosrocas/yaziline
-ya pack -a yazi-rs/plugins:git
-ya pack -a Rolv-Apneseth/starship
[unix]
zsh:
-[[ -f /etc/zshenv ]] && sudo cp {{DOTFILES}}/tools/zsh/global.zshenv /etc/zshenv # or /etc/zsh/zshenv
-[[ -f /etc/zsh/zshenv ]] && sudo cp {{DOTFILES}}/tools/zsh/global.zshenv /etc/zsh/zshenv
mkdir -p {{XDG_CONFIG_HOME}}/zsh
{{LN}} {{DOTFILES}}/tools/zsh/zshenv {{XDG_CONFIG_HOME}}/zsh/.zshenv
{{LN}} {{DOTFILES}}/tools/zsh/zshrc {{XDG_CONFIG_HOME}}/zsh/.zshrc
{{LN}} {{DOTFILES}}/tools/zsh/zprofile {{XDG_CONFIG_HOME}}/zsh/.zprofile
test -d {{XDG_CONFIG_HOME}}/zsh/plugins/zsh-autosuggestions || git clone --depth 1 https://github.com/zsh-users/zsh-autosuggestions.git {{XDG_CONFIG_HOME}}/zsh/plugins/zsh-autosuggestions
test -d {{XDG_CONFIG_HOME}}/zsh/plugins/zsh-syntax-highlighting || git clone --depth 1 https://github.com/zsh-users/zsh-syntax-highlighting.git {{XDG_CONFIG_HOME}}/zsh/plugins/zsh-syntax-highlighting
test -d {{XDG_CONFIG_HOME}}/zsh/plugins/zsh-history-substring-search || git clone --depth 1 https://github.com/zsh-users/zsh-history-substring-search.git {{XDG_CONFIG_HOME}}/zsh/plugins/zsh-history-substring-search
test -d {{XDG_CONFIG_HOME}}/zsh/plugins/zsh-completions || git clone --depth 1 https://github.com/zsh-users/zsh-completions.git {{XDG_CONFIG_HOME}}/zsh/plugins/zsh-completions
[linux]
install_emacs:
git clone --depth 1 https://github.com/emacs-mirror/emacs.git --branch feature/igc $HOME/.local/build/emacs-igc-build
cd $HOME/.local/build/emacs-igc-build
./autogen.sh
./configure --with-mailutils --with-native-compilation --with-pgtk --with-tree-sitter --with-imagemagick
make -j$(nproc)
sudo make install

View file

@ -1,42 +0,0 @@
OS := \
if os() == "linux" {
if env("WSL_DISTRO_NAME","") != "" {
"wsl"
} else {
"linux"
}
} else if os() == "windows" {
"win"
} else if os() == "macos" {
"mac"
} else { "" }
DOTFILES := join(home_directory(), ".dotfiles")
XDG_CONFIG_HOME := \
if env("XDG_CONFIG_HOME", "") != "" {env("XDG_CONFIG_HOME", "")} \
else {
if os_family() == "windows" {
env("APPDATA")
} else {
join(home_directory(), ".config")
}
}
XDG_DATA_HOME := \
if env("XDG_DATA_HOME", "") != "" {env("XDG_DATA_HOME", "")} \
else {
if os_family() == "windows" {
env("LOCALAPPDATA", "")
} else {
join(home_directory(), ".local/share")
}
}
XDG_STATE_HOME := \
if env("XDG_STATE_HOME", "") != "" {env("XDG_STATE_HOME", "")} \
else {
if os_family() == "windows" {
join(env("LOCALAPPDATA", ""), "state")
} else {
join(home_directory(), ".local/state")
}
}

View file

@ -1,15 +0,0 @@
# set shell := ["fish", "-c"]
set shell := ["bash", "-c"]
set windows-shell := ["pwsh", "-c"]
import '.just.d/vars.just'
import '.just.d/cmds.just'
import '.just.d/common.just'
import '.just.d/tools.just'
import '.just.d/misc.just'
import '.just.d/linux.just'
import '.just.d/check.just'
_default:
@just test
@just --list

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 MiB

View file

@ -1,11 +0,0 @@
#!/bin/sh
# shellcheck shell=sh
echo "[INFO] Installing DOOM Emacs"
echo "[ACTION] Request Human Takeover"
test -d ~/.config/emacs && mv ~/.config/emacs ~/.config/emacs.bak
git clone --depth 1 https://github.com/doomemacs/doomemacs ~/.config/emacs
~/.config/emacs/bin/doom install
~/.config/emacs/bin/doom sync
echo "[INFO] Installing Emacs-Rime"
git clone --depth 1 https://github.com/js0ny/Rime.git ~/.config/emacs/.local/cache/rime

View file

@ -1,231 +0,0 @@
#!/usr/bin/env bash
# Adds better error handling and safety features
# shellcheck disable=SC2016
set -e # Exit immediately if a command exits with a non-zero status
set -u # Treat unset variables as an error
# Create temporary working directory
TEMP_DIR="${HOME}/.tmp/catppuccin-install"
mkdir -p "${TEMP_DIR}"
# Create config directories
mkdir -p "${HOME}/.config/tmux/plugins"
mkdir -p "${HOME}/.config/yazi"
mkdir -p "${HOME}/.config/btop/themes"
mkdir -p "${HOME}/.config/git"
mkdir -p "${HOME}/.config/lsd"
mkdir -p "${HOME}/.local/share/mc/skins"
mkdir -p "${HOME}/.config/fish/themes"
mkdir -p "${HOME}/.local/share/fcitx5/themes"
# Function for downloading files
download_file() {
local url="$1"
local output_path="$2"
local output_dir
# Extract directory from output path
output_dir=$(dirname "$output_path")
# Create directory if it doesn't exist
if [ ! -d "$output_dir" ]; then
mkdir -p "$output_dir"
fi
# Print status message
echo "Downloading: $url"
echo " to: $output_path"
# Download with curl (using -L to follow redirects)
if ! curl -L -s --fail "$url" -o "$output_path"; then
echo "Error: Failed to download $url" >&2
return 1
fi
# Verify file was downloaded
if [ ! -f "$output_path" ]; then
echo "Error: File was not created at $output_path" >&2
return 1
fi
echo "Download successful."
return 0
}
# Function to check if command exists
command_exists() {
command -v "$1" >/dev/null 2>&1
}
# Install Bat themes
if command_exists bat; then
BAT_CONFIG_DIR=$(bat --config-dir 2>/dev/null || echo "${HOME}/.config/bat")
mkdir -p "${BAT_CONFIG_DIR}/themes"
echo "Installing Bat themes..."
THEMES=("Latte" "Frappe" "Macchiato" "Mocha")
for theme in "${THEMES[@]}"; do
download_file "https://github.com/catppuccin/bat/raw/main/themes/Catppuccin%20${theme}.tmTheme" \
"${BAT_CONFIG_DIR}/themes/Catppuccin ${theme}.tmTheme"
done
echo "Rebuilding Bat cache..."
bat cache --build || echo "WARNING: Failed to rebuild Bat cache" >&2
else
echo "Bat not found, skipping Bat themes installation" >&2
fi
# Install Tmux plugin
if command_exists tmux; then
echo "Installing Tmux plugin..."
TMUX_PLUGIN_DIR="${HOME}/.config/tmux/plugins/catppuccin"
rm -rf "${TMUX_PLUGIN_DIR}"
mkdir -p "${TMUX_PLUGIN_DIR}"
if command_exists git; then
if ! git clone -b v2.1.2 --depth=1 https://github.com/catppuccin/tmux.git "${TMUX_PLUGIN_DIR}/tmux" 2>/dev/null; then
echo "WARNING: Failed to clone Tmux plugin repository" >&2
fi
else
echo "Git not found, skipping Tmux plugin installation" >&2
fi
else
echo "Tmux not found, skipping Tmux plugin installation" >&2
fi
# Install Yazi theme
if command_exists yazi; then
echo "Installing Yazi theme..."
download_file "https://raw.githubusercontent.com/catppuccin/yazi/main/themes/mocha/catppuccin-mocha-lavender.toml" \
"${HOME}/.config/yazi/theme.toml"
else
echo "Yazi not found, skipping Yazi theme installation" >&2
fi
# Install BTopa themes
if command_exists btop; then
echo "Installing BTopa themes..."
download_file "https://raw.githubusercontent.com/catppuccin/btop/main/themes/catppuccin_mocha.theme" \
"${HOME}/.config/btop/themes/catppuccin_mocha.theme"
download_file "https://raw.githubusercontent.com/catppuccin/btop/main/themes/catppuccin_latte.theme" \
"${HOME}/.config/btop/themes/catppuccin_latte.theme"
else
echo "BTopa not found, skipping BTopa themes installation" >&2
fi
# Install Delta config
echo "Installing Delta config..."
download_file "https://raw.githubusercontent.com/catppuccin/delta/main/catppuccin.gitconfig" \
"${HOME}/.config/git/catppuccin-delta.gitconfig"
# Configure FZF
if command_exists fzf; then
echo "Configuring FZF..."
# Check shell type to determine how to set environment variables
if [ -n "${FISH_VERSION:-}" ] || command_exists fish; then
# For Fish shell
fish -c 'set -U FZF_DEFAULT_OPTS "--color=bg+:#313244,bg:#1e1e2e,spinner:#f5e0dc,hl:#f38ba8 --color=fg:#cdd6f4,header:#f38ba8,info:#cba6f7,pointer:#f5e0dc --color=marker:#b4befe,fg+:#cdd6f4,prompt:#cba6f7,hl+:#f38ba8 --color=selected-bg:#45475a --multi"' \
|| echo "WARNING: Failed to set FZF options for Fish shell" >&2
else
# For Bash/Zsh - add to both .bashrc and .zshrc if they exist
FZF_CONFIG="export FZF_DEFAULT_OPTS=\"--color=bg+:#313244,bg:#1e1e2e,spinner:#f5e0dc,hl:#f38ba8 --color=fg:#cdd6f4,header:#f38ba8,info:#cba6f7,pointer:#f5e0dc --color=marker:#b4befe,fg+:#cdd6f4,prompt:#cba6f7,hl+:#f38ba8 --color=selected-bg:#45475a --multi\""
# Add to .bashrc if it exists
if [ -f "${HOME}/.bashrc" ]; then
if ! grep -q "FZF_DEFAULT_OPTS.*catppuccin" "${HOME}/.bashrc"; then
echo "${FZF_CONFIG}" >>"${HOME}/.bashrc"
echo "Added FZF configuration to .bashrc"
fi
fi
# Add to .zshrc if it exists
if [ -f "${HOME}/.zshrc" ]; then
if ! grep -q "FZF_DEFAULT_OPTS.*catppuccin" "${HOME}/.zshrc"; then
echo "${FZF_CONFIG}" >>"${HOME}/.zshrc"
echo "Added FZF configuration to .zshrc"
fi
fi
fi
else
echo "FZF not found, skipping FZF configuration" >&2
fi
# Install LSD themes
if command_exists lsd; then
echo "Installing LSD themes..."
download_file "https://raw.githubusercontent.com/catppuccin/lsd/main/themes/catppuccin-mocha/colors.yaml" \
"${HOME}/.config/lsd/colors.yaml"
download_file "https://raw.githubusercontent.com/catppuccin/lsd/main/themes/catppuccin-latte/colors.yaml" \
"${HOME}/.config/lsd/colors-light.yaml"
else
echo "LSD not found, skipping LSD themes installation" >&2
fi
# Install Midnight Commander skin
echo "Installing Midnight Commander skin..."
download_file "https://raw.githubusercontent.com/catppuccin/mc/main/catppuccin.ini" \
"${HOME}/.local/share/mc/skins/catppuccin.ini"
# Print MC configuration hint
echo "Note: To use the Midnight Commander theme:"
echo " - Change or add skin=catppuccin in the [Midnight-Commander] section inside ~/.config/mc/ini"
echo " - OR choose the skin inside Midnight Commander through F9 > Options > Appearance"
echo " - Save setup through F9 > Options > Save setup"
# Install PowerShell module
if command_exists pwsh; then
echo "Installing PowerShell module..."
PS_MODULE_PATH=$(pwsh -C 'Write-Output $Env:PSModulePath.split(":")[0]' 2>/dev/null)
if [ -n "${PS_MODULE_PATH}" ]; then
if command_exists git; then
if ! git clone --depth=1 https://github.com/catppuccin/powershell.git "${PS_MODULE_PATH}/Catppuccin" 2>/dev/null; then
echo "WARNING: Failed to clone PowerShell module repository" >&2
fi
else
echo "Git not found, skipping PowerShell module installation" >&2
fi
else
echo "PowerShell module path not found, skipping PowerShell module installation" >&2
fi
else
echo "PowerShell not found, skipping PowerShell module installation" >&2
fi
# Install Fish themes
if command_exists fish; then
echo "Installing Fish themes..."
download_file "https://raw.githubusercontent.com/catppuccin/fish/main/themes/Catppuccin%20Mocha.theme" \
"${HOME}/.config/fish/themes/Catppuccin Mocha.theme"
download_file "https://raw.githubusercontent.com/catppuccin/fish/main/themes/Catppuccin%20Latte.theme" \
"${HOME}/.config/fish/themes/Catppuccin Latte.theme"
else
echo "Fish not found, skipping Fish themes installation" >&2
fi
# Install Fcitx5 themes
if command_exists fcitx5; then
echo "Installing Fcitx5 themes..."
rm -rf "${TEMP_DIR}/fcitx5"
if command_exists git; then
if git clone --depth=1 https://github.com/catppuccin/fcitx5.git "${TEMP_DIR}/fcitx5" 2>/dev/null; then
cp -r "${TEMP_DIR}/fcitx5/src/"* "${HOME}/.local/share/fcitx5/themes/"
else
echo "WARNING: Failed to clone Fcitx5 repository" >&2
fi
else
echo "Git not found, skipping Fcitx5 themes installation" >&2
fi
else
echo "Fcitx5 not found, skipping Fcitx5 themes installation" >&2
fi
# Clean up temporary directory
rm -rf "${TEMP_DIR}"
echo "Catppuccin themes installation completed!"

View file

@ -1,43 +0,0 @@
mkdir -p ~/.tmp
# Bat
mkdir -p "$(bat --config-dir)/themes"
wget -P "$(bat --config-dir)/themes" https://github.com/catppuccin/bat/raw/main/themes/Catppuccin%20Latte.tmTheme
wget -P "$(bat --config-dir)/themes" https://github.com/catppuccin/bat/raw/main/themes/Catppuccin%20Frappe.tmTheme
wget -P "$(bat --config-dir)/themes" https://github.com/catppuccin/bat/raw/main/themes/Catppuccin%20Macchiato.tmTheme
wget -P "$(bat --config-dir)/themes" https://github.com/catppuccin/bat/raw/main/themes/Catppuccin%20Mocha.tmTheme
bat cache --build
# Tmux
mkdir -p ~/.config/tmux/plugins/catppuccin:w
git clone -b v2.1.2 https://github.com/catppuccin/tmux.git ~/.config/tmux/plugins/catppuccin/tmux
# Yazi
curl https://raw.githubusercontent.com/catppuccin/yazi/refs/heads/main/themes/mocha/catppuccin-mocha-lavender.toml -o ~/.config/yazi/theme.toml
# BTop
curl https://raw.githubusercontent.com/catppuccin/btop/refs/heads/main/themes/catppuccin_mocha.theme -o ~/.config/btop/themes/catppuccin_mocha.theme
curl https://raw.githubusercontent.com/catppuccin/btop/refs/heads/main/themes/catppuccin_latte.theme -o ~/.config/btop/themes/catppuccin_latte.theme
# Delta
curl https://raw.githubusercontent.com/catppuccin/delta/refs/heads/main/catppuccin.gitconfig -o ~/.config/git/catppuccin-delta.gitconfig
# Fzf
set -Ux FZF_DEFAULT_OPTS "\
--color=bg+:#313244,bg:#1e1e2e,spinner:#f5e0dc,hl:#f38ba8 \
--color=fg:#cdd6f4,header:#f38ba8,info:#cba6f7,pointer:#f5e0dc \
--color=marker:#b4befe,fg+:#cdd6f4,prompt:#cba6f7,hl+:#f38ba8 \
--color=selected-bg:#45475a \
--multi"
# LsD
curl https://raw.githubusercontent.com/catppuccin/lsd/refs/heads/main/themes/catppuccin-mocha/colors.yaml -o ~/.config/lsd/colors.yaml
curl https://raw.githubusercontent.com/catppuccin/lsd/refs/heads/main/themes/catppuccin-latte/colors.yaml -o ~/.config/lsd/colors-light.yaml
# Midnight Commander
# Change or add skin=catppuccin in the [Midnight-Commander] section inside ~/.config/mc/ini OR Choose the skin inside Midnight Commander through F9>Options>Appearance and Save setup through F9>Options/Save setup
mkdir -p $HOME/.local/share/mc/skins
curl https://raw.githubusercontent.com/catppuccin/mc/refs/heads/main/catppuccin.ini -o $HOME/.local/share/mc/skins/catppuccin.ini
# PowerShell
pwsh -C 'git clone https://github.com/catppuccin/powershell.git (Join-Path $Env:PSModulePath.split(":")[0] Catppuccin)'
# Fish
mkdir -p ~/.config/fish/themes
curl https://raw.githubusercontent.com/catppuccin/fish/refs/heads/main/themes/Catppuccin%20Mocha.theme -o ~/.config/fish/themes/Catppuccin\ Mocha.theme
curl https://raw.githubusercontent.com/catppuccin/fish/refs/heads/main/themes/Catppuccin%20Latte.theme -o ~/.config/fish/themes/Catppuccin\ Latte.theme
# fcitx5
git clone https://github.com/catppuccin/fcitx5.git ~/.tmp/fcitx5
cd ~/.tmp/fcitx5
mkdir -p ~/.local/share/fcitx5/themes
cp -r ./src/* ~/.local/share/fcitx5/themes

View file

@ -1,3 +0,0 @@
Install-Module CompletionPredictor
Install-Module PSFzf
Install-Module Posh-Git

View file

@ -1,112 +0,0 @@
anyio==4.8.0
argon2-cffi==23.1.0
argon2-cffi-bindings==21.2.0
arrow==1.3.0
asttokens==3.0.0
async-lru==2.0.4
attrs==25.1.0
babel==2.17.0
beautifulsoup4==4.13.3
bleach==6.2.0
certifi==2025.1.31
cffi==1.17.1
charset-normalizer==3.4.1
comm==0.2.2
contourpy==1.3.1
cycler==0.12.1
debugpy==1.8.13
decorator==5.2.1
defusedxml==0.7.1
executing==2.2.0
fastjsonschema==2.21.1
fonttools==4.56.0
fqdn==1.5.1
h11==0.14.0
httpcore==1.0.7
httpx==0.28.1
idna==3.10
ipykernel==6.29.5
ipython==9.0.2
ipython-pygments-lexers==1.1.1
ipywidgets==8.1.5
isoduration==20.11.0
jedi==0.19.2
jinja2==3.1.6
joblib==1.4.2
json5==0.10.0
jsonpointer==3.0.0
jsonschema==4.23.0
jsonschema-specifications==2024.10.1
jupyter==1.1.1
jupyter-client==8.6.3
jupyter-console==6.6.3
jupyter-core==5.7.2
jupyter-events==0.12.0
jupyter-lsp==2.2.5
jupyter-server==2.15.0
jupyter-server-terminals==0.5.3
jupyterlab==4.3.5
jupyterlab-pygments==0.3.0
jupyterlab-server==2.27.3
jupyterlab-widgets==3.0.13
kiwisolver==1.4.8
markupsafe==3.0.2
matplotlib==3.10.1
matplotlib-inline==0.1.7
mistune==3.1.2
nbclient==0.10.2
nbconvert==7.16.6
nbformat==5.10.4
nest-asyncio==1.6.0
notebook==7.3.2
notebook-shim==0.2.4
numpy==2.2.3
overrides==7.7.0
packaging==24.2
pandas==2.2.3
pandocfilters==1.5.1
parso==0.8.4
pexpect==4.9.0
pillow==11.1.0
platformdirs==4.3.6
prometheus-client==0.21.1
prompt-toolkit==3.0.50
psutil==7.0.0
ptyprocess==0.7.0
pure-eval==0.2.3
pycparser==2.22
pygments==2.19.1
pyparsing==3.2.1
python-dateutil==2.9.0.post0
python-json-logger==3.3.0
pytz==2025.1
pyyaml==6.0.2
pyzmq==26.2.1
referencing==0.36.2
requests==2.32.3
rfc3339-validator==0.1.4
rfc3986-validator==0.1.1
rpds-py==0.23.1
scikit-learn==1.6.1
scipy==1.15.2
send2trash==1.8.3
setuptools==76.0.0
six==1.17.0
sniffio==1.3.1
soupsieve==2.6
stack-data==0.6.3
terminado==0.18.1
threadpoolctl==3.5.0
tinycss2==1.4.0
tornado==6.4.2
traitlets==5.14.3
types-python-dateutil==2.9.0.20241206
typing-extensions==4.12.2
tzdata==2025.1
uri-template==1.3.0
urllib3==2.3.0
wcwidth==0.2.13
webcolors==24.11.1
webencodings==0.5.1
websocket-client==1.8.0
widgetsnbextension==4.0.13

View file

@ -1,17 +0,0 @@
echo "[INFO] Installing Rime"
case "$(uname)" in
Linux)
RIMEDIR="${RIMEDIR:-$HOME/.local/share/fcitx5/rime}"
;;
Darwin)
RIMEDIR="${RIMEDIR:-$HOME/Library/Rime}"
;;
esac
git clone --depth 1 https://github.com/js0ny/rime_wanxiang_pro.git "$RIMEDIR"
cd "$RIMEDIR" || exit
just init
# just install_rime
just clone_plum

View file

@ -1,110 +0,0 @@
#!/usr/bin/env bash
# vim:ft=bash
# shellcheck disable=SC1090 shell=bash
# This should be run with bash > 4.0 or zsh
set -e # Exit immediately if a command exits with a non-zero status
DOTFILES="${DOTFILES:-$HOME/.dotfiles}"
ZDOTDIR="${ZDOTDIR:-$HOME/.config/zsh}"
XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
NPM_CONFIG_USERCONFIG="${NPM_CONFIG_USERCONFIG:-$XDG_CONFIG_HOME/npm/npmrc}"
GUI_SETUP="${GUI_SETUP:-1}"
WHEEL="${WHEEL:-0}"
XDG_CACHE_HOME="${XDG_CACHE_HOME:-$HOME/.cache}"
XDG_DATA_HOME="${XDG_DATA_HOME:-$HOME/.local/share}"
XDG_STATE_HOME="${XDG_STATE_HOME:-$HOME/.local/state}"
echo "[INFO] Setting up some local directories"
test -d "$XDG_CACHE_HOME" || mkdir -p "$XDG_CACHE_HOME"
test -d "$XDG_DATA_HOME" || mkdir -p "$XDG_DATA_HOME"
test -d "$XDG_STATE_HOME" || mkdir -p "$XDG_STATE_HOME"
test -d ~/.local/state/zsh || mkdir -p ~/.local/state/zsh
# echo "[INFO] Setting up system-wide zsh configuration"
# echo "[ACTION] Elevation required!"
# test -f "/etc/zsh/zshenv" && sudo cp "$DOTFILES/tools/zsh/zshenv" "/etc/zsh/zshenv"
# test -f "/etc/zshenv" && sudo cp "$DOTFILES/tools/zsh/zshenv" "/etc/zshenv"
declare -A linkDots
linkDots=(
["$DOTFILES/common/condarc.yaml"]="$XDG_CONFIG_HOME/conda/.condarc"
# ["$DOTFILES/common/gitconfig"]="$XDG_CONFIG_HOME/git/config"
["$DOTFILES/common/glow.yaml"]="$HOME/.config/glow/config.yml"
["$DOTFILES/common/haskeline"]="$HOME/.haskeline"
["$DOTFILES/common/ideavimrc"]="$XDG_CONFIG_HOME/ideavim/ideavimrc"
["$DOTFILES/common/lazygit.yaml"]="$XDG_CONFIG_HOME/lazygit/config.yml"
["$DOTFILES/common/lesskey"]="$XDG_CONFIG_HOME/lesskey"
["$DOTFILES/common/npmrc"]="$NPM_CONFIG_USERCONFIG"
["$DOTFILES/common/NuGet.Config"]="$XDG_CONFIG_HOME/NuGet/NuGet.Config"
["$DOTFILES/common/pip.conf"]="$XDG_CONFIG_HOME/pip/pip.conf"
["$DOTFILES/common/starship.toml"]="$HOME/.config/starship.toml"
["$DOTFILES/common/tmux.conf"]="$XDG_CONFIG_HOME/tmux/tmux.conf"
["$DOTFILES/common/vimrc"]="$XDG_CONFIG_HOME/vim/vimrc"
["$DOTFILES/common/zellij.config.kdl"]="$HOME/.config/zellij/config.kdl"
# ["$DOTFILES/tools/emacs.d"]="$HOME/.emacs.d"
["$DOTFILES/tools/doom"]="$HOME/.config/doom"
["$DOTFILES/tools/fish"]="$HOME/.config/fish"
["$DOTFILES/tools/ipython"]="$XDG_CONFIG_HOME/ipython"
["$DOTFILES/tools/nvim"]="$XDG_CONFIG_HOME/nvim"
["$DOTFILES/tools/yazi"]="$HOME/.config/yazi"
["$DOTFILES/tools/zsh/zshrc"]="$ZDOTDIR/.zshrc"
["$DOTFILES/tools/zsh/zshenv"]="$ZDOTDIR/.zshenv"
["$DOTFILES/platforms/mac/pwshProfile.ps1"]="$HOME/.config/powershell/Microsoft.PowerShell_profile.ps1"
)
if [ $(uname) = "Darwin" ]; then
echo "[INFO] Running on macOS"
linkDots+=(
["$DOTFILES/platforms/mac/karabiner"]="$HOME/.config/karabiner"
["$DOTFILES/platforms/mac/skhdrc"]="$XDG_CONFIG_HOME/skhd/skhdrc"
["$DOTFILES/platforms/mac/sketchybarrc"]="$XDG_CONFIG_HOME/sketchybar/sketchybarrc"
["$DOTFILES/platforms/mac/yabairc"]="$XDG_CONFIG_HOME/yabai/yabairc"
["$DOTFILES/tools/wezterm"]="$HOME/.config/wezterm"
["$DOTFILES/tools/zed"]="$HOME/.config/zed"
["$DOTFILES/tools/sioyek"]="$HOME/.config/sioyek"
)
else
echo "[INFO] Running on Linux"
linkDots+=(
["$DOTFILES/common/inputrc"]="$XDG_CONFIG_HOME/readline/inputrc"
)
# WSL1 : Microsoft
# WSL2 : microsoft
# if [ "$(uname -r)" = *icrosoft* ]; then
# echo "[INFO] Running on WSL"
# : # NOP
if [ "$GUI_SETUP" -eq 1 ]; then
echo "[INFO] Setting up Linux GUI Applications"
linkDots+=(
["$DOTFILES/platforms/linux/awesome"]="$HOME/.config/awesome"
["$DOTFILES/platforms/linux/hypr"]="$HOME/.config/hypr"
["$DOTFILES/platforms/linux/waybar"]="$HOME/.config/waybar"
["$DOTFILES/platforms/linux/wlogout"]="$HOME/.config/wlogout"
["$DOTFILES/platforms/linux/mako-config"]="$HOME/.config/mako/config"
["$DOTFILES/tools/wezterm"]="$HOME/.config/wezterm"
["$DOTFILES/tools/zed"]="$HOME/.config/zed"
["$DOTFILES/tools/sioyek"]="$HOME/.config/sioyek"
)
for kde in "$DOTFILES/platforms/linux/kde/"*; do
linkDots+=["$kde"]="$HOME/.config/kde/$(basename "$kde")"
# echo "Linking $kde to $HOME/.config/kde/$(basename $kde)"
done
if [ "$WHEEL" -eq 1 ]; then
echo "[INFO] Setting up system environment variables"
echo "[ACTION] Elevation required!"
sudo cp "$DOTFILES/platforms/linux/etc/environment" "/etc/environment"
fi
fi
fi
echo "[INFO] Copying example files"
test -d $XDG_CONFIG_HOME/git || mkdir -p $XDG_CONFIG_HOME/git
test -f $XDG_CONFIG_HOME/git/config && mv $XDG_CONFIG_HOME/git/config $XDG_CONFIG_HOME/git/config.bak
cp $DOTFILES/common/gitconfig.example $XDG_CONFIG_HOME/git/config
echo "[INFO] Don't forget to update your gitconfig!"
test -f ~/.wakatime.cfg && mv ~/.wakatime.cfg ~/.wakatime.cfg.bak
cp $DOTFILES/common/wakatime.example.cfg ~/.wakatime.cfg
echo "[INFO] Don't forget to update your wakatime config!"

View file

@ -1,28 +0,0 @@
WHEEL="${WHEEL:-1}"
echo "[INFO] ZDOTDIR = $ZDOTDIR"
echo "[INFO] DOTFILES = $DOTFILES"
echo "[INFO] WHEEL = $WHEEL"
echo "[ACTION] Press any key to proceed"
read -n 1
if [ "$WHEEL" -eq 1 ]; then
echo "[INFO] Setting up system-wide zsh configuration"
echo "[ACTION] Elevation required"
test -f "/etc/zsh/zshenv" && sudo cp "$DOTFILES/tools/zsh/global.zshenv" "/etc/zsh/zshenv"
test -f "/etc/zshenv" && sudo cp "$DOTFILES/tools/zsh/global.zshenv" "/etc/zshenv"
if [ "$(uname)" = "Darwin" ]; then
sudo cp "$DOTFILES/tools/zsh/global.zshenv" "/etc/zshenv"
fi
else
echo "[INFO] Setting up user zsh configuration"
# A fallback case to set $ZDOTDIR in ~/.zshenv if the user cannot access global zshenv
ln -sf "$DOTFILES/tools/zsh/zshenv" "$HOME/.zshenv"
fi
echo "[INFO] Installing zsh plugins"
test -d "$ZDOTDIR"/plugins/zsh-autosuggestions || git clone --depth 1 https://github.com/zsh-users/zsh-autosuggestions.git "$ZDOTDIR"/plugins/zsh-autosuggestions
test -d "$ZDOTDIR"/plugins/zsh-syntax-highlighting || git clone --depth 1 https://github.com/zsh-users/zsh-syntax-highlighting.git "$ZDOTDIR"/plugins/zsh-syntax-highlighting
test -d "$ZDOTDIR"/plugins/zsh-history-substring-search || git clone --depth 1 https://github.com/zsh-users/zsh-history-substring-search.git "$ZDOTDIR"/plugins/zsh-history-substring-search
test -d "$ZDOTDIR"/plugins/zsh-completions || git clone --depth 1 https://github.com/zsh-users/zsh-completions.git "$ZDOTDIR"/plugins/zsh-completions

View file

@ -1,12 +0,0 @@
#!/usr/bin/env bash
# vim:ft=bash
echo "[INFO] Installing AppMan"
echo "[ACTION] Type [2] to install AppMan"
wget -q https://raw.githubusercontent.com/ivan-hc/AM/main/AM-INSTALLER && chmod a+x ./AM-INSTALLER && ./AM-INSTALLER
APPMAN_PATH="$HOME/.local/bin/appman"
if command -v "$APPMAN_PATH" >/dev/null 2>&1; then
$APPMAN_PATH install wezterm
$APPMAN_PATH install nvim
fi

View file

@ -1,71 +0,0 @@
#!/usr/bin/env bash
# vim:ft=bash
# chromium-flags.sh
# Set Chromium & Electron Flags
echo "[INFO] Set Chromium & Electron Flags"
DOTFILES="${DOTFILES:-$HOME/.dotfiles}"
XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
BROWSER_FLAG=$DOTFILES/platforms/linux/chromium-flags.conf
ELECTRON_FLAG=$DOTFILES/platforms/linux/electron-flags.conf
parse_args() {
while [[ $# -gt 0 ]]; do
case "$1" in
# --debug|-d)
# export LOG_LEVEL="DEBUG"
# log_debug "Debug mode enabled"
# shift
# ;;
--force|-f)
FORCE_FILE="true"
echo "Force update enabled"
shift
;;
*)
echo "Unknown argument: $1"
echo "Usage: chromium-flags.sh [--debug|-d] [--force|-f]"
exit 1
;;
esac
done
}
parse_args "$@"
# Browser Flags
browser_flags_path=(
"$XDG_CONFIG_HOME/chromium-flags.conf" # Chromium
"$XDG_CONFIG_HOME/chrome-flags.conf" # Google Chrome
"$XDG_CONFIG_HOME/thorium-flags.conf" # Thorium
"$XDG_CONFIG_HOME/vivaldi-flags.conf" # Vivaldi
"$XDG_CONFIG_HOME/vivaldi-stable.conf" # Vivaldi
)
electron_flags_path=(
"$XDG_CONFIG_HOME/electron-flags.conf" # General
"$XDG_CONFIG_HOME/code-flags.conf" # VSCode
"$XDG_CONFIG_HOME/qq-electron-flags.conf" # QQ
)
for path in "${browser_flags_path[@]}"; do
if [ -f "$path" ] && [ "$FORCE_FILE" != "true" ]; then
echo "[INFO] Found Browser Flags: $path"
else
echo "[INFO] Creating Browser Flags: $path"
ln -sf "$BROWSER_FLAG" "$path"
fi
done
for path in "${electron_flags_path[@]}"; do
if [ -f "$path" ] && [ "$FORCE_FILE" != "true" ]; then
echo "[INFO] Found Electron Flags: $path"
else
echo "[INFO] Creating Electron Flags: $path"
ln -sf "$ELECTRON_FLAG" "$path"
fi
done

View file

@ -1,71 +0,0 @@
#!/usr/bin/env bash
# vim:ft=bash
# chromium-flags.sh
# Set Chromium & Electron Flags
echo "[INFO] Set Chromium & Electron Flags"
DOTFILES="${DOTFILES:-$HOME/.dotfiles}"
XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
BROWSER_FLAG=$DOTFILES/platforms/linux/chromium-flags.hypr.conf
ELECTRON_FLAG=$DOTFILES/platforms/linux/electron-flags.hypr.conf
parse_args() {
while [[ $# -gt 0 ]]; do
case "$1" in
# --debug|-d)
# export LOG_LEVEL="DEBUG"
# log_debug "Debug mode enabled"
# shift
# ;;
--force|-f)
FORCE_FILE="true"
echo "Force update enabled"
shift
;;
*)
echo "Unknown argument: $1"
echo "Usage: chromium-flags.sh [--debug|-d] [--force|-f]"
exit 1
;;
esac
done
}
parse_args "$@"
# Browser Flags
browser_flags_path=(
"$XDG_CONFIG_HOME/chromium-flags.conf" # Chromium
"$XDG_CONFIG_HOME/chrome-flags.conf" # Google Chrome
"$XDG_CONFIG_HOME/thorium-flags.conf" # Thorium
"$XDG_CONFIG_HOME/vivaldi-flags.conf" # Vivaldi
"$XDG_CONFIG_HOME/vivaldi-stable.conf" # Vivaldi
)
electron_flags_path=(
"$XDG_CONFIG_HOME/electron-flags.conf" # General
"$XDG_CONFIG_HOME/code-flags.conf" # VSCode
"$XDG_CONFIG_HOME/qq-electron-flags.conf" # QQ
)
for path in "${browser_flags_path[@]}"; do
if [ -f "$path" ] && [ "$FORCE_FILE" != "true" ]; then
echo "[INFO] Found Browser Flags: $path"
else
echo "[INFO] Creating Browser Flags: $path"
ln -sf "$BROWSER_FLAG" "$path"
fi
done
for path in "${electron_flags_path[@]}"; do
if [ -f "$path" ] && [ "$FORCE_FILE" != "true" ]; then
echo "[INFO] Found Electron Flags: $path"
else
echo "[INFO] Creating Electron Flags: $path"
ln -sf "$ELECTRON_FLAG" "$path"
fi
done

View file

@ -1,44 +0,0 @@
#!/usr/bin/env false
# TODO: This script is not ready for use yet
# -*- coding: utf-8 -*-
# Append Electron argument (for wayland) to *.desktop files
import argparse
import configparser
import os
APPEND_ARG_FILE = "~/.dotfiles/platforms/linux/electron-flags.conf"
with open(os.path.expanduser(APPEND_ARG_FILE)) as f:
APPEND_ARGS = list(map(str.strip, f.readlines()))
# for file in desktop_files:
# config = configparser.ConfigParser()
# config.read(file)
def append_arg(file):
config = configparser.ConfigParser()
config.read(file)
try:
exec_line = config["Desktop Entry"].get("Exec")
except KeyError:
print(f"Skipping {file} as it does not have an Exec key")
return
print(f"Appending {APPEND_ARGS} to {exec_line}")
config["Desktop Entry"].update({"Exec": f"{exec_line} {' '.join(APPEND_ARGS)}"})
with open(file, "w") as f:
config.write(f)
def main():
parser = argparse.ArgumentParser()
parser.add_argument("-f", "--file", help="Desktop file to modify")
args = parser.parse_args()
append_arg(args.file)
pass
if __name__ == "__main__":
main()

View file

@ -1,193 +0,0 @@
#!/usr/bin/env bash
# vim:ft=bash
set -e
echo "Running the setup script"
# Variables
export DOTFILES="${DOTFILES:-$HOME/.dotfiles}"
# If is in the sudo or wheel group, set the WHEEL variable to 1
WHEEL=0
groups "$(whoami)" | grep -E -q '\b(sudo|wheel)\b' && WHEEL=1
if [ "$WHEEL" -eq 1 ]; then
echo "[INFO] Running as sudo or wheel group"
else
echo "[INFO] Not running as sudo or wheel group"
fi
export WHEEL
GUI_SETUP=0
IS_WSL=0
WINDOWS_USER=""
PACKAGE_MANAGER=""
# WSL detection
# NOTE: This is NOT a POSIX-compliant way, for POSIX-compliant way, use case/esac
if [[ "$(uname -r)" = *icrosoft* ]]; then
echo "[INFO] Running on WSL"
WINDOWS_USER="$(cmd.exe /c "echo %USERNAME%" | tr -d '\r')"
IS_WSL=1
fi
if [ "$IS_WSL" -eq 1 ]; then
if [[ "$(uname -r)" = *Microsoft* ]]; then
IS_WSL=1
elif [[ "$(uname -r)" = *microsoft* ]]; then
IS_WSL=2
fi
fi
if [ "$IS_WSL" -eq 1 ]; then
echo "[INFO] Running on WSL1 Skipping GUI setup"
else
read -p "[ACTION] Do you want to setup Linux GUI? (y/N) " -r choice
case "$choice" in
y | Y)
GUI_SETUP=1
;;
*)
echo "[INFO] Skipping GUI setup"
;;
esac
fi
export GUI_SETUP
# base-devel
if [ "$WHEEL" -eq 1 ]; then
echo "[INFO] Installing basic build tools"
if command -v apt >/dev/null 2>&1; then
sudo apt update
sudo apt install -y build-essential
PACKAGE_MANAGER="apt"
elif command -v pacman >/dev/null 2>&1; then
sudo pacman -Syu --noconfirm
sudo pacman -S --noconfirm base-devel
PACKAGE_MANAGER="pacman"
else
echo "[ERROR] Unsupported package manager"
read -p "[ACTION] Do you still want to continue? (y/N) " -r choice
case "$choice" in
y | Y)
:
;;
*)
echo "[ERROR] Exiting"
exit 1
;;
esac
fi
fi
echo "[INFO] Cloning Dotfiles"
if [ -d "$DOTFILES" ]; then
echo "[INFO] Dotfiles already cloned"
elif [ "$IS_WSL" -eq 1 ]; then
ln -sf "/mnt/c/Users/$WINDOWS_USER/.dotfiles" "$DOTFILES"
elif command -v git >/dev/null 2>&1; then
git clone https://github.com/js0ny/dotfiles.git "$DOTFILES" --depth 1
else
echo "[ERROR] Git is not installed"
exit 1
fi
if [ "$WHEEL" -eq 0 ]; then
read -p "[ACTION] Do you want to install some AppImages (by AppMan)? (y/N) " -r choice
case "$choice" in
y | Y)
source "$DOTFILES/bootstrap/linux/appman.bash"
;;
*)
echo "[INFO] Skipping AppMan installation"
:
;;
esac
fi
echo "[INFO] Setting up symbolic links"
source "$DOTFILES"/bootstrap/linux/symlinks.bash
set +x
if [ "$WHEEL" -eq 1 ]; then
source "$DOTFILES"/tools/bash/xdg-compat.sh
source "$DOTFILES"/tools/bash/global.bashrc
fi
source "$DOTFILES"/tools/bash/profile
source "$DOTFILES"/tools/bash/bashrc
source "$DOTFILES"/tools/bash/bash_aliases
set -x
if command -v zsh >/dev/null 2>&1; then
read -p "[ACTION] Do you want to setup zsh? (Y/n) " -r choice
case "$choice" in
n | N)
:
;;
*)
source "$DOTFILES"/bootstrap/components/zsh.sh
;;
esac
fi
if [ "$WHEEL" -eq 0 ]; then
echo "Done!"
exit 0
fi
# TODO: Add this part
read -p "[ACTION] Do you want to use other package managers? (y/N) " -r choice
case "$choice" in
y | Y)
:
;;
*)
:
;;
esac
echo "[INFO] Installing Doom Emacs"
source "$DOTFILES"/bootstrap/components/emacs.sh
if [ "$IS_WSL" -eq 1 ]; then
ln -sf "/mnt/c/Users/$WINDOWS_USER" "$HOME/winhome"
ln -sf "/mnt/c/Users/$WINDOWS_USER/Downloads" "$HOME/Downloads"
ln -sf "/mnt/c/Users/$WINDOWS_USER/Documents" "$HOME/Documents"
ln -sf "/mnt/c/Users/$WINDOWS_USER/Desktop" "$HOME/Desktop"
ln -sf "/mnt/c/Users/$WINDOWS_USER/Pictures" "$HOME/Pictures"
ln -sf "/mnt/c/Users/$WINDOWS_USER/Music" "$HOME/Music"
ln -sf "/mnt/c/Users/$WINDOWS_USER/Videos" "$HOME/Videos"
fi
if [ "$GUI_SETUP" -eq 0 ]; then
echo "Done!"
exit 0
fi
# Wayland
source "$DOTFILES"/bootstrap/linux/chromium-flags.bash
# Rime
source "$DOTFILES"/bootstrap/components/rime.sh
echo "[INFO] Installing Color Scheme (Catppuccin Mocha)"
# fish $DOTFILES/bootstrap/temp/mocha_port.fish
source "$DOTFILES"/bootstrap/components/mocha-port.bash
echo "Done!"

View file

@ -1,29 +0,0 @@
#!/usr/bin/env bash
# vim:ft=bash
set -e # Exit immediately if a command exits with a non-zero status
declare -A linkDots
source "$DOTFILES/bootstrap/components/symlinks.bash"
echo "[INFO] DOTFILES = $DOTFILES"
echo "[ACTION] Press any key to proceed"
read -r -n1 -s
echo "[INFO] Setting up symbolic links"
for src in "${!linkDots[@]}"; do
dest="${linkDots[$src]}"
echo "Linking $src to $dest"
if [ -d "$src" ]; then
test -d "$dest" && mv "$dest" "$dest.bak"
ln -sf "$src" "$dest"
elif [ -f "$src" ]; then
dest_parent=$(dirname "$dest")
test -d "$dest_parent" || mkdir -p "$dest_parent"
ln -sf "$src" "$dest"
else
echo "[ERROR] $src does not exist"
fi
done

View file

@ -1 +0,0 @@

View file

@ -1,150 +0,0 @@
tap "daipeihust/tap"
tap "felixkratz/formulae"
tap "homebrew/bundle"
tap "homebrew/services"
tap "koekeishiya/formulae"
tap "nikitabobko/tap"
tap "railwaycat/emacsmacport"
brew "age"
brew "aichat"
brew "bat"
brew "bottom"
brew "broot"
brew "btop"
brew "cmake"
brew "composer"
brew "coreutils"
brew "curlie"
brew "dark-mode"
brew "dos2unix"
brew "duf"
brew "dust"
brew "duti"
brew "fastfetch"
brew "fd"
brew "ffmpeg"
brew "fish"
brew "fzf"
brew "gh"
brew "ghcup"
brew "git-delta"
brew "glow"
brew "go"
brew "hugo"
brew "hyperfine"
brew "imagemagick"
brew "ipython"
brew "julia"
brew "just"
brew "lazygit"
brew "less"
brew "pkgconf"
brew "lua"
brew "librime"
brew "lsd"
brew "luajit"
brew "luarocks"
brew "macvim", link: false
brew "node"
brew "markdownlint-cli"
brew "mas"
brew "neovim"
brew "nowplaying-cli"
brew "nushell"
brew "openjdk@21"
brew "pandoc"
brew "pipx"
brew "pnpm"
brew "procs"
brew "ripgrep"
brew "ripgrep-all"
brew "rlwrap"
brew "rust"
brew "rustup"
brew "screenfetch"
brew "sd"
brew "sevenzip"
brew "speedtest-cli"
brew "starship"
brew "switchaudio-osx"
brew "tldr"
brew "tmux"
brew "tree"
brew "uv"
brew "vim"
brew "wget"
brew "wget2"
brew "yarn"
brew "yazi"
brew "zellij"
brew "zoxide"
brew "daipeihust/tap/im-select"
brew "felixkratz/formulae/borders"
brew "felixkratz/formulae/sketchybar"
brew "koekeishiya/formulae/skhd"
brew "koekeishiya/formulae/yabai"
brew "railwaycat/emacsmacport/emacs-mac"
cask "activitywatch"
cask "alacritty"
cask "alex313031-thorium"
cask "alt-tab"
cask "apparency"
cask "appcleaner"
cask "arc"
cask "betterdisplay"
cask "chatgpt"
cask "discord"
cask "dotnet-sdk"
cask "font-caskaydia-cove-nerd-font"
cask "font-iosevka-nerd-font"
cask "font-jetbrains-mono-nerd-font"
cask "font-lxgw-wenkai"
cask "font-sf-mono"
cask "font-sf-pro"
cask "google-drive"
cask "iina"
cask "iterm2"
cask "jordanbaird-ice"
cask "karabiner-elements"
cask "keka"
cask "keyguard"
cask "kitty"
cask "localsend"
cask "ltspice"
cask "macfuse"
cask "neovide"
cask "obsidian"
cask "onedrive"
cask "orbstack"
cask "powershell"
cask "protonvpn"
cask "qlcolorcode"
cask "qlimagesize"
cask "qlmarkdown"
cask "qlstephen"
cask "qlvideo"
cask "qspace-pro"
cask "quicklook-json"
cask "quicklookase"
cask "r"
cask "raycast"
cask "rider"
cask "rstudio"
cask "rustdesk"
cask "scroll-reverser"
cask "sf-symbols"
cask "sioyek"
cask "skim"
cask "squirrel"
cask "steam"
cask "suspicious-package"
cask "telegram-desktop"
cask "typora"
cask "visual-studio-code"
cask "vivaldi"
cask "warp"
cask "wezterm"
cask "zen-browser"
mas "QQ", id: 451108668
mas "SnippetsLab", id: 1006087419
mas "微信", id: 836500024

View file

@ -1,74 +0,0 @@
#!/bin/zsh
# duti.zsh
# Set default apps (duti)
# The id of the app can be found by running
# `osascript -e 'id of app "AppName"'`
brew install --formula duti
echo "[INFO] Setting Default Apps"
# Define an associative array with file extensions and corresponding app IDs
typeset -A app_defaults
app_defaults=(
# Markdown -> Typora
.md abnerworks.Typora
.markdown abnerworks.Typora
# PDF -> Sioyek
.pdf info.sioyek.sioyek
# Raw Text -> Neovide
.txt com.neovide.neovide
# Archive -> Keka
.zip com.aone.keka
.rar com.aone.keka
.7z com.aone.keka
.tar com.aone.keka
# Source Code Light -> Neovim
.gitignore com.neovide.neovide
.vimrc com.neovide.neovide
.vim com.neovide.neovide
.lua com.neovide.neovide
.py com.neovide.neovide
.jl com.neovide.neovide
.sh com.neovide.neovide
.c com.neovide.neovide
# Source Code DOTNET -> VSCode
.cs com.microsoft.VSCode
.fs com.microsoft.VSCode
.fsx com.microsoft.VSCode
.csx com.microsoft.VSCode
.ps1 com.microsoft.VSCode
# Source Code Web -> VSCode
.js com.microsoft.VSCode
.ts com.microsoft.VSCode
.jsx com.microsoft.VSCode
.tsx com.microsoft.VSCode
.css com.microsoft.VSCode
.scss com.microsoft.VSCode
.sass com.microsoft.VSCode
.vue com.microsoft.VSCode
# Source Code Config -> Neovim
.json com.neovide.neovide
.yaml com.neovide.neovide
.yml com.neovide.neovide
.toml com.neovide.neovide
.ini com.neovide.neovide
.cfg com.neovide.neovide
.conf com.neovide.neovide
.kdl com.neovide.neovide
.xml com.neovide.neovide
# Source Code Jupyter -> VSCode
.ipynb com.microsoft.VSCode
# Source Code DotNet Project -> Rider
.sln com.jetbrains.rider
.csproj com.jetbrains.rider
.fsproj com.jetbrains.rider
# Video -> IINA
.mp4 com.colliderli.iina
.mkv com.colliderli.iina
)
# Loop through the array and set the default apps
for ext app_id in ${(kv)app_defaults}; do
duti -s $app_id $ext all
done
unset app_defaults

View file

@ -1,106 +0,0 @@
#! /bin/zsh
echo "Running the setup script"
set -e
set -x
# VARIABLES
export DOTFILES="${DOTFILES:-$HOME/.dotfiles}"
# In macOS, consider the user as sudoer by default
export WHEEL=1
export GUI_SETUP=1
# Xcode Command Line Tools
echo "[INFO] Installing Xcode Command Line Tools"
echo "[ACTION] Request Human Takeover"
xcode-select --install
# Press any key to continue (if Xcode Command Line Tools are installed)
echo "[ACTION] Press any key to continue when xcode CLI tools are installed"
read -n 1
# System Preferences
# Installation Sources
echo "[INFO] Setting Installation Sources"
echo "[ACTION] Request Human Takeover"
echo "In macOS Sequoia, setup manually (System preferences -> Security & Privacy -> General -> Allow apps downloaded from: Anywhere)"
# sudo spctl --master-disable
# In Mac OS Sequoia, the command above is not working
# Should be set up manually (System Preferences -> Security & Privacy -> General -> Allow apps downloaded from: Anywhere)
echo "[INFO] Installing Homebrew"
echo "[ACTION] Request Human Input"
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
echo "[ACTION] Press any key to continue when xcode CLI tools are installed"
read -n 1
echo "[INFO] Cloning Dotfiles"
git clone https://github.com/js0ny/dotfiles.git $DOTFILES
echo "[INFO] Setting up system properties"
source $DOTFILES/bootstrap/macOS/plist.zsh
read -p "[ACTION] Do you want to use sudo with touch ID? (Y/n) " -r choice
case "$choice" in
n | N)
:
;;
*)
# Use `sudo cp` to prevent losing sudo access
sudo cp /etc/pam.d/sudo /etc/pam.d/sudo.bak
sudo cp $DOTFILES/platforms/mac/etc/pam.d/sudo /etc/pam.d/sudo
;;
esac
echo "[INFO] Installing Homebrew Packages"
# Load Brewfile
eval "$(/opt/homebrew/bin/brew shellenv)"
brew bundle --file=$DOTFILES/bootstrap/macOS/Brewfile
# Setting up emacs
ln -s /usr/local/opt/emacs-mac/Emacs.app /Applications/Emacs.app
# Setting Default Apps
source $DOTFILES/bootstrap/macOS/duti.zsh
# Setting up Dotfiles
source $DOTFILES/bootstrap/macOS/symlinks.zsh
source $DOTFILES/bootstrap/components/zsh.sh
source $DOTFILES/tools/zsh/global.zshenv
source $DOTFILES/tools/zsh/zshenv
source $DOTFILES/tools/zsh/zshrc
# Rime
source $DOTFILES/bootstrap/components/rime.sh
echo "[INFO] Installing Doom Emacs"
source $DOTFILES/bootstrap/components/emacs.sh
echo "[INFO] Installing Color Scheme (Catppuccin Mocha)"
bash $DOTFILES/bootstrap/components/mocha-port.bash
# Misc
dotnet tool install --global dotnet-repl
pnpm install -g typescript
pnpm install -g tsx
echo "Done! For additional setup, boot to recovery mode and run the following command:"
echo "csrutil enable --without fs --without debug --without nvram"
echo "Then, reboot the system"
echo "Run the post-install script to finish the setup"

View file

@ -1,37 +0,0 @@
## Finder
echo "[INFO] Setting Finder Preferences"
defaults write com.apple.finder QuitMenuItem -bool true # Quit with CMD+Q
defaults write com.apple.finder ShowPathbar -bool true # Show Path Bar
defaults write com.apple.finder ShowStatusBar -bool true # Show Status Bar
defaults write NSGlobalDomain AppleShowAllExtensions -bool true # Show All File Extensions
defaults write com.apple.finder AppleShowAllFiles -bool true # Show Hidden Files
defaults write com.apple.finder _FXSortFoldersFirst -bool true
defaults write com.apple.finder FinderSpawnTab -bool true
# Don't show External Hard Drives on Desktop
defaults write com.apple.finder ShowExternalHardDrivesOnDesktop -bool false
defaults write com.apple.finder ShowHardDrivesOnDesktop -bool false
defaults write com.apple.finder ShowMountedServersOnDesktop -bool false
defaults write com.apple.finder ShowRemovableMediaOnDesktop -bool false
# No DS_Store on Network
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
# Keyboard
# Disable Accent Menu
defaults write NSGlobalDomain ApplePressAndHoldEnabled -boolean false
killall Finder
killall Dock
## Dock
echo "[INFO] Setting Dock Preferences"
defaults write com.apple.dock persistent-apps -array
defaults write com.apple.dock persistent-others -array
defaults write com.apple.dock autohide -bool true # Autohide Dock
defaults write com.apple.dock autohide-time-modifier -float 0.5
defaults write com.apple.dock autohide-delay -float 0 # Immediately Autohide Dock
defaults write com.apple.dock show-recents -bool false # Hide Recent Applications
killall Dock
## Trackpad
echo "[INFO] Setting Trackpad Preferences"
defaults write com.apple.AppleMultitouchTrackpad TrackpadThreeFingerDrag -bool true
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadThreeFingerDrag -bool true
defaults write com.apple.AppleMultitouchTrackpad Clicking -bool true
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool true
defaults write -g NSWindowShouldDragOnGesture -bool true

View file

@ -1,29 +0,0 @@
set -e # Exit immediately if a command exits with a non-zero status
# 声明为关联数组
typeset -A linkDots
# 从通用配置文件加载
source "$DOTFILES/bootstrap/components/symlinks.bash"
echo "[INFO] DOTFILES = $DOTFILES"
echo "[ACTION] Press any key to proceed"
read -r -n1
echo "[INFO] Setting up symbolic links"
# 使用 zsh 的关联数组语法
for src in ${(k)linkDots}; do
dest="${linkDots[$src]}"
echo "Linking $src to $dest"
if [ -d "$src" ]; then
test -d $dest && mv $dest $dest.bak
ln -sf $src $dest
elif [ -f "$src" ]; then
dest_parent=$(dirname $dest)
test -d $dest_parent || mkdir -p $dest_parent
ln -sf $src $dest
else
echo "[ERROR] $src does not exist"
fi
done

View file

@ -1,223 +0,0 @@
#Requires -RunAsAdministrator
# TODO: This file is under development
exit 1
$DOTFILES = if ($Env:DOTFILES) { $Env:DOTFILES } else { Join-Path "$Env:USERPROFILE" "dotfiles" }
New-Item -ItemType Directory -Path (Join-Path $Env:UserProfile "Temp") -Force
winget install -e --id Git.Git
if (Get-Command git -ErrorAction SilentlyContinue) {
git clone https://github.com/js0ny/dotfiles.git "$DOTFILES" --depth 1
}
else {
Write-Output "[ERROR] Git is not installed"
exit 1
}
# Install scoop
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression
# Inline `sudo`
sudo sudo config --enable normal
$BOOTSTRAP = Join-Path $DOTFILES "bootstrap" "win"
. (Join-Path $BOOTSTRAP "Environment.ps1")
. (Join-Path $BOOTSTRAP "Registry.ps1")
. (Join-Path $BOOTSTRAP "Symlinks.ps1")
scoop import (Join-Path $BOOTSTRAP "Scoopfile.json")
# Rime
$RIMEDIR = Join-Path $Env:AppData "Rime"
git clone --depth 1 https://github.com/js0ny/rime_wanxiang_pro.git $RIMEDIR
Set-Location $RIMEDIR
just init
just clone_plum
# The section below not done yet
exit 1
#!C:\Program Files\WindowsApps\Microsoft.PowerShell_7.4.6.0_x64__8wekyb3d8bbwe\pwsh.EXE
# Run with PowerShell 7
winget install -e --id Git.Git
git clone https://github.com/js0ny/dotfiles.git ~\.dotfiles
Set-Location -Path ~\.dotfiles
Remove-Item -Force $PROFILE
$DOTFILES = "$HOME\.dotfiles"
New-Item -ItemType SymbolicLink -Path $PROFILE -Target "$DOTFILES\win\Microsoft.PowerShell_profile.ps1"
. $PROFILE
# Install Scoop
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression
# Install Chocolatey
# Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
# Set Dotfiles
# $DOTFILES\.config
$folders = @("conda", "git", "ideavim", "ipython", "markdownlint", "npm", "NuGet", "nvim", "pip", "Vim")
foreach ($folder in $folders) {
New-Item -ItemType Directory -Path "$Env:XDG_CONFIG_HOME\$folder" -Force
}
New-Item -ItemType SymbolicLink -Path "$Env:XDG_CONFIG_HOME\conda\.condarc" -Target "$DOTFILES\.config\conda\condarc.yaml" -Force
New-Item -ItemType SymbolicLink -Path "$Env:XDG_CONFIG_HOME\git\config" -Target "$DOTFILES\.config\git\.gitconfig" -Force
New-Item -ItemType SymbolicLink -Path "~\.haskeline" -Target "$DOTFILES\.haskeline" -Force
New-Item -ItemType SymbolicLink -Path "$Env:XDG_CONFIG_HOME\ideavim\.ideavimrc" -Target "$DOTFILES\.config\ideavim\.ideavimrc" -Force
New-Item -ItemType SymbolicLink -Path "$Env:XDG_CONFIG_HOME\ipython" -Target "$DOTFILES\.config\ipython" -Force
# New-Item -ItemType SymbolicLink -Path "~\.markdownlint.json" -Target "$DOTFILES\.markdownlint.json" -Force
New-Item -ItemType SymbolicLink -Path "$Env:XDG_CONFIG_HOME\npm\npmrc" -Target "$DOTFILES\.config\npm\npmrc" -Force
New-Item -ItemType SymbolicLink -Path "$Env:AppData\NuGet\NuGet.Config" -Target "$DOTFILES\.config\NuGet\NuGet.Config" -Force
New-Item -ItemType SymbolicLink -Path "$Env:XDG_CONFIG_HOME\nvim" -Target "$DOTFILES\.config\nvim" -Force
New-Item -ItemType SymbolicLink -Path "$Env:AppData\pip\pip.ini" -Target "$DOTFILES\.config\pip\pip.conf" -Force
New-Item -ItemType SymbolicLink -Path "$Env:XDG_CONFIG_HOME\Vim\_vimrc" -Target "$DOTFILES\.config\vim\vimrc" -Force
New-Item -ItemType SymbolicLink -Path "~\.wslconfig" -Target "$DOTFILES\win\.wslconfig" -Force
New-Item -ItemType SymbolicLink -Path "$Env:AppData\neovide\config.toml" -Target "$DOTFILES\win\neovide.toml" -Force
# New-Item -ItemType SymbolicLink -Path "~\.vscode.vimrc" -Target "$DOTFILES\vscode\vscode.vimrc" Use Absolute Path
# Hide dotfiles
Get-ChildItem -Force -Filter .* -Path $HOME | ForEach-Object { $_.Attributes += "Hidden" }
@(
Join-Path $HOME '.config'
Join-Path $HOME '.dotfiles'
) | ForEach-Object {
$_.Attributes -band -bnot [System.IO.FileAttributes]::Hidden
}
Set-Location $HOME\Documents
# Match WindowsPowerShell and PowerShell
Get-ChildItem -Force -Filter *owerShell | ForEach-Object { $_.Attributes += "Hidden" }
# Windows Terminal
if (Get-Command wt -ErrorAction SilentlyContinue) {
Write-Output "Windows Terminal (wt) installed"
}
else {
winget install -e --id Microsoft.WindowsTerminal
}
# Uninstall Windows Apps
Get-AppxPackage *solit* | Remove-AppxPackage # 纸牌
Get-AppxPackage *sound* | Remove-AppxPackage # 錄音機
Get-AppxPackage *camera* | Remove-AppxPackage # 相機
Get-AppxPackage *weather* | Remove-AppxPackage # 天氣
Get-AppxPackage *Map* | Remove-AppxPackage # 地圖
# Get-AppxPackage *clipchamp* | Remove-AppxPackage # 其實這個還行
# Added Packages
scoop bucket add main
scoop bucket add nerd-fonts
scoop bucket add extras
scoop bucket add nonportable
# CLI Tools
# winget install -e --id GnuWin32.Grep # Use Select-String instead
scoop install main/make
# winget install -e --id GnuWin32.Which # Use Get-Command instead
scoop install main/fzf
scoop install main/ripgrep
scoop install main/wget
scoop install main/wget2
scoop install main/cmake
scoop install main/bat # modern cat
scoop install main/zoxide # Directory Jump
scoop install main/dos2unix # Convert line endings
scoop install main/hyperfine # Benchmark
scoop install main/bottom # System Monitor
scoop install main/delta # diff
scoop install extras/gpg4win
# File Management
scoop install extras/everything
scoop install main/7zip
scoop install extras/bandizip
scoop install main/pandoc
scoop install extras/sumatrapdf
winget install -e --id Google.GoogleDrive
sudo scoop install nonportable/winbtrfs-np
# System Enhancements
scoop install extras/fancontrol
scoop install extras/powertoys
scoop install extras/msiafterburner
winget install -e --id Yuanli.uTools
scoop install extras/geekuninstaller
scoop install extras/flow-launcher
# winget install -e --id AutoHotkey.AutoHotkey
scoop install extras/autohotkey
scoop install nonportable/mactype-np
scoop install extras/diskgenius
# winget install -e --id Nilesoft.Shell
# scoop install umi-ocr-paddle
# Editor
scoop install main/vim
scoop install main/neovim
scoop install extras/vscodium
scoop install extras/vscode
scoop install extras/neovide
# Security
scoop bucket add keyguard https://github.com/AChep/keyguard-repo-scoop
scoop install keyguard/keyguard
# PKM
scoop install extras/obsidian
winget install -e --id 9P7HPMXP73K4 # Siyuan
scoop install extras/typora
scoop install extras/zotero
scoop install extras/anki
# winget install -e --id Notion.Notion
# Browser
# Use Microsoft Edge directly
# winget install -e --id TheBrowserCompany.Arc
# winget install -e --id Mozilla.Firefox.Nightly # Not working
# Programming Languages
winget install -e --id Python.Python.3.13
winget install -e --id Anaconda.Miniconda3
winget install -e --id OpenJS.NodeJS
winget install -e --id Rustlang.Rustup
winget install -e --id Microsoft.DotNet.SDK.9
# Dev
scoop install extras/docker
scoop install extras/lazygit
# IDE
scoop install extras/rider
# Gaming
winget install -e --id Valve.Steam
# IME
winget install -e --id Rime.Weasel # 小狼毫 Rime
# Misc
winget install -e --id 9N5LW3JBCXKF --source msstore # MSIX Packaging Tool
winget install -e --id 9PKTQ5699M62 --source msstore # iCloud
winget install -e --id RazerInc.RazerInstaller # Razer Synapse
# Social
winget install -e --id 9N97ZCKPD60Q --source msstore # Unigram (Telegram client)
winget install -e --id Tencent.QQ.NT
winget install -e --id XPFCKBRNFZQ62G --source msstore # WeChat in Windows Store (MSIX)
# Others
winget install -e --id Appest.TickTick
winget install -e --id 9NBLGGH4Z1SP --source msstore # ShareX (screen capture)
# Fonts
scoop install FiraCode-NF
scoop install CascadiaCode-NF
scoop install LXGWWenKai # 霞鹜文楷
scoop install LXGWWenKaiMono # 霞鹜文楷Mono
# WSL
scoop install archwsl
wsl --set-version Arch 1

View file

@ -1,28 +0,0 @@
#!/usr/bin/env bash
# shellcheck disable=SC1090 shell=sh
# Date: 2025-02-11
# Author: js0ny
# IMPORTANT: The default `bash` in macOS is outdated, run with zsh or install the latest `bash` via Homebrew
# If you are macOS, run `xcode select --install` first
set -o errexit
set -o xtrace
DOTFILES="${DOTFILES:-$HOME/.dotfiles}"
mkdir -p ~/.local/.tmp
export DOTFILES
case "$(uname)" in
Linux)
curl https://raw.githubusercontent.com/js0ny/dotfiles/refs/heads/master/bootstrap/linux/main.bash -o ~/.local/.tmp/main.bash
source ~/.local/.tmp/main.bash
rm -rf ~/.local/.tmp/main.bash
;;
Darwin)
curl https://raw.githubusercontent.com/js0ny/dotfiles/refs/heads/master/bootstrap/macOS/main.zsh -o ~/.local/.tmp/main.zsh
zsh ~/.local/.tmp/main.zsh
rm -rf ~/.local/.tmp/main.zsh
;;
esac

View file

@ -1,23 +0,0 @@
#Requires -RunAsAdministrator
Set-MpPreference -EnableControlledFolderAccess 1
$protected = (Get-MpPreference).ControlledFolderAccessProtectedFolders
$protected += "$Env:UserProfile\.ssh"
$protected += "$Env:UserProfile\.config"
$protected += "$Env:UserProfile\Vault"
Set-MpPreference -ControlledFolderAccessProtectedFolders $protected
$apps = (Get-MpPreference).ControlledFolderAccessAllowedApplications
$apps += "$Env:Windir\System32\OpenSSH\ssh.exe"
$apps += "$Env:ProgramFiles\GPSoftware\Directory Opus\DOpus.exe"
$apps += (Get-Command -Name code).Source.Replace("bin\code.cmd", "Code.exe")
$apps += (Get-Command -Name pwsh).Source
$apps += (Get-Command -Name git).Source
Set-MpPreference -ControlledFolderAccessAllowedApplications $apps
$exclusion = (Get-MpPreference).ExclusionPath
$exclusion += "$env:ProgramFiles\JetBrains"
$exclusion += "$env:LocalAppData\JetBrains"
$exclusion += "D:\Source"
Set-MpPreference -ExclusionPath $exclusion

View file

@ -1,93 +0,0 @@
# Set Environment Variables
# Use %PATH_EXT% to prevent PATH from being too long
[System.Environment]::SetEnvironmentVariable("Path_EXT_0", "D:\bin", "User")
[System.Environment]::SetEnvironmentVariable("Path_EXT_0", "C:\Users\jsony\AppData\Local\Cargo\bin", "User")
[System.Environment]::SetEnvironmentVariable("Path_EXT_1", "C:\Users\jsony\AppData\Local\Go\bin", "User")
[System.Environment]::SetEnvironmentVariable("Path_EXT_2", "C:\Users\jsony\AppData\Local\Cargo\bin", "User")
$currentPath = [System.Environment]::GetEnvironmentVariable("Path", "User")
if ($currentPath -notlike "*%PATH_EXT%*") {
$currentPath += ";%PATH_EXT_0%;%PATH_EXT_1%;%PATH_EXT_2%"
}
[System.Environment]::SetEnvironmentVariable("Path", $currentPath, "User")
[System.Environment]::SetEnvironmentVariable("PATH_EXT_0", "", [System.EnvironmentVariableTarget]::Machine)
[System.Environment]::SetEnvironmentVariable("PATH_EXT_1", "", [System.EnvironmentVariableTarget]::Machine)
[System.Environment]::SetEnvironmentVariable("PATH_EXT_2", "", [System.EnvironmentVariableTarget]::Machine)
$currentPath = [System.Environment]::GetEnvironmentVariable("Path", [System.EnvironmentVariableTarget]::Machine)
if ($currentPath -notlike "*%PATH_EXT%*") {
$currentPath += ";%PATH_EXT_0%;%PATH_EXT_1%;%PATH_EXT_2%"
}
[System.Environment]::SetEnvironmentVariable("Path", $currentPath, [System.EnvironmentVariableTarget]::Machine)
# Simulate XDG Base Directory Specification
$Env:XDG_CONFIG_HOME = "$Env:AppData"
$Env:XDG_DATA_HOME = "$Env:LocalAppData"
$Env:XDG_CACHE_HOME = "$Env:LocalAppData\Cache"
$Env:XDG_STATE_HOME = "$Env:LocalAppData\State"
[System.Environment]::SetEnvironmentVariable("XDG_CONFIG_HOME", "$Env:XDG_CONFIG_HOME", "User")
[System.Environment]::SetEnvironmentVariable("XDG_DATA_HOME", "$Env:XDG_DATA_HOME", "User")
New-Item -ItemType Directory -Path "$Env:LocalAppData\cache" -Force
[System.Environment]::SetEnvironmentVariable("XDG_CACHE_HOME", "$Env:XDG_CACHE_HOME", "User")
New-Item -ItemType Directory -Path "$Env:LocalAppData\state" -Force
[System.Environment]::SetEnvironmentVariable("XDG_STATE_HOME", "$Env:XDG_STATE_HOME", "User")
# Add environment variables
[System.Environment]::SetEnvironmentVariable("DOTFILES", "$DOTFILES", "User")
# Set potential environment variables to prevent softwares put their configs in the wrong place
# eg. dotfiles in %UserProfile%
# ~\.aws -> %AppData%\aws :: AWS CLI
New-Item -ItemType Directory -Path "$Env:AppData\aws" -Force
[System.Environment]::SetEnvironmentVariable("AWS_CONFIG_FILE", "$Env:AppData\aws\config", "User")
[System.Environment]::SetEnvironmentVariable("AWS_SHARED_CREDENTIALS_FILE", "$Env:AppData\aws\credentials", "User")
# ~\.azure -> %LocalAppData%\Azure :: Azure CLIcargo install --list
[System.Environment]::SetEnvironmentVariable("AZURE_CONFIG_DIR", "$Env:LocalAppData\Azure", "User")
# ~\.cargo -> %LocalAppData%\Cargo :: Rust https://doc.rust-lang.org/cargo/guide/cargo-home.html
[System.Environment]::SetEnvironmentVariable("CARGO_HOME", "$Env:LocalAppData\Cargo", "User")
# ~\.docker -> %AppData%\dotDocker :: Docker (Docker takes %AppData%\Docker, use dotDocker instead)
[System.Environment]::SetEnvironmentVariable("DOCKER_CONFIG", "$Env:AppData\dotDocker", "User")
# ~\.dotnet -> %LocalAppData%\dotNET :: .NET Core
[System.Environment]::SetEnvironmentVariable("DOTNET_CLI_HOME", "$Env:LocalAppData\dotNET", "User")
# ~\.emacs.d -> %AppData%\.emacs.d :: Emacs (This is default)
# [System.Environment]::SetEnvironmentVariable("EMACS_HOME", "$Env:AppData\emacs.d", "User")
# ~\go -> %LocalAppData%\GO :: golang
[System.Environment]::SetEnvironmentVariable("GOPATH", "$Env:LocalAppData\GO", "User")
# ~\.ipython -> %AppData%\ipython :: IPython
# IPython won't check XDG on Windows https://github.com/ipython/ipython/blob/0615526f80691452f2e282c363bce197c0141561/IPython/utils/path.py#L200
[System.Environment]::SetEnvironmentVariable("IPYTHONDIR", "$Env:AppData\ipython", "User")
# ~\.julia -> %LocalAppData%\julia :: Julia
[System.Environment]::SetEnvironmentVariable("JULIA_DEPOT_PATH", "$Env:LocalAppData\julia", "User")
# ~\_lesshst -> %LocalAppData%\state\lesshst :: less
[System.Environment]::SetEnvironmentVariable("LESSHISTFILE", "$Env:XDG_STATE_HOME\lesshst", "User")
# %AppData%\less\lesskey :: less
New-Item -ItemType Directory -Path "$Env:AppData\less" -Force
[System.Environment]::SetEnvironmentVariable("LESSKEYIN", "$Env:AppData\less\lesskey", "User")
# ~\.matplotlib -> %LocalAppData%\matplotlib :: Matplotlib
[System.Environment]::SetEnvironmentVariable("MPLCONFIGDIR", "$Env:LocalAppData\matplotlib", "User")
# ~\.npmrc -> %AppData%\npm\npmrc :: npm
[System.Environment]::SetEnvironmentVariable("NPM_CONFIG_USERCONFIG", "$Env:AppData\npm\npmrc", "User")
# ~\.node_repl_history -> %LocalAppData%\state\node\repl_history :: Node.js
New-Item -ItemType Directory -Path "$Env:XDG_STATE_HOME\node" -Force
[System.Environment]::SetEnvironmentVariable("NODE_REPL_HISTORY", "$Env:XDG_STATE_HOME\node\repl_history", "User")
# ~\.ts_node_repl_history -> %LocalAppData%\state\node\ts_node_repl_history :: Node.js
# NOTE: ts-node doesn't support this yet
# [System.Environment]::SetEnvironmentVariable("TS_NODE_REPL_HISTORY", "$Env:XDG_STATE_HOME\node\ts_node_repl_history", "User")
# ~\.nuget\packages -> %LocalAppData%\cache\NuGet\packages :: NuGet
[System.Environment]::SetEnvironmentVariable("NUGET_PACKAGES", "$Env:XDG_CACHE_HOME\NuGet\packages", "User")
# ~\.omnisharp -> %AppData%\OmniSharp :: OmniSharp
[System.Environment]::SetEnvironmentVariable("OMNISHARPHOME", "$Env:AppData\OmniSharp", "User")
# ~\.python_history -> %LocalAppData%\state\python\python_history :: Python
# Only works for Python 3.13+ https://docs.python.org/3.13/using/cmdline.html#envvar-PYTHON_HISTORY
New-Item -ItemType Directory -Path "$Env:XDG_STATE_HOME\python" -Force
[System.Environment]::SetEnvironmentVariable("PYTHON_HISTORY", "$Env:XDG_STATE_HOME\python\python_history", "User")
# ~\.rustup -> %LocalAppData%\Rustup :: Rust
[System.Environment]::SetEnvironmentVariable("RUSTUP_HOME", "$Env:LocalAppData\Rustup", "User")
# ~\.vimrc -> %AppData%\Vim\_vimrc :: Vim
New-Item -ItemType Directory -Path "$Env:AppData\Vim" -Force
[System.Environment]::SetEnvironmentVariable("VIM", "$Env:AppData\Vim", "User")
[System.Environment]::SetEnvironmentVariable("KOMOREBI_CONFIG_HOME", "$Env:AppData\komorebi", "User")
# ~\.vuerc -> %AppData%\vue\.vuerc :: Vue CLI
# Currently, Vue CLI doesn't support file path configuration:https://github.com/vuejs/vue-cli/blob/dev/packages/%40vue/cli/lib/confifile
# [System.Environment]::SetEnvironmentVariable("VUE_CLI_CONFIG_PATH", "$Env:AppData\vue\.vuerc", "User")
# ~\.wget-hsts -> %LocalAppData%\cache\wget-hsts :: wget
# Use Alias, wget host file path is not configurable
# ~\.yarnrc -> %AppData%\yarn\config.yaml :: Yarn v1
# Use Alias, yarnrc path is not configurable
# Reload required here to make sure the environment variables are set

View file

@ -1,11 +0,0 @@
# Disable StickyKeys
REG ADD "HKEY_CURRENT_USER\Control Panel\Accessibility\StickyKeys" /v "Flags" /t REG_SZ /d "506" /f
# Disable Hyper+Keys to open Office apps
REG ADD HKCU\Software\Classes\ms-officeapp\Shell\Open\Command /t REG_SZ /d rundll32
# Disable DOS 8.3 file name creation
sudo fsutil 8dot3name set 1
# Delete all known DOS 8.3 file name
fsutil 8dot3name strip /s /v C:\

View file

@ -1,21 +0,0 @@
#Requires -RunAsAdministrator
Write-Output "[INFO] Setting up KMonad Tasks"
# PowerShell Path, use 7 if available
if (Get-Command "pwsh" -ErrorAction SilentlyContinue) {
$PowerShellPath = (Get-Command "pwsh").Source
}
else {
$PowerShellPath = (Get-Command "powershell").Source
}
$DotStartUpPath = "$Env:DOTFILES\platforms\win\start"
$KMonadRunnerPath = Join-Path $DotStartUpPath "KMonad.ps1"
$Action = New-ScheduledTaskAction -Execute $PowerShellPath -Argument "-NoProfile -ExecutionPolicy Bypass -File $KMonadRunnerPath"
$Trigger = New-ScheduledTaskTrigger -AtLogOn
$Principal = New-ScheduledTaskPrincipal -UserId "$env:USERNAME" -LogonType Interactive -RunLevel Highest
$Settings = New-ScheduledTaskSettingsSet -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries -DontStopOnIdleEnd -Hidden
Register-ScheduledTask -TaskName "Start Kmonad" -Action $Action -Trigger $Trigger -Principal $Principal -Settings $Settings -TaskPath "\Personal"

View file

@ -1,78 +0,0 @@
# $DOTFILES\bootstrap\set_symlink_win.ps1
# Date: 2024-12-01
# Author: js0ny
# Set symlinks for dotfiles on Windows
# 在 Windows 上设置 配置文件的符号链接
# Run this with Administrator privileges
$DOTFILES = Join-Path $Env:UserProfile ".dotfiles"
$BASE_COMMON = Join-Path $DOTFILES "common"
$BASE_TOOLS = Join-Path $DOTFILES "tools"
$BASE_WIN = Join-Path $DOTFILES "platforms" "win"
$STARTUP = [System.Environment]::GetFolderPath("Startup")
$BAT_CONF = Join-Path $Env:AppData "bat" "config"
if ((Get-Command bat).Source -ccontains "scoop") {
$BAT_CONF = Join-Path (scoop prefix bat) "config"
}
$SIOYEKDIR = scoop prefix sioyek
$SIOYEKCFG = Get-ChildItem "$BASE_TOOLS\sioyek" -Filter "*.config"
foreach ($cfg in $SIOYEKCFG) {
$cfgName = $cfg.Name
$cfgPath = Join-Path $SIOYEKDIR $cfgName
New-Item -ItemType SymbolicLink -Target $cfg -Path $cfgPath -Force
}
$linkDots = @{
"$BASE_WIN\wslconfig" = "$Env:UserProfile\.wslconfig"
"$BASE_WIN\glzr" = "$Env:UserProfile\.glzr"
"$BASE_WIN\neovide.toml" = "$Env:AppData\neovide\config.toml"
"$BASE_WIN\vsvimrc" = "$Env:UserProfile\.vsvimrc"
"$BASE_COMMON\bat.config" = "$BAT_CONF"
"$BASE_COMMON\condarc.yaml" = "$Env:XDG_CONFIG_HOME\conda\.condarc"
"$BASE_COMMON\glow.yaml" = "$Env:AppData\glow\glow.yml"
"$BASE_COMMON\haskeline" = "$Env:UserProfile\.haskeline"
"$BASE_COMMON\ideavimrc" = "$Env:XDG_CONFIG_HOME\ideavim\ideavimrc"
"$BASE_COMMON\lazygit.yaml" = "$Env:AppData\lazygit\config.yml"
"$BASE_COMMON\lesskey" = "$Env:LessKeyIn"
"$BASE_COMMON\lsd" = "$Env:AppData\lsd\config.yaml"
"$BASE_COMMON\npmrc" = "$Env:NPM_CONFIG_USERCONFIG"
"$BASE_COMMON\NuGet.Config" = "$Env:AppData\NuGet\NuGet.Config"
"$BASE_COMMON\starship.toml" = "$Env:UserProfile\.config\starship.toml"
"$BASE_COMMON\pip.conf" = "$Env:AppData\pip\pip.ini"
"$BASE_COMMON\vimrc.noxdg.vimrc" = "$Env:UserProfile\_vimrc"
"$BASE_COMMON\emacs.d" = "$Env:AppData\.emacs.d"
"$BASE_TOOLS\ipython" = "$Env:IPYTHONDIR"
"$BASE_TOOLS\nvim" = "$Env:XDG_CONFIG_HOME\nvim"
"$BASE_TOOLS\wezterm" = "$Env:XDG_CONFIG_HOME\wezterm"
"$BASE_TOOLS\yazi" = "$Env:AppData\yazi\config"
"$BASE_TOOLS\zed" = "$Env:AppData\Zed"
}
foreach ($src in $linkDots.Keys) {
$dest = $linkDots[$src]
# Auto create directories (Untested)
if (Test-Path -Path $src -PathType Container) {
New-Item -ItemType Directory -Path $dest -Force
}
else {
$Local:destParent = Split-Path -Path $dest -Parent
New-Item -ItemType Directory -Path $destParent -Force
}
if (Test-Path -Path $dest) {
Move-Item $dest "$dest.bak" -Force
}
New-Item -ItemType SymbolicLink -Target $src -Path $dest -Force
}
New-Item -ItemType SymbolicLink -Target "$BASE_WIN\Microsoft.PowerShell_profile.ps1" -Path "$Env:UserProfile\Documents\PowerShell\Microsoft.PowerShell_profile.ps1" -Force
Copy-Item (Join-Path $BASE_WIN "ahk" "bin" "Caps.exe") $STARTUP
Copy-Item (Join-Path $BASE_COMMON "gitconfig") $Env:UserProfile

View file

@ -1,3 +0,0 @@
(setq org-directory "~/OrgFiles/")
(setq org-agenda-files (list (concat org-directory "tasks/")))

View file

@ -1 +0,0 @@
/home/js0ny/.dotfiles/common/bat.config.light

View file

@ -1,10 +0,0 @@
# --preview 'bat --color=always --style=numbers {}'
# --bind alt-n:preview-down,alt-e:preview-up
# --bind ctrl-e:up
# --bind alt-p:toggle-preview
# --color=bg+:#313244,bg:#1e1e2e,spinner:#f5e0dc,hl:#f38ba8
# --color=fg:#cdd6f4,header:#f38ba8,info:#f5c2e7,pointer:#f5e0dc
# --color=marker:#b4befe,fg+:#cdd6f4,prompt:#f5c2e7,hl+:#f38ba8
# --color=selected-bg:#45475a
# --color=border:#313244,label:#cdd6f4
#

View file

@ -1,4 +0,0 @@
editMode: Vi
bind: n down
bind: e up
bind: l vi-insert

View file

@ -1,476 +0,0 @@
yaml-language-server: $schema=https://raw.githubusercontent.com/jesseduffield/lazygit/master/schema/config.json
# Config relating to the Lazygit UI
gui:
# The number of lines you scroll by when scrolling the main window
scrollHeight: 2
# If true, allow scrolling past the bottom of the content in the main window
scrollPastBottom: true
# See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#scroll-off-margin
scrollOffMargin: 2
# One of: 'margin' (default) | 'jump'
scrollOffBehavior: margin
# If true, capture mouse events.
# When mouse events are captured, it's a little harder to select text: e.g. requiring you to hold the option key when on macOS.
mouseEvents: true
# If true, do not show a warning when discarding changes in the staging view.
skipDiscardChangeWarning: false
# If true, do not show warning when applying/popping the stash
skipStashWarning: false
# If true, do not show a warning when attempting to commit without any staged files; instead stage all unstaged files.
skipNoStagedFilesWarning: false
# If true, do not show a warning when rewording a commit via an external editor
skipRewordInEditorWarning: false
# Fraction of the total screen width to use for the left side section. You may want to pick a small number (e.g. 0.2) if you're using a narrow screen, so that you can see more of the main section.
# Number from 0 to 1.0.
sidePanelWidth: 0.3333
# If true, increase the height of the focused side window; creating an accordion effect.
expandFocusedSidePanel: false
# The weight of the expanded side panel, relative to the other panels. 2 means
# twice as tall as the other panels. Only relevant if `expandFocusedSidePanel` is true.
expandedSidePanelWeight: 2
# Sometimes the main window is split in two (e.g. when the selected file has both staged and unstaged changes). This setting controls how the two sections are split.
# Options are:
# - 'horizontal': split the window horizontally
# - 'vertical': split the window vertically
# - 'flexible': (default) split the window horizontally if the window is wide enough, otherwise split vertically
mainPanelSplitMode: flexible
# How the window is split when in half screen mode (i.e. after hitting '+' once).
# Possible values:
# - 'left': split the window horizontally (side panel on the left, main view on the right)
# - 'top': split the window vertically (side panel on top, main view below)
enlargedSideViewLocation: left
# One of 'auto' (default) | 'en' | 'zh-CN' | 'zh-TW' | 'pl' | 'nl' | 'ja' | 'ko' | 'ru'
language: auto
# Format used when displaying time e.g. commit time.
# Uses Go's time format syntax: https://pkg.go.dev/time#Time.Format
timeFormat: 02 Jan 06
# Format used when displaying time if the time is less than 24 hours ago.
# Uses Go's time format syntax: https://pkg.go.dev/time#Time.Format
shortTimeFormat: 3:04PM
# Config relating to colors and styles.
# See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#color-attributes
theme:
activeBorderColor:
- "#b4befe"
- bold
inactiveBorderColor:
- "#a6adc8"
optionsTextColor:
- "#89b4fa"
selectedLineBgColor:
- "#313244"
cherryPickedCommitBgColor:
- "#45475a"
cherryPickedCommitFgColor:
- "#b4befe"
unstagedChangesColor:
- "#f38ba8"
defaultFgColor:
- "#cdd6f4"
searchingActiveBorderColor:
- "#f9e2af"
authorColors:
"*": "#b4befe"
# Background color of selected line when view doesn't have focus.
inactiveViewSelectedLineBgColor:
- bold
# Foreground color of marked base commit (for rebase)
markedBaseCommitFgColor:
- blue
# Background color of marked base commit (for rebase)
markedBaseCommitBgColor:
- yellow
# Config relating to the commit length indicator
commitLength:
# If true, show an indicator of commit message length
show: true
# If true, show the '5 of 20' footer at the bottom of list views
showListFooter: true
# If true, display the files in the file views as a tree. If false, display the files as a flat list.
# This can be toggled from within Lazygit with the '~' key, but that will not change the default.
showFileTree: true
# If true, show the number of lines changed per file in the Files view
showNumstatInFilesView: false
# If true, show a random tip in the command log when Lazygit starts
showRandomTip: true
# If true, show the command log
showCommandLog: true
# If true, show the bottom line that contains keybinding info and useful buttons. If false, this line will be hidden except to display a loader for an in-progress action.
showBottomLine: true
# If true, show jump-to-window keybindings in window titles.
showPanelJumps: true
# Deprecated: use nerdFontsVersion instead
showIcons: false
# Nerd fonts version to use.
# One of: '2' | '3' | empty string (default)
# If empty, do not show icons.
nerdFontsVersion: "3"
# If true (default), file icons are shown in the file views. Only relevant if NerdFontsVersion is not empty.
showFileIcons: true
# Length of author name in (non-expanded) commits view. 2 means show initials only.
commitAuthorShortLength: 2
# Length of author name in expanded commits view. 2 means show initials only.
commitAuthorLongLength: 17
# Length of commit hash in commits view. 0 shows '*' if NF icons aren't on.
commitHashLength: 8
# If true, show commit hashes alongside branch names in the branches view.
showBranchCommitHash: false
# Whether to show the divergence from the base branch in the branches view.
# One of: 'none' | 'onlyArrow' | 'arrowAndNumber'
showDivergenceFromBaseBranch: none
# Height of the command log view
commandLogSize: 8
# Whether to split the main window when viewing file changes.
# One of: 'auto' | 'always'
# If 'auto', only split the main window when a file has both staged and unstaged changes
splitDiff: auto
# Default size for focused window. Window size can be changed from within Lazygit with '+' and '_' (but this won't change the default).
# One of: 'normal' (default) | 'half' | 'full'
screenMode: normal
# Window border style.
# One of 'rounded' (default) | 'single' | 'double' | 'hidden'
border: rounded
# If true, show a seriously epic explosion animation when nuking the working tree.
animateExplosion: true
# Whether to stack UI components on top of each other.
# One of 'auto' (default) | 'always' | 'never'
portraitMode: auto
# How things are filtered when typing '/'.
# One of 'substring' (default) | 'fuzzy'
filterMode: substring
# Config relating to the spinner.
spinner:
# The frames of the spinner animation.
frames:
- "|"
- /
- "-"
- \
# The "speed" of the spinner in milliseconds.
rate: 50
# Status panel view.
# One of 'dashboard' (default) | 'allBranchesLog'
statusPanelView: dashboard
# If true, jump to the Files panel after popping a stash
switchToFilesAfterStashPop: true
# If true, jump to the Files panel after applying a stash
switchToFilesAfterStashApply: true
# If true, when using the panel jump keys (default 1 through 5) and target panel is already active, go to next tab instead
switchTabsWithPanelJumpKeys: false
# Config relating to git
git:
# See https://github.com/jesseduffield/lazygit/blob/master/docs/Custom_Pagers.md
paging:
# Value of the --color arg in the git diff command. Some pagers want this to be set to 'always' and some want it set to 'never'
colorArg: always
# e.g.
# diff-so-fancy
# delta --dark --paging=never
# ydiff -p cat -s --wrap --width={{columnWidth}}
pager: "delta --dark --paging=never"
# If true, Lazygit will use whatever pager is specified in `$GIT_PAGER`, `$PAGER`, or your *git config*. If the pager ends with something like ` | less` we will strip that part out, because less doesn't play nice with our rendering approach. If the custom pager uses less under the hood, that will also break rendering (hence the `--paging=never` flag for the `delta` pager).
useConfig: false
# e.g. 'difft --color=always'
externalDiffCommand: ""
# Config relating to committing
commit:
# If true, pass '--signoff' flag when committing
signOff: false
# Automatic WYSIWYG wrapping of the commit message as you type
autoWrapCommitMessage: true
# If autoWrapCommitMessage is true, the width to wrap to
autoWrapWidth: 72
# Config relating to merging
merging:
# If true, run merges in a subprocess so that if a commit message is required, Lazygit will not hang
# Only applicable to unix users.
manualCommit: false
# Extra args passed to `git merge`, e.g. --no-ff
args: ""
# The commit message to use for a squash merge commit. Can contain "{{selectedRef}}" and "{{currentBranch}}" placeholders.
squashMergeMessage: Squash merge {{selectedRef}} into {{currentBranch}}
# list of branches that are considered 'main' branches, used when displaying commits
mainBranches:
- master
- main
# Prefix to use when skipping hooks. E.g. if set to 'WIP', then pre-commit hooks will be skipped when the commit message starts with 'WIP'
skipHookPrefix: WIP
# If true, periodically fetch from remote
autoFetch: true
# If true, periodically refresh files and submodules
autoRefresh: true
# If true, pass the --all arg to git fetch
fetchAll: true
# If true, lazygit will automatically stage files that used to have merge
# conflicts but no longer do; and it will also ask you if you want to
# continue a merge or rebase if you've resolved all conflicts. If false, it
# won't do either of these things.
autoStageResolvedConflicts: true
# Command used when displaying the current branch git log in the main window
branchLogCmd: git log --graph --color=always --abbrev-commit --decorate --date=relative --pretty=medium {{branchName}} --
# If true, do not spawn a separate process when using GPG
overrideGpg: false
# If true, do not allow force pushes
disableForcePushing: false
# See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#predefined-commit-message-prefix
commitPrefix:
- # pattern to match on. E.g. for 'feature/AB-123' to match on the AB-123 use "^\\w+\\/(\\w+-\\w+).*"
pattern: ""
# Replace directive. E.g. for 'feature/AB-123' to start the commit message with 'AB-123 ' use "[$1] "
replace: ""
# See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#predefined-branch-name-prefix
branchPrefix: ""
# If true, parse emoji strings in commit messages e.g. render :rocket: as 🚀
# (This should really be under 'gui', not 'git')
parseEmoji: false
# Config for showing the log in the commits view
log:
# One of: 'date-order' | 'author-date-order' | 'topo-order' | 'default'
# 'topo-order' makes it easier to read the git log graph, but commits may not
# appear chronologically. See https://git-scm.com/docs/
#
# Deprecated: Configure this with `Log menu -> Commit sort order` (<c-l> in the commits window by default).
order: topo-order
# This determines whether the git graph is rendered in the commits panel
# One of 'always' | 'never' | 'when-maximised'
#
# Deprecated: Configure this with `Log menu -> Show git graph` (<c-l> in the commits window by default).
showGraph: always
# displays the whole git graph by default in the commits view (equivalent to passing the `--all` argument to `git log`)
showWholeGraph: false
# When copying commit hashes to the clipboard, truncate them to this
# length. Set to 40 to disable truncation.
truncateCopiedCommitHashesTo: 12
allBranchesLogCmds:
- git log --graph --all --color=always --abbrev-commit --decorate --date=relative --pretty=medium
# Periodic update checks
update:
# One of: 'prompt' (default) | 'background' | 'never'
method: prompt
# Period in days between update checks
days: 14
# Background refreshes
refresher:
# File/submodule refresh interval in seconds.
# Auto-refresh can be disabled via option 'git.autoRefresh'.
refreshInterval: 10
# Re-fetch interval in seconds.
# Auto-fetch can be disabled via option 'git.autoFetch'.
fetchInterval: 60
# If true, show a confirmation popup before quitting Lazygit
confirmOnQuit: false
# If true, exit Lazygit when the user presses escape in a context where there is nothing to cancel/close
quitOnTopLevelReturn: false
# Config relating to things outside of Lazygit like how files are opened, copying to clipboard, etc
os:
# Command for editing a file. Should contain "{{filename}}".
edit: ""
# Command for editing a file at a given line number. Should contain
# "{{filename}}", and may optionally contain "{{line}}".
editAtLine: ""
# Same as EditAtLine, except that the command needs to wait until the
# window is closed.
editAtLineAndWait: ""
# For opening a directory in an editor
openDirInEditor: ""
# A built-in preset that sets all of the above settings. Supported presets
# are defined in the getPreset function in editor_presets.go.
editPreset: "nvim"
# Command for opening a file, as if the file is double-clicked. Should
# contain "{{filename}}", but doesn't support "{{line}}".
open: ""
# Command for opening a link. Should contain "{{link}}".
openLink: ""
# EditCommand is the command for editing a file.
# Deprecated: use Edit instead. Note that semantics are different:
# EditCommand is just the command itself, whereas Edit contains a
# "{{filename}}" variable.
editCommand: ""
# EditCommandTemplate is the command template for editing a file
# Deprecated: use EditAtLine instead.
editCommandTemplate: ""
# OpenCommand is the command for opening a file
# Deprecated: use Open instead.
openCommand: ""
# OpenLinkCommand is the command for opening a link
# Deprecated: use OpenLink instead.
openLinkCommand: ""
# CopyToClipboardCmd is the command for copying to clipboard.
# See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#custom-command-for-copying-to-and-pasting-from-clipboard
copyToClipboardCmd: ""
# ReadFromClipboardCmd is the command for reading the clipboard.
# See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#custom-command-for-copying-to-and-pasting-from-clipboard
readFromClipboardCmd: ""
# If true, don't display introductory popups upon opening Lazygit.
disableStartupPopups: false
# What to do when opening Lazygit outside of a git repo.
# - 'prompt': (default) ask whether to initialize a new repo or open in the most recent repo
# - 'create': initialize a new repo
# - 'skip': open most recent repo
# - 'quit': exit Lazygit
notARepository: prompt
# If true, display a confirmation when subprocess terminates. This allows you to view the output of the subprocess before returning to Lazygit.
promptToReturnFromSubprocess: true
# Keybindings
keybinding:
universal:
quit: q
quit-alt1: <c-c>
return: <esc>
quitWithoutChangingDirectory: Q
togglePanel: <tab>
prevItem: <up>
nextItem: <down>
prevItem-alt: e
nextItem-alt: "n"
prevPage: ","
nextPage: .
scrollLeft: H
scrollRight: L
gotoTop: <
gotoBottom: ">"
toggleRangeSelect: v
rangeSelectDown: <s-down>
rangeSelectUp: <s-up>
prevBlock: <left>
nextBlock: <right>
prevBlock-alt: h
nextBlock-alt: i
nextBlock-alt2: <tab>
prevBlock-alt2: <backtab>
jumpToBlock:
- "1"
- "2"
- "3"
- "4"
- "5"
nextMatch: "k"
prevMatch: "K"
startSearch: /
optionMenu: <disabled>
optionMenu-alt1: "?"
select: <space>
goInto: <enter>
confirm: <enter>
confirmInEditor: <a-enter>
remove: d
new: "n"
edit: l
openFile: o
scrollUpMain: <pgup>
scrollDownMain: <pgdown>
scrollUpMain-alt1: E
scrollDownMain-alt1: "N"
scrollUpMain-alt2: <c-u>
scrollDownMain-alt2: <c-d>
executeShellCommand: ":"
createRebaseOptionsMenu: m
# 'Files' appended for legacy reasons
pushFiles: P
# 'Files' appended for legacy reasons
pullFiles: p
refresh: R
createPatchOptionsMenu: <c-p>
nextTab: "]"
prevTab: "["
nextScreenMode: +
prevScreenMode: _
undo: z
redo: <c-z>
filteringMenu: <c-s>
diffingMenu: W
diffingMenu-alt: <c-e>
copyToClipboard: <c-o>
openRecentRepos: <c-r>
submitEditorText: <enter>
extrasMenu: "@"
toggleWhitespaceInDiffView: <c-w>
increaseContextInDiffView: "}"
decreaseContextInDiffView: "{"
increaseRenameSimilarityThreshold: )
decreaseRenameSimilarityThreshold: (
openDiffTool: <c-t>
status:
checkForUpdate: u
recentRepos: <space>
allBranchesLogGraph: a
files:
commitChanges: c
commitChangesWithoutHook: w
amendLastCommit: A
commitChangesWithEditor: C
findBaseCommitForFixup: <c-f>
confirmDiscard: x
ignoreFile: i
refreshFiles: r
stashAllChanges: s
viewStashOptions: S
toggleStagedAll: a
viewResetOptions: D
fetch: f
toggleTreeView: "t"
openMergeTool: M
openStatusFilter: <c-b>
copyFileInfoToClipboard: "y"
branches:
createPullRequest: o
viewPullRequestOptions: O
copyPullRequestURL: <c-y>
checkoutBranchByName: c
forceCheckoutBranch: F
rebaseBranch: r
renameBranch: R
mergeIntoCurrentBranch: M
viewGitFlowOptions: l
fastForward: f
createTag: T
pushTag: P
setUpstream: u
fetchRemote: f
sortOrder: s
worktrees:
viewWorktreeOptions: w
commits:
squashDown: s
renameCommit: r
renameCommitWithEditor: R
viewResetOptions: g
markCommitAsFixup: f
createFixupCommit: F
squashAboveCommits: S
moveDownCommit: <c-j>
moveUpCommit: <c-k>
amendToCommit: A
resetCommitAuthor: a
pickCommit: p
revertCommit: t
cherryPickCopy: C
pasteCommits: V
markCommitAsBaseForRebase: B
tagCommit: T
checkoutCommit: <space>
resetCherryPick: <c-R>
copyCommitAttributeToClipboard: "y"
openLogMenu: <c-l>
openInBrowser: o
viewBisectOptions: b
startInteractiveRebase: I
amendAttribute:
resetAuthor: a
setAuthor: A
addCoAuthor: c
stash:
popStash: g
renameStash: r
commitFiles:
checkoutCommitFile: c
main:
toggleSelectHunk: a
pickBothHunks: b
editSelectHunk: E
submodules:
init: I
update: u
bulkMenu: b
commitMessage:
commitMenu: <c-o>

View file

@ -1 +0,0 @@
strict-ssl=false

View file

@ -1,159 +0,0 @@
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
# don't put duplicate lines or lines starting with space in the history.
# See bash(1) for more options
HISTCONTROL=ignoreboth
# append to the history file, don't overwrite it
shopt -s histappend
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=1000
HISTFILESIZE=2000
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize
# If set, the pattern "**" used in a pathname expansion context will
# match all files and zero or more directories and subdirectories.
#shopt -s globstar
# make less more friendly for non-text input files, see lesspipe(1)
#[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
fi
# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
xterm-color|*-256color) color_prompt=yes;;
esac
# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
#force_color_prompt=yes
if [ -n "$force_color_prompt" ]; then
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
# We have color support; assume it's compliant with Ecma-48
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
# a case would tend to support setf rather than setaf.)
color_prompt=yes
else
color_prompt=
fi
fi
if [ "$color_prompt" = yes ]; then
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
else
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi
unset color_prompt force_color_prompt
# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
;;
*)
;;
esac
# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto'
#alias dir='dir --color=auto'
#alias vdir='vdir --color=auto'
#alias grep='grep --color=auto'
#alias fgrep='fgrep --color=auto'
#alias egrep='egrep --color=auto'
fi
# colored GCC warnings and errors
#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
# some more ls aliases
alias ll='ls -l'
alias la='ls -A'
alias l='ls -CF'
# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if ! shopt -oq posix; then
if [ -f /usr/share/bash-completion/bash_completion ]; then
. /usr/share/bash-completion/bash_completion
elif [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
fi
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
source ~/.nvm/nvm.sh
# Append to original bashrc for minimal setup
# echo $DOTFILES/wsl/.bashrc >> ~/.bashrc
bind 'set show-mode-in-prompt on'
set -o vi
alias svi="sudo vim" # Prevent conflicts with svelte-cli
alias v="vim"
alias sdocker="sudo docker"
alias scompose="sudo docker compose up -d"
alias sdockerps="sudo docker ps"
alias netl="netstat -tulnp"
alias apt="sudo apt"
alias apts="apt search"
alias apti="sudo apt install"
alias aptr="sudo apt remove"
alias aptu="sudo apt upgrade && sudo apt update"
alias l="ls -lah"
alias ll="ls -l"
alias la="ls -lA"
bind 'set vi-ins-mode-string "sh"'
bind 'set vi-cmd-mode-string "vi"'
PS2=" > "
update_ps1() {
local last_status=$?
if [[ $last_status -eq 0 ]]; then
PS1="\[\e[0;33m\]  \[\e[0;35m\][\A] \[\e[0;32m\]\u @ \h \[\e[0;34m\]in \w \[\e[0;32m\]✔\n \$ \[\e[0m\]"
else
PS1="\[\e[0;33m\]  \[\e[0;35m\][\A] \[\e[0;32m\]\u @ \h \[\e[0;34m\]in \w \[\e[0;31m\]✘\n \$ \[\e[0m\]"
fi
}
PROMPT_COMMAND=update_ps1

View file

@ -1,455 +0,0 @@
# $DOTFILES/common/starship.toml
# vim:foldmethod=marker
# Date: 2025-01-26
# Description: Use one starship config for all shells
# Location: $XDG_CONFIG_HOME/starship.toml
# Linking: ln -s $DOTFILES/common/starship.toml $XDG_CONFIG_HOME/starship.toml
# Modified from the Powerline Preset
"$schema" = 'https://starship.rs/config-schema.json'
# {{{ format
format = """
$sudo\
$jobs\
$os\
$time\
[](bg:#DA627D fg:#9A348E)\
$username\
$hostname\
[](fg:#DA627D bg:#FCA17D)\
$directory\
$git_branch\
$git_status\
[](fg:#FCA17D bg:#86BBD8)\
$custom\
$bun\
$c\
$cmake\
$cobol\
$daml\
$dart\
$deno\
$dotnet\
$elixir\
$elm\
$erlang\
$fennel\
$gleam\
$golang\
$guix_shell\
$haskell\
$haxe\
$helm\
$java\
$julia\
$kotlin\
$gradle\
$lua\
$nim\
$nodejs\
$ocaml\
$opa\
$perl\
$php\
$pulumi\
$purescript\
$python\
$quarto\
$raku\
$rlang\
$red\
$ruby\
$rust\
$scala\
$solidity\
$swift\
$terraform\
$typst\
$vlang\
$vagrant\
$zig\
[](fg:#86BBD8)
$character\
$shell\
[](fg:#06969A)\
"""
# }}}
# {{{ TODO:
#
# $buf\
# $nix_shell\
# $conda\
# $meson\
# $spack\
# $memory_usage\
# $aws\
# $gcloud\
# $openstack\
# $azure\
# $nats\
# $direnv\
# $env_var\
# $crystal\
# $sudo\
# $cmd_duration\
# $line_break\
# $battery\
# $container\
# }}}
# Disable the blank line at the start of the prompt
# add_newline = false
# You can also replace your username with a neat symbol like  or disable this
# and use the os module below
# {{{ Part 1
[jobs]
style = "bg:#9A348E"
format = '[$symbol $number]($style)'
[os]
style = "bg:#9A348E"
format = '[ $symbol ]($style)'
disabled = false # Disabled by default
[os.symbols]
Alpaquita = " "
Alpine = " "
AlmaLinux = " "
Amazon = " "
Android = " "
Arch = " "
Artix = " "
CentOS = " "
Debian = " "
DragonFly = " "
Emscripten = " "
EndeavourOS = " "
Fedora = " "
FreeBSD = " "
Garuda = "󰛓 "
Gentoo = " "
HardenedBSD = "󰞌 "
Illumos = "󰈸 "
Kali = " "
Linux = " "
Mabox = " "
Macos = " "
Manjaro = " "
Mariner = " "
MidnightBSD = " "
Mint = " "
NetBSD = " "
NixOS = " "
OpenBSD = "󰈺 "
openSUSE = " "
OracleLinux = "󰌷 "
Pop = " "
Raspbian = " "
Redhat = " "
RedHatEnterprise = " "
RockyLinux = " "
Redox = "󰀘 "
Solus = "󰠳 "
SUSE = " "
Ubuntu = " "
Unknown = " "
Void = " "
Windows = "󰍲 "
[time]
disabled = false
time_format = "%R" # Hour:Minute Format
# style = "bg:#33658A"
style = "bg:#9A348E"
format = '[$time ]($style)'
# }}}
# {{{ Part 2
[username]
show_always = true
style_user = "bg:#DA627D"
style_root = "bg:#DA627D"
# style_user = "bg:#9A348E"
# style_root = "bg:#9A348E"
format = '[ $user ]($style)'
disabled = false
[hostname]
ssh_only = false
# format = '[$ssh_symbol](bold blue) [$hostname](bold red) '
style = "bg:#DA627D"
format = '[@ $hostname ]($style)'
trim_at = '.companyname.com'
disabled = false
# }}}
# {{{ Part 3
[directory]
style = "bg:#FCA17D fg:#035E82"
format = "[ $path ]($style)"
fish_style_pwd_dir_length = 1
# truncation_length = 100
truncation_length = 2
truncation_symbol = ":"
truncate_to_repo = true
# Here is how you can shorten some long paths by text replacementtruncation_symbol = ":"
# similar to mapped_locations in Oh My Posh:
[directory.substitutions]
# "Documents" = "󰈙 "
# "Downloads" = " "
# "Music" = " "
# "Pictures" = " "
# "Source" = " "
# ".dotfiles" = " "
# Keep in mind that the order matters. For example:
# "Important Documents" = " 󰈙 "
# will not be replaced, because "Documents" was already substituted before.
# So either put "Important Documents" before "Documents" or use the substituted version:
# "Important 󰈙 " = " 󰈙 "
[git_branch]
symbol = ""
style = "bg:#FCA17D fg:#035E82"
format = '[ $symbol $branch ]($style)'
[git_status]
style = "bg:#FCA17D fg:#035E82"
renamed = " "
modified = " "
staged = " "
deleted = " "
format = '[$all_status$ahead_behind ]($style)'
# }}}
# {{{ Part 4
[custom.just]
detect_files = ["Justfile", "justfile", ".Justfile", ".justfile"]
style = "bg:#86BBD8 fg:#794427"
format = "[ Just ]($style)"
[custom.dotenv]
detect_files = [
".env",
".env.local",
".env.development",
".env.test",
".env.production",
".env.staging",
]
style = "bg:#86BBD8 fg:#794427"
format = "[  ]($style)"
[custom.tex]
detect_extensions = ["tex", "bib"]
style = "bg:#86BBD8 fg:#794427"
format = "[  ]($style)"
[custom.readme]
detect_files = [
"README.md",
"readme.md",
"README",
"readme",
"README.org",
"readme.org",
]
style = "bg:#86BBD8 fg:#794427"
format = "[ 󰂺 ]($style)"
[c]
symbol = " "
style = "bg:#86BBD8 fg:#794427"
format = '[ $symbol ($version) ]($style)'
[cmake]
style = "bg:#86BBD8 fg:#794427"
format = '[ $symbol ($version) ]($style)'
[dart]
symbol = " "
style = "bg:#86BBD8 fg:#794427"
format = '[ $symbol ($version) ]($style)'
[deno]
symbol = " "
style = "bg:#86BBD8 fg:#794427"
format = '[ $symbol ($version) ]($style)'
[dotnet]
symbol = " "
style = "bg:#86BBD8 fg:#794427"
format = '[ $symbol ($version) ]($style)'
detect_extensions = [
"sln",
"csproj",
"fsproj",
"xproj",
"vbproj",
"cs",
"csx",
"fs",
"fsx",
]
[docker_context]
symbol = " "
style = "bg:#06969A"
format = '[ $symbol $context ]($style)'
[elixir]
symbol = " "
style = "bg:#86BBD8 fg:#794427"
format = '[ $symbol ($version) ]($style)'
[elm]
symbol = " "
style = "bg:#86BBD8 fg:#794427"
format = '[ $symbol ($version) ]($style)'
[golang]
symbol = " "
style = "bg:#86BBD8 fg:#794427"
format = '[ $symbol ($version) ]($style)'
[gradle]
style = "bg:#86BBD8 fg:#794427"
format = '[ $symbol ($version) ]($style)'
[haskell]
symbol = " "
style = "bg:#86BBD8 fg:#794427"
format = '[ $symbol ($version) ]($style)'
[java]
symbol = " "
style = "bg:#86BBD8 fg:#794427"
format = '[ $symbol ($version) ]($style)'
[julia]
symbol = " "
style = "bg:#86BBD8 fg:#794427"
format = '[ $symbol ($version) ]($style)'
[lua]
symbol = " "
style = "bg:#86BBD8 fg:#794427"
format = '[ $symbol ($version) ]($style)'
[nodejs]
symbol = ""
style = "bg:#86BBD8 fg:#794427"
format = '[ $symbol ($version) ]($style)'
[nim]
symbol = "󰆥 "
style = "bg:#86BBD8 fg:#794427"
format = '[ $symbol ($version) ]($style)'
[rust]
symbol = ""
style = "bg:#86BBD8 fg:#794427"
format = '[ $symbol ($version) ]($style)'
[scala]
symbol = " "
style = "bg:#86BBD8 fg:#794427"
format = '[ $symbol ($version) ]($style)'
[python]
symbol = " "
style = "bg:#86BBD8 fg:#794427"
format = '[ $symbol ($version) ]($style)'
[ruby]
symbol = " "
style = "bg:#86BBD8 fg:#794427"
format = '[ $symbol ($version) ]($style)'
[bun]
symbol = " "
style = "bg:#86BBD8 fg:#794427"
format = '[ $symbol ($version) ]($style)'
[typst]
symbol = " "
style = "bg:#86BBD8 fg:#794427"
format = '[ $symbol ($version) ]($style)'
[zig]
symbol = "↯ "
style = "bg:#86BBD8 fg:#794427"
format = '[ $symbol ($version) ]($style)'
[kotlin]
symbol = " "
style = "bg:#86BBD8 fg:#794427"
format = '[ $symbol ($version) ]($style)'
# }}}
# {{{ Part 5
[shell]
style = "bg:#06969A"
format = '[ $indicator ]($style)'
fish_indicator = "󰈺 "
bash_indicator = '\$ '
zsh_indicator = "% "
powershell_indicator = "PS"
cmd_indicator = "cm"
nu_indicator = "nu"
disabled = false
[character]
success_symbol = "[ ](bg:#33658A)[](fg:#33658A bg:#06969A)"
error_symbol = "[  ](fg:bold red bg:#33658A)[](fg:#33658A bg:#06969A)"
vimcmd_symbol = "[  ](fg:#32ff6c bg:#33658A)[](fg:#33658A bg:#06969A)"
vimcmd_visual_symbol = "[  ](fg:bold yellow bg:#33658A)[](fg:#33658A bg:#06969A)"
vimcmd_replace_symbol = "[  ](fg:bold purple bg:#33658A)[](fg:#33658A bg:#06969A)"
vimcmd_replace_one_symbol = "[  ](fg:bold purple bg:#33658A)[](fg:#33658A bg:#06969A)"
# success_symbol = "[ ](bg:#33658A)[](fg:#33658A bg:#06969A)"
# success_symbol = "[](fg:#86BBD8 bg:#33658A)"
format = "$symbol"
disabled = false
# }}}
# {{{ Misc
[palettes.catppuccin_mocha]
rosewater = "#f5e0dc"
flamingo = "#f2cdcd"
pink = "#f5c2e7"
mauve = "#cba6f7"
red = "#f38ba8"
maroon = "#eba0ac"
peach = "#fab387"
yellow = "#f9e2af"
green = "#a6e3a1"
teal = "#94e2d5"
sky = "#89dceb"
sapphire = "#74c7ec"
blue = "#89b4fa"
lavender = "#b4befe"
text = "#cdd6f4"
subtext1 = "#bac2de"
subtext0 = "#a6adc8"
overlay2 = "#9399b2"
overlay1 = "#7f849c"
overlay0 = "#6c7086"
surface2 = "#585b70"
surface1 = "#45475a"
surface0 = "#313244"
base = "#1e1e2e"
mantle = "#181825"
crust = "#11111b"
# }}}

View file

@ -1,60 +0,0 @@
" Source a global configuration file if available
if filereadable("/etc/vim/vimrc.local")
source /etc/vim/vimrc.local
endif
" This is a minimal setup of vimrc
" ln -sf $DOTFILES/.config/vim/vimrc $XDG_CONFIG_HOME/vim/vimrc
" Colemak Keys
" Arrow remap
noremap n j
noremap e k
noremap i l
nnoremap N 5j
nnoremap E 5k
vnoremap H ^
xnoremap H ^
onoremap H ^
vnoremap I $
xnoremap I $
onoremap I $
noremap I L
" Similar position to i
noremap l i
noremap L I
" ne[k]st
noremap k n
noremap K N
" [j]ump
noremap j e
noremap J E
" Normal minimal setup
noremap Y y$
set expandtab
set tabstop=4
set shiftwidth=4
set autoindent
set smartindent
set wrap
set scrolloff=3
set hlsearch
set incsearch
set ignorecase
set smartcase
set showcmd
set mouse=a " Enable mouse usage (all modes)
set number
set relativenumber
set laststatus=2
set showcmd
set statusline=%<%f\ %h%m%r\ %=\ [%l,%v]\ [%p%%]\ [\ %Y]\ [󱑉\ %{strftime('%H:%M:%S')}]
syntax on

View file

@ -1,74 +0,0 @@
" $XDG_CONFIG_HOME/vim/vimrc
" This is a minimal setup of vimrc
" ln -sf $DOTFILES/.config/vim/vimrc $XDG_CONFIG_HOME/vim/vimrc
" Colemak Keys
" Arrow remap
noremap n j
noremap e k
noremap i l
nnoremap N 5j
nnoremap E 5k
vnoremap H ^
xnoremap H ^
onoremap H ^
vnoremap I $
xnoremap I $
onoremap I $
noremap I L
" Similar position to i
noremap l i
noremap L I
" ne[k]st
noremap k n
noremap K N
" [j]ump
noremap j e
noremap J E
" Normal minimal setup
noremap Y y$
set expandtab
set tabstop=4
set shiftwidth=4
set autoindent
set smartindent
set wrap
set scrolloff=3
set hlsearch
set incsearch
set ignorecase
set smartcase
set number
set relativenumber
set laststatus=2
set showcmd
set statusline=%<%f\ %h%m%r\ %=\ [%l,%v]\ [%p%%]\ [\ %Y]\ [󱑉\ %{strftime('%H:%M:%S')}]
" XDG Directory Specifications
" Reference to https://jorenar.com/blog/vim-xdg
if empty($XDG_CACHE_HOME) | let $XDG_CACHE_HOME = $HOME."/.cache" | endif
if empty($XDG_CONFIG_HOME) | let $XDG_CONFIG_HOME = $HOME."/.config" | endif
if empty($XDG_DATA_HOME) | let $XDG_DATA_HOME = $HOME."/.local/share" | endif
if empty($XDG_STATE_HOME) | let $XDG_STATE_HOME = $HOME."/.local/state" | endif
set viminfo+=n$XDG_STATE_HOME/vim/viminfo
set packpath^=$XDG_DATA_HOME/vim
set packpath+=$XDG_DATA_HOME/vim/after
set backupdir=$XDG_STATE_HOME/vim/backup
set directory=$XDG_STATE_HOME/vim/swap
set undodir=$XDG_STATE_HOME/vim/undo
set viewdir=$XDG_STATE_HOME/vim/view
" set shada+=n$XDG_STATE_HOME/vim/shada
" Leader
let mapleader = "\<Space>"
nnoremap <leader><leader> :FZF<CR>
" Misc
syntax on

View file

@ -1,19 +0,0 @@
[settings]
api_key = FILL_YOUR_API_KEY_HERE
exclude =
^COMMIT_EDITMSG$
^TAG_EDITMSG$
*.md
*.org
*.txt
*.log
include =
readme.md
README.md
readme.org
README.org
readme.txt
README.txt
readme
README

17
home/.chezmoi.toml.tmpl Normal file
View file

@ -0,0 +1,17 @@
{{/* https://github.com/twpayne/dotfiles/blob/master/home/.chezmoi.toml.tmpl */}}
{{- $headless := false -}}
{{/* darwin hostname hack */}}
{{- $hostname := .chezmoi.hostname -}}
{{- if eq .chezmoi.os "darwin" -}}
{{- $hostname := output "scutil" "--get" "LocalHostName" | trim -}}
{{- end -}}
sourceDir = "~/.dotfiles"
{{ $email := promptStringOnce . "email" "What is your email address" -}}
{{ $username := promptStringOnce . "username" "What is your username" -}}
[data]
email = {{ $email | quote }}
username = {{ $username | quote }}

61
home/.chezmoiignore.tmpl Normal file
View file

@ -0,0 +1,61 @@
scripts
.chezmoiscripts/*
{{ if ne .chezmoi.os "linux" }}
.config/awesome
.config/dunst
.config/fcitx5
.config/hypr
.config/keyd
.config/mako
.config/readline
.config/rofi
.config/swaylock
.config/waybar
.config/wlogout
.config/krunnerrc
.config/systemd
.config/user-dirs.dirs
.config/user-dirs.locale
.local/share/kio/
{{ end }}
{{ if eq .chezmoi.os "linux" }}
{{ if ne .chezmoi.osRelease.id "arch" }}
.config/*-flags.conf
{{ end }}
{{ if eq .chezmoi.osRelease.id "nixos" }}
.config/bash
.config/bat
.config/doom
.config/dunst
.config/fastfetch
.config/fcitx5
.config/fish
.config/zsh
.config/lsd
.config/keyd
.config/readline
.config/krunnerrc
.bashrc
{{ end }}
{{ end }}
{{ if ne .chezmoi.os "darwin" }}
Library
.config/karabiner
.config/sketchybar
.config/skhd
.config/yabai
.config/powershell
{{ end }}
{{ if ne .chezmoi.os "windows" }}
.gitconfig
.glzr
.wslconfig
.wslgconfig
Appdata/
{{ end }}

View file

@ -0,0 +1,4 @@
#!/bin/sh
# shellcheck shell=sh
sudo cp $CHEZMOI_SOURCE_DIR/dot_config/bash/xdg-compat.sh /etc/profile.d/xdg-compat.sh

View file

@ -0,0 +1,11 @@
#!/bin/sh
if command -v bat > /dev/null 2>&1; then
mkdir -p "$(bat --config-dir)/themes"
wget -P "$(bat --config-dir)/themes" https://github.com/catppuccin/bat/raw/main/themes/Catppuccin%20Latte.tmTheme
wget -P "$(bat --config-dir)/themes" https://github.com/catppuccin/bat/raw/main/themes/Catppuccin%20Frappe.tmTheme
wget -P "$(bat --config-dir)/themes" https://github.com/catppuccin/bat/raw/main/themes/Catppuccin%20Macchiato.tmTheme
wget -P "$(bat --config-dir)/themes" https://github.com/catppuccin/bat/raw/main/themes/Catppuccin%20Mocha.tmTheme
fi

View file

@ -0,0 +1,3 @@
#!/usr/bin/env bash
curl https://raw.githubusercontent.com/SpaceAceMonkey/dotenv-for-fish/refs/heads/main/dotenv.fish -o "$CHEZMOI_SOURCE_DIR/dot_config/fish/functions/dotenv.fish"

View file

@ -0,0 +1,12 @@
#!/bin/bash
curl -L https://github.com/lxgw/LxgwWenKai/releases/download/v1.520/lxgw-wenkai-v1.520.zip -o /tmp/lxgw-wenkai.zip
unzip /tmp/lxgw-wenkai.zip -d ~/.local/share/fonts/
curl -L https://github.com/lxgw/LxgwNeoXiHei/releases/download/v1.223/LXGWNeoXiHeiPlus.ttf -o /tmp/lxgw-xihei.zip
unzip /tmp/lxgw-xihei.zip -d ~/.local/share/fonts/
curl -L https://github.com/subframe7536/maple-font/releases/download/v7.7/MapleMono-NF-CN-unhinted.zip -o /tmp/maple-mono.zip
unzip /tmp/maple-mono.zip -d ~/.local/share/fonts/
fc-cache -fv

View file

@ -0,0 +1,6 @@
#!/bin/sh
# shellcheck shell=sh
if command -v nvim > /dev/null 2>&1; then
nvim --headless +checkhealth +"w nvim-healthcheck.txt" +qall
fi

View file

@ -0,0 +1,7 @@
#!/usr/bin/env sh
XDG_DATA_HOME="${XDG_DATA_HOME:-$HOME/.local/share}"
mkdir -p $XDG_DATA_HOME/rtorrent/session
mkdir -p $XDG_DATA_HOME/rtorrent/watch

View file

@ -0,0 +1,9 @@
#!/bin/sh
XDG_STATE_HOME="${XDG_STATE_HOME:-$HOME/.local/state}"
XDG_DATA_HOME="${XDG_DATA_HOME:-$HOME/.local/share}"
mkdir -p $XDG_DATA_HOME/vim/after
mkdir -p $XDG_STATE_HOME/vim/{backup,swap,undo,view}

View file

@ -0,0 +1,9 @@
#!/usr/bin/env bash
if command -v yazi > /dev/null 2>&1; then
ya pkg add llanosrocas/yaziline
ya pkg add yazi-rs/plugins:git
ya pkg add Rolv-Apneseth/starship
fi
exit 0

View file

@ -0,0 +1,10 @@
#!/bin/sh
XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
XDG_STATE_HOME="${XDG_STATE_HOME:-$HOME/.local/state}"
test -d "$XDG_CONFIG_HOME/zsh/plugins/zsh-autosuggestions" || git clone --depth 1 https://github.com/zsh-users/zsh-autosuggestions.git "$XDG_CONFIG_HOME/zsh/plugins/zsh-autosuggestions"
test -d "$XDG_CONFIG_HOME/zsh/plugins/zsh-syntax-highlighting" || git clone --depth 1 https://github.com/zsh-users/zsh-syntax-highlighting.git "$XDG_CONFIG_HOME/zsh/plugins/zsh-syntax-highlighting"
test -d "$XDG_CONFIG_HOME/zsh/plugins/zsh-history-substring-search" || git clone --depth 1 https://github.com/zsh-users/zsh-history-substring-search.git "$XDG_CONFIG_HOME/zsh/plugins/zsh-history-substring-search"
test -d "$XDG_CONFIG_HOME/zsh/plugins/zsh-completions" || git clone --depth 1 https://github.com/zsh-users/zsh-completions.git "$XDG_CONFIG_HOME/zsh/plugins/zsh-completions"

View file

@ -0,0 +1,13 @@
#!/bin/sh
XDG_STATE_HOME="${XDG_STATE_HOME:-$HOME/.local/state}"
if [ -f /etc/zshenv ]; then
sudo cp "$CHEZMOI_SOURCE_DIR/dot_config/zsh/global.zshenv" /etc/zshenv
fi
if [ -f /etc/zsh/zshenv ]; then
sudo cp "$CHEZMOI_SOURCE_DIR/dot_config/zsh/global.zshenv" /etc/zsh/zshenv
fi
mkdir -p $XDG_STATE_HOME/zsh

View file

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0"?>
<configuration> <configuration>
<packageSources> <packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" /> <add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />

View file

@ -0,0 +1 @@
bat.config.dark

View file

@ -0,0 +1,13 @@
;;; -*- lexical-binding: t -*-
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(auth-source-save-behavior nil))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)

View file

@ -3,7 +3,7 @@
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json", "$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
"logo": { "logo": {
// "type": "auto", // "type": "auto",
"source": "arch_small", "source": "fedora_small",
"padding": { "padding": {
"top": 2, "top": 2,
"left": 1, "left": 1,

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,3 @@
# Hidden Notifications
HiddenNotifications=

Some files were not shown because too many files have changed in this diff Show more