dotfiles

my shiny new dotfiles
git clone git://git.jakekoroman.com/dotfiles
Log | Files | Refs | README

commit bab17e7d4979f476f79383bc826e4bbeba03fc3b
parent 7964be1a2c77319c693fba9eb30c7e65b6f12332
Author: Jake Koroman <jakekoroman@gmail.com>
Date:   Thu, 28 Mar 2024 09:50:16 -0400

changing to zsh finally

Diffstat:
A.config/shell/aliasrc | 22++++++++++++++++++++++
A.config/zsh/.zshrc | 52++++++++++++++++++++++++++++++++++++++++++++++++++++
A.zprofile | 20++++++++++++++++++++
3 files changed, 94 insertions(+), 0 deletions(-)

diff --git a/.config/shell/aliasrc b/.config/shell/aliasrc @@ -0,0 +1,22 @@ +#!/bin/sh + +alias grep='grep --color=auto' +alias ls='ls --color=auto' +alias l='ls -l' +alias ll='ls -la' + +alias v='nvim' +alias vv='doas nvim' +alias nt='firefox --new-tab' +alias nw='firefox --new-window' + +alias e='doas emerge' +alias eu='equery uses' +alias em='equery meta' +alias eb='equery belongs' +alias p='doas pacman' + +alias nas='doas mount /media/nas && cd /media/nas' + +alias poweroff='doas /sbin/poweroff' +alias reboot='doas /sbin/reboot' diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc @@ -0,0 +1,52 @@ +autoload -U colors && colors + +[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/aliasrc" ] && source "${XDG_CONFIG_HOME:-$HOME/.config}/shell/aliasrc" + +# fancy prompt +PS1="%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%M %{$fg[magenta]%}%~%{$fg[red]%}]%{$reset_color%}$%b " + +HISTFILE=$HOME/.cache/zsh/history +HISTSIZE=10000 +SAVEHIST=10000 + +setopt autocd +unsetopt beep +bindkey -v +export KEYTIMEOUT=1 + +# Basic auto/tab complete: +autoload -U compinit +zstyle ':completion:*' menu select +zmodload zsh/complist +compinit +_comp_options+=(globdots) + +# Use vim keys in tab complete menu: +bindkey -M menuselect 'h' vi-backward-char +bindkey -M menuselect 'k' vi-up-line-or-history +bindkey -M menuselect 'l' vi-forward-char +bindkey -M menuselect 'j' vi-down-line-or-history +bindkey -v '^?' backward-delete-char + +# edit cmd in vim +autoload edit-command-line; zle -N edit-command-line +bindkey '^e' edit-command-line +bindkey -M vicmd '^e' edit-command-line + +# Change cursor shape for different vi modes. +function zle-keymap-select () { + case $KEYMAP in + vicmd) echo -ne '\e[2 q';; # block + viins|main) echo -ne '\e[6 q';; # beam + esac +} +zle -N zle-keymap-select +zle-line-init() { + echo -ne "\e[6 q" +} +zle -N zle-line-init +echo -ne '\e[6 q' # Use beam shape cursor on startup. +preexec() { echo -ne '\e[6 q' ;} # Use beam shape cursor for each new prompt. + +# Load syntax highlighting; should be last. +source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh diff --git a/.zprofile b/.zprofile @@ -0,0 +1,20 @@ +[ ! -d "$HOME/.cache/zsh/" ] && mkdir -p "$HOME/.cache/zsh" + +export MOZ_ENABLE_WAYLAND=1 +export ELECTRON_OZONE_PLATFORM_HINT=wayland +export GTK_THEME=Adwaita:dark + +export XDG_CONFIG_HOME="$HOME/.config" +export XDG_DATA_HOME="$HOME/.local/share" +export XDG_CACHE_HOME="$HOME/.cache" +export ZDOTDIR="$XDG_CONFIG_HOME/zsh" +export WINEPREFIX="$XDG_DATA_HOME/wineprefixes/default" +export GOPATH="$XDG_DATA_HOME/go" + +export EDITOR=nvim +export BROWSER=firefox +export TERMINAL=xterm-256color + +export PATH=$HOME/.local/bin:$HOME/scripts:$PATH + +[ $(tty) = "/dev/tty1" ] && [ -z $DISPLAY ] && dbus-run-session sway