diff --git a/config.yaml b/config.yaml index 471999a..08df227 100644 --- a/config.yaml +++ b/config.yaml @@ -40,34 +40,54 @@ dotfiles: f_xinitrc: src: 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: laptop: include: - bash + - zsh - vim - x11 - i3 - font - git - gdb - workstation: + work: include: - bash + - zsh - vim - x11 - i3 - font - git - gdb - minimal: + dev-bash: include: - bash - vim + dev-zsh: + include: + - zsh + - vim # Packages to be used above bash: dotfiles: - f_bashrc + zsh: + dotfiles: + - f_zshrc + - d_oh-my-zsh + - f_zsh_theme vim: dotfiles: - f_vimrc diff --git a/dotdrop b/dotdrop index adc4581..d860c07 160000 --- a/dotdrop +++ b/dotdrop @@ -1 +1 @@ -Subproject commit adc4581533cba49d9e364c0d11fdaea874c71bc3 +Subproject commit d860c07f64006d87814d85417e6b04fdbb25d268 diff --git a/dotfiles/.gitmodules b/dotfiles/.gitmodules new file mode 100644 index 0000000..1074300 --- /dev/null +++ b/dotfiles/.gitmodules @@ -0,0 +1,3 @@ +[submodule "oh-my-zsh"] + path = oh-my-zsh + url = https://github.com/ohmyzsh/ohmyzsh/tree/64a7f6b38833d007394b9b4bf5d17e48db77c0d7 diff --git a/dotfiles/Xresources b/dotfiles/Xresources index 8f6fb29..7a5832d 100644 --- a/dotfiles/Xresources +++ b/dotfiles/Xresources @@ -47,8 +47,8 @@ *.color15: nord6 XTerm.vt100.faceName: xft:Inconsolata:antialias=true -{%@@ if profile == "workstation" @@%} -XTerm.vt100.faceSize: 12 +{%@@ if profile == "work" @@%} +XTerm.vt100.faceSize: 13 {%@@ endif @@%} {%@@ if profile == "laptop" @@%} XTerm.vt100.faceSize: 15 diff --git a/dotfiles/bashrc b/dotfiles/bashrc index c33bcf5..c80e6b0 100755 --- a/dotfiles/bashrc +++ b/dotfiles/bashrc @@ -9,6 +9,10 @@ GIT="\[\033[1;91m\](\$(git_branch))\[\033[m\]" DIR="\[\033[1;94m\]\w\[\033[m\]" export PS1="${NAME}@${HOST}:${DIR} ${GIT} ${CHAR} " +# Set vim as default +export VISUAL=vim +export EDITOR="$VISUAL" + # Dotdrop alias dotdrop="~/dotfiles/dotdrop.sh --cfg=~/dotfiles/config.yaml" diff --git a/dotfiles/config/i3/config b/dotfiles/config/i3/config index b6c6f8c..e136170 100644 --- a/dotfiles/config/i3/config +++ b/dotfiles/config/i3/config @@ -41,7 +41,7 @@ bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOU floating_modifier $mod # start a terminal -bindsym $mod+Return exec xterm +bindsym $mod+Return exec xterm -e zsh # kill focused window bindsym $mod+Shift+q kill @@ -188,7 +188,7 @@ bindsym Ctrl+Shift+2 exec --no-startup-id setxkbmap de new_window 1pixel -{%@@ if profile == "workstation" @@%} +{%@@ if profile == "work" @@%} # Locking 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" 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 #mainscreen -set $monitor1 "DVI-I-1" +set $monitor1 "HDMI-1" #side -set $monitor2 "VGA-1" +set $monitor2 "HDMI-2" workspace $ws10 output $monitor2 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 "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 {%@@ endif @@%} diff --git a/dotfiles/config/i3status/config b/dotfiles/config/i3status/config index 5b9c703..09039d2 100644 --- a/dotfiles/config/i3status/config +++ b/dotfiles/config/i3status/config @@ -4,6 +4,13 @@ general { interval = 1 } +{%@@ if profile == "workstation" @@%} +order += "load" +order += "memory" +order += "tztime local" +{%@@ endif @@%} + +{%@@ if profile == "laptop" @@%} order += "wireless _first_" order += "ethernet _first_" order += "battery all" @@ -11,6 +18,8 @@ order += "disk /" order += "load" order += "memory" order += "tztime local" +{%@@ endif @@%} + wireless _first_ { format_up = "W: (%quality at %essid) %ip" @@ -36,7 +45,7 @@ load { } memory { - format = "%used of %available" + format = "%used - %available" threshold_degraded = "1G" format_degraded = "MEMORY < %available" } diff --git a/dotfiles/oh-my-zsh b/dotfiles/oh-my-zsh new file mode 160000 index 0000000..69caf98 --- /dev/null +++ b/dotfiles/oh-my-zsh @@ -0,0 +1 @@ +Subproject commit 69caf98cf754553fda969b0bf1d4966f0498f58f diff --git a/dotfiles/xinitrc b/dotfiles/xinitrc index 33a58fa..6abcd99 100755 --- a/dotfiles/xinitrc +++ b/dotfiles/xinitrc @@ -2,9 +2,9 @@ export TERM="xterm-256color" xrdb -load $HOME/.Xresources -{%@@ if profile == "workstation" @@%} +{%@@ if profile == "work" @@%} /share/bin/isda ~/bin/.keyboard.scm & -xrandr --output DVI-I-1 --auto --right-of VGA-1 +xrandr --output HDMI-2 --auto --right-of HDMI-1 exec i3 {%@@ endif @@%} diff --git a/dotfiles/zsh/marc-pygmalion.zsh-theme b/dotfiles/zsh/marc-pygmalion.zsh-theme new file mode 100644 index 0000000..2da55c0 --- /dev/null +++ b/dotfiles/zsh/marc-pygmalion.zsh-theme @@ -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 diff --git a/dotfiles/zshrc b/dotfiles/zshrc new file mode 100644 index 0000000..17ffff4 --- /dev/null +++ b/dotfiles/zshrc @@ -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"