Skip to content

Commit

Permalink
workspace(update)
Browse files Browse the repository at this point in the history
  • Loading branch information
ss-o committed Jun 5, 2022
1 parent 0eb141f commit c07f3e1
Show file tree
Hide file tree
Showing 116 changed files with 141 additions and 44 deletions.
62 changes: 62 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Space or Tabs?
# https://stackoverflow.com/questions/35649847/objective-reasons-for-using-spaces-instead-of-tabs-for-indentation
# https://stackoverflow.com/questions/12093748/how-to-use-tabs-instead-of-spaces-in-a-shell-script
#
# 1. What happens when I press the Tab key in my text editor?
# 2. What happens when I request my editor to indent one or more lines?
# 3. What happens when I view a file containing U+0009 HORIZONTAL TAB characters?
#
# Answers:
#
# 1. Pressing the Tab key should indent the current line (or selected lines) one additional level.
# 2. As a secondary alternative, I can also tolerate an editor that,
# like Emacs, uses this key for a context-sensitive fix-my-indentation command.
# 3. Indenting one or more lines should follow the reigning convention, if consensus is sufficiently strong; otherwise,
# I greatly prefer 2-space indentation at each level. U+0009 characters should shift subsequent characters to the next tab stop.
#
# Note: VIM users should use alternate marks [[[ and ]]] as the original ones can confuse nested substitutions, e.g.: ${${${VAR}}}
#
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
# vim: ft=zsh sw=2 ts=2 et

root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.{md,rst}]
insert_final_newline = false
trim_trailing_whitespace = false

[*.{sh,bash,zsh,fish}]
indent_style = space
indent_size = 2
tab_width = 2

[Makefile]
indent_style = tab
indent_size = 4

[*.{css,less}]
indent_style = space
indent_size = 2

[*.{py,rb}]
indent_style = space
indent_size = 4

[*.{go,java,scala,groovy,kotlin}]
indent_style = tab
indent_size = 4

[*.{js,jsx,html,xml,sass,json,yml,yaml,toml}]
charset = utf-8
indent_style = space
indent_size = 2

[CHANGELOG.md]
indent_style = tab
indent_size = 4
File renamed without changes.
14 changes: 14 additions & 0 deletions .github/workflows/trunk_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: "⭕ Trunk"
on:
push:
branches: ["main"]
tags: ["v*.*.*"]
pull_request:
types: [opened, synchronize]
workflow_dispatch: {}

jobs:
check-call:
name: ""
uses: z-shell/.github/.github/workflows/trunk-call.yml@main
20 changes: 15 additions & 5 deletions .trunk/trunk.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
version: 0.1
cli:
version: 0.9.3-beta
version: 0.12.1-beta
repo:
repo:
host: github.com
owner: z-shell
name: playground
lint:
linters:
- name: markdownlint
command:
[markdownlint, -q, --config, .github/.markdownlint.yaml, "${target}"]
direct_configs: [.github/.markdownlint.yaml]
enabled:
- [email protected].9
- gitleaks@8.3.0
- hadolint@2.8.0
- [email protected].13
- gitleaks@8.8.7
- hadolint@2.10.0
- [email protected]
- prettier@2.5.1
- prettier@2.6.2
- [email protected]
- [email protected]
15 changes: 15 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"conventionalCommits.scopes": [
"maintenance",
"workspace",
"community",
"general",
"theme"
],
"markdownlint.config": {
"extends": ".github/.markdownlint.yaml"
},
"files.associations": {
"*.md": "mdx"
}
}
12 changes: 5 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,10 @@ ARG FOLDER
ARG USERNAME=z-shell
ARG DEBIAN_FRONTEND=noninteractive

