From 394204d20c551cc428c24ded331ef812ef3e6653 Mon Sep 17 00:00:00 2001 From: Timmy Keller Date: Sat, 9 Sep 2023 08:51:32 -0500 Subject: script to change terminal window name to match prompt --- zsh/zscripts/terminalname.zsh | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 zsh/zscripts/terminalname.zsh diff --git a/zsh/zscripts/terminalname.zsh b/zsh/zscripts/terminalname.zsh new file mode 100644 index 0000000..8543896 --- /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} %2~)" +} -- cgit v1.2.3 From ea3f4043c4895f51a519adca6c73d7b389007f8e Mon Sep 17 00:00:00 2001 From: Timmy Keller Date: Sat, 9 Sep 2023 09:09:08 -0500 Subject: change keybindings to work with zsh and clean up spacing --- zsh/zscripts/keybindrc.zsh | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) 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 -- cgit v1.2.3 From 6ec15506528b34bb2c0891026f7d20cf545f4ef3 Mon Sep 17 00:00:00 2001 From: Timmy Keller Date: Sat, 9 Sep 2023 09:17:19 -0500 Subject: add alacritty config --- alacritty/alacritty.yml | 54 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 alacritty/alacritty.yml diff --git a/alacritty/alacritty.yml b/alacritty/alacritty.yml new file mode 100644 index 0000000..b3af705 --- /dev/null +++ b/alacritty/alacritty.yml @@ -0,0 +1,54 @@ +import: + - ~/.config/alacritty/extra.yml + +env: + TERM: xterm-256color # Work will legacy applications and ssh + +window: + title: Terminal + dynamic_title: true + + class: + instance: Alacritty + general: st # Show as st in window manager because that's what i'm used to + + dynamic_padding: true + +font: + normal: + family: JetBrainsMonoNL Nerd Font Mono + size: 12 + +colors: + primary: + background: "#101010" + foreground: "#ffffff" + + normal: + black: "#101010" + red: "#ed1207" + green: "#2bb500" + yellow: "#fc9700" + blue: "#1578c1" + magenta: "#b14ff7" + cyan: "#00c4a3" + white: "#ffffff" + + bright: + black: "#7f7f7f" + red: "#ed1207" + green: "#2bb500" + yellow: "#fc9700" + blue: "#1578c1" + magenta: "#b14ff7" + cyan: "#00c4a3" + white: "#ffffff" + +cursor: + style: + blinking: Never + +mouse_bindings: + - { mouse: Right, action: PasteSelection } + + -- cgit v1.2.3 From 2ffec4661917cacf20075c42cd04e25d6f5dc42b Mon Sep 17 00:00:00 2001 From: Timmy Keller Date: Sat, 9 Sep 2023 09:17:52 -0500 Subject: dont ignore alacritty --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index a142a36..884d3c3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ /* !.gitignore +!alacritty !dunst !git !htop -- cgit v1.2.3 From dfeee1fa12729f010d11a4e6e8c9f12e06cd6d5b Mon Sep 17 00:00:00 2001 From: Timmy Keller Date: Sat, 9 Sep 2023 09:18:29 -0500 Subject: remove unnessesary line in xprofile --- x11/xprofile | 1 - 1 file changed, 1 deletion(-) diff --git a/x11/xprofile b/x11/xprofile index 611a04f..9e96b65 100755 --- a/x11/xprofile +++ b/x11/xprofile @@ -1,5 +1,4 @@ #!/bin/sh -#xrdb -merge $X11CONFIG/Xresources.$(hostname) 2>/dev/null & xrdbpid=$! xrdb -merge $X11CONFIG/Xresources -merge $X11CONFIG/Xresources.$(hostname) 2>/dev/null & xrdbpid=$! redshift & seasonalwallpaper & -- cgit v1.2.3 From a78d9dd25c4c2d988b425ea0ed3dc190867cd7ca Mon Sep 17 00:00:00 2001 From: Timmy Keller Date: Sat, 9 Sep 2023 10:32:30 -0500 Subject: infinite length path in window title and make script executable --- zsh/zscripts/terminalname.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 zsh/zscripts/terminalname.zsh diff --git a/zsh/zscripts/terminalname.zsh b/zsh/zscripts/terminalname.zsh old mode 100644 new mode 100755 index 8543896..6e55d22 --- a/zsh/zscripts/terminalname.zsh +++ b/zsh/zscripts/terminalname.zsh @@ -4,5 +4,5 @@ function xtitle () { # Updates the window title whenever a command is run function precmd () { - xtitle "$(print -P ${USER}@${HOST} %2~)" + xtitle "$(print -P ${USER}@${HOST} %~)" } -- cgit v1.2.3 From a9e3e3057ddfae2ae2393868febe8dfa0c4fb58f Mon Sep 17 00:00:00 2001 From: Timmy Keller Date: Sat, 9 Sep 2023 10:37:34 -0500 Subject: reflect changing hostname fedora to desktop --- x11/Xresources.desktop | 4 ++++ x11/Xresources.fedora | 4 ---- zsh/zscripts/hosts/aliasrc.desktop.zsh | 12 ++++++++++++ zsh/zscripts/hosts/aliasrc.fedora.zsh | 12 ------------ zsh/zscripts/hosts/colors.desktop.zsh | 9 +++++++++ zsh/zscripts/hosts/colors.fedora.zsh | 9 --------- 6 files changed, 25 insertions(+), 25 deletions(-) create mode 100755 x11/Xresources.desktop delete mode 100755 x11/Xresources.fedora create mode 100755 zsh/zscripts/hosts/aliasrc.desktop.zsh delete mode 100755 zsh/zscripts/hosts/aliasrc.fedora.zsh create mode 100755 zsh/zscripts/hosts/colors.desktop.zsh delete mode 100755 zsh/zscripts/hosts/colors.fedora.zsh diff --git a/x11/Xresources.desktop b/x11/Xresources.desktop new file mode 100755 index 0000000..c89a8e1 --- /dev/null +++ b/x11/Xresources.desktop @@ -0,0 +1,4 @@ +Xft.dpi: 144 + +Xcursor.theme: default +Xcursor.size: 36 diff --git a/x11/Xresources.fedora b/x11/Xresources.fedora deleted file mode 100755 index c89a8e1..0000000 --- a/x11/Xresources.fedora +++ /dev/null @@ -1,4 +0,0 @@ -Xft.dpi: 144 - -Xcursor.theme: default -Xcursor.size: 36 diff --git a/zsh/zscripts/hosts/aliasrc.desktop.zsh b/zsh/zscripts/hosts/aliasrc.desktop.zsh new file mode 100755 index 0000000..141212f --- /dev/null +++ b/zsh/zscripts/hosts/aliasrc.desktop.zsh @@ -0,0 +1,12 @@ +#!/bin/sh + +# Package Management +alias \ + d="sudo dnf" \ + dnf="sudo dnf" \ + +# Shorten program names +alias \ + systemctl="sudo systemctl" \ + sd="systemctl" \ + diff --git a/zsh/zscripts/hosts/aliasrc.fedora.zsh b/zsh/zscripts/hosts/aliasrc.fedora.zsh deleted file mode 100755 index 141212f..0000000 --- a/zsh/zscripts/hosts/aliasrc.fedora.zsh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh - -# Package Management -alias \ - d="sudo dnf" \ - dnf="sudo dnf" \ - -# Shorten program names -alias \ - systemctl="sudo systemctl" \ - sd="systemctl" \ - diff --git a/zsh/zscripts/hosts/colors.desktop.zsh b/zsh/zscripts/hosts/colors.desktop.zsh new file mode 100755 index 0000000..dee7ed3 --- /dev/null +++ b/zsh/zscripts/hosts/colors.desktop.zsh @@ -0,0 +1,9 @@ +#!/usr/bin/env zsh + +if [ -n "$DISPLAY" ]; then + declare col{br,at}=57 + declare col{name,host}=13 + coldir=129 +else + declare col{br,name,at,host,dir}=magenta +fi diff --git a/zsh/zscripts/hosts/colors.fedora.zsh b/zsh/zscripts/hosts/colors.fedora.zsh deleted file mode 100755 index dee7ed3..0000000 --- a/zsh/zscripts/hosts/colors.fedora.zsh +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env zsh - -if [ -n "$DISPLAY" ]; then - declare col{br,at}=57 - declare col{name,host}=13 - coldir=129 -else - declare col{br,name,at,host,dir}=magenta -fi -- cgit v1.2.3 From 39628ca7cf62383a39525f1945ebab7a6319465f Mon Sep 17 00:00:00 2001 From: Timmy Keller Date: Sat, 9 Sep 2023 19:52:48 -0500 Subject: change pythonuserbase to .local/bin/python and add bin to path --- zsh/zprofile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/zsh/zprofile b/zsh/zprofile index 209e56a..2049165 100755 --- a/zsh/zprofile +++ b/zsh/zprofile @@ -26,6 +26,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 +37,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' -- cgit v1.2.3 From 866f16893ddd51c06f4b30211a6156d5f09453bb Mon Sep 17 00:00:00 2001 From: Timmy Keller Date: Sat, 9 Sep 2023 21:02:02 -0500 Subject: cdc cdw cds direct to docs/src now --- zsh/zscripts/aliasrc.zsh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/zsh/zscripts/aliasrc.zsh b/zsh/zscripts/aliasrc.zsh index 842d634..9c0e659 100755 --- a/zsh/zscripts/aliasrc.zsh +++ b/zsh/zscripts/aliasrc.zsh @@ -20,10 +20,9 @@ alias \ # 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/bin" \ + cdw="cd ~/docs/src/sites" \ vrc="vim ~/.config/nvim/init.vim" \ xrc="cd ~/.config/x11" \ zrc="cd ~/.config/zsh" \ -- cgit v1.2.3 From 503e1c3ad21a5367fe2d5c988afac30fa16f5f60 Mon Sep 17 00:00:00 2001 From: Timmy Keller Date: Sun, 10 Sep 2023 10:17:30 -0500 Subject: move ansible files from home dir --- zsh/zprofile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/zsh/zprofile b/zsh/zprofile index 2049165..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" -- cgit v1.2.3 From 259d50a2a18daae577ff3c80bd0285a0357f0a53 Mon Sep 17 00:00:00 2001 From: Timmy Keller Date: Mon, 11 Sep 2023 12:05:45 -0500 Subject: move shortcut aliases to shortcuts.zsh --- zsh/zscripts/aliasrc.zsh | 9 --------- zsh/zscripts/shortcuts.zsh | 8 ++++---- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/zsh/zscripts/aliasrc.zsh b/zsh/zscripts/aliasrc.zsh index 9c0e659..049c9c7 100755 --- a/zsh/zscripts/aliasrc.zsh +++ b/zsh/zscripts/aliasrc.zsh @@ -18,15 +18,6 @@ alias \ smi="sudo make install" \ su="sudo su -l" \ -# Quick navigate to directories / open specific files -alias \ - cdc="cd ~/docs/src/programs" \ - cds="cd ~/docs/src/bin" \ - cdw="cd ~/docs/src/sites" \ - 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/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" \ -- cgit v1.2.3