Add zsh
This commit is contained in:
24
config.yaml
24
config.yaml
@@ -40,34 +40,54 @@ dotfiles:
|
|||||||
f_xinitrc:
|
f_xinitrc:
|
||||||
src: xinitrc
|
src: xinitrc
|
||||||
dst: ~/.xinitrc
|
dst: ~/.xinitrc
|
||||||
|
f_zshrc:
|
||||||
|
src: zshrc
|
||||||
|
dst: ~/.zshrc
|
||||||
|
d_oh-my-zsh:
|
||||||
|
src: oh-my-zsh
|
||||||
|
dst: ~/.oh-my-zsh
|
||||||
|
f_zsh_theme:
|
||||||
|
src: zsh/marc-pygmalion.zsh-theme
|
||||||
|
dst: ~/.oh-my-zsh/themes/marc-pygmalion.zsh-theme
|
||||||
profiles:
|
profiles:
|
||||||
laptop:
|
laptop:
|
||||||
include:
|
include:
|
||||||
- bash
|
- bash
|
||||||
|
- zsh
|
||||||
- vim
|
- vim
|
||||||
- x11
|
- x11
|
||||||
- i3
|
- i3
|
||||||
- font
|
- font
|
||||||
- git
|
- git
|
||||||
- gdb
|
- gdb
|
||||||
workstation:
|
work:
|
||||||
include:
|
include:
|
||||||
- bash
|
- bash
|
||||||
|
- zsh
|
||||||
- vim
|
- vim
|
||||||
- x11
|
- x11
|
||||||
- i3
|
- i3
|
||||||
- font
|
- font
|
||||||
- git
|
- git
|
||||||
- gdb
|
- gdb
|
||||||
minimal:
|
dev-bash:
|
||||||
include:
|
include:
|
||||||
- bash
|
- bash
|
||||||
- vim
|
- vim
|
||||||
|
dev-zsh:
|
||||||
|
include:
|
||||||
|
- zsh
|
||||||
|
- vim
|
||||||
|
|
||||||
# Packages to be used above
|
# Packages to be used above
|
||||||
bash:
|
bash:
|
||||||
dotfiles:
|
dotfiles:
|
||||||
- f_bashrc
|
- f_bashrc
|
||||||
|
zsh:
|
||||||
|
dotfiles:
|
||||||
|
- f_zshrc
|
||||||
|
- d_oh-my-zsh
|
||||||
|
- f_zsh_theme
|
||||||
vim:
|
vim:
|
||||||
dotfiles:
|
dotfiles:
|
||||||
- f_vimrc
|
- f_vimrc
|
||||||
|
|||||||
2
dotdrop
2
dotdrop
Submodule dotdrop updated: adc4581533...d860c07f64
3
dotfiles/.gitmodules
vendored
Normal file
3
dotfiles/.gitmodules
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
[submodule "oh-my-zsh"]
|
||||||
|
path = oh-my-zsh
|
||||||
|
url = https://github.com/ohmyzsh/ohmyzsh/tree/64a7f6b38833d007394b9b4bf5d17e48db77c0d7
|
||||||
@@ -47,8 +47,8 @@
|
|||||||
*.color15: nord6
|
*.color15: nord6
|
||||||
|
|
||||||
XTerm.vt100.faceName: xft:Inconsolata:antialias=true
|
XTerm.vt100.faceName: xft:Inconsolata:antialias=true
|
||||||
{%@@ if profile == "workstation" @@%}
|
{%@@ if profile == "work" @@%}
|
||||||
XTerm.vt100.faceSize: 12
|
XTerm.vt100.faceSize: 13
|
||||||
{%@@ endif @@%}
|
{%@@ endif @@%}
|
||||||
{%@@ if profile == "laptop" @@%}
|
{%@@ if profile == "laptop" @@%}
|
||||||
XTerm.vt100.faceSize: 15
|
XTerm.vt100.faceSize: 15
|
||||||
|
|||||||
@@ -9,6 +9,10 @@ GIT="\[\033[1;91m\](\$(git_branch))\[\033[m\]"
|
|||||||
DIR="\[\033[1;94m\]\w\[\033[m\]"
|
DIR="\[\033[1;94m\]\w\[\033[m\]"
|
||||||
export PS1="${NAME}@${HOST}:${DIR} ${GIT} ${CHAR} "
|
export PS1="${NAME}@${HOST}:${DIR} ${GIT} ${CHAR} "
|
||||||
|
|
||||||
|
# Set vim as default
|
||||||
|
export VISUAL=vim
|
||||||
|
export EDITOR="$VISUAL"
|
||||||
|
|
||||||
# Dotdrop
|
# Dotdrop
|
||||||
alias dotdrop="~/dotfiles/dotdrop.sh --cfg=~/dotfiles/config.yaml"
|
alias dotdrop="~/dotfiles/dotdrop.sh --cfg=~/dotfiles/config.yaml"
|
||||||
|
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOU
|
|||||||
floating_modifier $mod
|
floating_modifier $mod
|
||||||
|
|
||||||
# start a terminal
|
# start a terminal
|
||||||
bindsym $mod+Return exec xterm
|
bindsym $mod+Return exec xterm -e zsh
|
||||||
|
|
||||||
# kill focused window
|
# kill focused window
|
||||||
bindsym $mod+Shift+q kill
|
bindsym $mod+Shift+q kill
|
||||||
@@ -188,7 +188,7 @@ bindsym Ctrl+Shift+2 exec --no-startup-id setxkbmap de
|
|||||||
new_window 1pixel
|
new_window 1pixel
|
||||||
|
|
||||||
|
|
||||||
{%@@ if profile == "workstation" @@%}
|
{%@@ if profile == "work" @@%}
|
||||||
# Locking
|
# Locking
|
||||||
bindsym $mod+Shift+b exec "xlock -mode blank -startCmd /share/bin/isweg -endCmd /share/bin/isda"
|
bindsym $mod+Shift+b exec "xlock -mode blank -startCmd /share/bin/isweg -endCmd /share/bin/isda"
|
||||||
|
|
||||||
@@ -197,13 +197,13 @@ exec --no-startup-id "xterm -e /home/mthomas/bin/info-tmux"
|
|||||||
exec --no-startup-id "firefox"
|
exec --no-startup-id "firefox"
|
||||||
|
|
||||||
for_window [class="XTerm" title="info-tmux"] move container to workspace 10
|
for_window [class="XTerm" title="info-tmux"] move container to workspace 10
|
||||||
for_window [class="Firefox"] move container to workspace 3
|
for_window [class="Firefox"] move container to workspace 9
|
||||||
|
|
||||||
# Monitors
|
# Monitors
|
||||||
#mainscreen
|
#mainscreen
|
||||||
set $monitor1 "DVI-I-1"
|
set $monitor1 "HDMI-1"
|
||||||
#side
|
#side
|
||||||
set $monitor2 "VGA-1"
|
set $monitor2 "HDMI-2"
|
||||||
|
|
||||||
workspace $ws10 output $monitor2
|
workspace $ws10 output $monitor2
|
||||||
workspace $ws3 output $monitor1
|
workspace $ws3 output $monitor1
|
||||||
@@ -220,6 +220,6 @@ bindsym $mod+Shift+b exec "xlock -mode matrix"
|
|||||||
exec --no-startup-id "firefox"
|
exec --no-startup-id "firefox"
|
||||||
exec --no-startup-id "discord"
|
exec --no-startup-id "discord"
|
||||||
|
|
||||||
for_window [class="Firefox"] move container to workspace 3
|
for_window [class="Firefox"] move container to workspace 9
|
||||||
for_window [class="Discord"] move container to workspace 10
|
for_window [class="Discord"] move container to workspace 10
|
||||||
{%@@ endif @@%}
|
{%@@ endif @@%}
|
||||||
|
|||||||
@@ -4,6 +4,13 @@ general {
|
|||||||
interval = 1
|
interval = 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{%@@ if profile == "workstation" @@%}
|
||||||
|
order += "load"
|
||||||
|
order += "memory"
|
||||||
|
order += "tztime local"
|
||||||
|
{%@@ endif @@%}
|
||||||
|
|
||||||
|
{%@@ if profile == "laptop" @@%}
|
||||||
order += "wireless _first_"
|
order += "wireless _first_"
|
||||||
order += "ethernet _first_"
|
order += "ethernet _first_"
|
||||||
order += "battery all"
|
order += "battery all"
|
||||||
@@ -11,6 +18,8 @@ order += "disk /"
|
|||||||
order += "load"
|
order += "load"
|
||||||
order += "memory"
|
order += "memory"
|
||||||
order += "tztime local"
|
order += "tztime local"
|
||||||
|
{%@@ endif @@%}
|
||||||
|
|
||||||
|
|
||||||
wireless _first_ {
|
wireless _first_ {
|
||||||
format_up = "W: (%quality at %essid) %ip"
|
format_up = "W: (%quality at %essid) %ip"
|
||||||
@@ -36,7 +45,7 @@ load {
|
|||||||
}
|
}
|
||||||
|
|
||||||
memory {
|
memory {
|
||||||
format = "%used of %available"
|
format = "%used - %available"
|
||||||
threshold_degraded = "1G"
|
threshold_degraded = "1G"
|
||||||
format_degraded = "MEMORY < %available"
|
format_degraded = "MEMORY < %available"
|
||||||
}
|
}
|
||||||
|
|||||||
1
dotfiles/oh-my-zsh
Submodule
1
dotfiles/oh-my-zsh
Submodule
Submodule dotfiles/oh-my-zsh added at 69caf98cf7
@@ -2,9 +2,9 @@ export TERM="xterm-256color"
|
|||||||
|
|
||||||
xrdb -load $HOME/.Xresources
|
xrdb -load $HOME/.Xresources
|
||||||
|
|
||||||
{%@@ if profile == "workstation" @@%}
|
{%@@ if profile == "work" @@%}
|
||||||
/share/bin/isda
|
/share/bin/isda
|
||||||
~/bin/.keyboard.scm &
|
~/bin/.keyboard.scm &
|
||||||
xrandr --output DVI-I-1 --auto --right-of VGA-1
|
xrandr --output HDMI-2 --auto --right-of HDMI-1
|
||||||
exec i3
|
exec i3
|
||||||
{%@@ endif @@%}
|
{%@@ endif @@%}
|
||||||
|
|||||||
40
dotfiles/zsh/marc-pygmalion.zsh-theme
Normal file
40
dotfiles/zsh/marc-pygmalion.zsh-theme
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
# Yay! High voltage and arrows!
|
||||||
|
|
||||||
|
prompt_setup_pygmalion(){
|
||||||
|
ZSH_THEME_GIT_PROMPT_PREFIX="%{$reset_color%}%{$fg[red]%}|"
|
||||||
|
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "
|
||||||
|
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[yellow]%}⚡%{$reset_color%}"
|
||||||
|
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||||
|
|
||||||
|
base_prompt='%{$fg[green]%}%n%{$reset_color%}%{$fg[cyan]%}@%{$reset_color%}%{$fg[yellow]%}%m%{$reset_color%}%{$fg[red]%}:%{$reset_color%}%{$fg[cyan]%}%1~%{$reset_color%}'
|
||||||
|
post_prompt=' '
|
||||||
|
|
||||||
|
base_prompt_nocolor=$(echo "$base_prompt" | perl -pe "s/%\{[^}]+\}//g")
|
||||||
|
post_prompt_nocolor=$(echo "$post_prompt" | perl -pe "s/%\{[^}]+\}//g")
|
||||||
|
|
||||||
|
autoload -U add-zsh-hook
|
||||||
|
add-zsh-hook precmd prompt_pygmalion_precmd
|
||||||
|
}
|
||||||
|
|
||||||
|
prompt_pygmalion_precmd(){
|
||||||
|
local gitinfo=$(git_prompt_info)
|
||||||
|
local gitinfo_nocolor=$(echo "$gitinfo" | perl -pe "s/%\{[^}]+\}//g")
|
||||||
|
local exp_nocolor="$(print -P \"$base_prompt_nocolor$gitinfo_nocolor$post_prompt_nocolor\")"
|
||||||
|
local prompt_length=${#exp_nocolor}
|
||||||
|
|
||||||
|
local nl=""
|
||||||
|
post_prompt=' '
|
||||||
|
|
||||||
|
|
||||||
|
if [ ${#gitinfo} -ne 0 ] ; then
|
||||||
|
gitinfo=${gitinfo[1,-2]}
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $prompt_length -gt 40 ]]; then
|
||||||
|
nl=$'\n%{\r%}';
|
||||||
|
post_prompt='>';
|
||||||
|
fi
|
||||||
|
PROMPT="$base_prompt$gitinfo$nl$post_prompt"
|
||||||
|
}
|
||||||
|
|
||||||
|
prompt_setup_pygmalion
|
||||||
26
dotfiles/zshrc
Normal file
26
dotfiles/zshrc
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
export ZSH="/home/$USER/.oh-my-zsh"
|
||||||
|
ZSH_THEME="marc-pygmalion"
|
||||||
|
DISABLE_AUTO_UPDATE="true"
|
||||||
|
COMPLETION_WAITING_DOTS="true"
|
||||||
|
DISABLE_UNTRACKED_FILES_DIRTY="true"
|
||||||
|
|
||||||
|
plugins=(
|
||||||
|
git
|
||||||
|
common-aliases
|
||||||
|
compleat
|
||||||
|
history
|
||||||
|
)
|
||||||
|
|
||||||
|
source $ZSH/oh-my-zsh.sh
|
||||||
|
export TERM="xterm-256color"
|
||||||
|
export EDITOR="vim"
|
||||||
|
|
||||||
|
# Some aliases
|
||||||
|
alias zshrc="vim ~/.zshrc"
|
||||||
|
alias szsh="source ~/.zshrc"
|
||||||
|
alias vimrc="vim ~/.vimrc"
|
||||||
|
|
||||||
|
alias dotdrop=~/dotfiles/dotdrop.sh --cfg=~/dotfiles/config.yaml
|
||||||
|
|
||||||
|
alias listfonts="fc-list :scalable=true:spacing=mono: family"
|
||||||
|
alias cachefonts="fc-cache -f -v"
|
||||||
Reference in New Issue
Block a user