Browse Source

chezmoi: ignore (root), convert some paths

Aliases for chezmoi.
red-hat-laptop
Kevin Mok 6 years ago
parent
commit
59c6e400c5
Signed by: Kevin-Mok GPG Key ID: AEA75288DC135CF5
  1. 17
      .chezmoiignore
  2. 12
      dot_config/private_fish/config.fish
  3. 10
      key_aliases
  4. 9
      key_dirs
  5. 10
      key_files
  6. 36
      scripts/executable_sync-aliases
  7. 6
      scripts/executable_sync-shortcuts
  8. 7
      txt/ideas.md

17
.chezmoiignore

@ -0,0 +1,17 @@
README.md
{{ if eq .chezmoi.username "root" }}
.config/i3/
.config/i3blocks/
.config/mpv/
.config/neofetch/
.config/zathura/
scripts/
txt/
.bashrc
.gitconfig
.imwheelrc
.xinitrc
.Xresources
.zshrc
{{ end }}

12
dot_config/private_fish/config.fish

@ -20,9 +20,11 @@ builtin cd $last_dir
bind \ce edit_command_buffer bind \ce edit_command_buffer
bind \cr forward-word bind \cr forward-word
/home/kevin/linux-config/scripts/sync-shortcuts
chezmoi apply
/home/kevin/scripts/sync-shortcuts
source /home/kevin/.config/fish/key_abbr.fish source /home/kevin/.config/fish/key_abbr.fish
set -U fish_fxn_dir "/home/kevin/linux-config/fish/.config/fish/functions"
# set -U fish_fxn_dir "/home/kevin/linux-config/fish/.config/fish/functions"
set -U fish_fxn_dir "/home/kevin/.config/fish/functions"
abbr ff "cd $fish_fxn_dir" abbr ff "cd $fish_fxn_dir"
for fxn in (find $fish_fxn_dir -name '*.fish') for fxn in (find $fish_fxn_dir -name '*.fish')
source $fxn source $fxn
@ -42,11 +44,7 @@ abbr mt "math"
set -U spv_dir "/home/kevin/coding/spotify-lib-vis" set -U spv_dir "/home/kevin/coding/spotify-lib-vis"
set -U mfs_dir "/home/kevin/coding/mf-site" set -U mfs_dir "/home/kevin/coding/mf-site"
# set -U PATH /usr/local/sbin /usr/local/bin /usr/bin /usr/bin/site_perl
# /usr/bin/vendor_perl /usr/bin/core_perl /home/kevin/linux-config/scripts
# /home/kevin/linux-config/scripts/colors
# (ruby -e 'print Gem.user_dir')/bin
set -x PATH $PATH /home/kevin/linux-config/scripts /home/kevin/linux-config/scripts/colors /home/kevin/go/bin
set -x PATH $PATH /home/kevin/scripts /home/kevin/scripts/colors /home/kevin/go/bin
set -x PASSWORD_STORE_CLIP_TIME 120 set -x PASSWORD_STORE_CLIP_TIME 120
set -xU XSET_RATE 90 set -xU XSET_RATE 90
set -xU XSET_DELAY 200 set -xU XSET_DELAY 200

10
key_aliases

@ -174,7 +174,7 @@ sxt "sxiv -t *"
vmd "vimdiff" vmd "vimdiff"
wg "wego" wg "wego"
wp "grep wallpaper ~/.cache/wal/colors.sh" wp "grep wallpaper ~/.cache/wal/colors.sh"
z "zathura --fork"
zt "zathura --fork"
lz "unzip -l" lz "unzip -l"
@ -325,9 +325,11 @@ gunc "git update-index --assume-unchanged"
# coding projs {{{ # # coding projs {{{ #
# coding_dir="~/coding" # coding_dir="~/coding"
cz "chezmoi"
cza "chezmoi add"
cze "chezmoi edit"
zm "chezmoi"
za "chezmoi add"
zar "chezmoi add -r"
ze "chezmoi edit"
zp "chezmoi -v apply"
rgt "rg TODO" rgt "rg TODO"

9
txt/key_dirs.txt → key_dirs

