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/zscripts | |
parent | 6cf13aeebf0d2c6c396ff230578101cbd5c0494f (diff) | |
parent | 259d50a2a18daae577ff3c80bd0285a0357f0a53 (diff) | |
download | dotconfig-b8afc0ee37255aa00c68ab70220d2c957c205e64.tar.xz dotconfig-b8afc0ee37255aa00c68ab70220d2c957c205e64.zip |
merge laptop config with desktop
Diffstat (limited to 'zsh/zscripts')
-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 |
6 files changed, 23 insertions, 30 deletions
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} %~)" +} |