From 0203957b9e4f4809ea9e75a4ecba59c881eb3d3b Mon Sep 17 00:00:00 2001 From: Buddy Sandidge Date: Thu, 25 May 2023 14:07:26 -0700 Subject: [PATCH] Remove base-linux/base-osx and use chezmoi templates --- base-linux/.config/user-dirs.dirs | 15 ---------- base-linux/.config/user-dirs.locale | 1 - base-linux/.config/zsh/zshrc.d/base-linux.zsh | 1 - base-osx/.config/profile/env.d/base-osx.env | 2 -- base-osx/.config/user-dirs.dirs | 15 ---------- .../bash/env.d/darwin.env.tmpl | 2 ++ dot_config/profile/env.d/darwin.env.tmpl | 4 +++ dot_config/user-dirs.dirs.tmpl | 29 +++++++++++++++++++ dot_config/user-dirs.locale.tmpl | 3 ++ dot_config/zsh/zshrc.d/base-linux.zsh.tmpl | 3 ++ 10 files changed, 41 insertions(+), 34 deletions(-) delete mode 100644 base-linux/.config/user-dirs.dirs delete mode 100644 base-linux/.config/user-dirs.locale delete mode 100644 base-linux/.config/zsh/zshrc.d/base-linux.zsh delete mode 100644 base-osx/.config/profile/env.d/base-osx.env delete mode 100644 base-osx/.config/user-dirs.dirs rename base-osx/.config/bash/env.d/base-osx.env => dot_config/bash/env.d/darwin.env.tmpl (57%) create mode 100644 dot_config/profile/env.d/darwin.env.tmpl create mode 100644 dot_config/user-dirs.dirs.tmpl create mode 100644 dot_config/user-dirs.locale.tmpl create mode 100644 dot_config/zsh/zshrc.d/base-linux.zsh.tmpl diff --git a/base-linux/.config/user-dirs.dirs b/base-linux/.config/user-dirs.dirs deleted file mode 100644 index be1b4f5..0000000 --- a/base-linux/.config/user-dirs.dirs +++ /dev/null @@ -1,15 +0,0 @@ -# If you want to change or add directories, just edit the line you're -# interested in. All local changes will be retained on the next run. -# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped -# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an -# absolute path. No other format is supported. - -XDG_DESKTOP_DIR="$HOME/desktop" -XDG_DOCUMENTS_DIR="$HOME/documents" -XDG_DOWNLOAD_DIR="$HOME/downloads" -XDG_MUSIC_DIR="$HOME/music" -XDG_PICTURES_DIR="$HOME/pictures" -XDG_PODCAST_DIR="$HOME/podcasts" -XDG_PUBLICSHARE_DIR="$HOME/public" -XDG_TEMPLATES_DIR="$HOME/templates" -XDG_VIDEOS_DIR="$HOME/videos" diff --git a/base-linux/.config/user-dirs.locale b/base-linux/.config/user-dirs.locale deleted file mode 100644 index 3e0b419..0000000 --- a/base-linux/.config/user-dirs.locale +++ /dev/null @@ -1 +0,0 @@ -en_US \ No newline at end of file diff --git a/base-linux/.config/zsh/zshrc.d/base-linux.zsh b/base-linux/.config/zsh/zshrc.d/base-linux.zsh deleted file mode 100644 index 68f1247..0000000 --- a/base-linux/.config/zsh/zshrc.d/base-linux.zsh +++ /dev/null @@ -1 +0,0 @@ -eval "$(dircolors -b)" diff --git a/base-osx/.config/profile/env.d/base-osx.env b/base-osx/.config/profile/env.d/base-osx.env deleted file mode 100644 index 19a711f..0000000 --- a/base-osx/.config/profile/env.d/base-osx.env +++ /dev/null @@ -1,2 +0,0 @@ -#shellcheck disable=SC2034 -CLICOLOR=1 diff --git a/base-osx/.config/user-dirs.dirs b/base-osx/.config/user-dirs.dirs deleted file mode 100644 index 18d8436..0000000 --- a/base-osx/.config/user-dirs.dirs +++ /dev/null @@ -1,15 +0,0 @@ -# If you want to change or add directories, just edit the line you're -# interested in. All local changes will be retained on the next run. -# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped -# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an -# absolute path. No other format is supported. - -XDG_DESKTOP_DIR="$HOME/Desktop" -XDG_DOCUMENTS_DIR="$HOME/Documents" -XDG_DOWNLOAD_DIR="$HOME/Downloads" -XDG_MUSIC_DIR="$HOME/Music" -XDG_PICTURES_DIR="$HOME/Pictures" -XDG_PODCAST_DIR="$HOME/Podcasts" -XDG_PUBLICSHARE_DIR="$HOME/Public" -XDG_TEMPLATES_DIR="$HOME/Templates" -XDG_VIDEOS_DIR="$HOME/Movies" diff --git a/base-osx/.config/bash/env.d/base-osx.env b/dot_config/bash/env.d/darwin.env.tmpl similarity index 57% rename from base-osx/.config/bash/env.d/base-osx.env rename to dot_config/bash/env.d/darwin.env.tmpl index 0e6ad46..2e0279d 100644 --- a/base-osx/.config/bash/env.d/base-osx.env +++ b/dot_config/bash/env.d/darwin.env.tmpl @@ -1,2 +1,4 @@ +{{ if eq .chezmoi.os "darwin" -}} #shellcheck disable=SC2034 BASH_SILENCE_DEPRECATION_WARNING=1 +{{- end }} diff --git a/dot_config/profile/env.d/darwin.env.tmpl b/dot_config/profile/env.d/darwin.env.tmpl new file mode 100644 index 0000000..2699c42 --- /dev/null +++ b/dot_config/profile/env.d/darwin.env.tmpl @@ -0,0 +1,4 @@ +{{ if eq .chezmoi.os "darwin" -}} +#shellcheck disable=SC2034 +CLICOLOR=1 +{{- end }} diff --git a/dot_config/user-dirs.dirs.tmpl b/dot_config/user-dirs.dirs.tmpl new file mode 100644 index 0000000..79d2ebd --- /dev/null +++ b/dot_config/user-dirs.dirs.tmpl @@ -0,0 +1,29 @@ +{{- if or (eq .chezmoi.os "linux") (eq .chezmoi.os "darwin") -}} +# If you want to change or add directories, just edit the line you're +# interested in. All local changes will be retained on the next run. +# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped +# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an +# absolute path. No other format is supported. + +{{ if eq .chezmoi.os "linux" -}} +XDG_DESKTOP_DIR=$HOME/desktop +XDG_DOCUMENTS_DIR=$HOME/documents +XDG_DOWNLOAD_DIR=$HOME/downloads +XDG_MUSIC_DIR=$HOME/music +XDG_PICTURES_DIR=$HOME/pictures +XDG_PODCAST_DIR=$HOME/podcasts +XDG_PUBLICSHARE_DIR=$HOME/public +XDG_TEMPLATES_DIR=$HOME/templates +XDG_VIDEOS_DIR=$HOME/videos +{{- else if eq .chezmoi.os "darwin" -}} +XDG_DESKTOP_DIR=$HOME/Desktop +XDG_DOCUMENTS_DIR=$HOME/Documents +XDG_DOWNLOAD_DIR=$HOME/Downloads +XDG_MUSIC_DIR=$HOME/Music +XDG_PICTURES_DIR=$HOME/Pictures +XDG_PODCAST_DIR=$HOME/Podcasts +XDG_PUBLICSHARE_DIR=$HOME/Public +XDG_TEMPLATES_DIR=$HOME/Templates +XDG_VIDEOS_DIR=$HOME/Movies +{{- end -}} +{{- end }} diff --git a/dot_config/user-dirs.locale.tmpl b/dot_config/user-dirs.locale.tmpl new file mode 100644 index 0000000..3868b44 --- /dev/null +++ b/dot_config/user-dirs.locale.tmpl @@ -0,0 +1,3 @@ +{{ if eq .chezmoi.os "linux" -}} +en_US +{{- end }} diff --git a/dot_config/zsh/zshrc.d/base-linux.zsh.tmpl b/dot_config/zsh/zshrc.d/base-linux.zsh.tmpl new file mode 100644 index 0000000..3457670 --- /dev/null +++ b/dot_config/zsh/zshrc.d/base-linux.zsh.tmpl @@ -0,0 +1,3 @@ +{{ if lookPath "dircolors" -}} +eval "$(dircolors -b)" +{{- end }}