RUN apt-get update && \
apt-get install --no-install-recommends -yq file dirmngr iproute2 procps sudo lsb-release zlib1g tree vim nano \
ncurses-dev man telnet unzip zsh apt-transport-https jq gnupg2 git subversion curl make sudo locales \
autoconf automake python3-minimal python3-pip libffi-dev python3-venv golang-go rsync socat build-essential \
less vim htop
RUN apt-get clean -y && rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get install --no-install-recommends -yq file dirmngr iproute2 procps sudo lsb-release \
zlib1g tree vim nano ncurses-dev man telnet unzip zsh apt-transport-https jq gnupg2 git subversion curl make sudo \
locales autoconf automake python3-minimal python3-pip libffi-dev python3-venv golang-go rsync socat build-essential \
less vim htop && apt-get clean -y && rm -rf /var/lib/apt/lists/*

RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && locale-gen
ENV LANG en_US.UTF-8
Expand Down Expand Up @@ -40,5 +38,5 @@ RUN if [ -f /home/${USERNAME}/bootstrap.sh ]; then \
fi

WORKDIR /home/${USERNAME}
RUN SHELL=/bin/zsh zsh -i -ls -c -- 'zi module build; @zi-scheduler burst || true '
RUN SHELL=/bin/zsh zsh -i -lc -- 'zi module build; @zi-scheduler burst || true '
CMD ["zsh", "-i", "-l"]
15 changes: 0 additions & 15 deletions jubi/bootstrap.sh

This file was deleted.

2 changes: 1 addition & 1 deletion playground.plugin.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
CURRENT_DIR=${0:a:h}

playground() {
"${CURRENT_DIR}"/run.sh
"${CURRENT_DIR}"/run.sh
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
15 changes: 15 additions & 0 deletions profiles/jubi/bootstrap.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env zsh

case $(uname) in
Darwin)
brew install fzf
;;
Linux)
# No such package
# sudo apt install fzf
:
;;
*)
:
;;
esac
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion psprint/bootstrap.sh → profiles/psprint/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

sudo apt update
sudo DEBIAN_FRONTEND=noninteractive apt install --yes cmake redis-server libhiredis-dev \
tree gem libfreetype6-dev libfontconfig-dev autoconf automake nodejs npm
tree gem libfreetype6-dev libfontconfig-dev autoconf automake nodejs npm

# For zdharma/zredis
sudo mkdir -p usr/local/var/db/redis
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
22 changes: 9 additions & 13 deletions z-shell/kickstart/.zshrc → profiles/z-shell/kickstart/.zshrc
Original file line number Diff line number Diff line change
@@ -1,24 +1,20 @@
# ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ ❮ Z-SHELL ❯ ❮ ZI ❯
# ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ ❮ Z-SHELL ❯ ❮ ZI ❯
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
source <(curl -sL https://init.zshell.dev); zzinit
zi for z-shell/z-a-meta-plugins @annexes \
skip'hexyl hyperfine vivid tig' @console-tools \
skip'git-extras' @ext-git \
skip'peko skim fzy' @fuzzy \
skip'git-extras' @ext-git @romkatv \
skip'F-Sy-H' @z-shell @zsh-users+fast
skip'hexyl hyperfine vivid tig' @console-tools \
skip'F-Sy-H' @z-shell @zsh-users+fast @romkatv \
array=({git,functions,history,completion,prompt_info_functions,grep,completion,vcs_info}.zsh)
zi-turbo '0a' lucid is-snippet for has'svn' svn multisrc'$array' pick'/dev/null' \
atinit'HISTFILE=${HOME}/.cache/zi/zsh-history; COMPLETION_WAITING_DOTS=true' \
OMZ::lib
atinit'HISTFILE=${HOME}/.cache/zi/zsh-history; COMPLETION_WAITING_DOTS=true' OMZ::lib
zi-turbo '0b' lucid is-snippet for \
atload"unalias grv g" \
OMZP::git
zi-turbo '0c' lucid light-mode for MichaelAquilina/zsh-you-should-use \
atinit'ZSH_SYSTEM_CLIPBOARD_TMUX_SUPPORT=true' \
kutsan/zsh-system-clipboard \
atinit'AUTOCD=1' \
zplugin/zsh-exa
atload"unalias grv g" OMZP::git
zi-turbo '0c' lucid light-mode for \
atinit'AUTOCD=1' zplugin/zsh-exa \
MichaelAquilina/zsh-you-should-use \

[[ ! -f "${HOME}/.p10k.zsh" ]] && p10k configure
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 4 additions & 2 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ set -o nounset # exit on undeclared variable
# Folders containing `.zshrc`
FOLDERS_WITH_ZSHRC=$(
cd "${0:a:h}"
find * \( -name .zshrc -o -name zshrc.zsh \) -type f -exec dirname {} \;
find profiles/* \( -name .zshrc -o -name zshrc.zsh \) -type f -exec dirname {} \;
)

# A fuzzy finder available
Expand All @@ -22,9 +22,11 @@ else
fi

# Folder to load, chosen by user
FOLDER=$(${FUZZY_FINDER} <<< ${FOLDERS_WITH_ZSHRC})
FOLDER=$(${FUZZY_FINDER} <<< "${FOLDERS_WITH_ZSHRC}")

# Build an image
# trunk-ignore(shellcheck/SC2296)
# trunk-ignore(shfmt/parse)
FOLDER_LOWERCASE="${(L)FOLDER}"
docker build --build-arg FOLDER="${FOLDER}" --build-arg TERM="${TERM}" -t "zi/${FOLDER_LOWERCASE}" "${0:a:h}"

Expand Down

0 comments on commit c07f3e1

Please sign in to comment.