Compare commits
74 Commits
Author | SHA1 | Date |
---|---|---|
Adam Goldsmith | b03223b9ba | |
Adam Goldsmith | 8b0b1dce34 | |
Adam Goldsmith | f803311fd6 | |
Adam Goldsmith | 29f1b87f59 | |
Adam Goldsmith | 30627b531b | |
Adam Goldsmith | 10ed0376f9 | |
Adam Goldsmith | d14b4ebee9 | |
Adam Goldsmith | 645710c31d | |
Adam Goldsmith | 108d8ac5a3 | |
Adam Goldsmith | b6f33fc3c3 | |
Adam Goldsmith | 1e941f215d | |
Adam Goldsmith | 9dbf5d391a | |
Adam Goldsmith | e4d579fa52 | |
Adam Goldsmith | e8b33d4e7d | |
Adam Goldsmith | a2a8ff9a0d | |
Adam Goldsmith | 84b343a6f0 | |
Adam Goldsmith | 6b1ff550dd | |
Adam Goldsmith | 530f1d9729 | |
Adam Goldsmith | 6f427f0c5b | |
Adam Goldsmith | 35e0cbbb15 | |
Adam Goldsmith | defffb7391 | |
Adam Goldsmith | 87c935ffe5 | |
Adam Goldsmith | a165991e9a | |
Adam Goldsmith | ebf39e2b04 | |
Adam Goldsmith | 89f4cb0fef | |
Adam Goldsmith | be1ce99f00 | |
Adam Goldsmith | fedbaf42fc | |
Adam Goldsmith | 5a50b6be66 | |
Adam Goldsmith | e4f2a41e1f | |
Adam Goldsmith | 9385ab2f72 | |
Adam Goldsmith | e0170d68c8 | |
Adam Goldsmith | 5f554d5826 | |
Adam Goldsmith | 60f6c3e104 | |
Adam Goldsmith | 48f8e3c6d3 | |
Adam Goldsmith | 52c1171151 | |
Adam Goldsmith | c3f0f20728 | |
Adam Goldsmith | 4176453676 | |
Adam Goldsmith | 9e8d3508ac | |
Adam Goldsmith | ef6f3433f2 | |
Adam Goldsmith | 81f2bfe24d | |
Adam Goldsmith | df4f903a59 | |
Adam Goldsmith | c74a679f49 | |
Adam Goldsmith | fccf010a3a | |
Adam Goldsmith | 39c9c98176 | |
Adam Goldsmith | ec40b3d83e | |
Adam Goldsmith | 40c79488d4 | |
Adam Goldsmith | 98f1fd6b31 | |
Adam Goldsmith | 30fbaacc52 | |
Adam Goldsmith | 4d1e081619 | |
Adam Goldsmith | 5b0b23d05a | |
Adam Goldsmith | b75fe78ac7 | |
Adam Goldsmith | cf54eb4c4a | |
Adam Goldsmith | e61efefed7 | |
Adam Goldsmith | a7434463b3 | |
Adam Goldsmith | fabc0bc01b | |
Adam Goldsmith | 9cfe45a8d8 | |
Adam Goldsmith | e3362805b4 | |
Adam Goldsmith | 581f6eeb2e | |
Adam Goldsmith | 84de02484f | |
Adam Goldsmith | 8cb7895bdf | |
Adam Goldsmith | cca767608a | |
Adam Goldsmith | c41da91132 | |
Adam Goldsmith | 82cad3d993 | |
Adam Goldsmith | 1874872e35 | |
Adam Goldsmith | baa1712e7b | |
Adam Goldsmith | a3b419fc05 | |
Adam Goldsmith | 746850b32d | |
Adam Goldsmith | 38da9ca7fc | |
Adam Goldsmith | ff0ce7fe92 | |
Adam Goldsmith | 13a67689df | |
Adam Goldsmith | 4337defa08 | |
Adam Goldsmith | 1fe053f6ea | |
Adam Goldsmith | fab1a19fd6 | |
Adam Goldsmith | 0530d4ee76 |
|
@ -0,0 +1,5 @@
|
||||||
|
;;; Directory Local Variables
|
||||||
|
;;; For more information see (info "(emacs) Directory Variables")
|
||||||
|
|
||||||
|
;; set sh mode for all files
|
||||||
|
((nil . ((mode . sh))))
|
|
@ -1,21 +1,7 @@
|
||||||
## Various update aliases
|
## Various update aliases
|
||||||
### apt
|
### apt
|
||||||
alias ai="noglob sudo apt-get install"
|
alias ai="noglob sudo apt-get install"
|
||||||
alias aup="sudo apt-get update; sudo apt-get upgrade"
|
|
||||||
alias adup="sudo apt-get dist-upgrade"
|
alias adup="sudo apt-get dist-upgrade"
|
||||||
alias aclean="sudo apt-get autoremove; sudo apt-get autoclean"
|
alias aclean="sudo apt-get autoremove; sudo apt-get autoclean"
|
||||||
alias apt="noglob apt"
|
alias apt="noglob apt"
|
||||||
|
alias up="sudo apt-get update; sudo apt-get upgrade"
|
||||||
### mr
|
|
||||||
alias mup="mr -mj update"
|
|
||||||
alias cmup="mup 2>&1|sed -ur 's/mr update: \/(.*)/'\"$(tput bold)\1$(tput sgr0)\"'/g
|
|
||||||
/mr update: command failed/c'\"$(tput setf 4)mr update: command failed$(tput sgr0)\"'
|
|
||||||
s/\/?home\/adam/~/g
|
|
||||||
/Already up-to-date/d
|
|
||||||
/Tree is up to date/d
|
|
||||||
/Updating '\''\.'\'':/d
|
|
||||||
/At revision/d
|
|
||||||
/^$/d'"
|
|
||||||
|
|
||||||
### general
|
|
||||||
alias up="(aup;aclean;cmup) | tee /tmp/up.log"
|
|
||||||
|
|
|
@ -1,14 +0,0 @@
|
||||||
#!/bin/zsh
|
|
||||||
# borg
|
|
||||||
|
|
||||||
backupName='{hostname}-{now:%Y-%m-%d}'
|
|
||||||
borgArgs="--compression lzma,9 \
|
|
||||||
--progress \
|
|
||||||
--exclude-caches \
|
|
||||||
--exclude-from ~/Documents/backuplist.txt"
|
|
||||||
backupTargets="/home/adam/ /etc/"
|
|
||||||
|
|
||||||
alias borg-backup="sudo borg create /run/media/adam/Backup/borg-backups::$backupName $backupTargets $borgArgs"
|
|
||||||
alias borg-backup-home="sudo BORG_RSH='sudo -u adam ssh' borg create thewarehouse:borg-backups::$backupName $backupTargets $borgArgs --ignore-inode --remote-path /var/services/homes/adam/bin/borg"
|
|
||||||
|
|
||||||
unset backupName borgArgs backupTargets
|
|
|
@ -0,0 +1 @@
|
||||||
|
alias bup="brew update && brew upgrade"
|
|
@ -4,3 +4,7 @@ alias en="e -n"
|
||||||
alias et="e -t"
|
alias et="e -t"
|
||||||
alias ec="e -c"
|
alias ec="e -c"
|
||||||
alias ecn="ec -n"
|
alias ecn="ec -n"
|
||||||
|
|
||||||
|
function magit() {
|
||||||
|
ecn -e '(magit-status-no-new-window "'"$(realpath ${1-.})"'")'
|
||||||
|
}
|
||||||
|
|
|
@ -1,2 +1,4 @@
|
||||||
## git
|
## git
|
||||||
alias git-yolo='git commit -am "`curl -s http://whatthecommit.com/index.txt`"'
|
alias git-yolo='git commit -am "`curl -s http://whatthecommit.com/index.txt`"'
|
||||||
|
alias diff='git diff --no-index'
|
||||||
|
alias gcdr='cd "$(git rev-parse --show-toplevel)"' # cd to top level
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
## makepkg
|
## makepkg
|
||||||
|
|
||||||
alias fmakepkg='PKGEXT='''.pkg.tar''' makepkg'
|
alias fmakepkg='PKGEXT='''.pkg.tar''' makepkg'
|
||||||
|
alias mksrcinfo='makepkg --printsrcinfo > .SRCINFO'
|
||||||
|
|
|
@ -1,2 +1,3 @@
|
||||||
## notify-send
|
## notify-send
|
||||||
alias N='notify-send "Command finished"'
|
alias N='notify-send "Command finished" -i text-x-script'
|
||||||
|
alias NS='N -u critical' # sticky
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
alias n="notmuch"
|
||||||
|
alias nco="n compact"
|
||||||
|
alias nag="mujmap -C ~/mail/adamgoldsmith.name sync"
|
|
@ -0,0 +1 @@
|
||||||
|
alias o="open"
|
|
@ -1,17 +1,10 @@
|
||||||
# pacman
|
# pacman
|
||||||
alias pi='pacaur'
|
alias pi='paru'
|
||||||
alias pup='pi -Syu --noedit'
|
alias pup='pi -Syu'
|
||||||
alias pr='pi -Rs'
|
alias pr='pi -Rs'
|
||||||
alias prc='pr -c'
|
alias prc='pr -c'
|
||||||
alias pin='pi --noedit --noconfirm'
|
alias pin='pi --noconfirm'
|
||||||
alias pis='pi -S'
|
alias pis='pi -S'
|
||||||
alias pins='pin -S'
|
alias pins='pin -S'
|
||||||
piro() { #remove orphans
|
alias piro='pi -c'
|
||||||
if [[ ! -n $(pacaur -Qdt) ]]; then
|
|
||||||
echo "No orphans to remove."
|
|
||||||
else
|
|
||||||
pacaur -Rns $(pacman -Qdtq)
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
alias up='pup'
|
alias up='pup'
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
## rdiff-backup
|
|
||||||
alias backup="rdiff-backup --exclude-globbing-filelist /home/adam/Documents/backuplist.txt /home/adam/" #target
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
alias sup="softwareupdate -ia"
|
||||||
|
|
||||||
|
alias up='tmux new-session "tmux split-window \"$(whence sup)\"; \
|
||||||
|
tmux split-window \"$(whence npmgup)\"; \
|
||||||
|
$(whence bup)"'
|
|
@ -1,14 +1,30 @@
|
||||||
#-*- mode: sh; -*-
|
#-*- mode: sh; -*-
|
||||||
alias sy="systemctl"
|
alias sy="systemctl"
|
||||||
|
alias sydr="sy daemon-reload"
|
||||||
alias sye="sy enable"
|
alias sye="sy enable"
|
||||||
alias syd="sy disable"
|
alias syd="sy disable"
|
||||||
|
alias syre="sy restart"
|
||||||
alias systa="sy start"
|
alias systa="sy start"
|
||||||
alias systo="sy stop"
|
alias systo="sy stop"
|
||||||
alias systat="sy status"
|
alias systat="sy status"
|
||||||
|
|
||||||
alias ssy="sudo systemctl"
|
alias ssy="sudo systemctl"
|
||||||
|
alias ssydr="ssy daemon-reload"
|
||||||
alias ssye="ssy enable"
|
alias ssye="ssy enable"
|
||||||
alias ssyd="ssy disable"
|
alias ssyd="ssy disable"
|
||||||
|
alias ssyre="ssy restart"
|
||||||
alias ssysta="ssy start"
|
alias ssysta="ssy start"
|
||||||
alias ssysto="ssy stop"
|
alias ssysto="ssy stop"
|
||||||
alias ssystat="ssy status"
|
alias ssystat="ssy status"
|
||||||
|
|
||||||
|
alias jo="journalctl"
|
||||||
|
alias joe="jo -e"
|
||||||
|
alias joeu="jo -eu"
|
||||||
|
alias jof="jo -f"
|
||||||
|
alias jofu="jo -fu"
|
||||||
|
|
||||||
|
alias sjo="sudo journalctl"
|
||||||
|
alias sjoe="sjo -e"
|
||||||
|
alias sjoeu="sjo -eu"
|
||||||
|
alias sjof="sjo -f"
|
||||||
|
alias sjofu="sjo -fu"
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
for interface in cms homeserver
|
||||||
|
do
|
||||||
|
alias wg${interface}="sudo systemctl restart wg-quick@wg-${interface}"
|
||||||
|
alias wg${interface}D="sudo systemctl stop wg-quick@wg-${interface}"
|
||||||
|
done
|
|
@ -4,6 +4,9 @@
|
||||||
alias l='ls -1a'
|
alias l='ls -1a'
|
||||||
alias la='ll -a'
|
alias la='ll -a'
|
||||||
|
|
||||||
|
# zim updates
|
||||||
|
alias zup="zimfw update && zimfw upgrade"
|
||||||
|
|
||||||
## Disable Globbing (for some things)
|
## Disable Globbing (for some things)
|
||||||
alias nmap="noglob nmap"
|
alias nmap="noglob nmap"
|
||||||
|
|
||||||
|
@ -15,3 +18,12 @@ alias irc='ssh ag tmux a -t irc'
|
||||||
|
|
||||||
#quick alias for enabling bluetooth
|
#quick alias for enabling bluetooth
|
||||||
alias ebluetooth="sudo modprobe btusb;ssy start bluetooth;blueman-manager"
|
alias ebluetooth="sudo modprobe btusb;ssy start bluetooth;blueman-manager"
|
||||||
|
|
||||||
|
# Command Specific Aliases
|
||||||
|
for i in $HOME/.aliases/command-specific/*
|
||||||
|
do
|
||||||
|
if hash $(basename $i) 2>/dev/null # check if command exists
|
||||||
|
then
|
||||||
|
source $i
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
# Beware! This file is rewritten by htop when settings are changed in the interface.
|
||||||
|
# The parser is also very primitive, and not human-friendly.
|
||||||
|
fields=0 48 17 18 38 39 40 2 46 47 49 1
|
||||||
|
sort_key=46
|
||||||
|
sort_direction=1
|
||||||
|
hide_threads=0
|
||||||
|
hide_kernel_threads=1
|
||||||
|
hide_userland_threads=0
|
||||||
|
shadow_other_users=0
|
||||||
|
show_thread_names=0
|
||||||
|
show_program_path=1
|
||||||
|
highlight_base_name=0
|
||||||
|
highlight_megabytes=1
|
||||||
|
highlight_threads=1
|
||||||
|
tree_view=0
|
||||||
|
header_margin=1
|
||||||
|
detailed_cpu_time=0
|
||||||
|
cpu_count_from_zero=0
|
||||||
|
update_process_names=0
|
||||||
|
account_guest_in_cpu_meter=0
|
||||||
|
color_scheme=0
|
||||||
|
delay=15
|
||||||
|
left_meters=AllCPUs2 Memory Swap
|
||||||
|
left_meter_modes=1 1 1
|
||||||
|
right_meters=Tasks LoadAverage Uptime Battery
|
||||||
|
right_meter_modes=2 2 2 1
|
|
@ -0,0 +1,42 @@
|
||||||
|
# set prefix to C-z
|
||||||
|
set -g prefix C-z
|
||||||
|
unbind C-b
|
||||||
|
bind C-z send-prefix
|
||||||
|
|
||||||
|
# enable mouse support
|
||||||
|
set -g mouse on
|
||||||
|
|
||||||
|
# open new panes in current directory
|
||||||
|
bind % split-window -h -c "#{pane_current_path}"
|
||||||
|
bind '"' split-window -v -c "#{pane_current_path}"
|
||||||
|
|
||||||
|
# vim-like pane navigation
|
||||||
|
bind h select-pane -L
|
||||||
|
bind j select-pane -D
|
||||||
|
bind k select-pane -U
|
||||||
|
bind l select-pane -R
|
||||||
|
# resizing
|
||||||
|
bind -r C-h resize-pane -L
|
||||||
|
bind -r C-j resize-pane -D
|
||||||
|
bind -r C-k resize-pane -U
|
||||||
|
bind -r C-l resize-pane -R
|
||||||
|
bind -r M-h resize-pane -L 5
|
||||||
|
bind -r M-j resize-pane -D 5
|
||||||
|
bind -r M-k resize-pane -U 5
|
||||||
|
bind -r M-l resize-pane -R 5
|
||||||
|
|
||||||
|
set -g history-file ~/.local/state/tmux_history
|
||||||
|
|
||||||
|
# plugins
|
||||||
|
set-option -g @plugin 'tmux-plugins/tpm'
|
||||||
|
set-option -g @plugin 'noscript/tmux-mighty-scroll'
|
||||||
|
set-option -g @mighty-scroll-by-line 'man less pager fzf emacs emacsclient'
|
||||||
|
|
||||||
|
# install/update tpm
|
||||||
|
if-shell "test ! -d ~/.config/tmux/plugins/tpm" {
|
||||||
|
run-shell 'git clone https://github.com/tmux-plugins/tpm ~/.config/tmux/plugins/tpm'
|
||||||
|
}
|
||||||
|
# start tpm
|
||||||
|
run-shell '~/.config/tmux/plugins/tpm/tpm'
|
||||||
|
# install and update plugins in background
|
||||||
|
run-shell -b '($TMUX_PLUGIN_MANAGER_PATH/tpm/bin/install_plugins && $TMUX_PLUGIN_MANAGER_PATH/tpm/bin/clean_plugins && $TMUX_PLUGIN_MANAGER_PATH/tpm/bin/update_plugins all && $TMUX_PLUGIN_MANAGER_PATH/tpm/scripts/source_plugins.sh) > /dev/null'
|
|
@ -0,0 +1,39 @@
|
||||||
|
{
|
||||||
|
"buildDir": "/home/adam/.cache/yay",
|
||||||
|
"editor": "",
|
||||||
|
"editorflags": "",
|
||||||
|
"makepkgbin": "makepkg",
|
||||||
|
"makepkgconf": "",
|
||||||
|
"pacmanbin": "pacman",
|
||||||
|
"pacmanconf": "/etc/pacman.conf",
|
||||||
|
"tarbin": "bsdtar",
|
||||||
|
"redownload": "no",
|
||||||
|
"rebuild": "no",
|
||||||
|
"answerclean": "",
|
||||||
|
"answerdiff": "",
|
||||||
|
"answeredit": "",
|
||||||
|
"answerupgrade": "",
|
||||||
|
"gitbin": "git",
|
||||||
|
"gpgbin": "gpg",
|
||||||
|
"gpgflags": "",
|
||||||
|
"mflags": "",
|
||||||
|
"sortby": "votes",
|
||||||
|
"gitflags": "",
|
||||||
|
"removemake": "yes",
|
||||||
|
"requestsplitn": 150,
|
||||||
|
"sortmode": 0,
|
||||||
|
"completionrefreshtime": 7,
|
||||||
|
"sudoloop": false,
|
||||||
|
"timeupdate": false,
|
||||||
|
"devel": false,
|
||||||
|
"cleanAfter": false,
|
||||||
|
"gitclone": true,
|
||||||
|
"provides": true,
|
||||||
|
"pgpfetch": true,
|
||||||
|
"upgrademenu": true,
|
||||||
|
"cleanmenu": false,
|
||||||
|
"diffmenu": false,
|
||||||
|
"editmenu": false,
|
||||||
|
"combinedupgrade": false,
|
||||||
|
"useask": false
|
||||||
|
}
|
|
@ -0,0 +1 @@
|
||||||
|
/.config/tmux/plugins/
|
46
.profile
46
.profile
|
@ -1,47 +1,3 @@
|
||||||
#-*- mode: sh; -*-
|
#-*- mode: sh; -*-
|
||||||
# Environment variables
|
|
||||||
export ARDUINO_DIR="/usr/share/arduino"
|
|
||||||
export ARDMK_DIR="$HOME/Programs/Arduino-Makefile"
|
|
||||||
export STEAMAPPS="$HOME/.local/share/Steam/steamapps/common"
|
|
||||||
export QT_STYLE_OVERRIDE=gtk2
|
|
||||||
export ALTERNATE_EDITOR=""
|
|
||||||
export TERMINAL=roxterm
|
|
||||||
export CALIBRE_USE_SYSTEM_THEME=true
|
|
||||||
|
|
||||||
export WORDCHARS=${WORDCHARS/\//}
|
source $HOME/.zshenv
|
||||||
export PAGER=less
|
|
||||||
|
|
||||||
# Add $HOME/.bin to PATH if it exists
|
|
||||||
if [[ -d "$HOME/.bin" ]]; then
|
|
||||||
export PATH="$PATH:$HOME/.bin"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Set temporary files locations
|
|
||||||
if [[ ! -d "$TMPDIR" ]]; then
|
|
||||||
export TMPDIR="/tmp/$LOGNAME"
|
|
||||||
mkdir -p -m 700 "$TMPDIR"
|
|
||||||
fi
|
|
||||||
|
|
||||||
TMPPREFIX="${TMPDIR%/}/zsh"
|
|
||||||
if [[ ! -d "$TMPPREFIX" ]]; then
|
|
||||||
mkdir -p "$TMPPREFIX"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Gnupg setup
|
|
||||||
## Start the gpg-agent if not already running
|
|
||||||
if ! pgrep -x -u "${USER}" gpg-agent >/dev/null 2>&1; then
|
|
||||||
gpg-connect-agent /bye >/dev/null 2>&1
|
|
||||||
fi
|
|
||||||
|
|
||||||
## Set SSH to use gpg-agent
|
|
||||||
unset SSH_AGENT_PID
|
|
||||||
if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
|
|
||||||
export SSH_AUTH_SOCK="/run/user/$UID/gnupg/S.gpg-agent.ssh"
|
|
||||||
fi
|
|
||||||
|
|
||||||
## Set GPG TTY
|
|
||||||
GPG_TTY=$(tty)
|
|
||||||
export GPG_TTY
|
|
||||||
|
|
||||||
## Refresh gpg-agent tty in case user switches into an X session
|
|
||||||
gpg-connect-agent updatestartuptty /bye >/dev/null
|
|
||||||
|
|
Binary file not shown.
|
@ -0,0 +1,27 @@
|
||||||
|
# -*- mode: sh; -*-
|
||||||
|
|
||||||
|
#
|
||||||
|
# Modules
|
||||||
|
#
|
||||||
|
|
||||||
|
zmodule environment
|
||||||
|
zmodule git
|
||||||
|
zmodule input
|
||||||
|
zmodule termtitle
|
||||||
|
zmodule utility
|
||||||
|
|
||||||
|
# Prompt
|
||||||
|
zmodule git-info
|
||||||
|
zmodule duration-info
|
||||||
|
zmodule https://git.adamgoldsmith.name/adam/fred-prompt.git
|
||||||
|
|
||||||
|
zmodule zsh-users/zsh-completions
|
||||||
|
# completion must be sourced after zsh-users/zsh-completions
|
||||||
|
zmodule completion
|
||||||
|
# fast must be loaded after completion
|
||||||
|
zmodule fasd
|
||||||
|
zmodule zsh-users/zsh-autosuggestions
|
||||||
|
# zsh-users/zsh-syntax-highlighting must be sourced after completion
|
||||||
|
zmodule zsh-users/zsh-syntax-highlighting
|
||||||
|
# zsh-users/zsh-history-substring-search must be sourced after zsh-users/zsh-syntax-highlighting
|
||||||
|
zmodule zsh-users/zsh-history-substring-search
|
|
@ -0,0 +1,51 @@
|
||||||
|
#-*- mode: sh; -*-
|
||||||
|
|
||||||
|
# Define Zim location
|
||||||
|
ZIM_HOME=${ZDOTDIR:-${HOME}}/.zim
|
||||||
|
|
||||||
|
# Environment variables
|
||||||
|
export EDITOR="emacsclient -t"
|
||||||
|
export ALTERNATE_EDITOR=""
|
||||||
|
export VISUAL="emacsclient -c -n"
|
||||||
|
export PAGER=less
|
||||||
|
export TERMINAL=alacritty
|
||||||
|
|
||||||
|
export ARDUINO_DIR="/usr/share/arduino"
|
||||||
|
export ARDMK_DIR="$HOME/Programs/Arduino-Makefile"
|
||||||
|
export STEAMAPPS="$HOME/.local/share/Steam/steamapps/common"
|
||||||
|
|
||||||
|
export QT_STYLE_OVERRIDE=gtk2
|
||||||
|
export QT_AUTO_SCREEN_SCALE_FACTOR=true
|
||||||
|
export CALIBRE_USE_SYSTEM_THEME=true
|
||||||
|
|
||||||
|
export WINEDLLOVERRIDES=winemenubuilder.exe=d
|
||||||
|
|
||||||
|
# Don't allow duplicate values in path
|
||||||
|
typeset -U path
|
||||||
|
path=(
|
||||||
|
$HOME/.bin
|
||||||
|
$HOME/.local/bin
|
||||||
|
$HOME/.dotfiles/
|
||||||
|
$HOME/.cargo/bin
|
||||||
|
$path
|
||||||
|
)
|
||||||
|
|
||||||
|
# Set temporary files locations
|
||||||
|
if [[ ! -d "$TMPDIR" ]]
|
||||||
|
then
|
||||||
|
export TMPDIR="/tmp/$LOGNAME"
|
||||||
|
mkdir -p -m 700 "$TMPDIR"
|
||||||
|
fi
|
||||||
|
|
||||||
|
TMPPREFIX="${TMPDIR%/}/zsh"
|
||||||
|
if [[ ! -d "$TMPPREFIX" ]]
|
||||||
|
then
|
||||||
|
mkdir -p "$TMPPREFIX"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Set SSH auth socket
|
||||||
|
unset SSH_AGENT_PID
|
||||||
|
if hash gpgconf 2>/dev/null && [[ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]]
|
||||||
|
then
|
||||||
|
export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
|
||||||
|
fi
|
128
.zshrc
128
.zshrc
|
@ -1,76 +1,83 @@
|
||||||
# Antigen Stuff
|
if [ ! -d "$HOME/.zim" ]
|
||||||
ADOTDIR="$HOME/.antigen"
|
then
|
||||||
[ ! -e "$ADOTDIR" ] && git clone https://github.com/zsh-users/antigen.git "$ADOTDIR"
|
git clone https://github.com/zimfw/zimfw $HOME/.zim
|
||||||
source "$ADOTDIR/antigen.zsh"
|
source ~/.zim/zimfw.zsh install
|
||||||
|
fi
|
||||||
|
|
||||||
# Temporary, hopefully remove later when antigen correctly fails to shallow clone from http
|
# Set editor default keymap to emacs
|
||||||
[ ! -e "$ADOTDIR/bundles/zsh/fred-prompt" ] && git clone https://adamgoldsmith.name/cgit/zsh/fred-prompt.git/ $ADOTDIR/bundles/zsh/fred-prompt
|
bindkey -e
|
||||||
|
stty -ixon #disable XON/XOFF, which breaks C-s
|
||||||
|
|
||||||
antigen bundles <<EOBUNDLES
|
# Prompt for spelling correction of commands.
|
||||||
https://adamgoldsmith.name/cgit/zsh/fred-prompt.git prompt_fred_setup
|
setopt CORRECT
|
||||||
zsh-users/zsh-syntax-highlighting
|
CORRECT_IGNORE="_*" # don't suggest completion functions
|
||||||
zsh-users/zsh-history-substring-search
|
|
||||||
Eriner/zim modules/directory
|
|
||||||
Eriner/zim modules/git
|
|
||||||
Eriner/zim modules/history
|
|
||||||
Eriner/zim modules/input
|
|
||||||
Eriner/zim modules/utility
|
|
||||||
Eriner/zim modules/completion
|
|
||||||
EOBUNDLES
|
|
||||||
antigen apply
|
|
||||||
|
|
||||||
# Command Specific Aliases
|
# Customize spelling correction prompt.
|
||||||
for i in $HOME/.aliases/command-specific/*
|
SPROMPT='zsh: correct %F{red}%R%f to %F{green}%r%f [nyae]? '
|
||||||
do
|
|
||||||
if hash $(basename $i) 2>/dev/null
|
|
||||||
then
|
|
||||||
source $i
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# General Aliases
|
# Remove path separator from WORDCHARS.
|
||||||
|
WORDCHARS=${WORDCHARS//[\/]}
|
||||||
|
|
||||||
|
# Set window title format
|
||||||
|
# Escape % in commands
|
||||||
|
zstyle ':zim:termtitle' format '%~:${${1:-zsh}//\\%/%%}'
|
||||||
|
# Set window title before running a command
|
||||||
|
zstyle ':zim:termtitle' hooks 'precmd' 'preexec'
|
||||||
|
|
||||||
|
# Append `../` to your input for each `.` you type after an initial `..`
|
||||||
|
zstyle ':zim:input' double-dot-expand yes
|
||||||
|
|
||||||
|
# Set what highlighters will be used.
|
||||||
|
# See https://github.com/zsh-users/zsh-syntax-highlighting/blob/master/docs/highlighters.md
|
||||||
|
ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets)
|
||||||
|
|
||||||
|
# Set zsh-autosuggestions highlight style
|
||||||
|
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=black,bold,underline"
|
||||||
|
|
||||||
|
# Initialize Zim modules
|
||||||
|
if [[ ${ZIM_HOME}/init.zsh -ot ${ZDOTDIR:-${HOME}}/.zimrc ]]; then
|
||||||
|
# Update static initialization script if it's outdated, before sourcing it
|
||||||
|
source ${ZIM_HOME}/zimfw.zsh init -q
|
||||||
|
fi
|
||||||
|
source ${ZIM_HOME}/init.zsh
|
||||||
|
|
||||||
|
# Source aliases
|
||||||
source $HOME/.aliases/general
|
source $HOME/.aliases/general
|
||||||
|
|
||||||
# Various Options
|
# Various Options
|
||||||
setopt EXTENDED_GLOB
|
unsetopt NOMATCH # turn off "no matches found" on glob failure
|
||||||
unsetopt NOMATCH
|
|
||||||
setopt CORRECT
|
# Remove older command from the history if a duplicate is to be added.
|
||||||
CORRECT_IGNORE="_*"
|
setopt HIST_IGNORE_ALL_DUPS
|
||||||
zhighlighters=(main brackets)
|
unsetopt SHARE_HISTORY # don't share history between terminals
|
||||||
stty -ixon #disable XON/XOFF, which breaks C-s
|
setopt INC_APPEND_HISTORY
|
||||||
setopt no_share_history
|
|
||||||
# rehashes on bin change, might cause performance issues
|
# rehashes on bin change, might cause performance issues
|
||||||
zstyle ':completion:*' rehash true
|
zstyle ':completion:*' rehash true
|
||||||
|
|
||||||
#load fasd if it exists
|
# Fix completion matching: # https://github.com/zimfw/completion/issues/10
|
||||||
hash fasd 2>/dev/null && eval "$(fasd --init auto)"
|
zstyle ':completion:*' matcher-list 'm:{[:lower:]-}={[:upper:]_} r:|[.]=**' '+l:|=*'
|
||||||
|
|
||||||
# Load run-help
|
|
||||||
unalias run-help
|
|
||||||
autoload run-help
|
|
||||||
|
|
||||||
# Auto start tmux if a remote connection
|
|
||||||
if [[ -z "$TMUX" && -z "$EMACS" && -z "$VIM" && -n "$SSH_TTY" ]]
|
|
||||||
then
|
|
||||||
# Attach only to the 'auto' session
|
|
||||||
exec tmux new-session -A -s 'auto'
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
# History Substring Search bindings (PageUp and PageDown)
|
# History Substring Search bindings (PageUp and PageDown)
|
||||||
bindkey '^[[5~' history-substring-search-up
|
bindkey '^[[5~' history-substring-search-up
|
||||||
bindkey '^[[6~' history-substring-search-down
|
bindkey '^[[6~' history-substring-search-down
|
||||||
|
|
||||||
# Expands ... to ../..
|
# equivalents of eponymous Emacs functions
|
||||||
function expand-dot-to-parent-directory-path {
|
# from https://unix.stackexchange.com/a/595157
|
||||||
if [[ $LBUFFER = *.. ]]; then
|
delete-horizontal-space() {
|
||||||
LBUFFER+='/..'
|
emulate -L zsh
|
||||||
else
|
set -o extendedglob
|
||||||
LBUFFER+='.'
|
LBUFFER=${LBUFFER%%[[:blank:]]##}
|
||||||
fi
|
RBUFFER=${RBUFFER##[[:blank:]]##}
|
||||||
}
|
}
|
||||||
zle -N expand-dot-to-parent-directory-path
|
zle -N delete-horizontal-space
|
||||||
bindkey -M emacs "." expand-dot-to-parent-directory-path
|
bindkey '\e\\' delete-horizontal-space
|
||||||
|
just-one-space() {
|
||||||
|
delete-horizontal-space
|
||||||
|
LBUFFER="$LBUFFER "
|
||||||
|
}
|
||||||
|
zle -N just-one-space
|
||||||
|
bindkey '\e ' just-one-space
|
||||||
|
|
||||||
# Inserts 'sudo ' at the beginning of the line.
|
# Inserts 'sudo ' at the beginning of the line.
|
||||||
function prepend-sudo() {
|
function prepend-sudo() {
|
||||||
|
@ -85,3 +92,10 @@ bindkey "^X^S" prepend-sudo
|
||||||
# Control-Backspace and Control-Delete
|
# Control-Backspace and Control-Delete
|
||||||
bindkey '^H' backward-kill-word
|
bindkey '^H' backward-kill-word
|
||||||
bindkey '5~' kill-word
|
bindkey '5~' kill-word
|
||||||
|
|
||||||
|
# Auto start tmux if a remote connection
|
||||||
|
if [[ -z "$TMUX" && -z "$EMACS" && -z "$VIM" && -n "$SSH_TTY" ]]
|
||||||
|
then
|
||||||
|
# Attach only to the 'auto' session
|
||||||
|
exec tmux new-session -A -s 'auto'
|
||||||
|
fi
|
||||||
|
|
Loading…
Reference in New Issue