summaryrefslogtreecommitdiff
path: root/zsh
diff options
context:
space:
mode:
Diffstat (limited to 'zsh')
-rwxr-xr-xzsh/zprofile5
-rwxr-xr-xzsh/zscripts/aliasrc.zsh10
-rwxr-xr-xzsh/zscripts/hosts/aliasrc.desktop.zsh (renamed from zsh/zscripts/hosts/aliasrc.fedora.zsh)0
-rwxr-xr-xzsh/zscripts/hosts/colors.desktop.zsh (renamed from zsh/zscripts/hosts/colors.fedora.zsh)0
-rwxr-xr-xzsh/zscripts/keybindrc.zsh27
-rwxr-xr-xzsh/zscripts/shortcuts.zsh8
-rwxr-xr-xzsh/zscripts/terminalname.zsh8
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} %~)"
+}