carbon-config

config submodule of carbon-core-system
git clone https://ccx.te2000.cz/git/carbon-config
Log | Files | Refs

commit 093090c663d664ae6e05bfbb75ee364ed2a5f570
parent eb2c9938ae170430d49e4efb2bfc03f057c0f2da
Author: Jan Pobrislo <ccx@webprojekty.cz>
Date:   Wed, 27 Jul 2022 12:51:40 +0200

Move skel to scripts repo; disable tracing for postinstall fsapply

Diffstat:
Mpostinstall | 11++---------
Dskel/.config/zsh/.zshenv | 25-------------------------
Dskel/.config/zsh/.zshrc | 93-------------------------------------------------------------------------------
3 files changed, 2 insertions(+), 127 deletions(-)

diff --git a/postinstall b/postinstall @@ -86,14 +86,7 @@ setup_static_symlinks() { } setup_skel() { - local f l h=/root - (umask 077 && mkdir -p $h/.{config,cache,local/{share/zsh,state}}) || return $? - for f in conf/skel/**/*(.D); do - l=$h/${f#conf/skel/} - [[ -e $l ]] && continue - mkdir -p $l:h || return $? - s6-ln -s /current/$f $l || return $? - done + ./command/link-skel || return $? } setup_storage() { @@ -140,7 +133,7 @@ setup_fileset() { ) $rsync --delete-excluded --log-file $SETUP_DIR/rsync.log.get / $SETUP_DIR/files.pre/ || return $? cp -a --reflink=auto $SETUP_DIR/files.pre $SETUP_DIR/files.post || return $? - ./command/fsapply -x $SETUP_DIR/files.post $PWD/conf/postinstall.fileset || exit $? + ./command/fsapply $SETUP_DIR/files.post $PWD/conf/postinstall.fileset || exit $? mkdir $SETUP_DIR/files.bak || return $? $rsync --log-file $SETUP_DIR/rsync.log.put $SETUP_DIR/files.post/ / --backup --backup-dir=$SETUP_DIR/files.bak || return $? } diff --git a/skel/.config/zsh/.zshenv b/skel/.config/zsh/.zshenv @@ -1,25 +0,0 @@ -# nice PS4 with elapsed seconds (to two decimal places) and subshell indication -if zmodload zsh/system; then # to get actual pid - setopt PROMPT_SUBST - if [[ $TERM == (xterm|rxvt|screen|linux|console|Eterm|putty)* ]]; then - # first color is for main shell process, second is subshell - PS4_PID_COLORS=(cyan magenta) - PS4='+%B${SECONDS} %F{${PS4_PID_COLORS[1+($$ != ${sysparams[pid]})]}}%N%f:%F{yellow}%i%f>%b ' - else - PS4='+%B${SECONDS} ${sysparams[pid]} %N:%i>%b ' - fi - - # two digits after the decimal point - typeset -g -F 2 SECONDS - # typeset -F 2 SECONDS # do it twice, some bug I don't understand -fi - -if [[ -o login ]]; then - # Set default XDG directories so apps (and /etc/zsh/*) will make use of them - : ${XDG_DATA_HOME:=$HOME/.local/share} - : ${XDG_CONFIG_HOME:=$HOME/.config} - : ${XDG_STATE_HOME:=$HOME/.local/state} - : ${XDG_CACHE_HOME:=$HOME/.cache} - export XDG_DATA_HOME XDG_CONFIG_HOME XDG_STATE_HOME XDG_CACHE_HOME -fi -# vim: ft=zsh noet ts=4 sts=4 sw=4 diff --git a/skel/.config/zsh/.zshrc b/skel/.config/zsh/.zshrc @@ -1,93 +0,0 @@ -setopt extended_history inc_append_history hist_find_no_dups hist_expire_dups_first -HISTFILE=${XDG_DATA_HOME:-$HOME/.local/share}/zsh/history -HISTSIZE=2000 -SAVEHIST=1000 - -alias ll='ls -lh --full-time' -alias ns='netstat -ltup' - -setopt warn_create_global -prompt_hash_color_zshrc() { - local h c - # djbhash, simple string hash function to generate distinct numbers for similar strings - h=5381 - for c in ${(s::)1}; do - h=$(( ( (h << 5) + h + #c ) % 0xffffffff )) - done - - local -a color_list - # List of colors bright enough to be readable against dark background - if (($+FG_COLOR_NUMBERS)); then - color_list=( $=FG_COLOR_NUMBERS ) - elif [[ $terminfo[colors] == 256 ]]; then - color_list=( - 23 24 25 26 27 28 29 - 30 31 32 33 34 35 36 37 38 39 - 40 41 42 43 44 45 46 47 48 49 - 50 51 - 61 62 63 64 65 66 67 68 69 - 70 71 72 73 74 75 76 77 78 79 - 80 81 82 83 84 85 86 87 - 94 95 96 97 98 99 - 100 101 102 103 104 105 106 107 108 109 - 110 111 112 113 114 115 116 117 118 119 - 120 121 122 123 126 127 128 129 - 130 131 132 133 134 135 136 137 138 139 - 140 141 142 143 144 145 146 147 148 149 - 150 151 152 153 154 155 156 157 158 159 - 160 161 162 163 164 165 166 167 168 169 - 170 171 172 173 174 175 176 177 178 179 - 180 181 182 183 184 185 186 187 188 189 - 190 191 192 193 194 195 196 197 198 199 - 200 201 - ) - else - color_list=( 1 2 3 5 6 7 9 10 11 13 14 15 ) - fi - printf '%%F{%d}' $color_list[$h%$#color_list+1] -} - -(){ # prompt - local prompt_char prompt_color_host prompt_color_jobs prompt_color_errno prompt_color_dir prompt_color_user prompt_base - - if [[ ${LC_ALL:-${LC_MESSAGES:-$LANG}} == *.UTF-8 ]]; then - if (($UID)); then - prompt_char='▷' - else - prompt_char='▶' - fi - else - if (($UID)); then - prompt_char='%%' - else - prompt_char='#' - fi - fi - - prompt_color_host="%b%F{green}" - prompt_color_jobs="%b%F{cyan}" - prompt_color_errno="%B%F{yellow}" - prompt_color_dir="%B%F{yellow}" - - if [[ $terminfo[colors] == 256 ]]; then - autoload string_hash_color - prompt_color_host="%b$(prompt_hash_color_zshrc $HOST)" - prompt_color_errno="%b%F{214}" - prompt_color_dir="%b%F{214}" - fi - - prompt_color_user=$prompt_color_host - - if [[ $UID -eq 0 ]]; then - prompt_color_dir="%B%F{red}" - fi - - prompt_base="${prompt_color_user}%n${prompt_color_host}@%m%k ${prompt_color_dir}%1~" - PS1="%(?..${prompt_color_errno}<%?>)%(1j.${prompt_color_jobs}{%j}.)$prompt_base ${prompt_char}%b%f%k " - PS2="$prompt_base %_> %b%f%k" - PS3="$prompt_base ?# %b%f%k" -} -unset -f prompt_hash_color_zshrc - -autoload -Uz compinit -compinit