summaryrefslogtreecommitdiff
path: root/.config/zsh
diff options
context:
space:
mode:
Diffstat (limited to '.config/zsh')
-rw-r--r--.config/zsh/.zcompdump340
-rw-r--r--.config/zsh/.zshrc137
2 files changed, 279 insertions, 198 deletions
diff --git a/.config/zsh/.zcompdump b/.config/zsh/.zcompdump
index e5117fd..43df84d 100644
--- a/.config/zsh/.zcompdump
+++ b/.config/zsh/.zcompdump
@@ -1,8 +1,7 @@
-#files: 784 version: 5.8
+#files: 792 version: 5.8
_comps=(
'-' '_precommand'
-'-*-' '_bootctl'
'-array-value-' '_value'
'-assign-parameter-' '_assign'
'-brace-parameter-' '_brace_parameter'
@@ -182,7 +181,6 @@ _comps=(
'brctl' '_brctl'
'bsdgrep' '_grep'
'bsdtar' '_tar'
-'bspc' '_bspc'
'btdownloadcurses' '_bittorrent'
'btdownloadgui' '_bittorrent'
'btdownloadheadless' '_bittorrent'
@@ -199,6 +197,7 @@ _comps=(
'bunzip2' '_bzip2'
'burst' '_mh'
'busctl' '_busctl'
+'bwrap' '_bwrap'
'bzcat' '_bzip2'
'bzegrep' '_grep'
'bzfgrep' '_grep'
@@ -210,6 +209,7 @@ _comps=(
'cabal' '_cabal'
'cal' '_cal'
'calendar' '_calendar'
+'cargo' '_cargo'
'cat' '_cat'
'catchsegv' '_precommand'
'cc' '_gcc'
@@ -228,6 +228,7 @@ _comps=(
'chcon' '_chcon'
'chdir' '_cd'
'chfn' '_users'
+'chg' '_hg'
'chgrp' '_chown'
'chimera' '_webbrowser'
'chkconfig' '_chkconfig'
@@ -252,6 +253,8 @@ _comps=(
'cmp' '_cmp'
'co' '_rcs'
'code' '_code'
+'code-oss' '_code-oss'
+'colorscript' '_colorscript'
'column' '_column'
'comb' '_sccs'
'combine' '_imagemagick'
@@ -327,8 +330,6 @@ _comps=(
'dmesg' '_dmesg'
'dmidecode' '_dmidecode'
'doas' '_doas'
-'docker' '_docker'
-'dockerd' '_docker'
'domainname' '_yp'
'dos2unix' '_dos2unix'
'drill' '_drill'
@@ -635,6 +636,7 @@ _comps=(
'heat' '_openstack'
'help' '_sccs'
'hexdump' '_hexdump'
+'hg' '_hg'
'hilite' '_precommand'
'history' '_fc'
'host' '_host'
@@ -927,14 +929,24 @@ _comps=(
'opkg' '_opkg'
'p4' '_perforce'
'p4d' '_perforce'
+'pacat' '_pulseaudio'
'pack' '_pack'
'packf' '_mh'
'pacman' '_pacman'
+'pacman-conf' '_pacman'
'pacman-key' '_pacman'
'pacman.static' '_pacman'
+'pacmd' '_pulseaudio'
+'pactl' '_pulseaudio'
+'padsp' '_pulseaudio'
'pandoc' '_pandoc'
+'paplay' '_pulseaudio'
+'parec' '_pulseaudio'
+'parecord' '_pulseaudio'
+'pass' '_pass'
'passwd' '_users'
'paste' '_paste'
+'pasuspender' '_pulseaudio'
'patch' '_patch'
'pax' '_pax'
'pcat' '_pack'
@@ -1040,6 +1052,7 @@ _comps=(
'pstops' '_psutils'
'pstotgif' '_pspdf'
'pswrap' '_postscript'
+'pulseaudio' '_pulseaudio'
'pump' '_pump'
'pushd' '_cd'
'pv' '_pv'
@@ -1147,7 +1160,6 @@ _comps=(
'sha512sum' '_md5sum'
'sha512t256' '_cksum'
'shasum' '_shasum'
-'shell-script' '_bootctl'
'shift' '_arrays'
'show' '_mh'
'showchar' '_psutils'
@@ -1234,6 +1246,7 @@ _comps=(
'systemd-machine-id-setup' '_systemd'
'systemd-notify' '_systemd'
'systemd-nspawn' '_systemd-nspawn'
+'systemd-path' '_systemd-path'
'systemd-resolve' '_resolvectl'
'systemd-run' '_systemd-run'
'systemd-tmpfiles' '_systemd-tmpfiles'
@@ -1616,163 +1629,164 @@ bindkey '^[,' _history-complete-newer
bindkey '^[/' _history-complete-older
bindkey '^[~' _bash_complete-word
-autoload -Uz _bluetoothctl _bootctl _bspc _busctl _coredumpctl \
- _curl _docker _email-notmuch _hostnamectl _journalctl \
- _kernel-install _kitty _libinput _localectl _loginctl \
- _machinectl _mkinitcpio _mpv _netctl _networkctl \
- _notmuch _pacman _resolvectl _rg _sd_hosts_or_user_at_host \
- _sd_machines _sd_outputmodes _sd_unit_files _systemctl _systemd \
- _systemd-analyze _systemd-delta _systemd-inhibit _systemd-nspawn _systemd-run \
- _systemd-tmpfiles _timedatectl _udevadm _xss-lock _xwallpaper \
- _yay _youtube-dl _zathura _cdr _all_labels \
- _all_matches _alternative _approximate _arg_compile _arguments \
- _bash_completions _cache_invalid _call_function _combination _comp_locale \
- _complete _complete_debug _complete_help _complete_help_generic _complete_tag \
- _correct _correct_filename _correct_word _describe _description \
- _dispatch _expand _expand_alias _expand_word _extensions \
- _external_pwds _generic _guard _history _history_complete_word \
- _ignored _list _main_complete _match _menu \
- _message _most_recent_file _multi_parts _next_label _next_tags \
- _normal _nothing _oldlist _pick_variant _prefix \
- _read_comp _regex_arguments _regex_words _requested _retrieve_cache \
- _sep_parts _sequence _set_command _setup _store_cache \
- _sub_commands _tags _user_expand _values _wanted \
- _acpi _acpitool _alsa-utils _analyseplugin _brctl \
- _btrfs _chattr _chcon _chrt _cpupower \
- _cryptsetup _dkms _e2label _ethtool _findmnt \
- _free _fuse_arguments _fuse_values _fusermount _gpasswd \
- _htop _iconvconfig _ionice _ipset _iptables \
- _iwconfig _kpartx _losetup _lsattr _lsblk \
- _lsusb _ltrace _mdadm _mii-tool _modutils \
- _mondo _networkmanager _opkg _pidof _pmap \
- _qdbus _schedtool _selinux_contexts _selinux_roles _selinux_types \
- _selinux_users _setsid _slabtop _ss _sshfs \
- _strace _sysstat _tload _tpb _tracepath \
- _tune2fs _uml _valgrind _vserver _wakeup_capable_devices \
- _wipefs _wpa_cli _a2ps _aap _abcde \
- _absolute_command_paths _ack _adb _ansible _ant \
- _antiword _apachectl _apm _arch_archives _arch_namespace \
- _arp _arping _asciidoctor _asciinema _at \
- _attr _augeas _avahi _awk _base64 \
- _basename _bash _baudrates _baz _beep \
- _bibtex _bind_addresses _bison _bittorrent _bogofilter \
- _bpf_filters _bpython _bzip2 _bzr _cabal \
- _cal _calendar _canonical_paths _cat _ccal \
- _cdcd _cdrdao _cdrecord _chkconfig _chmod \
- _chown _chroot _chsh _cksum _clay \
- _cmdambivalent _cmdstring _cmp _column _comm \
- _composer _compress _configure _cowsay _cp \
- _cpio _cplay _crontab _cscope _cssh \
- _ctags_tags _curl _cut _cvs _darcs \
- _date _date_formats _dates _dbus _dconf \
- _dd _devtodo _df _dhclient _dict \
- _dict_words _diff _diff3 _diff_options _diffstat \
- _dig _dir_list _directories _django _dmesg \
- _dmidecode _dns_types _doas _domains _dos2unix \
- _drill _dsh _dtruss _du _dvi \
- _ecasound _ed _elfdump _elinks _email_addresses \
- _enscript _entr _env _espeak _etags \
- _fakeroot _feh _fetchmail _ffmpeg _figlet \
- _file_modes _file_systems _files _find _find_net_interfaces \
- _finger _flac _flex _fmt _fold \
- _fortune _fsh _fuser _gcc _gcore \
- _gdb _gem _genisoimage _getconf _getent \
- _getfacl _getmail _getopt _ghostscript _git \
- _global _global_tags _gnu_generic _gnupod _gnutls \
- _go _gpg _gphoto2 _gprof _gradle \
- _graphicsmagick _grep _groff _groups _growisofs \
- _gsettings _guilt _gzip _have_glob_qual _head \
- _hexdump _host _hostname _hosts _iconv \
- _id _ifconfig _iftop _imagemagick _init_d \
- _initctl _install _iostat _ip _ipsec \
- _irssi _ispell _java _java_class _joe \
- _join _jq _killall _knock _kvno \
- _last _ld_debug _ldconfig _ldd _less \
- _lha _libvirt _links _list_files _lldb \
- _ln _loadkeys _locale _localedef _locales \
- _locate _look _lp _ls _lsof \
- _lua _luarocks _lynx _lz4 _lzop \
- _mail _mailboxes _make _man _md5sum \
- _mencal _mh _mime_types _mkdir _mkfifo \
- _mknod _mktemp _module _monotone _moosic \
- _mosh _mount _mpc _mt _mtools \
- _mtr _mutt _mv _my_accounts _myrepos \
- _mysql_utils _mysqldiff _ncftp _net_interfaces _netcat \
- _netstat _newsgroups _nginx _ngrep _nice \
- _nkf _nl _nm _nmap _npm \
- _nslookup _numfmt _objdump _object_files _od \
- _openstack _other_accounts _pack _pandoc _paste \
- _patch _patchutils _path_commands _path_files _pax \
- _pbm _pdf _perforce _perl _perl_basepods \
- _perl_modules _perldoc _pgrep _php _picocom \
- _pids _pine _ping _pkg-config _pkg_instance \
- _pkgadd _pkginfo _pkgrm _pon _ports \
- _postfix _postgresql _postscript _printenv _printers \
- _process_names _prove _ps _pspdf _psutils \
- _pump _pv _pwgen _pydoc _python \
- _python_modules _qemu _quilt _rake _ranlib \
- _rar _rclone _rcs _readelf _readlink \
- _remote_files _renice _ri _rlogin _rm \
- _rmdir _route _rrdtool _rsync _rubber \
- _ruby _runit _samba _sccs _scons \
- _screen _script _seafile _sed _seq \
- _service _services _setfacl _sh _shasum \
- _showmount _shred _shuf _shutdown _signals \
- _sisu _slrn _smartmontools _socket _sort \
- _spamassassin _split _sqlite _sqsh _ssh \
- _ssh_hosts _stat _stdbuf _stgit _stow \
- _strings _strip _stty _su _subversion \
- _sudo _surfraw _swaks _swanctl _swift \
- _sys_calls _sysctl _tac _tail _tar \
- _tar_archive _tardy _tcpdump _tcptraceroute _tee \
- _telnet _terminals _tex _texi _texinfo \
- _tidy _tiff _tilde_files _time_zone _timeout \
- _tin _tla _tmux _todo.sh _toilet \
- _top _topgit _totd _touch _tput \
- _tr _transmission _tree _truss _tty \
- _ttys _twidge _twisted _umountable _unace \
- _uname _unexpand _uniq _unison _units \
- _uptime _urls _user_admin _user_at_host _users \
- _users_on _vcsh _vim _visudo _vmstat \
- _vorbis _vpnc _w _w3m _watch \
- _wc _webbrowser _wget _whereis _who \
- _whois _wiggle _xargs _xmlsoft _xmlstarlet \
- _xmms2 _xxd _xz _yafc _yodl \
- _yp _zcat _zdump _zfs _zfs_dataset \
- _zfs_keysource_props _zfs_pool _zip _zpool _zsh \
- _acroread _code _dcop _eog _evince \
- _geany _gnome-gv _gqview _gv _kdeconnect \
- _kfmclient _matlab _mozilla _mplayer _mupdf \
- _nautilus _nedit _netscape _okular _pdftk \
- _qiv _rdesktop _setxkbmap _sublimetext _urxvt \
- _vnc _x_arguments _x_borderwidth _x_color _x_colormapid \
- _x_cursor _x_display _x_extension _x_font _x_geometry \
- _x_keysym _x_locale _x_modifier _x_name _x_resource \
- _x_selection_timeout _x_title _x_utils _x_visual _x_window \
- _xauth _xautolock _xclip _xdvi _xfig \
- _xft_fonts _xloadimage _xmodmap _xournal _xpdf \
- _xrandr _xscreensaver _xset _xt_arguments _xt_session_id \
- _xterm _xv _xwit _zeal _add-zle-hook-widget \
- _add-zsh-hook _alias _aliases _arrays _assign \
- _autocd _bindkey _brace_parameter _builtin _cd \
- _command _command_names _compadd _compdef _completers \
- _condition _default _delimiters _directory_stack _dirs \
- _disable _dynamic_directory_name _echotc _echoti _emulate \
- _enable _equal _exec _fc _file_descriptors \
- _first _functions _globflags _globqual_delims _globquals \
- _hash _history_modifiers _in_vared _jobs _jobs_bg \
- _jobs_builtin _jobs_fg _kill _limit _limits \
- _math _math_params _mere _module_math_func _options \
- _options_set _options_unset _parameter _parameters _precommand \
- _print _prompt _ps1234 _read _redirect \
- _run-help _sched _set _setopt _source \
- _strftime _subscript _suffix_alias_files _tcpsys _tilde \
- _trap _ttyctl _typeset _ulimit _unhash \
- _user_math_func _value _vared _vars _wait \
- _which _widgets _zargs _zattr _zcalc \
- _zcalc_line _zcompile _zed _zftp _zle \
- _zmodload _zmv _zparseopts _zpty _zsh-mime-handler \
- _zsocket _zstyle _ztodo
+autoload -Uz _bluetoothctl _bootctl _busctl _bwrap _cargo \
+ _code _code-oss _colorscript _coredumpctl _curl \
+ _email-notmuch _hg _hostnamectl _journalctl _kernel-install \
+ _kitty _libinput _localectl _loginctl _machinectl \
+ _mkinitcpio _mpv _netctl _networkctl _notmuch \
+ _pacman _pass _pulseaudio _resolvectl _rg \
+ _sd_hosts_or_user_at_host _sd_machines _sd_outputmodes _sd_unit_files _systemctl \
+ _systemd _systemd-analyze _systemd-delta _systemd-inhibit _systemd-nspawn \
+ _systemd-path _systemd-run _systemd-tmpfiles _timedatectl _udevadm \
+ _xss-lock _xwallpaper _yay _youtube-dl _zathura \
+ _cdr _all_labels _all_matches _alternative _approximate \
+ _arg_compile _arguments _bash_completions _cache_invalid _call_function \
+ _combination _comp_locale _complete _complete_debug _complete_help \
+ _complete_help_generic _complete_tag _correct _correct_filename _correct_word \
+ _describe _description _dispatch _expand _expand_alias \
+ _expand_word _extensions _external_pwds _generic _guard \
+ _history _history_complete_word _ignored _list _main_complete \
+ _match _menu _message _most_recent_file _multi_parts \
+ _next_label _next_tags _normal _nothing _oldlist \
+ _pick_variant _prefix _read_comp _regex_arguments _regex_words \
+ _requested _retrieve_cache _sep_parts _sequence _set_command \
+ _setup _store_cache _sub_commands _tags _user_expand \
+ _values _wanted _acpi _acpitool _alsa-utils \
+ _analyseplugin _brctl _btrfs _chattr _chcon \
+ _chrt _cpupower _cryptsetup _dkms _e2label \
+ _ethtool _findmnt _free _fuse_arguments _fuse_values \
+ _fusermount _gpasswd _htop _iconvconfig _ionice \
+ _ipset _iptables _iwconfig _kpartx _losetup \
+ _lsattr _lsblk _lsusb _ltrace _mdadm \
+ _mii-tool _modutils _mondo _networkmanager _opkg \
+ _pidof _pmap _qdbus _schedtool _selinux_contexts \
+ _selinux_roles _selinux_types _selinux_users _setsid _slabtop \
+ _ss _sshfs _strace _sysstat _tload \
+ _tpb _tracepath _tune2fs _uml _valgrind \
+ _vserver _wakeup_capable_devices _wipefs _wpa_cli _a2ps \
+ _aap _abcde _absolute_command_paths _ack _adb \
+ _ansible _ant _antiword _apachectl _apm \
+ _arch_archives _arch_namespace _arp _arping _asciidoctor \
+ _asciinema _at _attr _augeas _avahi \
+ _awk _base64 _basename _bash _baudrates \
+ _baz _beep _bibtex _bind_addresses _bison \
+ _bittorrent _bogofilter _bpf_filters _bpython _bzip2 \
+ _bzr _cabal _cal _calendar _canonical_paths \
+ _cat _ccal _cdcd _cdrdao _cdrecord \
+ _chkconfig _chmod _chown _chroot _chsh \
+ _cksum _clay _cmdambivalent _cmdstring _cmp \
+ _column _comm _composer _compress _configure \
+ _cowsay _cp _cpio _cplay _crontab \
+ _cscope _cssh _ctags_tags _curl _cut \
+ _cvs _darcs _date _date_formats _dates \
+ _dbus _dconf _dd _devtodo _df \
+ _dhclient _dict _dict_words _diff _diff3 \
+ _diff_options _diffstat _dig _dir_list _directories \
+ _django _dmesg _dmidecode _dns_types _doas \
+ _domains _dos2unix _drill _dsh _dtruss \
+ _du _dvi _ecasound _ed _elfdump \
+ _elinks _email_addresses _enscript _entr _env \
+ _espeak _etags _fakeroot _feh _fetchmail \
+ _ffmpeg _figlet _file_modes _file_systems _files \
+ _find _find_net_interfaces _finger _flac _flex \
+ _fmt _fold _fortune _fsh _fuser \
+ _gcc _gcore _gdb _gem _genisoimage \
+ _getconf _getent _getfacl _getmail _getopt \
+ _ghostscript _git _global _global_tags _gnu_generic \
+ _gnupod _gnutls _go _gpg _gphoto2 \
+ _gprof _gradle _graphicsmagick _grep _groff \
+ _groups _growisofs _gsettings _guilt _gzip \
+ _have_glob_qual _head _hexdump _host _hostname \
+ _hosts _iconv _id _ifconfig _iftop \
+ _imagemagick _init_d _initctl _install _iostat \
+ _ip _ipsec _irssi _ispell _java \
+ _java_class _joe _join _jq _killall \
+ _knock _kvno _last _ld_debug _ldconfig \
+ _ldd _less _lha _libvirt _links \
+ _list_files _lldb _ln _loadkeys _locale \
+ _localedef _locales _locate _look _lp \
+ _ls _lsof _lua _luarocks _lynx \
+ _lz4 _lzop _mail _mailboxes _make \
+ _man _md5sum _mencal _mh _mime_types \
+ _mkdir _mkfifo _mknod _mktemp _module \
+ _monotone _moosic _mosh _mount _mpc \
+ _mt _mtools _mtr _mutt _mv \
+ _my_accounts _myrepos _mysql_utils _mysqldiff _ncftp \
+ _net_interfaces _netcat _netstat _newsgroups _nginx \
+ _ngrep _nice _nkf _nl _nm \
+ _nmap _npm _nslookup _numfmt _objdump \
+ _object_files _od _openstack _other_accounts _pack \
+ _pandoc _paste _patch _patchutils _path_commands \
+ _path_files _pax _pbm _pdf _perforce \
+ _perl _perl_basepods _perl_modules _perldoc _pgrep \
+ _php _picocom _pids _pine _ping \
+ _pkg-config _pkg_instance _pkgadd _pkginfo _pkgrm \
+ _pon _ports _postfix _postgresql _postscript \
+ _printenv _printers _process_names _prove _ps \
+ _pspdf _psutils _pump _pv _pwgen \
+ _pydoc _python _python_modules _qemu _quilt \
+ _rake _ranlib _rar _rclone _rcs \
+ _readelf _readlink _remote_files _renice _ri \
+ _rlogin _rm _rmdir _route _rrdtool \
+ _rsync _rubber _ruby _runit _samba \
+ _sccs _scons _screen _script _seafile \
+ _sed _seq _service _services _setfacl \
+ _sh _shasum _showmount _shred _shuf \
+ _shutdown _signals _sisu _slrn _smartmontools \
+ _socket _sort _spamassassin _split _sqlite \
+ _sqsh _ssh _ssh_hosts _stat _stdbuf \
+ _stgit _stow _strings _strip _stty \
+ _su _subversion _sudo _surfraw _swaks \
+ _swanctl _swift _sys_calls _sysctl _tac \
+ _tail _tar _tar_archive _tardy _tcpdump \
+ _tcptraceroute _tee _telnet _terminals _tex \
+ _texi _texinfo _tidy _tiff _tilde_files \
+ _time_zone _timeout _tin _tla _tmux \
+ _todo.sh _toilet _top _topgit _totd \
+ _touch _tput _tr _transmission _tree \
+ _truss _tty _ttys _twidge _twisted \
+ _umountable _unace _uname _unexpand _uniq \
+ _unison _units _uptime _urls _user_admin \
+ _user_at_host _users _users_on _vcsh _vim \
+ _visudo _vmstat _vorbis _vpnc _w \
+ _w3m _watch _wc _webbrowser _wget \
+ _whereis _who _whois _wiggle _xargs \
+ _xmlsoft _xmlstarlet _xmms2 _xxd _xz \
+ _yafc _yodl _yp _zcat _zdump \
+ _zfs _zfs_dataset _zfs_keysource_props _zfs_pool _zip \
+ _zpool _zsh _acroread _code _dcop \
+ _eog _evince _geany _gnome-gv _gqview \
+ _gv _kdeconnect _kfmclient _matlab _mozilla \
+ _mplayer _mupdf _nautilus _nedit _netscape \
+ _okular _pdftk _qiv _rdesktop _setxkbmap \
+ _sublimetext _urxvt _vnc _x_arguments _x_borderwidth \
+ _x_color _x_colormapid _x_cursor _x_display _x_extension \
+ _x_font _x_geometry _x_keysym _x_locale _x_modifier \
+ _x_name _x_resource _x_selection_timeout _x_title _x_utils \
+ _x_visual _x_window _xauth _xautolock _xclip \
+ _xdvi _xfig _xft_fonts _xloadimage _xmodmap \
+ _xournal _xpdf _xrandr _xscreensaver _xset \
+ _xt_arguments _xt_session_id _xterm _xv _xwit \
+ _zeal _add-zle-hook-widget _add-zsh-hook _alias _aliases \
+ _arrays _assign _autocd _bindkey _brace_parameter \
+ _builtin _cd _command _command_names _compadd \
+ _compdef _completers _condition _default _delimiters \
+ _directory_stack _dirs _disable _dynamic_directory_name _echotc \
+ _echoti _emulate _enable _equal _exec \
+ _fc _file_descriptors _first _functions _globflags \
+ _globqual_delims _globquals _hash _history_modifiers _in_vared \
+ _jobs _jobs_bg _jobs_builtin _jobs_fg _kill \
+ _limit _limits _math _math_params _mere \
+ _module_math_func _options _options_set _options_unset _parameter \
+ _parameters _precommand _print _prompt _ps1234 \
+ _read _redirect _run-help _sched _set \
+ _setopt _source _strftime _subscript _suffix_alias_files \
+ _tcpsys _tilde _trap _ttyctl _typeset \
+ _ulimit _unhash _user_math_func _value _vared \
+ _vars _wait _which _widgets _zargs \
+ _zattr _zcalc _zcalc_line _zcompile _zed \
+ _zftp _zle _zmodload _zmv _zparseopts \
+ _zpty _zsh-mime-handler _zsocket _zstyle _ztodo
autoload -Uz +X _call_program
typeset -gUa _comp_assocs
diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc
index 7f0341f..ca38703 100644
--- a/.config/zsh/.zshrc
+++ b/.config/zsh/.zshrc
@@ -1,49 +1,55 @@
# Luke's config for the Zoomer Shell
+#
+parse_git_branch() {
+ git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
+}
-autoload -U colors && colors
-PS1="%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%M %{$fg[magenta]%}%~ %{$fg[red]%}] %{$reset_color%}$%b "
+# Enable colors and change prompt:
+autoload -U colors && colors # Load colors
+setopt prompt_subst
+setopt autocd # Automatically cd into typed directory.
+stty stop undef # Disable ctrl-s to freeze terminal.
+setopt interactive_comments
+autoload -U promptinit
+promptinit
+PROMPT="%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%M %{$fg[magenta]%}%~%{$fg[red]%}]\$(parse_git_branch)%{$reset_color%} $%b "
-source $HOME/.functions
+# History in cache directory:
+HISTSIZE=10000000
+SAVEHIST=10000000
+HISTFILE=~/.cache/zsh/history
# Load aliases and shortcuts if existent.
-#[ -f "$HOME/.config/shortcutrc" ] && source "$HOME/.config/shortcutrc"
-# [ -f "$HOME/.config/aliasrc" ] && source "$HOME/.config/aliasrc"
+# [ -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc" ] && source "${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc"
+[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/aliasrc" ] && source "${XDG_CONFIG_HOME:-$HOME/.config}/shell/aliasrc"
+# [ -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/zshnameddirrc" ] && source "${XDG_CONFIG_HOME:-$HOME/.config}/shell/zshnameddirrc"
+# Basic auto/tab complete:
autoload -U compinit
zstyle ':completion:*' menu select
zmodload zsh/complist
compinit
+_comp_options+=(globdots) # Include hidden files.
-# Include hidden files in autocomplete:
-_comp_options+=(globdots)
-
+# vi mode
+bindkey -v
export KEYTIMEOUT=1
# Change cursor shape for different vi modes.
-function zle-keymap-select {
- if [[ ${KEYMAP} == vicmd ]] ||
- [[ $1 = 'block' ]]; then
- echo -ne '\e[1 q'
-
- elif [[ ${KEYMAP} == main ]] ||
- [[ ${KEYMAP} == viins ]] ||
- [[ ${KEYMAP} = '' ]] ||
- [[ $1 = 'beam' ]]; then
- echo -ne '\e[5 q'
- fi
+function zle-keymap-select () {
+ case $KEYMAP in
+ vicmd) echo -ne '\e[1 q';; # block
+ viins|main) echo -ne '\e[5 q';; # beam
+ esac
}
zle -N zle-keymap-select
-
zle-line-init() {
zle -K viins # initiate `vi insert` as keymap (can be removed if `bindkey -V` has been set elsewhere)
echo -ne "\e[5 q"
}
zle -N zle-line-init
-
-# Use beam shape cursor on startup.
-echo -ne '\e[5 q'
-# Use beam shape cursor for each new prompt.
-preexec() { echo -ne '\e[5 q' ;}
+echo -ne '\e[5 q' # Use beam shape cursor on startup.
+preexec() { echo -ne '\e[5 q' ;} # Use beam shape cursor for each new prompt.
# Use lf to switch directories and bind it to ctrl-o
lfcd () {
@@ -51,17 +57,78 @@ lfcd () {
lf -last-dir-path="$tmp" "$@"
if [ -f "$tmp" ]; then
dir="$(cat "$tmp")"
- rm -f "$tmp"
- if [ -d "$dir" ]; then
- if [ "$dir" != "$(pwd)" ]; then
- cd "$dir"
- fi
- fi
+ rm -f "$tmp" >/dev/null
+ [ -d "$dir" ] && [ "$dir" != "$(pwd)" ] && cd "$dir"
fi
}
-bindkey -s '^o' 'lfcd\n' # zsh
+bindkey -s '^o' 'ranger_cd\n'
+
+bindkey -s '^a' 'bc -lq\n'
+
+bindkey -s '^f' 'cd "$(dirname "$(fzf)")"\n'
+
+bindkey '^[[P' delete-char
-alias vim='nvim'
+# Edit line in vim with ctrl-e:
+autoload edit-command-line; zle -N edit-command-line
+bindkey '^e' edit-command-line
-# Load zsh-syntax-highlighting; should be last.
-# source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh 2>/dev/null
+# Load syntax highlighting; should be last.
+source /usr/share/zsh/plugins/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh 2>/dev/null
+
+alias books="cd $HOME/Documents/books"
+alias calcurse="calcurse -D ~/.config/calcurse"
+alias cdgo="cd $HOME/code/go/src/git.jacksontaylor.xyz"
+alias code="cd $HOME/code"
+alias dox="cd $HOME/Documents"
+alias dl="cd $HOME/Downloads"
+alias gs="git status"
+alias jojo="cd $HOME/Documents/books/manga/jojos_bizarre_adventure"
+alias ll="ls -lAh"
+alias ls="ls -hA --color=auto --group-directories-first"
+alias music-dl="youtube-dl -x --audio-format mp3 "
+alias music_info="python3 -m music_tag --print"
+# alias music="cd $HOME/Music"
+alias pix="cd $HOME/Pictures"
+alias ranger="ranger_cd"
+alias site="cd ~/code/jacksontaylor.xyz"
+alias up="cd ../"
+alias vim="nvim"
+alias vrc="vim ~/.config/nvim/init.vim"
+alias wiki="nvim +VimwikiIndex"
+alias diary="nvim +Diary"
+alias xmpp="$TERMINAL -e profanity"
+alias wisecow='clear && fortune | cowsay'
+
+alias \
+ cp="cp -iv" \
+ mv="mv -iv" \
+ rm="rm -vI" \
+ bc="bc -ql" \
+ mkd="mkdir -pv" \
+ yt="youtube-dl --add-metadata -i" \
+ yta="yt -x -f bestaudio/best" \
+ ffmpeg="ffmpeg -hide_banner"
+
+alias \
+ grep="grep --color=auto" \
+ diff="diff --color=auto" \
+ ccat="highlight --out-format=ansi"
+
+source /usr/share/doc/mcfly/mcfly.zsh
+
+# Function to cd to last open dir in ranger
+ranger_cd() {
+ temp_file="$(mktemp -t "ranger_cd.XXXXXXXXXX")"
+ ranger="${1:-ranger}"
+ if [ -n "$1" ]; then
+ shift
+ fi
+ "$ranger" --choosedir="$temp_file" -- "${@:-$PWD}"
+ return_value="$?"
+ if chosen_dir="$(cat -- "$temp_file")" && [ -n "$chosen_dir" ] && [ "$chosen_dir" != "$PWD" ]; then
+ cd -- "$chosen_dir"
+ fi
+ rm -f -- "$temp_file"
+ return "$return_value"
+}