mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 08:43:00 +00:00
refractor: on chezmoi
Add multiple variables in chezmoi.toml, apply a more detailed ignore rule Use of chezmoi scripts Use Neogit for default git GUI (TUI) Integrate chezmoi with age
This commit is contained in:
parent
5921775239
commit
2a1127bf10
38 changed files with 988 additions and 129 deletions
|
|
@ -1,3 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
# curl -fsSL https://install.determinate.systems/nix | sh -s -- install
|
||||
15
home/.chezmoiscripts/darwin/run_once_touchid-sudo.sh
Normal file
15
home/.chezmoiscripts/darwin/run_once_touchid-sudo.sh
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
#!/bin/sh
|
||||
|
||||
echo "Use TouchID to authenticate before running sudo commands."
|
||||
echo "WARNING: This operation modifies critical system files."
|
||||
echo "If something goes wrong, you may need to boot into macOS Recovery Mode to restore your system."
|
||||
echo "To continue, type EXACTLY 'yes' and press Enter."
|
||||
read -p "Do you want to continue? (yes/no): " response
|
||||
if [ "$response" != "yes" ]; then
|
||||
echo "Operation cancelled."
|
||||
exit 0 # Exit with success status code
|
||||
fi
|
||||
echo ""
|
||||
|
||||
|
||||
sudo cp ~/.dotfiles/misc/mac/etc/pam.d/sudo /etc/pam.d/sudo
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
#!/bin/sh
|
||||
|
||||
src=~/.dotfiles/misc/firefox/search.json.mozlz4
|
||||
dest=~/.mozilla/firefox/*.default/search.json.mozlz4
|
||||
if ! cmp -s "$src" "$dest" 2>/dev/null; then
|
||||
cp "$src" "$dest"
|
||||
fi
|
||||
|
||||
{{ if .wheel }}
|
||||
|
||||
src=~/.dotfiles/misc/firefox/policies.json
|
||||
dest=/etc/firefox/policies/policies.json
|
||||
if ! cmp -s "$src" "$dest" 2>/dev/null; then
|
||||
sudo cp "$src" "$dest"
|
||||
fi
|
||||
|
||||
{{ end }}
|
||||
3
home/.chezmoiscripts/linux/run_onchange_after_fonts.sh
Normal file
3
home/.chezmoiscripts/linux/run_onchange_after_fonts.sh
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
|
||||
fc-cache -fv
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
#!/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
|
||||
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
#!/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"
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
#!/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
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
#!/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"
|
||||
|
||||
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
XDG_STATE_HOME="${XDG_STATE_HOME:-$HOME/.local/state}"
|
||||
|
||||
{{ if .wheel }}
|
||||
|
||||
if [ -f /etc/zshenv ]; then
|
||||
sudo cp "$CHEZMOI_SOURCE_DIR/dot_config/zsh/global.zshenv" /etc/zshenv
|
||||
fi
|
||||
|
|
@ -10,4 +12,10 @@ if [ -f /etc/zsh/zshenv ]; then
|
|||
sudo cp "$CHEZMOI_SOURCE_DIR/dot_config/zsh/global.zshenv" /etc/zsh/zshenv
|
||||
fi
|
||||
|
||||
{{ else }}
|
||||
|
||||
cp "$CHEZMOI_SOURCE_DIR/dot_config/zsh/global.zshenv" "$HOME/.zshenv"
|
||||
|
||||
{{ end }}
|
||||
|
||||
mkdir -p $XDG_STATE_HOME/zsh
|
||||
Loading…
Add table
Add a link
Reference in a new issue