@ -3,21 +3,19 @@
bg /home/kevin/Pictures/Backgrounds bg /home/kevin/Pictures/Backgrounds
cf /home/kevin/.config cf /home/kevin/.config
lc /home/kevin/linux-config/
lf /mnt/linux-files
d /home/kevin/Downloads d /home/kevin/Downloads
D /home/kevin/Documents D /home/kevin/Documents
fo /home/kevin/.config/fish fo /home/kevin/.config/fish
fs /home/kevin/linux-config/fish/.config/fish
k /home/kevin/ k /home/kevin/
lc /home/kevin/linux-config/
lf /mnt/linux-files
lfv /mnt/linux-files/Videos
me /run/media/kevin me /run/media/kevin
o / o /
p /home/kevin/.password-store p /home/kevin/.password-store
P /home/kevin/Pictures P /home/kevin/Pictures
sw ~/.local/share/nvim/swap/ sw ~/.local/share/nvim/swap/
tm /tmp tm /tmp
lfv /mnt/linux-files/Videos
z /home/kevin/linux-config
# }}} sys * # }}} sys *
@ -39,7 +37,6 @@ swa /home/kevin/.local/share/nvim/swap
tx /home/kevin/linux-config/txt tx /home/kevin/linux-config/txt
wd /home/kevin/.config/watson wd /home/kevin/.config/watson
wo /home/kevin/Documents/workout-logs/11 wo /home/kevin/Documents/workout-logs/11
zd /home/kevin/chezmoi
# }}} cdn * # }}} cdn *

10
txt/key_files.txt → key_files

@ -1,9 +1,9 @@
# sys {{{ * # sys {{{ *
3 /home/kevin/.config/i3/config
a /home/kevin/linux-config/aliases/key_aliases
d /home/kevin/linux-config/txt/key_dirs.txt
f /home/kevin/linux-config/txt/key_files.txt
3 ~/linux-config/dot_config/i3/config
a ~/linux-config/key_aliases
d ~/linux-config/key_dirs
f ~/linux-config/key_files
i /home/kevin/.config/i3blocks/i3blocks.conf i /home/kevin/.config/i3blocks/i3blocks.conf
p /home/kevin/linux-config/txt/pacman-pkgs/pacman-pkgs.txt p /home/kevin/linux-config/txt/pacman-pkgs/pacman-pkgs.txt
r /home/kevin/.config/ranger/rc.conf r /home/kevin/.config/ranger/rc.conf
@ -11,7 +11,7 @@ sr /home/kevin/linux-config/configs/ranger/shortcuts.conf
ss /home/kevin/.shortcuts ss /home/kevin/.shortcuts
u /home/kevin/.Xresources u /home/kevin/.Xresources
v /home/kevin/.vimrc v /home/kevin/.vimrc
x /home/kevin/.config/fish/config.fish
x ~/linux-config/dot_config/private_fish/config.fish
y /home/kevin/.zshrc y /home/kevin/.zshrc
z /home/kevin/linux-config/aliases/zsh_aliases z /home/kevin/linux-config/aliases/zsh_aliases

36
scripts/executable_sync-aliases

@ -1,36 +0,0 @@
#!/bin/bash
key_aliases="$HOME/linux-config/aliases/key_aliases"
# Ensure text of argument 1 exists in the file argument 2
ensure() {{{
if [[ ! -e "$2" ]]; then
touch "$2"
fi
(grep "$1" "$2")>/dev/null 2>&1 || echo "$1" >> "$2"
}}}
# fish
fish_config="$HOME/.config/fish/config.fish"
fish_abbr="$HOME/.config/fish/key_aliases.fish"
ensure "source $fish_abbr" "$fish_config"
# bash/zsh
bashrc="$HOME/.bashrc"
zshrc="$HOME/.zshrc"
aliases="$HOME/.aliases"
ensure "source $aliases" "$bashrc"
ensure "source $aliases" "$zshrc"
# Remove, prepare files
printf "# vim: filetype=sh\\n" > "$fish_abbr"
printf "# vim: filetype=sh\\n" > "$aliases"
sed -e '/^$/d' -e '/^[ \t#].*/d' "$key_aliases" | sort | tee \
>(awk '{printf "abbr " $1; $1 = ""; print $0; }' >> "$fish_abbr") \
| awk '{
printf "alias " $1;
$1 = "";
printf "=";
print gensub(" ", "", 1, $0);
}' >> "$aliases"

6
scripts/executable_sync-shortcuts

@ -30,9 +30,9 @@ ensure "source $fish_abbr" "$fish_config"
ensure "source $ranger_mappings" "$ranger_config" ensure "source $ranger_mappings" "$ranger_config"
# key files # key files
key_dirs="$HOME/linux-config/txt/key_dirs.txt"
key_files="$HOME/linux-config/txt/key_files.txt"
key_aliases="$HOME/linux-config/aliases/key_aliases"
key_dirs="$HOME/key_dirs"
key_files="$HOME/key_files"
key_aliases="$HOME/key_aliases"
# Remove, prepare files # Remove, prepare files
rm -f "$ranger_mappings" 2>/dev/null rm -f "$ranger_mappings" 2>/dev/null

7
txt/ideas.md

@ -1,2 +1,9 @@
# chezmoi
- edit chez dir files?
- nvim setup
- fish config
- home dir var
- merge laptop
- nnn - nnn
- spotify blocklet - escape chars. - spotify blocklet - escape chars.
Loading…
Cancel
Save