diff options
author | Timmy Keller <tjk@tjkeller.xyz> | 2023-09-22 10:15:12 -0500 |
---|---|---|
committer | Timmy Keller <tjk@tjkeller.xyz> | 2023-09-22 10:15:12 -0500 |
commit | b8afc0ee37255aa00c68ab70220d2c957c205e64 (patch) | |
tree | 451ab664d8e51db41d04eef37a4f0a99c48b55a6 /zsh | |
parent | 6cf13aeebf0d2c6c396ff230578101cbd5c0494f (diff) | |
parent | 259d50a2a18daae577ff3c80bd0285a0357f0a53 (diff) | |
download | dotconfig-b8afc0ee37255aa00c68ab70220d2c957c205e64.tar.xz dotconfig-b8afc0ee37255aa00c68ab70220d2c957c205e64.zip |
merge laptop config with desktop
Diffstat (limited to 'zsh')
-rwxr-xr-x | zsh/zprofile | 5 | ||||
-rwxr-xr-x | zsh/zscripts/aliasrc.zsh | 10 | ||||
-rwxr-xr-x | zsh/zscripts/hosts/aliasrc.desktop.zsh (renamed from zsh/zscripts/hosts/aliasrc.fedora.zsh) | 0 | ||||
-rwxr-xr-x | zsh/zscripts/hosts/colors.desktop.zsh (renamed from zsh/zscripts/hosts/colors.fedora.zsh) | 0 | ||||
-rwxr-xr-x | zsh/zscripts/keybindrc.zsh | 27 | ||||
-rwxr-xr-x | zsh/zscripts/shortcuts.zsh | 8 | ||||
-rwxr-xr-x | zsh/zscripts/terminalname.zsh | 8 |
7 files changed, 28 insertions, 30 deletions
diff --git a/zsh/zprofile b/zsh/zprofile index 209e56a..33e2e01 100755 --- a/zsh/zprofile +++ b/zsh/zprofile @@ -11,9 +11,12 @@ export SUDO='doas' # Make programs follow the XDG base directory specification export XDG_CACHE_HOME="$HOME/.cache" +export ANSIBLE_GALAXY_CACHE_DIR="${XDG_CACHE_HOME}/ansible/galaxy_cache" export XAUTHORITY="$XDG_CACHE_HOME/Xauthority" export XDG_CONFIG_HOME="$HOME/.config" +export ANSIBLE_HOME="${XDG_CONFIG_HOME}/ansible" +export ANSIBLE_CONFIG="${XDG_CONFIG_HOME}/ansible.cfg" export GTK2_RC_FILES="$XDG_CONFIG_HOME/gtk-2.0/gtkrc" export MBSYNCRC="$XDG_CONFIG_HOME/mbsync/config" export NOTMUCH_CONFIG="$XDG_CONFIG_HOME/notmuch/config" @@ -26,6 +29,7 @@ export CARGO_HOME="$XDG_DATA_HOME/cargo" export GNUPGHOME="$XDG_DATA_HOME/gnupg" export GRADLE_USER_HOME="$XDG_DATA_HOME/gradle" export PASSWORD_STORE_DIR="$XDG_DATA_HOME/password-store" +export PYTHONUSERBASE="$XDG_DATA_HOME/python" export _JAVA_OPTIONS="-Djava.util.prefs.userRoot=$XDG_DATA_HOME/java" export XDG_STATE_HOME="$HOME/.local/state" @@ -36,6 +40,7 @@ export ZHISTFILE="$XDG_STATE_HOME/zsh/zhistory" # Used to set HISTFILE in zshrc for lbin in "$HOME/.local/bin"{/,/*/}; do export PATH="${lbin%/}:$PATH"; done 2>/dev/null # Add ~/.local/bin and all sub dirs export PATH="$HOME/.local/opt:$PATH" export PATH="$CARGO_HOME/bin:$PATH" +export PATH="$PYTHONUSERBASE/bin:$PATH" # Theming export QT_QPA_PLATFORMTHEME='qt5ct' diff --git a/zsh/zscripts/aliasrc.zsh b/zsh/zscripts/aliasrc.zsh index 842d634..049c9c7 100755 --- a/zsh/zscripts/aliasrc.zsh +++ b/zsh/zscripts/aliasrc.zsh @@ -18,16 +18,6 @@ alias \ smi="sudo make install" \ su="sudo su -l" \ -# Quick navigate to directories / open specific files -alias \ - cdc="cd ~/.local/src/programs" \ - cds="cd ~/.local/bin" \ - cdw="cd ~/.local/src/sites" \ - hw="cd ~/docs/school" \ - vrc="vim ~/.config/nvim/init.vim" \ - xrc="cd ~/.config/x11" \ - zrc="cd ~/.config/zsh" \ - # Power scripts alias \ halt="launch shutdown" \ diff --git a/zsh/zscripts/hosts/aliasrc.fedora.zsh b/zsh/zscripts/hosts/aliasrc.desktop.zsh index 141212f..141212f 100755 --- a/zsh/zscripts/hosts/aliasrc.fedora.zsh +++ b/zsh/zscripts/hosts/aliasrc.desktop.zsh diff --git a/zsh/zscripts/hosts/colors.fedora.zsh b/zsh/zscripts/hosts/colors.desktop.zsh index dee7ed3..dee7ed3 100755 --- a/zsh/zscripts/hosts/colors.fedora.zsh +++ b/zsh/zscripts/hosts/colors.desktop.zsh diff --git a/zsh/zscripts/keybindrc.zsh b/zsh/zscripts/keybindrc.zsh index 5e6ee83..2f2e664 100755 --- a/zsh/zscripts/keybindrc.zsh +++ b/zsh/zscripts/keybindrc.zsh @@ -6,24 +6,19 @@ KEYTIMEOUT=1 # Keybindings autoload edit-command-line; zle -N edit-command-line # Edit line in Vim buffer -bindkey '^E' edit-command-line # Ctrl-e - edit line in Vim buffer +bindkey '^E' edit-command-line # Ctrl-e - edit line in Vim buffer -bindkey '^[[P' delete-char # Delete Key -bindkey '^[[4~' end-of-line # End Key -bindkey '^[[H' beginning-of-line # Home Key -bindkey '^[[4h' overwrite-mode # Insert Key -bindkey '^D' kill-whole-line # Ctrl-d - delete line -bindkey '^X' clear-screen # Ctrl-x - clear screen -bindkey '^H' backward-delete-word # Ctrl-Backspace - delete entire word behind cursor -bindkey '^[[M' delete-word # Ctrl-Delete - delete currect word in front of the cursor +bindkey '^[[P' delete-char # Delete Key +bindkey '^[[F' end-of-line # End Key +bindkey '^[[H' beginning-of-line # Home Key +bindkey '^[[2~' overwrite-mode # Insert Key +bindkey '^D' kill-whole-line # Ctrl-d - delete line +bindkey '^X' clear-screen # Ctrl-x - clear screen +bindkey '^H' backward-delete-word # Ctrl-Backspace - delete entire word behind cursor +bindkey '^[[3;5~' delete-word # Ctrl-Delete - delete currect word in front of the cursor # History completion -bindkey '\e[A' history-search-backward # Up arrow - seach history backwards -bindkey '\e[B' history-search-forward # Down arrow - seach history forwards -# Ctrl-vi keys emulate arrow keys -#bindkey '^L' emacs-forward-word # Ctrl-H - go forward one word -#bindkey '^J' history-search-forward # Ctrl-J - seach history backwards -#bindkey '^K' history-search-backward # Ctrl-K - seach history forwards -#bindkey '^H' emacs-backward-word # Ctrl-L - go back one word +bindkey '\e[A' history-search-backward # Up arrow - seach history backwards +bindkey '\e[B' history-search-forward # Down arrow - seach history forwards # Ignore ctrl-d to exit shell setopt IGNORE_EOF diff --git a/zsh/zscripts/shortcuts.zsh b/zsh/zscripts/shortcuts.zsh index fb34337..214b7f7 100755 --- a/zsh/zscripts/shortcuts.zsh +++ b/zsh/zscripts/shortcuts.zsh @@ -1,11 +1,11 @@ #!/usr/bin/env zsh +# TODO make this script more comprehensive to allow real aliases for directories # Quick navigate to directories / open specific files alias \ - cdc="cd ~/.local/src/programs" \ - cds="cd ~/.local/bin" \ - cdw="cd ~/.local/src/sites" \ - hw="cd ~/docs/school" \ + cdc="cd ~/docs/src/programs" \ + cds="cd ~/docs/src/scripts" \ + cdw="cd ~/docs/src/sites" \ vrc="vim ~/.config/nvim/init.vim" \ xrc="cd ~/.config/x11" \ zrc="cd ~/.config/zsh" \ diff --git a/zsh/zscripts/terminalname.zsh b/zsh/zscripts/terminalname.zsh new file mode 100755 index 0000000..6e55d22 --- /dev/null +++ b/zsh/zscripts/terminalname.zsh @@ -0,0 +1,8 @@ +function xtitle () { + builtin print -n -- "\e]0;$@\a" +} + +# Updates the window title whenever a command is run +function precmd () { + xtitle "$(print -P ${USER}@${HOST} %~)" +} |