Skip to content

Commit f3072a4

Browse files
add zsh + oh my zsh shell installation and configuration
1 parent e63978f commit f3072a4

File tree

6 files changed

+1748
-1
lines changed

6 files changed

+1748
-1
lines changed

local/bin/shell_zsh_web.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/usr/bin/env bash
2+
3+
docker-compose exec -u $UID web zsh

local/config/zsh/.p10k.zsh

Lines changed: 1621 additions & 0 deletions
Large diffs are not rendered by default.

local/config/zsh/.zshrc

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
2+
# Initialization code that may require console input (password prompts, [y/n]
3+
# confirmations, etc.) must go above this block; everything else may go below.
4+
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
5+
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
6+
fi
7+
8+
# If you come from bash you might have to change your $PATH.
9+
# export PATH=$HOME/bin:/usr/local/bin:$PATH
10+
11+
# Path to your oh-my-zsh installation.
12+
ZSH=$HOME/.oh-my-zsh
13+
14+
# Set name of the theme to load --- if set to "random", it will
15+
# load a random theme each time oh-my-zsh is loaded, in which case,
16+
# to know which specific one was loaded, run: echo $RANDOM_THEME
17+
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
18+
ZSH_THEME="powerlevel10k/powerlevel10k"
19+
20+
# Set list of themes to pick from when loading at random
21+
# Setting this variable when ZSH_THEME=random will cause zsh to load
22+
# a theme from this variable instead of looking in $ZSH/themes/
23+
# If set to an empty array, this variable will have no effect.
24+
# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" )
25+
26+
# Uncomment the following line to use case-sensitive completion.
27+
# CASE_SENSITIVE="true"
28+
29+
# Uncomment the following line to use hyphen-insensitive completion.
30+
# Case-sensitive completion must be off. _ and - will be interchangeable.
31+
# HYPHEN_INSENSITIVE="true"
32+
33+
# Uncomment the following line to disable bi-weekly auto-update checks.
34+
# DISABLE_AUTO_UPDATE="true"
35+
36+
# Uncomment the following line to automatically update without prompting.
37+
# DISABLE_UPDATE_PROMPT="true"
38+
39+
# Uncomment the following line to change how often to auto-update (in days).
40+
# export UPDATE_ZSH_DAYS=13
41+
42+
# Uncomment the following line if pasting URLs and other text is messed up.
43+
# DISABLE_MAGIC_FUNCTIONS="true"
44+
45+
# Uncomment the following line to disable colors in ls.
46+
# DISABLE_LS_COLORS="true"
47+
48+
# Uncomment the following line to disable auto-setting terminal title.
49+
# DISABLE_AUTO_TITLE="true"
50+
51+
# Uncomment the following line to enable command auto-correction.
52+
# ENABLE_CORRECTION="true"
53+
54+
# Uncomment the following line to display red dots whilst waiting for completion.
55+
# Caution: this setting can cause issues with multiline prompts (zsh 5.7.1 and newer seem to work)
56+
# See https://github.com/ohmyzsh/ohmyzsh/issues/5765
57+
# COMPLETION_WAITING_DOTS="true"
58+
59+
# Uncomment the following line if you want to disable marking untracked files
60+
# under VCS as dirty. This makes repository status check for large repositories
61+
# much, much faster.
62+
# DISABLE_UNTRACKED_FILES_DIRTY="true"
63+
64+
# Uncomment the following line if you want to change the command execution time
65+
# stamp shown in the history command output.
66+
# You can set one of the optional three formats:
67+
# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
68+
# or set a custom format using the strftime function format specifications,
69+
# see 'man strftime' for details.
70+
# HIST_STAMPS="mm/dd/yyyy"
71+
72+
# Would you like to use another custom folder than $ZSH/custom?
73+
# ZSH_CUSTOM=/path/to/new-custom-folder
74+
75+
# Which plugins would you like to load?
76+
# Standard plugins can be found in $ZSH/plugins/
77+
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
78+
# Example format: plugins=(rails git textmate ruby lighthouse)
79+
# Add wisely, as too many plugins slow down shell startup.
80+
plugins=(git docker docker-compose)
81+
82+
source $ZSH/oh-my-zsh.sh
83+
84+
# User configuration
85+
86+
# export MANPATH="/usr/local/man:$MANPATH"
87+
88+
# You may need to manually set your language environment
89+
# export LANG=en_US.UTF-8
90+
91+
# Preferred editor for local and remote sessions
92+
# if [[ -n $SSH_CONNECTION ]]; then
93+
# export EDITOR='vim'
94+
# else
95+
# export EDITOR='mvim'
96+
# fi
97+
98+
# Compilation flags
99+
# export ARCHFLAGS="-arch x86_64"
100+
101+
# Set personal aliases, overriding those provided by oh-my-zsh libs,
102+
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
103+
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
104+
# For a full list of active aliases, run `alias`.
105+
#
106+
# Example aliases
107+
# alias zshconfig="mate ~/.zshrc"
108+
# alias ohmyzsh="mate ~/.oh-my-zsh"
109+
110+
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
111+
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
5+
cd ~
6+
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
7+
8+
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
9+
10+
cp /var/www/html/docker/local/config/zsh/.zshrc ~/.zshrc
11+
cp /var/www/html/docker/local/config/zsh/.p10k.zsh ~/.p10k.zsh

local/provision/bin/sudo_web_tasks.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
set -e
44

5-
# apt-get update && apt-get install -y nano
5+
apt-get update && apt-get install -y zsh nano
66

77
cp /var/www/html/docker/local/config/php/"$PHP_VERSION"/mods-available/devbox.ini /etc/php/"$PHP_VERSION"/apache2/conf.d/devbox.ini
88
cp /var/www/html/docker/local/config/php/"$PHP_VERSION"/mods-available/devbox.ini /etc/php/"$PHP_VERSION"/cli/conf.d/devbox.ini

local/provision/docker_provision.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ set -e
77
#docker-compose exec web bash /var/www/html/docker/local/provision/bin/disable_xdebug.sh
88
#docker-compose exec mysql bash /devbox/provision/bin/db_tasks.sh
99
#docker-compose exec -u $UID web bash /var/www/html/docker/local/provision/bin/web_tasks.sh
10+
# docker-compose exec -u $UID web bash /var/www/html/docker/local/provision/bin/install_ohmyzsh_shell.sh
1011

1112
## FOR NODE.JS STACK
1213
# docker-compose run nodejs bash /home/node/docker/local/provision/bin/nodejs_tasks.sh

0 commit comments

Comments
 (0)