From c649953048f0f1213f2fcb5d898aaa730ef9b39a Mon Sep 17 00:00:00 2001 From: GitIR Date: Mon, 10 Jul 2023 22:35:58 -0500 Subject: Add PATH checking if dir exists --- zsh/.zshenv | 86 ++++++++++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 65 insertions(+), 21 deletions(-) (limited to 'zsh') diff --git a/zsh/.zshenv b/zsh/.zshenv index 228d6f8..70b37b1 100644 --- a/zsh/.zshenv +++ b/zsh/.zshenv @@ -79,26 +79,70 @@ export SRCDIR="$HOME/.local/src" export ENV="$XDG_CONFIG_HOME/mksh/mkshrc" # PATH -export PATH="$HOME/.local/bin/testing" -export PATH="$PATH:$HOME/.local/bin/shortcmds" -export PATH="$PATH:$HOME/.local/bin/generics" -export PATH="$PATH:$HOME/.local/bin/scripts" -export PATH="$PATH:$HOME/.local/bin/sp" -export PATH="$PATH:$HOME/.local/bin/blocks" -export PATH="$PATH:$HOME/.local/bin/ignore" -export PATH="$PATH:$HOME/.local/bin" -export PATH="$PATH:$HOME/.local/bin/flatpak-sc" -export PATH="$PATH:$HOME/.local/share/flatpak/exports/bin/" -export PATH="$PATH:$CARGO_HOME/bin" -export PATH="$PATH:$GOPATH/bin" -export PATH="$PATH:/opt/REAPER" -export PATH="$PATH:/usr/local/bin" -export PATH="$PATH:/usr/local/sbin" -export PATH="$PATH:/opt/safing/portmaster" -export PATH="$PATH:/var/lib/flatpak/exports/bin" -export PATH="$PATH:/usr/bin" -export PATH="$PATH:/usr/sbin" -export PATH="$PATH:/bin" -export PATH="$PATH:/sbin" +if [ -d "$HOME/.local/bin/testing" ]; then + export PATH="$HOME/.local/bin/testing" +fi +if [ -d "$HOME/.local/bin/shortcmds" ]; then + export PATH="$PATH:$HOME/.local/bin/shortcmds" +fi +if [ -d "$HOME/.local/bin/generics" ]; then + export PATH="$PATH:$HOME/.local/bin/generics" +fi +if [ -d "$HOME/.local/bin/scripts" ]; then + export PATH="$PATH:$HOME/.local/bin/scripts" +fi +if [ -d "$HOME/.local/bin/sp" ]; then + export PATH="$PATH:$HOME/.local/bin/sp" +fi +if [ -d "$HOME/.local/bin/blocks" ]; then + export PATH="$PATH:$HOME/.local/bin/blocks" +fi +if [ -d "$HOME/.local/bin/ignore" ]; then + export PATH="$PATH:$HOME/.local/bin/ignore" +fi +if [ -d "$HOME/.local/bin" ]; then + export PATH="$PATH:$HOME/.local/bin" +fi +if [ -d "$HOME/.local/bin/flatpak-sc" ]; then + export PATH="$PATH:$HOME/.local/bin/flatpak-sc" +fi +if [ -d "$HOME/.local/bin/flatpak/exports/bin" ]; then + export PATH="$PATH:$HOME/.local/share/flatpak/exports/bin/" +fi +if [ -d "$CARGO_HOME/bin" ]; then + export PATH="$PATH:$CARGO_HOME/bin" +fi +if [ -d "$GOPATH/bin" ]; then + export PATH="$PATH:$GOPATH/bin" +fi +if [ -d "/opt/REAPER" ]; then + export PATH="$PATH:/opt/REAPER" +fi +if [ -d "/usr/local/bin" ]; then + export PATH="$PATH:/usr/local/bin" +fi +if [ -d "/usr/local/sbin" ]; then + export PATH="$PATH:/usr/local/sbin" +fi +if [ -d "/opt/safing/portmaster" ]; then + export PATH="$PATH:/opt/safing/portmaster" +fi +if [ -d "/var/lib/flatpak/exports/bin" ]; then + export PATH="$PATH:/var/lib/flatpak/exports/bin" +fi +if [ -d "/usr/bin" ]; then + export PATH="$PATH:/usr/bin" +fi +if [ -d "/usr/sbin" ]; then + export PATH="$PATH:/usr/sbin" +fi +if [ -d "/bin" ]; then + export PATH="$PATH:/bin" +fi +if [ -d "/sbin" ]; then + export PATH="$PATH:/sbin" +fi + +[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/user-dirs.dirs" ] && . "${XDG_CONFIG_HOME:-$HOME/.config}/user-dirs.dirs" [ -f /etc/profile.d/nix-daemon.sh ] && . /etc/profile.d/nix-daemon.sh -- cgit v1.2.3 From 82f8607df7ff29f5a8f179e81a96c49bab4ff185 Mon Sep 17 00:00:00 2001 From: zachir Date: Mon, 10 Jul 2023 23:05:43 -0500 Subject: Update path setting to be what it probably should have been --- zsh/.zshenv | 43 ++++++++++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 17 deletions(-) (limited to 'zsh') diff --git a/zsh/.zshenv b/zsh/.zshenv index 70b37b1..1840082 100644 --- a/zsh/.zshenv +++ b/zsh/.zshenv @@ -1,10 +1,13 @@ +# Import ENV from system +. /etc/profile +[ -f /etc/profile.d/nix-daemon.sh ] && . /etc/profile.d/nix-daemon.sh + unset HISTFILE # Other XDG paths export XDG_DATA_HOME=${XDG_DATA_HOME:="$HOME/.local/share"} export XDG_CACHE_HOME=${XDG_CACHE_HOME:="$HOME/.cache"} export XDG_CONFIG_HOME=${XDG_CONFIG_HOME:="$HOME/.config"} - [ -f "${XDG_CONFIG_HOME:-$HOME/.config}/user-dirs.dirs" ] && . "${XDG_CONFIG_HOME:-$HOME/.config}/user-dirs.dirs" # Doesn't seem to work @@ -78,42 +81,46 @@ export SRCDIR="$HOME/.local/src" # KSH export ENV="$XDG_CONFIG_HOME/mksh/mkshrc" -# PATH +# OLD PATH +export SYSPATH="$PATH" + +# NEW PATH +unset PATH if [ -d "$HOME/.local/bin/testing" ]; then - export PATH="$HOME/.local/bin/testing" + PATH="$HOME/.local/bin/testing" fi if [ -d "$HOME/.local/bin/shortcmds" ]; then - export PATH="$PATH:$HOME/.local/bin/shortcmds" + PATH="$PATH:$HOME/.local/bin/shortcmds" fi if [ -d "$HOME/.local/bin/generics" ]; then - export PATH="$PATH:$HOME/.local/bin/generics" + PATH="$PATH:$HOME/.local/bin/generics" fi if [ -d "$HOME/.local/bin/scripts" ]; then - export PATH="$PATH:$HOME/.local/bin/scripts" + PATH="$PATH:$HOME/.local/bin/scripts" fi if [ -d "$HOME/.local/bin/sp" ]; then - export PATH="$PATH:$HOME/.local/bin/sp" + PATH="$PATH:$HOME/.local/bin/sp" fi if [ -d "$HOME/.local/bin/blocks" ]; then - export PATH="$PATH:$HOME/.local/bin/blocks" + PATH="$PATH:$HOME/.local/bin/blocks" fi if [ -d "$HOME/.local/bin/ignore" ]; then - export PATH="$PATH:$HOME/.local/bin/ignore" + PATH="$PATH:$HOME/.local/bin/ignore" fi if [ -d "$HOME/.local/bin" ]; then - export PATH="$PATH:$HOME/.local/bin" + PATH="$PATH:$HOME/.local/bin" fi if [ -d "$HOME/.local/bin/flatpak-sc" ]; then - export PATH="$PATH:$HOME/.local/bin/flatpak-sc" + PATH="$PATH:$HOME/.local/bin/flatpak-sc" fi if [ -d "$HOME/.local/bin/flatpak/exports/bin" ]; then - export PATH="$PATH:$HOME/.local/share/flatpak/exports/bin/" + PATH="$PATH:$HOME/.local/share/flatpak/exports/bin/" fi if [ -d "$CARGO_HOME/bin" ]; then - export PATH="$PATH:$CARGO_HOME/bin" + PATH="$PATH:$CARGO_HOME/bin" fi if [ -d "$GOPATH/bin" ]; then - export PATH="$PATH:$GOPATH/bin" + PATH="$PATH:$GOPATH/bin" fi if [ -d "/opt/REAPER" ]; then export PATH="$PATH:/opt/REAPER" @@ -128,7 +135,7 @@ if [ -d "/opt/safing/portmaster" ]; then export PATH="$PATH:/opt/safing/portmaster" fi if [ -d "/var/lib/flatpak/exports/bin" ]; then - export PATH="$PATH:/var/lib/flatpak/exports/bin" + PATH="$PATH:/var/lib/flatpak/exports/bin" fi if [ -d "/usr/bin" ]; then export PATH="$PATH:/usr/bin" @@ -143,6 +150,8 @@ if [ -d "/sbin" ]; then export PATH="$PATH:/sbin" fi -[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/user-dirs.dirs" ] && . "${XDG_CONFIG_HOME:-$HOME/.config}/user-dirs.dirs" +# MERGE PATHS +export PATH="$PATH:$SYSPATH" -[ -f /etc/profile.d/nix-daemon.sh ] && . /etc/profile.d/nix-daemon.sh +# CLEANUP +unset SYSPATH -- cgit v1.2.3 From 8afad1f7ac3813c57c851c510ef062fa3739d385 Mon Sep 17 00:00:00 2001 From: GitIR Date: Mon, 10 Jul 2023 23:08:40 -0500 Subject: Fix zsh path exports again because I merged badly --- zsh/.zshenv | 27 --------------------------- 1 file changed, 27 deletions(-) (limited to 'zsh') diff --git a/zsh/.zshenv b/zsh/.zshenv index 1840082..1ac6756 100644 --- a/zsh/.zshenv +++ b/zsh/.zshenv @@ -122,33 +122,6 @@ fi if [ -d "$GOPATH/bin" ]; then PATH="$PATH:$GOPATH/bin" fi -if [ -d "/opt/REAPER" ]; then - export PATH="$PATH:/opt/REAPER" -fi -if [ -d "/usr/local/bin" ]; then - export PATH="$PATH:/usr/local/bin" -fi -if [ -d "/usr/local/sbin" ]; then - export PATH="$PATH:/usr/local/sbin" -fi -if [ -d "/opt/safing/portmaster" ]; then - export PATH="$PATH:/opt/safing/portmaster" -fi -if [ -d "/var/lib/flatpak/exports/bin" ]; then - PATH="$PATH:/var/lib/flatpak/exports/bin" -fi -if [ -d "/usr/bin" ]; then - export PATH="$PATH:/usr/bin" -fi -if [ -d "/usr/sbin" ]; then - export PATH="$PATH:/usr/sbin" -fi -if [ -d "/bin" ]; then - export PATH="$PATH:/bin" -fi -if [ -d "/sbin" ]; then - export PATH="$PATH:/sbin" -fi # MERGE PATHS export PATH="$PATH:$SYSPATH" -- cgit v1.2.3 From cd934044acabb919e34a1bf3d13719bcb13decdb Mon Sep 17 00:00:00 2001 From: ZachIR Date: Sat, 15 Jul 2023 15:14:21 -0500 Subject: Install .profile separately from .zshenv --- Makefile | 9 +++- sh/profile | 134 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ zsh/.zshenv | 129 +-------------------------------------------------------- 3 files changed, 143 insertions(+), 129 deletions(-) create mode 100644 sh/profile (limited to 'zsh') diff --git a/Makefile b/Makefile index 966bde8..0faf846 100644 --- a/Makefile +++ b/Makefile @@ -2,11 +2,12 @@ VIM := $(shell command -v vim 2>/dev/null) NVIM := $(shell command -v nvim 2>/dev/null) XCONFS := X11/Xresources ZCONFS := zsh/.zshenv +SCONFS := sh/profile DCONFS := doas.conf all: -install: install-xconfigs install-zshconfigs vimplug-vim vimplug-nvim +install: install-xconfigs install-shconfigs install-zshconfigs vimplug-vim vimplug-nvim install-xconfigs: $(XCONFS) @echo "Installing Xorg conf files..." @@ -14,6 +15,12 @@ install-xconfigs: $(XCONFS) @ln -sf `pwd`/X11/Xresources ~/.Xresources @echo "Done." +install-shconfigs: $(SCONFS) + @echo "Installing SH conf files..." + @echo ".profile..." + @ln -sf `pwd`/sh/profile ~/.profile + @echo "Done." + install-zshconfigs: $(ZCONFS) @echo "Installing zsh conf files..." @echo ".zshenv..." diff --git a/sh/profile b/sh/profile new file mode 100644 index 0000000..09a81c1 --- /dev/null +++ b/sh/profile @@ -0,0 +1,134 @@ +# Import ENV from system +. /etc/profile +[ -f /etc/profile.d/nix-daemon.sh ] && . /etc/profile.d/nix-daemon.sh + +# Other XDG paths +export XDG_DATA_HOME=${XDG_DATA_HOME:="$HOME/.local/share"} +export XDG_CACHE_HOME=${XDG_CACHE_HOME:="$HOME/.cache"} +export XDG_CONFIG_HOME=${XDG_CONFIG_HOME:="$HOME/.config"} +[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/user-dirs.dirs" ] && . "${XDG_CONFIG_HOME:-$HOME/.config}/user-dirs.dirs" + +# Doesn't seem to work +export ANDROID_SDK_HOME="$XDG_CONFIG_HOME"/android +export ANDROID_AVD_HOME="$XDG_DATA_HOME"/android/ +export ANDROID_EMULATOR_HOME="$XDG_DATA_HOME"/android/ +export ADB_VENDOR_KEY="$XDG_CONFIG_HOME"/android + +# Disable files +export LESSHISTFILE=- + +# Fixing Paths +export MBSYNCRC="$XDG_CONFIG_HOME"/isync/mbsyncrc +export ATOM_HOME="$XDG_DATA_HOME"/atom +export XINITRC="$XDG_CONFIG_HOME"/X11/xinitrc +export XSERVERRC="$XDG_CONFIG_HOME"/X11/xserverrc +export GEM_SPEC_CACHE="$XDG_DATA_HOME/ruby/specs" +export GEM_HOME="$XDG_DATA_HOME/ruby/gems" +export NPM_CONFIG_USERCONFIG=$XDG_CONFIG_HOME/npm/npmrc +export GOPATH="$XDG_DATA_HOME"/go +export GNUPGHOME="$XDG_DATA_HOME"/gnupg +export GRADLE_USER_HOME="$XDG_DATA_HOME"/gradle +export NUGET_PACKAGES="$XDG_CACHE_HOME"/NuGetPackages +export RXVT_SOCKET="$XDG_RUNTIME_DIR"/urxvtd +export _JAVA_OPTIONS=-Djava.util.prefs.userRoot="$XDG_CONFIG_HOME"/java +export GTK2_RC_FILES="$XDG_CONFIG_HOME"/gtk-2.0/gtkrc +export ZDOTDIR=$HOME/.config/zsh +export CARGO_HOME="$XDG_DATA_HOME"/cargo +export WEECHAT_HOME="$XDG_CONFIG_HOME"/weechat +export PASSWORD_STORE_DIR="$XDG_DATA_HOME"/pass +export NOTMUCH_CONFIG="$XDG_CONFIG_HOME"/notmuch/notmuchrc +export NMBGIT="$XDG_DATA_HOME"/notmuch/nmbug +export WINEROOT="$XDG_DATA_HOME"/wineprefixes +export WINEPREFIX="$WINEROOT"/default +export MPD_HOST="$XDG_CONFIG_HOME/mpd/socket" + +# Scaling +export QT_AUTO_SCREEN_SCALE_FACTOR=0 +export QT_SCALE_FACTOR=1 +export QT_SCREEN_SCALE_FACTORS="1;1;1" +export GDK_SCALE=1 +export GDK_DPI_SCALE=1 + +# Theming +export QT_QPA_PLATFORMTHEME=qt5ct + +# Configure apps +export BEMENU_OPTS="-H 36 --fn \"mononoki Nerd Font Mono 24\" --nb \"#000000\" --nf \"#c5c8c6\" --hb \"#39c1ed\" --hf \"#000000\" --cb \"#000000\" --cf \"#000000\" --tf \"#000000\" --tb \"#39c1ed\" --fb \"#000000\" --ff \"#c5c8c6\" --fbb \"#39c1ed\" --fbf \"#198844\"" + +# Fix wayland stuff +export MOZ_ENABLE_WAYLAND=1 +export XKB_DEFAULT_OPTIONS=caps:escape +export XDG_CURRENT_DESKTOP=Unity + +# Default Apps +export EDITOR="nvim" +export READER="zathura" +export VISUAL="nvim" +export TERMINAL="alacritty" +export BROWSER="browser" +export VIDEO="mpv" +export IMAGE="sxiv" +export OPENER="xdg-open" +export PAGER="less" + +# Modern SDK +export N64_LIBGCCDIR="/opt/crashsdk/lib/gcc/mips64-elf/12.2.0" +export ROOT=/etc/n64 +export BLENDER_3_0="/usr/bin/blender" + +# DIRS +export SRCDIR="$HOME/.local/src" + +# OLD PATH +export SYSPATH="$PATH" + +# NEW PATH +unset PATH +if [ -d "$HOME/.local/bin/testing" ]; then + PATH="$HOME/.local/bin/testing" +fi +if [ -d "$HOME/.local/bin/shortcmds" ]; then + PATH="$PATH:$HOME/.local/bin/shortcmds" +fi +if [ -d "$HOME/.local/bin/generics" ]; then + PATH="$PATH:$HOME/.local/bin/generics" +fi +if [ -d "$HOME/.local/bin/scripts" ]; then + PATH="$PATH:$HOME/.local/bin/scripts" +fi +if [ -d "$HOME/.local/bin/sp" ]; then + PATH="$PATH:$HOME/.local/bin/sp" +fi +if [ -d "$HOME/.local/bin/blocks" ]; then + PATH="$PATH:$HOME/.local/bin/blocks" +fi +if [ -d "$HOME/.local/bin/ignore" ]; then + PATH="$PATH:$HOME/.local/bin/ignore" +fi +if [ -d "$HOME/local/bin/volsv" ]; then + PATH="$PATH:$HOME/.local/volsv" +fi +if [ -d "$HOME/.local/bin" ]; then + PATH="$PATH:$HOME/.local/bin" +fi +if [ -d "$HOME/.local/bin/flatpak-sc" ]; then + PATH="$PATH:$HOME/.local/bin/flatpak-sc" +fi +if [ -d "$HOME/.local/bin/flatpak/exports/bin" ]; then + PATH="$PATH:$HOME/.local/share/flatpak/exports/bin/" +fi +if [ -d "$CARGO_HOME/bin" ]; then + PATH="$PATH:$CARGO_HOME/bin" +fi +if [ -d "$GOPATH/bin" ]; then + PATH="$PATH:$GOPATH/bin" +fi +if [ -d "/var/lib/flatpak/exports/bin" ]; then + PATH="$PATH:/var/lib/flatpak/exports/bin" +fi + +# MERGE PATHS +export PATH="$PATH:$SYSPATH" + +# CLEANUP +unset SYSPATH diff --git a/zsh/.zshenv b/zsh/.zshenv index 1ac6756..286e11a 100644 --- a/zsh/.zshenv +++ b/zsh/.zshenv @@ -1,130 +1,3 @@ -# Import ENV from system -. /etc/profile -[ -f /etc/profile.d/nix-daemon.sh ] && . /etc/profile.d/nix-daemon.sh - +# ZSH SPECIFIC CONFIGS unset HISTFILE - -# Other XDG paths -export XDG_DATA_HOME=${XDG_DATA_HOME:="$HOME/.local/share"} -export XDG_CACHE_HOME=${XDG_CACHE_HOME:="$HOME/.cache"} -export XDG_CONFIG_HOME=${XDG_CONFIG_HOME:="$HOME/.config"} -[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/user-dirs.dirs" ] && . "${XDG_CONFIG_HOME:-$HOME/.config}/user-dirs.dirs" - -# Doesn't seem to work -export ANDROID_SDK_HOME="$XDG_CONFIG_HOME"/android -export ANDROID_AVD_HOME="$XDG_DATA_HOME"/android/ -export ANDROID_EMULATOR_HOME="$XDG_DATA_HOME"/android/ -export ADB_VENDOR_KEY="$XDG_CONFIG_HOME"/android - -# Disable files -export LESSHISTFILE=- - -# Fixing Paths -export MBSYNCRC="$XDG_CONFIG_HOME"/isync/mbsyncrc -export ATOM_HOME="$XDG_DATA_HOME"/atom -export XINITRC="$XDG_CONFIG_HOME"/X11/xinitrc -export XSERVERRC="$XDG_CONFIG_HOME"/X11/xserverrc -export GEM_SPEC_CACHE="$XDG_DATA_HOME/ruby/specs" -export GEM_HOME="$XDG_DATA_HOME/ruby/gems" -export NPM_CONFIG_USERCONFIG=$XDG_CONFIG_HOME/npm/npmrc -export GOPATH="$XDG_DATA_HOME"/go -export GNUPGHOME="$XDG_DATA_HOME"/gnupg -export GRADLE_USER_HOME="$XDG_DATA_HOME"/gradle -export NUGET_PACKAGES="$XDG_CACHE_HOME"/NuGetPackages -export RXVT_SOCKET="$XDG_RUNTIME_DIR"/urxvtd -export _JAVA_OPTIONS=-Djava.util.prefs.userRoot="$XDG_CONFIG_HOME"/java -export GTK2_RC_FILES="$XDG_CONFIG_HOME"/gtk-2.0/gtkrc export ZDOTDIR=$HOME/.config/zsh -#export HISTFILE="$XDG_DATA_HOME"/zsh/history -export CARGO_HOME="$XDG_DATA_HOME"/cargo -export WEECHAT_HOME="$XDG_CONFIG_HOME"/weechat -export PASSWORD_STORE_DIR="$XDG_DATA_HOME"/pass -export NOTMUCH_CONFIG="$XDG_CONFIG_HOME"/notmuch/notmuchrc -export NMBGIT="$XDG_DATA_HOME"/notmuch/nmbug -export WINEROOT="$XDG_DATA_HOME"/wineprefixes -export WINEPREFIX="$WINEROOT"/default - -export MPD_HOST="$XDG_CONFIG_HOME/mpd/socket" - -# Scaling -export QT_AUTO_SCREEN_SCALE_FACTOR=0 -export QT_SCALE_FACTOR=1 -export QT_SCREEN_SCALE_FACTORS="1;1;1" -export GDK_SCALE=1 -export GDK_DPI_SCALE=1 - -# Theming -export QT_QPA_PLATFORMTHEME=qt5ct - -# Configure apps -export BEMENU_OPTS="-H 36 --fn \"mononoki Nerd Font Mono 24\" --nb \"#000000\" --nf \"#c5c8c6\" --hb \"#39c1ed\" --hf \"#000000\" --cb \"#000000\" --cf \"#000000\" --tf \"#000000\" --tb \"#39c1ed\" --fb \"#000000\" --ff \"#c5c8c6\" --fbb \"#39c1ed\" --fbf \"#198844\"" - -# Fix wayland stuff -export MOZ_ENABLE_WAYLAND=1 -export XKB_DEFAULT_OPTIONS=caps:escape -export XDG_CURRENT_DESKTOP=Unity - -# Default Apps -export EDITOR="nvim" -export READER="zathura" -export VISUAL="nvim" -export TERMINAL="alacritty" -export BROWSER="browser" -export VIDEO="mpv" -export IMAGE="sxiv" -export OPENER="xdg-open" -export PAGER="less" - -# DIRS -export SRCDIR="$HOME/.local/src" - -# KSH -export ENV="$XDG_CONFIG_HOME/mksh/mkshrc" - -# OLD PATH -export SYSPATH="$PATH" - -# NEW PATH -unset PATH -if [ -d "$HOME/.local/bin/testing" ]; then - PATH="$HOME/.local/bin/testing" -fi -if [ -d "$HOME/.local/bin/shortcmds" ]; then - PATH="$PATH:$HOME/.local/bin/shortcmds" -fi -if [ -d "$HOME/.local/bin/generics" ]; then - PATH="$PATH:$HOME/.local/bin/generics" -fi -if [ -d "$HOME/.local/bin/scripts" ]; then - PATH="$PATH:$HOME/.local/bin/scripts" -fi -if [ -d "$HOME/.local/bin/sp" ]; then - PATH="$PATH:$HOME/.local/bin/sp" -fi -if [ -d "$HOME/.local/bin/blocks" ]; then - PATH="$PATH:$HOME/.local/bin/blocks" -fi -if [ -d "$HOME/.local/bin/ignore" ]; then - PATH="$PATH:$HOME/.local/bin/ignore" -fi -if [ -d "$HOME/.local/bin" ]; then - PATH="$PATH:$HOME/.local/bin" -fi -if [ -d "$HOME/.local/bin/flatpak-sc" ]; then - PATH="$PATH:$HOME/.local/bin/flatpak-sc" -fi -if [ -d "$HOME/.local/bin/flatpak/exports/bin" ]; then - PATH="$PATH:$HOME/.local/share/flatpak/exports/bin/" -fi -if [ -d "$CARGO_HOME/bin" ]; then - PATH="$PATH:$CARGO_HOME/bin" -fi -if [ -d "$GOPATH/bin" ]; then - PATH="$PATH:$GOPATH/bin" -fi - -# MERGE PATHS -export PATH="$PATH:$SYSPATH" - -# CLEANUP -unset SYSPATH -- cgit v1.2.3 From d300dc0020fbe7579be489a03ece7b62ad33ffd2 Mon Sep 17 00:00:00 2001 From: zachir Date: Mon, 17 Jul 2023 22:16:01 -0500 Subject: Make ^l reset to delete terminal history --- zsh/.zshrc | 1 + 1 file changed, 1 insertion(+) (limited to 'zsh') diff --git a/zsh/.zshrc b/zsh/.zshrc index d11c091..91abe7c 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -94,6 +94,7 @@ bindkey -- '^[[B' down-line-or-beg [[ -n "${key[Right]}" ]] && bindkey -- "${key[Right]}" forward-char [[ -n "${key[Shift-Tab]}" ]] && bindkey -- "${key[Shift-Tab]}" reverse-menu-complete [[ -n "${key[Delete]}" ]] && bindkey -- "${key[Delete]}" delete-char +bindkey -s '^l' "^ureset^M" #eval "$(starship init zsh)" type portmaster-start 2>&1 >/dev/null && eval "$(portmaster-start --data=/opt/safing/portmaster completion zsh)" -- cgit v1.2.3 From 9aeae2e662aa1384b14fa507b525dadd30300499 Mon Sep 17 00:00:00 2001 From: zachir Date: Mon, 17 Jul 2023 22:25:31 -0500 Subject: On second thought, reset should be alias --- sh/aliases | 2 +- zsh/.zshrc | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) (limited to 'zsh') diff --git a/sh/aliases b/sh/aliases index e3996bd..93672b9 100644 --- a/sh/aliases +++ b/sh/aliases @@ -43,7 +43,7 @@ alias ga='git add -A' alias gd='git diff' ## Single Chars -alias r='cd ~ && clear && exec $SHELL' +alias r='cd ~ && reset && exec $SHELL' alias q='exit' alias c='clear' alias m='make' diff --git a/zsh/.zshrc b/zsh/.zshrc index 91abe7c..d11c091 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -94,7 +94,6 @@ bindkey -- '^[[B' down-line-or-beg [[ -n "${key[Right]}" ]] && bindkey -- "${key[Right]}" forward-char [[ -n "${key[Shift-Tab]}" ]] && bindkey -- "${key[Shift-Tab]}" reverse-menu-complete [[ -n "${key[Delete]}" ]] && bindkey -- "${key[Delete]}" delete-char -bindkey -s '^l' "^ureset^M" #eval "$(starship init zsh)" type portmaster-start 2>&1 >/dev/null && eval "$(portmaster-start --data=/opt/safing/portmaster completion zsh)" -- cgit v1.2.3 From 0e3d7c9afdc49e1b81f976a380a878db0d0c3947 Mon Sep 17 00:00:00 2001 From: zachir Date: Wed, 23 Aug 2023 02:02:51 -0500 Subject: Add zfunc completion path support --- zsh/.zshrc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'zsh') diff --git a/zsh/.zshrc b/zsh/.zshrc index d11c091..0c0366f 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -63,6 +63,8 @@ zle -N zle-line-init zle -N zle-keymap-select export KEYTIMEOUT=1 +fpath+="$ZDOTDIR/zfunc" + autoload -Uz compinit promptinit compinit -d $CONFIG/zcompdump promptinit -- cgit v1.2.3 From e7f2de1fc4362673d4cce38441e396e08929c942 Mon Sep 17 00:00:00 2001 From: zachir Date: Thu, 19 Oct 2023 09:07:03 -0500 Subject: Change shell alias and ENV, set kitty title Adding in lb=lsblk, adding in more XDG dirs, and permanently set kitty title to 'terminal' from zsh. --- sh/aliases | 2 +- sh/profile | 9 +++++++-- zsh/.zshrc | 3 +-- 3 files changed, 9 insertions(+), 5 deletions(-) (limited to 'zsh') diff --git a/sh/aliases b/sh/aliases index 6b254d7..ef9a53b 100644 --- a/sh/aliases +++ b/sh/aliases @@ -24,13 +24,13 @@ esac alias ll='ls -l' alias la='ls -A' alias lla='ls -lA' +alias lb='lsblk' alias md='mkdir -p' alias ch='cd $HOME' #alias nvim='vim' alias nv='nvim' alias v='nvim' -#alias lf='lfrun' ## Change utils alias rm='rm -i' diff --git a/sh/profile b/sh/profile index 1174421..79151b9 100644 --- a/sh/profile +++ b/sh/profile @@ -2,11 +2,17 @@ . /etc/profile [ -f /etc/profile.d/nix-daemon.sh ] && . /etc/profile.d/nix-daemon.sh -# Other XDG paths +# Other XDG vars export XDG_DATA_HOME=${XDG_DATA_HOME:="$HOME/.local/share"} export XDG_CACHE_HOME=${XDG_CACHE_HOME:="$HOME/.cache"} export XDG_CONFIG_HOME=${XDG_CONFIG_HOME:="$HOME/.config"} [ -f "${XDG_CONFIG_HOME:-$HOME/.config}/user-dirs.dirs" ] && . "${XDG_CONFIG_HOME:-$HOME/.config}/user-dirs.dirs" +export XDG_CURRENT_DESKTOP="i3" +export XDG_DOCUMENTS_DIR=${HOME}/Documents +export XDG_DOWNLOAD_DIR=${HOME}/Downloads +export XDG_DESKTOP_DIR=${HOME}/Desktop +export XDG_VIDEOS_DIR=${HOME}/Videos + # Doesn't seem to work export ANDROID_SDK_HOME="$XDG_CONFIG_HOME"/android @@ -55,7 +61,6 @@ export QT_QPA_PLATFORMTHEME=qt5ct # Fix wayland stuff export MOZ_ENABLE_WAYLAND=1 export XKB_DEFAULT_OPTIONS=caps:escape -export XDG_CURRENT_DESKTOP=Unity # Default Apps export EDITOR="nvim" diff --git a/zsh/.zshrc b/zsh/.zshrc index 0c0366f..3314bb3 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -97,5 +97,4 @@ bindkey -- '^[[B' down-line-or-beg [[ -n "${key[Shift-Tab]}" ]] && bindkey -- "${key[Shift-Tab]}" reverse-menu-complete [[ -n "${key[Delete]}" ]] && bindkey -- "${key[Delete]}" delete-char -#eval "$(starship init zsh)" -type portmaster-start 2>&1 >/dev/null && eval "$(portmaster-start --data=/opt/safing/portmaster completion zsh)" +precmd () {print -Pn "\e]0;terminal\a"} -- cgit v1.2.3 From e52d33c3800479d17b7f55a67186b9d73a78ec96 Mon Sep 17 00:00:00 2001 From: zachir Date: Wed, 3 Jan 2024 11:43:05 -0600 Subject: zsh: add function anonsh Anonsh is useful if you dont't want your shell history recorded (for example, if you need to type in a password). --- zsh/functions/anonsh | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 zsh/functions/anonsh (limited to 'zsh') diff --git a/zsh/functions/anonsh b/zsh/functions/anonsh new file mode 100644 index 0000000..c9b1b4f --- /dev/null +++ b/zsh/functions/anonsh @@ -0,0 +1,72 @@ +# Convenience helper to set up an "incognito mode" for a shell session. +# +# Installation: +# 1. Create a folder like ~/.zsh/functions +# 2. Add it to your ZSH function path with fpath=(~/.zsh/functions(:A) $fpath) in ~/.zshenv +# 3. Save this script as ~/.zsh/functions/anonsh +# 4. Add `autoload -Uz anonsh` to your ~/.zshrc +# +# Now you can type `anonsh` in any zsh session +# +# - Use `clear` to clear both the screen and scrollback buffer +# - Use `fc -p` to clear command history without affecting your usual HISTFILE + +# Only store new command history entries in RAM +unset HISTFILE + +# Redefine the hardstatus text to "anonsh" so it doesn't show $PWD +# where people can see it when the shell doesn't have focus +# +# (The zsh_hardstatus_pre* and title functions are part of my .zshrc setup) +if typeset -f zsh_hardstatus_precmd > /dev/null && typeset -f title > /dev/null; then + autoload -Uz add-zsh-hook + add-zsh-hook -d precmd zsh_hardstatus_precmd + add-zsh-hook -d preexec zsh_hardstatus_preexec + + function zsh_hardstatus_precmd { title "anonsh" "anonsh"; } + add-zsh-hook precmd zsh_hardstatus_precmd + add-zsh-hook preexec zsh_hardstatus_precmd +fi + +# Show ... in the prompt instead of $PWD so it can't give away +# something after running `clear` +# +# ($base_prompt is a custom part of my .zshrc setup) +if (( ${+base_prompt} )); then + export base_prompt="${base_prompt//%%1~/...}" +fi +export PS1="${PS1//%%1~/...}" +export PS2="${PS2//%%1~/...}" +export PS3="${PS3//%%1~/...}" +export PS4="${PS4//%%1~/...}" + +# Redefine "clear" to also clear the GNU screen scrollback buffer and to ask +# for the terminal scrollback buffer to be cleared in as many ways as possible +clear() { + # Call the regular clear command + command clear + + # Manually emit all the escapes I know for requesting the terminal be + # cleared and ask GNU Screen to pass it through as a literal + # + # Source: https://apple.stackexchange.com/a/318217/388700 + printf '\eP\e[2J\e[3J\e[;H\ec\e\\' + + # Flush GNU Screen's internal scrollback for this shell + if [ "$TERM" = "screen" ]; then + screen -X scrollback 0 + screen -X scrollback 5000 + fi +} + +# TODO: Try to find a workaround to call the terminal scrollback-clearing part +# of `clear` on switching GNU screen focus and then refresh the visible +# part from screen's stored copy so nothing anonsh can show accidentally. +# +# (Without removing the `termcapinfo` line to from ~/.screenrc which +# would disable it when `anonsh` isn't in use.) + +# Call `clear` on exit to clear terminal scrollback +zshexit() { clear; } + +# vim: set ft=zsh : -- cgit v1.2.3 From 7a250319aaa6ca612b8c30f362b6855ae43e410c Mon Sep 17 00:00:00 2001 From: zachir Date: Sat, 23 Mar 2024 18:11:04 -0500 Subject: Fix sh not loading xdg user dirs --- sh/profile | 3 ++- zsh/.zshenv | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'zsh') diff --git a/sh/profile b/sh/profile index 33faf7a..c03fc93 100644 --- a/sh/profile +++ b/sh/profile @@ -6,13 +6,14 @@ export XDG_DATA_HOME=${XDG_DATA_HOME:="$HOME/.local/share"} export XDG_CACHE_HOME=${XDG_CACHE_HOME:="$HOME/.cache"} export XDG_CONFIG_HOME=${XDG_CONFIG_HOME:="$HOME/.config"} -[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/user-dirs.dirs" ] && . "${XDG_CONFIG_HOME:-$HOME/.config}/user-dirs.dirs" +. "$HOME/.config/user-dirs.dirs" export XDG_CURRENT_DESKTOP="i3" export XDG_DOCUMENTS_DIR=${HOME}/Documents export XDG_DOWNLOAD_DIR=${HOME}/Downloads export XDG_DESKTOP_DIR=${HOME}/Desktop export XDG_VIDEOS_DIR=${HOME}/Videos +export XDG_DATA_DIRS="${XDG_DATA_DIRS}:$HOME/.nix-profile/share" # Doesn't seem to work export ANDROID_SDK_HOME="$XDG_CONFIG_HOME"/android diff --git a/zsh/.zshenv b/zsh/.zshenv index 286e11a..1740c82 100644 --- a/zsh/.zshenv +++ b/zsh/.zshenv @@ -1,3 +1,4 @@ # ZSH SPECIFIC CONFIGS unset HISTFILE +[ -f "$HOME/.profile" ] && . "$HOME/.profile" export ZDOTDIR=$HOME/.config/zsh -- cgit v1.2.3 From 5c08cffb9924377b063220adc5ba0712f19e2505 Mon Sep 17 00:00:00 2001 From: zachir Date: Tue, 4 Jun 2024 23:31:17 -0500 Subject: Remove unnecessary zsh command It doesn't need to set the terminal title to "terminal"? --- zsh/.zshrc | 1 - 1 file changed, 1 deletion(-) (limited to 'zsh') diff --git a/zsh/.zshrc b/zsh/.zshrc index 3314bb3..00be912 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -97,4 +97,3 @@ bindkey -- '^[[B' down-line-or-beg [[ -n "${key[Shift-Tab]}" ]] && bindkey -- "${key[Shift-Tab]}" reverse-menu-complete [[ -n "${key[Delete]}" ]] && bindkey -- "${key[Delete]}" delete-char -precmd () {print -Pn "\e]0;terminal\a"} -- cgit v1.2.3 From f7175b21a3a6cc6965b0ea77e7c47535ce83beec Mon Sep 17 00:00:00 2001 From: zachir Date: Wed, 5 Jun 2024 09:09:47 -0500 Subject: Add better/more XDG support Implements XDG support for more programs that support it, in various levels of hackiness. --- .gitignore | 4 + X11/Xresources | 495 ----------------------------------------------------- X11/xresources | 495 +++++++++++++++++++++++++++++++++++++++++++++++++++++ autostart.sh | 2 +- hypr/hyprland.conf | 2 +- sh/aliases | 3 + sh/profile | 7 + zsh/.zshenv | 4 +- 8 files changed, 513 insertions(+), 499 deletions(-) delete mode 100644 X11/Xresources create mode 100644 X11/xresources (limited to 'zsh') diff --git a/.gitignore b/.gitignore index 76e77d4..522e3d0 100644 --- a/.gitignore +++ b/.gitignore @@ -61,6 +61,7 @@ galculator/ gamescope/ ghb/ GIMP/ +git/ glib-2.0/ gnome-control-center/ gnome-initial-setup-done @@ -222,6 +223,7 @@ solaar/ spotifyd/ spotify-tui/ straw-viewer/ +subversion/ SUPERHOT/ switcher/ syncthing/ @@ -248,6 +250,8 @@ unity3d/ Valve Corporation/ vdirsyncer/ VeraCrypt/ +vim/ +!vim/vimrc VirtualBox/ vlc/vlc-qt-interface.conf waybar/config-dwl-* diff --git a/X11/Xresources b/X11/Xresources deleted file mode 100644 index d5c4550..0000000 --- a/X11/Xresources +++ /dev/null @@ -1,495 +0,0 @@ -!! dmenu - -dmenu.font: mononoki Nerd Font Mono:size=24 - -!! dwm - -dwm.normbgcolor: #000000 -dwm.normbordercolor: #1b1d1c -dwm.normfgcolor: #ffffff -dwm.selbgcolor: #198844 -dwm.selbordercolor: #198844 -dwm.selfgcolor: #ffffff -dwm.urgfgcolor: #ffffff -dwm.urgbordercolor: #198844 -dwm.urgbgcolor: #cc342b -dwm.borderpx: 3 -dwm.gappx: 6 -dwm.snap: 32 -dwm.showbar: 1 -dwm.topbar: 1 -dwm.nmaster: 1 -dwm.resizehints: 1 -dwm.mfact: 0.50 - -!! st - -! These options only take effect on startup. -st.termname: st-256color -! if you do not set shell, precedence is: -e arg, utmp option, SHELL env var, /etc/passwd shell -st.shell: /usr/bin/tmux - -! The following options options can be reloaded via USR1 signal. -!st.font: mononoki Nerd Font Mono:pixelsize=12:antialias=true:autohint=true; -!st.font2: Symbola:pixelsize=12:antialias=true:autohint=true; -st.borderpx: 3 -! st alpha -st.alpha: 0.8 -st.alphaUnfocused: 0.8 -! Available cursor values: 2 4 6 7 = █ _ | ☃ ( 1 3 5 are blinking versions) -st.cursorshape: 6 -! thickness of underline and bar cursors -st.cursorthickness: 2 -! 0: normal blinking, 1: leave cursor border and blink with cursor''s background -st.cursorblinkstyle: 0 -! 0: cursor blinks with a constant interval; 1: blinking cycle resets on key input -st.cursorblinkontype: 1 -! st.bold_font: 0 -st.xfps: 120 -st.actionfps: 60 -! Amount of lines scrolled -st.mouseScrollLines: 1 -! Kerning / character bounding-box height multiplier -st.chscale: 1.0 -! Kerning / character bounding-box width multiplier -st.cwscale: 1.0 -! blinking timeout for terminal and cursor blinking (0 disables) -st.blinktimeout: 800 -! bell volume. Value between -100 and 100. (0 disables) -st.bellvolume: 0 -! this is a char that is exposed like so: `printf '\033[z'` -st.prompt_char: $ -! This option is can be preedit style. Available values: `root` `overthespot` (Default taken `root`) -st.imstyle: root -! This option sets the number of spaces for a tab -st.tabspaces: 2 - -!! RXVT-Unicode (urxvt) config -! do not scroll with output -URxvt.scrollTtyOutput: false -! scroll in relation to buffer (with mouse scroll or Shift+Page Up) -URxvt.scrollWithBuffer: true -! scroll back to the bottom on keypress -URxvt.scrollTtyKeypress: true -! disable scrollback buffer for secondary screen -URxvt.secondaryScreen: 1 -URxvt.secondaryScroll: 0 -URxvt.secondaryWheel: 1 -! URxvt font -URxvt.font: xft:Fira Code:regular:size=8,xft:symbola:regular:size=9 -! fix font spacing -URxvt.letterSpace: -1 -! Disable printing -URxvt.print-pipe: "cat > /dev/null" -! disable iso14755 -URxvt.iso14755: false -URxvt.iso14755_52: false -! enable transparency -URxvt.depth: 32 -URxvt.background: rgba:0000/0000/0200/c800 -! disable scrollbar -URxvt.scrollBar: false - -!! perls -! perls -URxvt.perl-ext: default,url-select,tabbed,resize-font,clipboard -! clipboard -URxvt.clipboard.autocopy: true -URxvt.keysym.Shift-Control-C: perl:clipboard:copy -URxvt.keysym.Shift-Control-V: perl:clipboard:paste -! url-select -URxvt.keysum.M-u: perl:url-select:select-next -URxvt.url-select.launcher: /usr/bin/xdg-open -URxvt.url-select.underline: true -! tabbed -URxvt.tabbed.tabbar-fg: 2 -URxvt.tabbed.tabbar-bg: 0 -URxvt.tabbed.tab-fg: 3 -URxvt.tabbed.tab-bg: 0 -! resize-font -URxvt.keysym.C-Minus: resize-font:smaller -URxvt.keysym.C-Plus: resize-font:bigger - -! "Enabled modi" Set from: Default -rofi.modi: window,run,ssh,drun.5 -! "Window width" Set from: Default -rofi.width: 1366 -! "Number of lines" Set from: Default -! rofi.lines: 15 -! "Number of columns" Set from: Default -! rofi.columns: 1 -! "Font to use" Set from: Default -rofi.font: mononoki 9 -! "Border width" Set from: Default -! rofi.bw: 1 -! "Location on screen" Set from: Default -rofi.location: 2 -! "Padding" Set from: Default -! rofi.padding: 5 -! "Y-offset relative to location" Set from: Default -! rofi.yoffset: 0 -! "X-offset relative to location" Set from: Default -! rofi.xoffset: 0 -! "Always show number of lines" Set from: Default -! rofi.fixed-num-lines: true -! "Whether to load and show icons" Set from: Default -! rofi.show-icons: false -! "Terminal to use" Set from: Default -! rofi.terminal: rofi-sensible-terminal -! "Ssh client to use" Set from: Default -! rofi.ssh-client: ssh -! "Ssh command to execute" Set from: Default -! rofi.ssh-command: {terminal} -e {ssh-client} {host} [-p {port}] -! "Run command to execute" Set from: Default -! rofi.run-command: {cmd} -! "Command to get extra run targets" Set from: Default -! rofi.run-list-command: -! "Run command to execute that runs in shell" Set from: Default -! rofi.run-shell-command: {terminal} -e {cmd} -! "Command to executed when -kb-accept-alt binding is hit on selected window " Set from: Default -! rofi.window-command: wmctrl -i -R {window} -! "Window fields to match in window mode" Set from: Default -! rofi.window-match-fields: all -! "Theme to use to look for icons" Set from: Default -! rofi.icon-theme: -! "Desktop entry fields to match in drun" Set from: Default -! rofi.drun-match-fields: name,generic,exec,categories,keywords -! "Only show Desktop entry from these categories" Set from: Default -! rofi.drun-categories: -! "Desktop entry show actions." Set from: Default -! rofi.drun-show-actions: false -! "DRUN format string. (Supports: generic,name,comment,exec,categories)" Set from: Default -! rofi.drun-display-format: {name} [({generic})] -! "Command to open an Desktop Entry that is a Link." Set from: Default -! rofi.drun-url-launcher: xdg-open -! "Disable history in run/ssh" Set from: Default -! rofi.disable-history: false -! "Programs ignored for history" Set from: Default -! rofi.ignored-prefixes: -! "Use sorting" Set from: Default -! rofi.sort: false -! "Choose the strategy used for sorting: normal (levenshtein) or fzf." Set from: Default -! rofi.sorting-method: normal -! "Set case-sensitivity" Set from: Default -! rofi.case-sensitive: false -! "Cycle through the results list" Set from: Default -! rofi.cycle: true -! "Enable sidebar-mode" Set from: Default -! rofi.sidebar-mode: false -! "Row height (in chars)" Set from: Default -! rofi.eh: 1 -! "Enable auto select mode" Set from: Default -! rofi.auto-select: false -! "Parse hosts file for ssh mode" Set from: Default -! rofi.parse-hosts: false -! "Parse known_hosts file for ssh mode" Set from: Default -! rofi.parse-known-hosts: true -! "Set the modi to combine in combi mode" Set from: Default -! rofi.combi-modi: window,run -! "Set the matching algorithm. (normal, regex, glob, fuzzy)" Set from: Default -! rofi.matching: normal -! "Tokenize input string" Set from: Default -! rofi.tokenize: true -! "Monitor id to show on" Set from: Default -! rofi.m: -5 -! "Margin between rows *DEPRECATED*" Set from: Default -! rofi.line-margin: 2 -! "Padding within rows *DEPRECATED*" Set from: Default -! rofi.line-padding: 1 -! "Pre-set filter" Set from: Default -! rofi.filter: -! "Separator style (none, dash, solid) *DEPRECATED*" Set from: Default -! rofi.separator-style: dash -! "Hide scroll-bar *DEPRECATED*" Set from: Default -! rofi.hide-scrollbar: false -! "Fullscreen" Set from: Default -! rofi.fullscreen: false -! "Fake transparency *DEPRECATED*" Set from: Default -! rofi.fake-transparency: false -! "DPI" Set from: Default -! rofi.dpi: -1 -! "Threads to use for string matching" Set from: Default -! rofi.threads: 0 -! "Scrollbar width *DEPRECATED*" Set from: Default -! rofi.scrollbar-width: 8 -! "Scrolling method. (0: Page, 1: Centered)" Set from: Default -! rofi.scroll-method: 0 -! "Background to use for fake transparency. (background or screenshot) *DEPRECATED*" Set from: Default -! rofi.fake-background: screenshot -! "Window Format. w (desktop name), t (title), n (name), r (role), c (class)" Set from: Default -! rofi.window-format: {w} {c} {t} -! "Click outside the window to exit" Set from: Default -! rofi.click-to-exit: true -! "Indicate how it match by underlining it." Set from: Default -! rofi.show-match: true -! "New style theme file" Set from: Default -! rofi.theme: -! "Color scheme for normal row" Set from: Default -! 'bg' 'fg' 'bgalt' 'hlbg' 'hlfg' -rofi.color-normal: #000000, #b4b7b5, #89231d, #cc342b, #000000 -! "Color scheme for urgent row" Set from: Default -! rofi.color-urgent: -! "Color scheme for active row" Set from: Default -! rofi.color-active: -! "Color scheme window" Set from: Default -! 'background' 'border' 'separator' -rofi.color-window: #1d1f21, #101010, #000000 -! "Max history size (WARNING: can cause slowdowns when set to high)." Set from: Default -! rofi.max-history-size: 25 -! "Hide the prefix mode prefix on the combi view." Set from: Default -! rofi.combi-hide-mode-prefix: false -! "Set the character used to negate the matching. ('\0' to disable)" Set from: Default -! rofi.matching-negate-char: - -! "Directory where history and temporary files are stored." Set from: Default -! rofi.cache-dir: -! "Show window thumbnail (if available) as icon in window switcher." Set from: Default -! rofi.window-thumbnail: false -! "DRUN: build and use a cache with desktop file content." Set from: Default -! rofi.drun-use-desktop-cache: false -! "DRUN: If enabled, reload the cache with desktop file content." Set from: Default -! rofi.drun-reload-desktop-cache: false -! "Normalize string when matching (implies -no-show-match)." Set from: Default -! rofi.normalize-match: false -! "Pidfile location" Set from: Default -! rofi.pid: /run/user/1000/rofi.pid -! "The display name of this browser" Set from: Default -! rofi.display-window: -! "The display name of this browser" Set from: Default -! rofi.display-windowcd: -! "The display name of this browser" Set from: Default -! rofi.display-run: -! "The display name of this browser" Set from: Default -! rofi.display-ssh: -! "The display name of this browser" Set from: Default -! rofi.display-drun: -! "The display name of this browser" Set from: Default -! rofi.display-combi: -! "The display name of this browser" Set from: Default -! rofi.display-keys: -! "The display name of this browser" Set from: Default -! rofi.display-file-browser: -! "Paste primary selection" Set from: Default -! rofi.kb-primary-paste: Control+V,Shift+Insert -! "Paste clipboard" Set from: Default -! rofi.kb-secondary-paste: Control+v,Insert -! "Clear input line" Set from: Default -! rofi.kb-clear-line: Control+w -! "Beginning of line" Set from: Default -! rofi.kb-move-front: Control+a -! "End of line" Set from: Default -! rofi.kb-move-end: Control+e -! "Move back one word" Set from: Default -! rofi.kb-move-word-back: Alt+b,Control+Left -! "Move forward one word" Set from: Default -! rofi.kb-move-word-forward: Alt+f,Control+Right -! "Move back one char" Set from: Default -! rofi.kb-move-char-back: Left,Control+b -! "Move forward one char" Set from: Default -! rofi.kb-move-char-forward: Right,Control+f -! "Delete previous word" Set from: Default -! rofi.kb-remove-word-back: Control+Alt+h,Control+BackSpace -! "Delete next word" Set from: Default -! rofi.kb-remove-word-forward: Control+Alt+d -! "Delete next char" Set from: Default -! rofi.kb-remove-char-forward: Delete,Control+d -! "Delete previous char" Set from: Default -! rofi.kb-remove-char-back: BackSpace,Shift+BackSpace,Control+h -! "Delete till the end of line" Set from: Default -! rofi.kb-remove-to-eol: Control+k -! "Delete till the start of line" Set from: Default -! rofi.kb-remove-to-sol: Control+u -! "Accept entry" Set from: Default -! rofi.kb-accept-entry: Control+j,Control+m,Return,KP_Enter -! "Use entered text as command (in ssh/run modi)" Set from: Default -! rofi.kb-accept-custom: Control+Return -! "Use alternate accept command." Set from: Default -! rofi.kb-accept-alt: Shift+Return -! "Delete entry from history" Set from: Default -! rofi.kb-delete-entry: Shift+Delete -! "Switch to the next mode." Set from: Default -! rofi.kb-mode-next: Shift+Right,Control+Tab -! "Switch to the previous mode." Set from: Default -! rofi.kb-mode-previous: Shift+Left,Control+ISO_Left_Tab -! "Go to the previous column" Set from: Default -! rofi.kb-row-left: Control+Page_Up -! "Go to the next column" Set from: Default -! rofi.kb-row-right: Control+Page_Down -! "Select previous entry" Set from: Default -! rofi.kb-row-up: Up,Control+p,ISO_Left_Tab -! "Select next entry" Set from: Default -! rofi.kb-row-down: Down,Control+n -! "Go to next row, if one left, accept it, if no left next mode." Set from: Default -! rofi.kb-row-tab: Tab -! "Go to the previous page" Set from: Default -! rofi.kb-page-prev: Page_Up -! "Go to the next page" Set from: Default -! rofi.kb-page-next: Page_Down -! "Go to the first entry" Set from: Default -! rofi.kb-row-first: Home,KP_Home -! "Go to the last entry" Set from: Default -! rofi.kb-row-last: End,KP_End -! "Set selected item as input text" Set from: Default -! rofi.kb-row-select: Control+space -! "Take a screenshot of the rofi window" Set from: Default -! rofi.kb-screenshot: Alt+S -! "Toggle between ellipsize modes for displayed data" Set from: Default -! rofi.kb-ellipsize: Alt+period -! "Toggle case sensitivity" Set from: Default -! rofi.kb-toggle-case-sensitivity: grave,dead_grave -! "Toggle sort" Set from: Default -! rofi.kb-toggle-sort: Alt+grave -! "Quit rofi" Set from: Default -! rofi.kb-cancel: Escape,Control+g,Control+bracketleft -! "Custom keybinding 1" Set from: Default -! rofi.kb-custom-1: Alt+1 -! "Custom keybinding 2" Set from: Default -! rofi.kb-custom-2: Alt+2 -! "Custom keybinding 3" Set from: Default -! rofi.kb-custom-3: Alt+3 -! "Custom keybinding 4" Set from: Default -! rofi.kb-custom-4: Alt+4 -! "Custom Keybinding 5" Set from: Default -! rofi.kb-custom-5: Alt+5 -! "Custom keybinding 6" Set from: Default -! rofi.kb-custom-6: Alt+6 -! "Custom Keybinding 7" Set from: Default -! rofi.kb-custom-7: Alt+7 -! "Custom keybinding 8" Set from: Default -! rofi.kb-custom-8: Alt+8 -! "Custom keybinding 9" Set from: Default -! rofi.kb-custom-9: Alt+9 -! "Custom keybinding 10" Set from: Default -! rofi.kb-custom-10: Alt+0 -! "Custom keybinding 11" Set from: Default -! rofi.kb-custom-11: Alt+exclam -! "Custom keybinding 12" Set from: Default -! rofi.kb-custom-12: Alt+at -! "Custom keybinding 13" Set from: Default -! rofi.kb-custom-13: Alt+numbersign -! "Custom keybinding 14" Set from: Default -! rofi.kb-custom-14: Alt+dollar -! "Custom keybinding 15" Set from: Default -! rofi.kb-custom-15: Alt+percent -! "Custom keybinding 16" Set from: Default -! rofi.kb-custom-16: Alt+dead_circumflex -! "Custom keybinding 17" Set from: Default -! rofi.kb-custom-17: Alt+ampersand -! "Custom keybinding 18" Set from: Default -! rofi.kb-custom-18: Alt+asterisk -! "Custom Keybinding 19" Set from: Default -! rofi.kb-custom-19: Alt+parenleft -! "Select row 1" Set from: Default -! rofi.kb-select-1: Super+1 -! "Select row 2" Set from: Default -! rofi.kb-select-2: Super+2 -! "Select row 3" Set from: Default -! rofi.kb-select-3: Super+3 -! "Select row 4" Set from: Default -! rofi.kb-select-4: Super+4 -! "Select row 5" Set from: Default -! rofi.kb-select-5: Super+5 -! "Select row 6" Set from: Default -! rofi.kb-select-6: Super+6 -! "Select row 7" Set from: Default -! rofi.kb-select-7: Super+7 -! "Select row 8" Set from: Default -! rofi.kb-select-8: Super+8 -! "Select row 9" Set from: Default -! rofi.kb-select-9: Super+9 -! "Select row 10" Set from: Default -! rofi.kb-select-10: Super+0 -! "Go to the previous column" Set from: Default -! rofi.ml-row-left: ScrollLeft -! "Go to the next column" Set from: Default -! rofi.ml-row-right: ScrollRight -! "Select previous entry" Set from: Default -! rofi.ml-row-up: ScrollUp -! "Select next entry" Set from: Default -! rofi.ml-row-down: ScrollDown -! "Select hovered row" Set from: Default -! rofi.me-select-entry: MousePrimary -! "Accept hovered row" Set from: Default -! rofi.me-accept-entry: MouseDPrimary -! "Accept hovered row with custom action" Set from: Default -! rofi.me-accept-custom: Control+MouseDPrimary - -!! special -!*.foreground: #c5c8c6 -!*.background: #1d1f21 -!*.cursorColor: #c5c8c6 -! -!! black -!*.color0: #282a2e -!*.color8: #373b41 -! -!! red -!*.color1: #a54242 -!*.color9: #cc6666 -! -!! green -!*.color2: #8c9440 -!*.color10: #b5bd68 -! -!! yellow -!*.color3: #de935f -!*.color11: #f0c674 -! -!! blue -!*.color4: #5f819d -!*.color12: #81a2be -! -!! magenta -!*.color5: #85678f -!*.color13: #b294bb -! -!! cyan -!*.color6: #5e8d87 -!*.color14: #8abeb7 -! -!! white -!*.color7: #707880 -!*.color15: #c5c8c6 -! -!! special -*.foreground: #c5c8c6 -*.background: #000000 -*.cursorColor: #c5c8c6 -*.reverseCursor: #333536 -dmenu.selbackground: #39c1ed -dmenu.selforeground: #000000 -dmenu.hibackground: #000000 -dmenu.hiforeground: #198844 -dmenu.selhibackground: #39c1ed -dmenu.selhiforeground: #198844 - -! black -*.color0: #1b1d1c -*.color8: #969896 - -! red -*.color1: #89231d -*.color9: #cc342b - -! green -*.color2: #198844 -*.color10: #4eec4e - -! yellow -*.color3: #ae7518 -*.color11: #fba922 - -! blue -*.color4: #2b55b2 -*.color12: #3971ed - -! magenta -*.color5: #784e93 -*.color13: #a36ac7 - -! cyan -*.color6: #2783a1 -*.color14: #39c1ed - -! white -*.color7: #b4b7b5 -*.color15: #ffffff diff --git a/X11/xresources b/X11/xresources new file mode 100644 index 0000000..d5c4550 --- /dev/null +++ b/X11/xresources @@ -0,0 +1,495 @@ +!! dmenu + +dmenu.font: mononoki Nerd Font Mono:size=24 + +!! dwm + +dwm.normbgcolor: #000000 +dwm.normbordercolor: #1b1d1c +dwm.normfgcolor: #ffffff +dwm.selbgcolor: #198844 +dwm.selbordercolor: #198844 +dwm.selfgcolor: #ffffff +dwm.urgfgcolor: #ffffff +dwm.urgbordercolor: #198844 +dwm.urgbgcolor: #cc342b +dwm.borderpx: 3 +dwm.gappx: 6 +dwm.snap: 32 +dwm.showbar: 1 +dwm.topbar: 1 +dwm.nmaster: 1 +dwm.resizehints: 1 +dwm.mfact: 0.50 + +!! st + +! These options only take effect on startup. +st.termname: st-256color +! if you do not set shell, precedence is: -e arg, utmp option, SHELL env var, /etc/passwd shell +st.shell: /usr/bin/tmux + +! The following options options can be reloaded via USR1 signal. +!st.font: mononoki Nerd Font Mono:pixelsize=12:antialias=true:autohint=true; +!st.font2: Symbola:pixelsize=12:antialias=true:autohint=true; +st.borderpx: 3 +! st alpha +st.alpha: 0.8 +st.alphaUnfocused: 0.8 +! Available cursor values: 2 4 6 7 = █ _ | ☃ ( 1 3 5 are blinking versions) +st.cursorshape: 6 +! thickness of underline and bar cursors +st.cursorthickness: 2 +! 0: normal blinking, 1: leave cursor border and blink with cursor''s background +st.cursorblinkstyle: 0 +! 0: cursor blinks with a constant interval; 1: blinking cycle resets on key input +st.cursorblinkontype: 1 +! st.bold_font: 0 +st.xfps: 120 +st.actionfps: 60 +! Amount of lines scrolled +st.mouseScrollLines: 1 +! Kerning / character bounding-box height multiplier +st.chscale: 1.0 +! Kerning / character bounding-box width multiplier +st.cwscale: 1.0 +! blinking timeout for terminal and cursor blinking (0 disables) +st.blinktimeout: 800 +! bell volume. Value between -100 and 100. (0 disables) +st.bellvolume: 0 +! this is a char that is exposed like so: `printf '\033[z'` +st.prompt_char: $ +! This option is can be preedit style. Available values: `root` `overthespot` (Default taken `root`) +st.imstyle: root +! This option sets the number of spaces for a tab +st.tabspaces: 2 + +!! RXVT-Unicode (urxvt) config +! do not scroll with output +URxvt.scrollTtyOutput: false +! scroll in relation to buffer (with mouse scroll or Shift+Page Up) +URxvt.scrollWithBuffer: true +! scroll back to the bottom on keypress +URxvt.scrollTtyKeypress: true +! disable scrollback buffer for secondary screen +URxvt.secondaryScreen: 1 +URxvt.secondaryScroll: 0 +URxvt.secondaryWheel: 1 +! URxvt font +URxvt.font: xft:Fira Code:regular:size=8,xft:symbola:regular:size=9 +! fix font spacing +URxvt.letterSpace: -1 +! Disable printing +URxvt.print-pipe: "cat > /dev/null" +! disable iso14755 +URxvt.iso14755: false +URxvt.iso14755_52: false +! enable transparency +URxvt.depth: 32 +URxvt.background: rgba:0000/0000/0200/c800 +! disable scrollbar +URxvt.scrollBar: false + +!! perls +! perls +URxvt.perl-ext: default,url-select,tabbed,resize-font,clipboard +! clipboard +URxvt.clipboard.autocopy: true +URxvt.keysym.Shift-Control-C: perl:clipboard:copy +URxvt.keysym.Shift-Control-V: perl:clipboard:paste +! url-select +URxvt.keysum.M-u: perl:url-select:select-next +URxvt.url-select.launcher: /usr/bin/xdg-open +URxvt.url-select.underline: true +! tabbed +URxvt.tabbed.tabbar-fg: 2 +URxvt.tabbed.tabbar-bg: 0 +URxvt.tabbed.tab-fg: 3 +URxvt.tabbed.tab-bg: 0 +! resize-font +URxvt.keysym.C-Minus: resize-font:smaller +URxvt.keysym.C-Plus: resize-font:bigger + +! "Enabled modi" Set from: Default +rofi.modi: window,run,ssh,drun.5 +! "Window width" Set from: Default +rofi.width: 1366 +! "Number of lines" Set from: Default +! rofi.lines: 15 +! "Number of columns" Set from: Default +! rofi.columns: 1 +! "Font to use" Set from: Default +rofi.font: mononoki 9 +! "Border width" Set from: Default +! rofi.bw: 1 +! "Location on screen" Set from: Default +rofi.location: 2 +! "Padding" Set from: Default +! rofi.padding: 5 +! "Y-offset relative to location" Set from: Default +! rofi.yoffset: 0 +! "X-offset relative to location" Set from: Default +! rofi.xoffset: 0 +! "Always show number of lines" Set from: Default +! rofi.fixed-num-lines: true +! "Whether to load and show icons" Set from: Default +! rofi.show-icons: false +! "Terminal to use" Set from: Default +! rofi.terminal: rofi-sensible-terminal +! "Ssh client to use" Set from: Default +! rofi.ssh-client: ssh +! "Ssh command to execute" Set from: Default +! rofi.ssh-command: {terminal} -e {ssh-client} {host} [-p {port}] +! "Run command to execute" Set from: Default +! rofi.run-command: {cmd} +! "Command to get extra run targets" Set from: Default +! rofi.run-list-command: +! "Run command to execute that runs in shell" Set from: Default +! rofi.run-shell-command: {terminal} -e {cmd} +! "Command to executed when -kb-accept-alt binding is hit on selected window " Set from: Default +! rofi.window-command: wmctrl -i -R {window} +! "Window fields to match in window mode" Set from: Default +! rofi.window-match-fields: all +! "Theme to use to look for icons" Set from: Default +! rofi.icon-theme: +! "Desktop entry fields to match in drun" Set from: Default +! rofi.drun-match-fields: name,generic,exec,categories,keywords +! "Only show Desktop entry from these categories" Set from: Default +! rofi.drun-categories: +! "Desktop entry show actions." Set from: Default +! rofi.drun-show-actions: false +! "DRUN format string. (Supports: generic,name,comment,exec,categories)" Set from: Default +! rofi.drun-display-format: {name} [({generic})] +! "Command to open an Desktop Entry that is a Link." Set from: Default +! rofi.drun-url-launcher: xdg-open +! "Disable history in run/ssh" Set from: Default +! rofi.disable-history: false +! "Programs ignored for history" Set from: Default +! rofi.ignored-prefixes: +! "Use sorting" Set from: Default +! rofi.sort: false +! "Choose the strategy used for sorting: normal (levenshtein) or fzf." Set from: Default +! rofi.sorting-method: normal +! "Set case-sensitivity" Set from: Default +! rofi.case-sensitive: false +! "Cycle through the results list" Set from: Default +! rofi.cycle: true +! "Enable sidebar-mode" Set from: Default +! rofi.sidebar-mode: false +! "Row height (in chars)" Set from: Default +! rofi.eh: 1 +! "Enable auto select mode" Set from: Default +! rofi.auto-select: false +! "Parse hosts file for ssh mode" Set from: Default +! rofi.parse-hosts: false +! "Parse known_hosts file for ssh mode" Set from: Default +! rofi.parse-known-hosts: true +! "Set the modi to combine in combi mode" Set from: Default +! rofi.combi-modi: window,run +! "Set the matching algorithm. (normal, regex, glob, fuzzy)" Set from: Default +! rofi.matching: normal +! "Tokenize input string" Set from: Default +! rofi.tokenize: true +! "Monitor id to show on" Set from: Default +! rofi.m: -5 +! "Margin between rows *DEPRECATED*" Set from: Default +! rofi.line-margin: 2 +! "Padding within rows *DEPRECATED*" Set from: Default +! rofi.line-padding: 1 +! "Pre-set filter" Set from: Default +! rofi.filter: +! "Separator style (none, dash, solid) *DEPRECATED*" Set from: Default +! rofi.separator-style: dash +! "Hide scroll-bar *DEPRECATED*" Set from: Default +! rofi.hide-scrollbar: false +! "Fullscreen" Set from: Default +! rofi.fullscreen: false +! "Fake transparency *DEPRECATED*" Set from: Default +! rofi.fake-transparency: false +! "DPI" Set from: Default +! rofi.dpi: -1 +! "Threads to use for string matching" Set from: Default +! rofi.threads: 0 +! "Scrollbar width *DEPRECATED*" Set from: Default +! rofi.scrollbar-width: 8 +! "Scrolling method. (0: Page, 1: Centered)" Set from: Default +! rofi.scroll-method: 0 +! "Background to use for fake transparency. (background or screenshot) *DEPRECATED*" Set from: Default +! rofi.fake-background: screenshot +! "Window Format. w (desktop name), t (title), n (name), r (role), c (class)" Set from: Default +! rofi.window-format: {w} {c} {t} +! "Click outside the window to exit" Set from: Default +! rofi.click-to-exit: true +! "Indicate how it match by underlining it." Set from: Default +! rofi.show-match: true +! "New style theme file" Set from: Default +! rofi.theme: +! "Color scheme for normal row" Set from: Default +! 'bg' 'fg' 'bgalt' 'hlbg' 'hlfg' +rofi.color-normal: #000000, #b4b7b5, #89231d, #cc342b, #000000 +! "Color scheme for urgent row" Set from: Default +! rofi.color-urgent: +! "Color scheme for active row" Set from: Default +! rofi.color-active: +! "Color scheme window" Set from: Default +! 'background' 'border' 'separator' +rofi.color-window: #1d1f21, #101010, #000000 +! "Max history size (WARNING: can cause slowdowns when set to high)." Set from: Default +! rofi.max-history-size: 25 +! "Hide the prefix mode prefix on the combi view." Set from: Default +! rofi.combi-hide-mode-prefix: false +! "Set the character used to negate the matching. ('\0' to disable)" Set from: Default +! rofi.matching-negate-char: - +! "Directory where history and temporary files are stored." Set from: Default +! rofi.cache-dir: +! "Show window thumbnail (if available) as icon in window switcher." Set from: Default +! rofi.window-thumbnail: false +! "DRUN: build and use a cache with desktop file content." Set from: Default +! rofi.drun-use-desktop-cache: false +! "DRUN: If enabled, reload the cache with desktop file content." Set from: Default +! rofi.drun-reload-desktop-cache: false +! "Normalize string when matching (implies -no-show-match)." Set from: Default +! rofi.normalize-match: false +! "Pidfile location" Set from: Default +! rofi.pid: /run/user/1000/rofi.pid +! "The display name of this browser" Set from: Default +! rofi.display-window: +! "The display name of this browser" Set from: Default +! rofi.display-windowcd: +! "The display name of this browser" Set from: Default +! rofi.display-run: +! "The display name of this browser" Set from: Default +! rofi.display-ssh: +! "The display name of this browser" Set from: Default +! rofi.display-drun: +! "The display name of this browser" Set from: Default +! rofi.display-combi: +! "The display name of this browser" Set from: Default +! rofi.display-keys: +! "The display name of this browser" Set from: Default +! rofi.display-file-browser: +! "Paste primary selection" Set from: Default +! rofi.kb-primary-paste: Control+V,Shift+Insert +! "Paste clipboard" Set from: Default +! rofi.kb-secondary-paste: Control+v,Insert +! "Clear input line" Set from: Default +! rofi.kb-clear-line: Control+w +! "Beginning of line" Set from: Default +! rofi.kb-move-front: Control+a +! "End of line" Set from: Default +! rofi.kb-move-end: Control+e +! "Move back one word" Set from: Default +! rofi.kb-move-word-back: Alt+b,Control+Left +! "Move forward one word" Set from: Default +! rofi.kb-move-word-forward: Alt+f,Control+Right +! "Move back one char" Set from: Default +! rofi.kb-move-char-back: Left,Control+b +! "Move forward one char" Set from: Default +! rofi.kb-move-char-forward: Right,Control+f +! "Delete previous word" Set from: Default +! rofi.kb-remove-word-back: Control+Alt+h,Control+BackSpace +! "Delete next word" Set from: Default +! rofi.kb-remove-word-forward: Control+Alt+d +! "Delete next char" Set from: Default +! rofi.kb-remove-char-forward: Delete,Control+d +! "Delete previous char" Set from: Default +! rofi.kb-remove-char-back: BackSpace,Shift+BackSpace,Control+h +! "Delete till the end of line" Set from: Default +! rofi.kb-remove-to-eol: Control+k +! "Delete till the start of line" Set from: Default +! rofi.kb-remove-to-sol: Control+u +! "Accept entry" Set from: Default +! rofi.kb-accept-entry: Control+j,Control+m,Return,KP_Enter +! "Use entered text as command (in ssh/run modi)" Set from: Default +! rofi.kb-accept-custom: Control+Return +! "Use alternate accept command." Set from: Default +! rofi.kb-accept-alt: Shift+Return +! "Delete entry from history" Set from: Default +! rofi.kb-delete-entry: Shift+Delete +! "Switch to the next mode." Set from: Default +! rofi.kb-mode-next: Shift+Right,Control+Tab +! "Switch to the previous mode." Set from: Default +! rofi.kb-mode-previous: Shift+Left,Control+ISO_Left_Tab +! "Go to the previous column" Set from: Default +! rofi.kb-row-left: Control+Page_Up +! "Go to the next column" Set from: Default +! rofi.kb-row-right: Control+Page_Down +! "Select previous entry" Set from: Default +! rofi.kb-row-up: Up,Control+p,ISO_Left_Tab +! "Select next entry" Set from: Default +! rofi.kb-row-down: Down,Control+n +! "Go to next row, if one left, accept it, if no left next mode." Set from: Default +! rofi.kb-row-tab: Tab +! "Go to the previous page" Set from: Default +! rofi.kb-page-prev: Page_Up +! "Go to the next page" Set from: Default +! rofi.kb-page-next: Page_Down +! "Go to the first entry" Set from: Default +! rofi.kb-row-first: Home,KP_Home +! "Go to the last entry" Set from: Default +! rofi.kb-row-last: End,KP_End +! "Set selected item as input text" Set from: Default +! rofi.kb-row-select: Control+space +! "Take a screenshot of the rofi window" Set from: Default +! rofi.kb-screenshot: Alt+S +! "Toggle between ellipsize modes for displayed data" Set from: Default +! rofi.kb-ellipsize: Alt+period +! "Toggle case sensitivity" Set from: Default +! rofi.kb-toggle-case-sensitivity: grave,dead_grave +! "Toggle sort" Set from: Default +! rofi.kb-toggle-sort: Alt+grave +! "Quit rofi" Set from: Default +! rofi.kb-cancel: Escape,Control+g,Control+bracketleft +! "Custom keybinding 1" Set from: Default +! rofi.kb-custom-1: Alt+1 +! "Custom keybinding 2" Set from: Default +! rofi.kb-custom-2: Alt+2 +! "Custom keybinding 3" Set from: Default +! rofi.kb-custom-3: Alt+3 +! "Custom keybinding 4" Set from: Default +! rofi.kb-custom-4: Alt+4 +! "Custom Keybinding 5" Set from: Default +! rofi.kb-custom-5: Alt+5 +! "Custom keybinding 6" Set from: Default +! rofi.kb-custom-6: Alt+6 +! "Custom Keybinding 7" Set from: Default +! rofi.kb-custom-7: Alt+7 +! "Custom keybinding 8" Set from: Default +! rofi.kb-custom-8: Alt+8 +! "Custom keybinding 9" Set from: Default +! rofi.kb-custom-9: Alt+9 +! "Custom keybinding 10" Set from: Default +! rofi.kb-custom-10: Alt+0 +! "Custom keybinding 11" Set from: Default +! rofi.kb-custom-11: Alt+exclam +! "Custom keybinding 12" Set from: Default +! rofi.kb-custom-12: Alt+at +! "Custom keybinding 13" Set from: Default +! rofi.kb-custom-13: Alt+numbersign +! "Custom keybinding 14" Set from: Default +! rofi.kb-custom-14: Alt+dollar +! "Custom keybinding 15" Set from: Default +! rofi.kb-custom-15: Alt+percent +! "Custom keybinding 16" Set from: Default +! rofi.kb-custom-16: Alt+dead_circumflex +! "Custom keybinding 17" Set from: Default +! rofi.kb-custom-17: Alt+ampersand +! "Custom keybinding 18" Set from: Default +! rofi.kb-custom-18: Alt+asterisk +! "Custom Keybinding 19" Set from: Default +! rofi.kb-custom-19: Alt+parenleft +! "Select row 1" Set from: Default +! rofi.kb-select-1: Super+1 +! "Select row 2" Set from: Default +! rofi.kb-select-2: Super+2 +! "Select row 3" Set from: Default +! rofi.kb-select-3: Super+3 +! "Select row 4" Set from: Default +! rofi.kb-select-4: Super+4 +! "Select row 5" Set from: Default +! rofi.kb-select-5: Super+5 +! "Select row 6" Set from: Default +! rofi.kb-select-6: Super+6 +! "Select row 7" Set from: Default +! rofi.kb-select-7: Super+7 +! "Select row 8" Set from: Default +! rofi.kb-select-8: Super+8 +! "Select row 9" Set from: Default +! rofi.kb-select-9: Super+9 +! "Select row 10" Set from: Default +! rofi.kb-select-10: Super+0 +! "Go to the previous column" Set from: Default +! rofi.ml-row-left: ScrollLeft +! "Go to the next column" Set from: Default +! rofi.ml-row-right: ScrollRight +! "Select previous entry" Set from: Default +! rofi.ml-row-up: ScrollUp +! "Select next entry" Set from: Default +! rofi.ml-row-down: ScrollDown +! "Select hovered row" Set from: Default +! rofi.me-select-entry: MousePrimary +! "Accept hovered row" Set from: Default +! rofi.me-accept-entry: MouseDPrimary +! "Accept hovered row with custom action" Set from: Default +! rofi.me-accept-custom: Control+MouseDPrimary + +!! special +!*.foreground: #c5c8c6 +!*.background: #1d1f21 +!*.cursorColor: #c5c8c6 +! +!! black +!*.color0: #282a2e +!*.color8: #373b41 +! +!! red +!*.color1: #a54242 +!*.color9: #cc6666 +! +!! green +!*.color2: #8c9440 +!*.color10: #b5bd68 +! +!! yellow +!*.color3: #de935f +!*.color11: #f0c674 +! +!! blue +!*.color4: #5f819d +!*.color12: #81a2be +! +!! magenta +!*.color5: #85678f +!*.color13: #b294bb +! +!! cyan +!*.color6: #5e8d87 +!*.color14: #8abeb7 +! +!! white +!*.color7: #707880 +!*.color15: #c5c8c6 +! +!! special +*.foreground: #c5c8c6 +*.background: #000000 +*.cursorColor: #c5c8c6 +*.reverseCursor: #333536 +dmenu.selbackground: #39c1ed +dmenu.selforeground: #000000 +dmenu.hibackground: #000000 +dmenu.hiforeground: #198844 +dmenu.selhibackground: #39c1ed +dmenu.selhiforeground: #198844 + +! black +*.color0: #1b1d1c +*.color8: #969896 + +! red +*.color1: #89231d +*.color9: #cc342b + +! green +*.color2: #198844 +*.color10: #4eec4e + +! yellow +*.color3: #ae7518 +*.color11: #fba922 + +! blue +*.color4: #2b55b2 +*.color12: #3971ed + +! magenta +*.color5: #784e93 +*.color13: #a36ac7 + +! cyan +*.color6: #2783a1 +*.color14: #39c1ed + +! white +*.color7: #b4b7b5 +*.color15: #ffffff diff --git a/autostart.sh b/autostart.sh index 311953f..3616220 100755 --- a/autostart.sh +++ b/autostart.sh @@ -25,7 +25,7 @@ if [ -n "${WAYLAND_DISPLAY}${DISPLAY}" ]; then import-gsettings gtk-theme 'Flat-Remix-GTK-Green-Darkest-Solid' import-gsettings icon-theme 'Mint-X-Grey' import-gsettings cursor-theme 'Adwaita' - xrdb ~/.Xresources + xrdb "$XDG_CONFIG_HOME/X11/xresources" fi [ -x "$XDG_CONFIG_HOME/computerrc.sh" ] && "$XDG_CONFIG_HOME/computerrc.sh" diff --git a/hypr/hyprland.conf b/hypr/hyprland.conf index 26d5441..633c832 100644 --- a/hypr/hyprland.conf +++ b/hypr/hyprland.conf @@ -20,7 +20,7 @@ exec-once = lxqt-policykit-agent exec-once = import-gsettings gtk-theme 'Flat-Remix-GTK-Green-Darkest-Solid' exec-once = import-gsettings icon-theme 'Mint-X-Grey' exec-once = import-gsettings cursor-theme 'Breeze' -exec-once = xrdb ~/.Xresources +exec-once = xrdb -load "$XDG_CONFIG_HOME"/X11/xresources exec-once = com.github.wwmm.easyeffects exec-once = mpd #}}} diff --git a/sh/aliases b/sh/aliases index a930a47..1537161 100644 --- a/sh/aliases +++ b/sh/aliases @@ -77,3 +77,6 @@ alias s='sudo systemctl' ## Runit #alias ursm='env SVDIR="$HOME/.local/sv/" rsm' + +# XDG dirs fix +alias svn="svn --config-dir \"$XDG_CONFIG_HOME\"/subversion" diff --git a/sh/profile b/sh/profile index e5c38b2..b18500d 100644 --- a/sh/profile +++ b/sh/profile @@ -7,6 +7,7 @@ export XDG_CURRENT_DESKTOP="i3" export XDG_DOCUMENTS_DIR=${HOME}/Documents export XDG_DOWNLOAD_DIR=${HOME}/Downloads export XDG_DESKTOP_DIR=${HOME}/Desktop +export XDG_STATE_HOME="${HOME}/.local/state" export XDG_VIDEOS_DIR=${HOME}/Videos export XDG_DATA_DIRS="${XDG_DATA_DIRS}:$HOME/.nix-profile/share" @@ -37,6 +38,7 @@ export _JAVA_OPTIONS=-Djava.util.prefs.userRoot="$XDG_CONFIG_HOME"/java export GTK2_RC_FILES="$XDG_CONFIG_HOME"/gtk-2.0/gtkrc export ZDOTDIR=$HOME/.config/zsh export CARGO_HOME="$XDG_DATA_HOME"/cargo +export RUSTUP_HOME="$XDG_DATA_HOME"/rustup export WEECHAT_HOME="$XDG_CONFIG_HOME"/weechat export PASSWORD_STORE_DIR="$XDG_DATA_HOME"/pass export NOTMUCH_CONFIG="$XDG_CONFIG_HOME"/notmuch/notmuchrc @@ -44,6 +46,11 @@ export NMBGIT="$XDG_DATA_HOME"/notmuch/nmbug export WINEROOT="$XDG_DATA_HOME"/wineprefixes export WINEPREFIX="$WINEROOT"/default export MPD_HOST="$XDG_CONFIG_HOME/mpd/socket" +export GTK2_RC_FILES="$XDG_CONFIG_HOME"/gtk-2.0/gtkrc +export RENPY_PATH_TO_SAVES="$XDG_DATA_HOME" +export XINITRC="$XDG_CONFIG_HOME"/X11/xinitrc +export XAUTHORITY="$XDG_RUNTIME_DIR"/X11/Xauthority +export VIMINIT="set nocp | source ${XDG_CONFIG_HOME:-$HOME.config}/vim/vimrc" # Scaling export QT_AUTO_SCREEN_SCALE_FACTOR=0 diff --git a/zsh/.zshenv b/zsh/.zshenv index 1740c82..b8c9d48 100644 --- a/zsh/.zshenv +++ b/zsh/.zshenv @@ -1,4 +1,4 @@ # ZSH SPECIFIC CONFIGS unset HISTFILE -[ -f "$HOME/.profile" ] && . "$HOME/.profile" -export ZDOTDIR=$HOME/.config/zsh +export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}" +[ -f "$XDG_CONFIG_HOME/sh/profile" ] && . "$XDG_CONFIG_HOME/sh/profile" -- cgit v1.2.3 From 663699322c45f2c830e167d142d6b3579e849eb4 Mon Sep 17 00:00:00 2001 From: zachir Date: Thu, 6 Jun 2024 15:16:14 -0500 Subject: Install ZDOTDIR globally and load profile manually This means I don't need to have either ~/.profile or ~/.zshenv symlinks in the home directory. This adds in an installer to set that up. --- Makefile | 18 +++--------------- installers/set_zshdirs.sh | 13 +++++++++++++ zsh/.zshenv | 1 + 3 files changed, 17 insertions(+), 15 deletions(-) create mode 100755 installers/set_zshdirs.sh (limited to 'zsh') diff --git a/Makefile b/Makefile index 0faf846..e27af0a 100644 --- a/Makefile +++ b/Makefile @@ -1,28 +1,16 @@ VIM := $(shell command -v vim 2>/dev/null) NVIM := $(shell command -v nvim 2>/dev/null) -XCONFS := X11/Xresources ZCONFS := zsh/.zshenv -SCONFS := sh/profile DCONFS := doas.conf all: -install: install-xconfigs install-shconfigs install-zshconfigs vimplug-vim vimplug-nvim - -install-xconfigs: $(XCONFS) - @echo "Installing Xorg conf files..." - @echo "Xresources..." - @ln -sf `pwd`/X11/Xresources ~/.Xresources - @echo "Done." - -install-shconfigs: $(SCONFS) - @echo "Installing SH conf files..." - @echo ".profile..." - @ln -sf `pwd`/sh/profile ~/.profile - @echo "Done." +install: install-zshconfigs vimplug-vim vimplug-nvim install-zshconfigs: $(ZCONFS) @echo "Installing zsh conf files..." + @echo "Setting ZSHDOTDIR globally..." + @$(shell sudo installers/set_zshdirs.sh) @echo ".zshenv..." @ln -sf `pwd`/zsh/.zshenv ~/.zshenv @echo "Done." diff --git a/installers/set_zshdirs.sh b/installers/set_zshdirs.sh new file mode 100755 index 0000000..2d82f19 --- /dev/null +++ b/installers/set_zshdirs.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +if [ -f /etc/zshenv ]; then + ZSHENV="/etc/zshenv" +elif [ -d /etc/zsh ]; then + ZSHENV="/etc/zsh/zshenv" +else + ZSHENV="/etc/zshenv" +fi + +if ! grep -q "ZDOTDIR" $ZSHENV 2>/dev/null; then + echo "export ZDOTDIR=\"\$HOME\"/.config/zsh" >> $ZSHENV +fi diff --git a/zsh/.zshenv b/zsh/.zshenv index b8c9d48..f02f83a 100644 --- a/zsh/.zshenv +++ b/zsh/.zshenv @@ -1,4 +1,5 @@ # ZSH SPECIFIC CONFIGS unset HISTFILE export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}" +[ -f /etc/profile ] && . /etc/profile [ -f "$XDG_CONFIG_HOME/sh/profile" ] && . "$XDG_CONFIG_HOME/sh/profile" -- cgit v1.2.3 From f627c6a471c89f3a13ef0dfee411dc6dbf18a0ee Mon Sep 17 00:00:00 2001 From: ZachIR Date: Thu, 31 Oct 2024 12:08:12 -0500 Subject: Add auto-cpufreq zsh completion --- zsh/.zshrc | 1 + 1 file changed, 1 insertion(+) (limited to 'zsh') diff --git a/zsh/.zshrc b/zsh/.zshrc index 00be912..a00f116 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -97,3 +97,4 @@ bindkey -- '^[[B' down-line-or-beg [[ -n "${key[Shift-Tab]}" ]] && bindkey -- "${key[Shift-Tab]}" reverse-menu-complete [[ -n "${key[Delete]}" ]] && bindkey -- "${key[Delete]}" delete-char +eval "$(_AUTO_CPUFREQ_COMPLETE=zsh_source auto-cpufreq)" -- cgit v1.2.3 From 44fbfc95f779e5d6bbdaaf250ada4dfcdae5cb2a Mon Sep 17 00:00:00 2001 From: ZachIR Date: Sat, 18 Jan 2025 23:39:25 -0600 Subject: Cleanup zsh configs + add zplug Just a couple plugins for syntax highlighting and history searching, removing a bunch of old unused files, and changing to just accept the standard of using dotfiles in the home directory. --- Makefile | 16 +++++--- installers/set_zshdirs.sh | 13 ------ sh/profile | 2 +- zsh/.zlogout | 1 - zsh/.zprofile | 6 --- zsh/.zshenv | 5 --- zsh/.zshrc | 100 ---------------------------------------------- zsh/zshenv | 6 +++ zsh/zshrc | 72 +++++++++++++++++++++++++++++++++ 9 files changed, 90 insertions(+), 131 deletions(-) delete mode 100755 installers/set_zshdirs.sh delete mode 100644 zsh/.zlogout delete mode 100644 zsh/.zprofile delete mode 100644 zsh/.zshenv delete mode 100644 zsh/.zshrc create mode 100644 zsh/zshenv create mode 100644 zsh/zshrc (limited to 'zsh') diff --git a/Makefile b/Makefile index e27af0a..898fe9e 100644 --- a/Makefile +++ b/Makefile @@ -1,20 +1,26 @@ VIM := $(shell command -v vim 2>/dev/null) NVIM := $(shell command -v nvim 2>/dev/null) -ZCONFS := zsh/.zshenv +ZCONFS := zsh/zshenv zsh/zshrc +SCONFS := sh/profile DCONFS := doas.conf all: -install: install-zshconfigs vimplug-vim vimplug-nvim +install: install-zshconfigs install-shconfigs vimplug-vim vimplug-nvim install-zshconfigs: $(ZCONFS) @echo "Installing zsh conf files..." - @echo "Setting ZSHDOTDIR globally..." - @$(shell sudo installers/set_zshdirs.sh) @echo ".zshenv..." - @ln -sf `pwd`/zsh/.zshenv ~/.zshenv + @ln -sf `pwd`/zsh/zshenv ~/.zshenv + @echo ".zshrc..." + @ln -sf `pwd`/zsh/zshrc ~/.zshrc @echo "Done." +install-shconfigs: $(SCONFS) + @echo "Installing sh conf files..." + @echo ".profile..." + @ln -sf `pwd`/sh/profile ~/.profile + vimplug-vim: installers/vimplug_vim.sh ifdef VIM @echo "Installing vim-plug for vim..." diff --git a/installers/set_zshdirs.sh b/installers/set_zshdirs.sh deleted file mode 100755 index 2d82f19..0000000 --- a/installers/set_zshdirs.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -if [ -f /etc/zshenv ]; then - ZSHENV="/etc/zshenv" -elif [ -d /etc/zsh ]; then - ZSHENV="/etc/zsh/zshenv" -else - ZSHENV="/etc/zshenv" -fi - -if ! grep -q "ZDOTDIR" $ZSHENV 2>/dev/null; then - echo "export ZDOTDIR=\"\$HOME\"/.config/zsh" >> $ZSHENV -fi diff --git a/sh/profile b/sh/profile index de79a65..b83d012 100644 --- a/sh/profile +++ b/sh/profile @@ -36,7 +36,7 @@ export NUGET_PACKAGES="$XDG_CACHE_HOME"/NuGetPackages export RXVT_SOCKET="$XDG_RUNTIME_DIR"/urxvtd export _JAVA_OPTIONS=-Djava.util.prefs.userRoot="$XDG_CONFIG_HOME"/java export GTK2_RC_FILES="$XDG_CONFIG_HOME"/gtk-2.0/gtkrc -export ZDOTDIR=$HOME/.config/zsh +#export ZDOTDIR=$HOME/.config/zsh export CARGO_HOME="$XDG_DATA_HOME"/cargo export RUSTUP_HOME="$XDG_DATA_HOME"/rustup export WEECHAT_HOME="$XDG_CONFIG_HOME"/weechat diff --git a/zsh/.zlogout b/zsh/.zlogout deleted file mode 100644 index 33666be..0000000 --- a/zsh/.zlogout +++ /dev/null @@ -1 +0,0 @@ -rm -rf /tmp/xorg-awake diff --git a/zsh/.zprofile b/zsh/.zprofile deleted file mode 100644 index 1eae5e7..0000000 --- a/zsh/.zprofile +++ /dev/null @@ -1,6 +0,0 @@ -#export GDK_DPI_SCALE=0.7 - -#gnome_schema=org.gnome.desktop.interface -# -#gsettings set $gnome_schema gtk-theme 'Plata-Noir-Compact' -#gsettings set $gnome_schema icon-theme 'Papirus-Dark' diff --git a/zsh/.zshenv b/zsh/.zshenv deleted file mode 100644 index f02f83a..0000000 --- a/zsh/.zshenv +++ /dev/null @@ -1,5 +0,0 @@ -# ZSH SPECIFIC CONFIGS -unset HISTFILE -export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}" -[ -f /etc/profile ] && . /etc/profile -[ -f "$XDG_CONFIG_HOME/sh/profile" ] && . "$XDG_CONFIG_HOME/sh/profile" diff --git a/zsh/.zshrc b/zsh/.zshrc deleted file mode 100644 index a00f116..0000000 --- a/zsh/.zshrc +++ /dev/null @@ -1,100 +0,0 @@ -HISTFILE="$ZDOTDIR"/hist -SAVEHIST=1000 -HISTSIZE=1000 -setopt APPEND_HISTORY -setopt HIST_FIND_NO_DUPS -setopt HIST_EXPIRE_DUPS_FIRST -setopt HIST_VERIFY -setopt HIST_IGNORE_DUPS -setopt INC_APPEND_HISTORY -setopt HIST_REDUCE_BLANKS - -_SH="zsh" - -if [ -f "$XDG_CONFIG_HOME"/sh/aliases ]; then - source "$XDG_CONFIG_HOME"/sh/aliases -fi -if [ -f "$XDG_CONFIG_HOME"/sh/functions ]; then - source "$XDG_CONFIG_HOME"/sh/functions -fi - -if [ -n "$ZDOTDIR"/.zshrc -a -f "$ZDOTDIR"/.zshrc ]; then - alias e='source "$ZDOTDIR"/.zshrc' -elif [ -f "$HOME"/.zshrc ]; then - alias e='source ~/.zshrc' -fi - -bindkey "^?" backward-delete-char - -# bindkey -v - -if [ "$TERM" = "st-256color" ] || [ "$TERM" = "xterm-256color" ]; then - function zle-line-init () { echoti smkx } - function zle-line-finish () { echoti rmkx } - - zle -N zle-line-init - zle -N zle-line-finish -fi - -unset COLOR1 -ZSHTHEMERC="${ZDOTDIR:-$HOME}/.zsh_theme" -[ -f "$ZSHTHEMERC" ] && . "$ZSHTHEMERC" - -if [ -z "$COLOR1" ]; then - case "$(whoami)" in - zachir) COLOR1="014" ;; - git) COLOR1="013" ;; - subsonic) COLOR1="012" ;; - *) COLOR1="015" ;; - esac -fi - -MYPROMPT='%B%S%F{'"$COLOR1"'}[%n@%m]:%f%s%F{015}%~%f%S%F{'"$COLOR1"'}%#%f%s%b ' -function zle-line-init zle-keymap-select { - VIM_PROMPT="%B%F{012}[%n@%m]:%f%F{015}%~%f%F{012}%#%f%b " - PS1="${${KEYMAP/vicmd/$VIM_PROMPT}/main/$MYPROMPT}" - #PS1="$PROMPT $KEYMAP" - zle reset-prompt -} - -unset COLOR1 - -zle -N zle-line-init -zle -N zle-keymap-select -export KEYTIMEOUT=1 - -fpath+="$ZDOTDIR/zfunc" - -autoload -Uz compinit promptinit -compinit -d $CONFIG/zcompdump -promptinit -autoload -Uz up-line-or-beginning-search down-line-or-beginning-search -zle -N up-line-or-beginning-search -zle -N down-line-or-beginning-search - -zstyle ':completion:*' menu select -zstyle ':completion::complete:*' gain-privileges 1 -zstyle ':completion:*' rehash true - -setopt COMPLETE_ALIASES -setopt AUTO_CD - -typeset -g -A key - -key[Up]="${terminfo[kcuu1]}" -key[Down]="${terminfo[kcud1]}" -key[Left]="${terminfo[kcub1]}" -key[Right]="${terminfo[kcuf1]}" -key[Shift-Tab]="${terminfo[kcbt]}" -key[Delete]="${terminfo[kdch1]}" - -[[ -n "${key[Up]}" ]] && bindkey -- "${key[Up]}" up-line-or-beginning-search -bindkey -- '^[[A' up-line-or-beginning-search -bindkey -- '^[[B' down-line-or-beginning-search -[[ -n "${key[Down]}" ]] && bindkey -- "${key[Down]}" down-line-or-beginning-search -[[ -n "${key[Left]}" ]] && bindkey -- "${key[Left]}" backward-char -[[ -n "${key[Right]}" ]] && bindkey -- "${key[Right]}" forward-char -[[ -n "${key[Shift-Tab]}" ]] && bindkey -- "${key[Shift-Tab]}" reverse-menu-complete -[[ -n "${key[Delete]}" ]] && bindkey -- "${key[Delete]}" delete-char - -eval "$(_AUTO_CPUFREQ_COMPLETE=zsh_source auto-cpufreq)" diff --git a/zsh/zshenv b/zsh/zshenv new file mode 100644 index 0000000..df0371e --- /dev/null +++ b/zsh/zshenv @@ -0,0 +1,6 @@ +# ZSH SPECIFIC CONFIGS +unset HISTFILE +export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}" +export skip_global_compinit=1 +[ -f /etc/profile ] && . /etc/profile +[ -f "$XDG_CONFIG_HOME/sh/profile" ] && . "$XDG_CONFIG_HOME/sh/profile" diff --git a/zsh/zshrc b/zsh/zshrc new file mode 100644 index 0000000..fb5b167 --- /dev/null +++ b/zsh/zshrc @@ -0,0 +1,72 @@ +#zmodload zsh/zprof +if [ -d "$HOME/.zplug" ]; then + export ZPLUG_INSTALLED="y" + source "$HOME/.zplug/init.zsh" +fi +HISTFILE="$XDG_CONFIG_HOME/zsh/hist" +SAVEHIST=1000 +HISTSIZE=1000 +setopt APPEND_HISTORY +setopt HIST_FIND_NO_DUPS +setopt HIST_EXPIRE_DUPS_FIRST +setopt HIST_VERIFY +setopt HIST_IGNORE_DUPS +setopt INC_APPEND_HISTORY +setopt HIST_REDUCE_BLANKS +setopt COMPLETE_ALIASES +setopt AUTO_CD + +_SH="zsh" + +if [ -f "$XDG_CONFIG_HOME"/sh/aliases ]; then + source "$XDG_CONFIG_HOME"/sh/aliases +fi +if [ -f "$XDG_CONFIG_HOME"/sh/functions ]; then + source "$XDG_CONFIG_HOME"/sh/functions +fi + +if [ -f "$XDG_CONFIG_HOME/zsh/zshrc" ]; then + alias e='source "$XDG_CONFIG_HOME/zsh/zshrc"' +elif [ -f "$XDG_CONFIG_HOME/zshrc" ]; then + alias e='source "$XDG_CONFIG_HOME/zshrc"' +elif [ -f "$HOME"/.zshrc ]; then + alias e='source ~/.zshrc' +fi + +bindkey -v + +MYPROMPT=$'%B%S%F{002}[%n@%m]%s\UE0B0%F{015}%~%S%F{002}\UE0B0%#%s\UE0B0%f%k%b ' +function zle-line-init zle-keymap-select { + VIM_PROMPT=$'%B%S%F{012}[%n@%m]%s\UE0B0%F{015}%~%S%F{012}\UE0B0%#%s\UE0B0%f%k%b ' + PS1="${${KEYMAP/vicmd/$VIM_PROMPT}/main/$MYPROMPT}" + zle reset-prompt +} + +zle -N zle-line-init +zle -N zle-keymap-select +export KEYTIMEOUT=1 + +fpath+="$XDG_CONFIG_HOME/zsh/zfunc" + +if [ -n "$ZPLUG_INSTALLED" ]; then + # zsh history substring search + zplug "zsh-users/zsh-history-substring-search", as:plugin + + bindkey '^[[A' history-substring-search-up + bindkey '^[[B' history-substring-search-down + bindkey -M vicmd '^[[A' history-substring-search-up + bindkey -M vicmd '^[[B' history-substring-search-down + bindkey -M vicmd 'k' history-substring-search-up + bindkey -M vicmd 'j' history-substring-search-down + + # zsh syntax highlighting + zplug "zsh-users/zsh-syntax-highlighting", defer:2 + + # load zsh plugins + zplug load +fi + +autoload -Uz compinit +compinit + +#zprof -- cgit v1.2.3 From 95d509eeaba97aa0a35bb8c42225495e69d3a2c1 Mon Sep 17 00:00:00 2001 From: ZachIR Date: Tue, 21 Jan 2025 19:11:45 -0600 Subject: Use zkbd for zsh keybindings --- zsh/zshrc | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'zsh') diff --git a/zsh/zshrc b/zsh/zshrc index fb5b167..c95feb3 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -33,7 +33,16 @@ elif [ -f "$HOME"/.zshrc ]; then alias e='source ~/.zshrc' fi +source ~/.zkbd/$TERM-${${DISPLAY:t}:-$VENDOR-$OSTYPE} + +#autoload zkbd; zkbd bindkey -v +bindkey "${key[Backspace]}" backward-delete-char +bindkey "${key[Delete]}" delete-char +bindkey "${key[Home]}" beginning-of-line +bindkey "${key[End]}" end-of-line +bindkey "${key[PageUp]}" history-substring-search-up +bindkey "${key[PageDown]}" history-substring-search-down MYPROMPT=$'%B%S%F{002}[%n@%m]%s\UE0B0%F{015}%~%S%F{002}\UE0B0%#%s\UE0B0%f%k%b ' function zle-line-init zle-keymap-select { @@ -52,10 +61,10 @@ if [ -n "$ZPLUG_INSTALLED" ]; then # zsh history substring search zplug "zsh-users/zsh-history-substring-search", as:plugin - bindkey '^[[A' history-substring-search-up - bindkey '^[[B' history-substring-search-down - bindkey -M vicmd '^[[A' history-substring-search-up - bindkey -M vicmd '^[[B' history-substring-search-down + bindkey '${key[Up]}' history-substring-search-up + bindkey '${key[Down]}' history-substring-search-down + bindkey -M vicmd '${key[Up]}' history-substring-search-up + bindkey -M vicmd '${key[Down]}' history-substring-search-down bindkey -M vicmd 'k' history-substring-search-up bindkey -M vicmd 'j' history-substring-search-down -- cgit v1.2.3 From a9be74adf57403f7840d09f7a0081b6390864d5a Mon Sep 17 00:00:00 2001 From: ZachIR Date: Tue, 21 Jan 2025 19:12:56 -0600 Subject: Change zsh prompt to have <~> for powerline --- zsh/zshrc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'zsh') diff --git a/zsh/zshrc b/zsh/zshrc index c95feb3..0d6ecd5 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -44,9 +44,9 @@ bindkey "${key[End]}" end-of-line bindkey "${key[PageUp]}" history-substring-search-up bindkey "${key[PageDown]}" history-substring-search-down -MYPROMPT=$'%B%S%F{002}[%n@%m]%s\UE0B0%F{015}%~%S%F{002}\UE0B0%#%s\UE0B0%f%k%b ' +MYPROMPT=$'%B%S%F{002}[%n@%m]\UE0B2%F{015}%s%~%S%F{002}\UE0B0%#%s\UE0B0%f%k%b ' function zle-line-init zle-keymap-select { - VIM_PROMPT=$'%B%S%F{012}[%n@%m]%s\UE0B0%F{015}%~%S%F{012}\UE0B0%#%s\UE0B0%f%k%b ' + VIM_PROMPT=$'%B%S%F{012}[%n@%m]\UE0B2%F{015}%s%~%S%F{012}\UE0B0%#%s\UE0B0%f%k%b ' PS1="${${KEYMAP/vicmd/$VIM_PROMPT}/main/$MYPROMPT}" zle reset-prompt } -- cgit v1.2.3 From dd88548e55fc05f2b9dff855143e87141690b42a Mon Sep 17 00:00:00 2001 From: ZachIR Date: Thu, 23 Jan 2025 14:17:04 -0600 Subject: Fix zsh search bindkeys They used single quotes, but needed to be double quotes. --- zsh/zshrc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'zsh') diff --git a/zsh/zshrc b/zsh/zshrc index 0d6ecd5..4c633ee 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -61,12 +61,12 @@ if [ -n "$ZPLUG_INSTALLED" ]; then # zsh history substring search zplug "zsh-users/zsh-history-substring-search", as:plugin - bindkey '${key[Up]}' history-substring-search-up - bindkey '${key[Down]}' history-substring-search-down - bindkey -M vicmd '${key[Up]}' history-substring-search-up - bindkey -M vicmd '${key[Down]}' history-substring-search-down - bindkey -M vicmd 'k' history-substring-search-up - bindkey -M vicmd 'j' history-substring-search-down + bindkey "${key[Up]}" history-substring-search-up + bindkey "${key[Down]}" history-substring-search-down + bindkey -M vicmd "${key[Up]}" history-substring-search-up + bindkey -M vicmd "${key[Down]}" history-substring-search-down + bindkey -M vicmd "k" history-substring-search-up + bindkey -M vicmd "j" history-substring-search-down # zsh syntax highlighting zplug "zsh-users/zsh-syntax-highlighting", defer:2 -- cgit v1.2.3 From e3cde1579bbc9e07c0afc71084c9b5e83adf4ed7 Mon Sep 17 00:00:00 2001 From: ZachIR Date: Thu, 23 Jan 2025 14:19:01 -0600 Subject: Un-bold the zsh prompt (fixes issue in some terms) Namely cool-retro-term doesn't like bolded powerline symbols. --- zsh/zshrc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'zsh') diff --git a/zsh/zshrc b/zsh/zshrc index 4c633ee..9acd42f 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -44,9 +44,9 @@ bindkey "${key[End]}" end-of-line bindkey "${key[PageUp]}" history-substring-search-up bindkey "${key[PageDown]}" history-substring-search-down -MYPROMPT=$'%B%S%F{002}[%n@%m]\UE0B2%F{015}%s%~%S%F{002}\UE0B0%#%s\UE0B0%f%k%b ' +MYPROMPT=$'%S%F{002}[%n@%m]\UE0B2%F{015}%s%~%S%F{002}\UE0B0%#%s\UE0B0%f ' function zle-line-init zle-keymap-select { - VIM_PROMPT=$'%B%S%F{012}[%n@%m]\UE0B2%F{015}%s%~%S%F{012}\UE0B0%#%s\UE0B0%f%k%b ' + VIM_PROMPT=$'%S%F{012}[%n@%m]\UE0B2%F{015}%s%~%S%F{012}\UE0B0%#%s\UE0B0%f ' PS1="${${KEYMAP/vicmd/$VIM_PROMPT}/main/$MYPROMPT}" zle reset-prompt } -- cgit v1.2.3 From 9ca0fcebf70babcaa9caf87ce313540ba3567546 Mon Sep 17 00:00:00 2001 From: ZachIR Date: Fri, 25 Apr 2025 19:16:37 -0500 Subject: Update theming with EC0101 red --- gtk-2.0/gtkrc | 6 +++--- gtk-3.0/settings.ini | 14 ++++++++++---- waybar/style.css | 24 ++++++++++++------------ xsettingsd/xsettingsd.conf | 2 +- zsh/zshrc | 8 ++++++-- 5 files changed, 32 insertions(+), 22 deletions(-) (limited to 'zsh') diff --git a/gtk-2.0/gtkrc b/gtk-2.0/gtkrc index 3c97dc3..d0152f7 100644 --- a/gtk-2.0/gtkrc +++ b/gtk-2.0/gtkrc @@ -1,12 +1,12 @@ # DO NOT EDIT! This file will be overwritten by nwg-look. # Any customization should be done in ~/.gtkrc-2.0.mine instead. -gtk-theme-name="Flat-Remix-GTK-Green-Darkest" +gtk-theme-name="Flat-Remix-GTK-Red-Darkest" gtk-icon-theme-name="Cosmic" -gtk-font-name="Cantarell 11" +gtk-font-name="Noto Sans, 10" gtk-cursor-theme-name="BreezeX-Black" gtk-cursor-theme-size=32 -gtk-toolbar-style=GTK_TOOLBAR_ICONS +gtk-toolbar-style=3 gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR gtk-button-images=0 gtk-menu-images=0 diff --git a/gtk-3.0/settings.ini b/gtk-3.0/settings.ini index 85d3ba5..c597fa3 100644 --- a/gtk-3.0/settings.ini +++ b/gtk-3.0/settings.ini @@ -1,10 +1,10 @@ [Settings] -gtk-theme-name=Flat-Remix-GTK-Green-Darkest +gtk-theme-name=Flat-Remix-GTK-Red-Darkest gtk-icon-theme-name=Cosmic -gtk-font-name=Cantarell 11 +gtk-font-name=Noto Sans, 10 gtk-cursor-theme-name=BreezeX-Black gtk-cursor-theme-size=32 -gtk-toolbar-style=GTK_TOOLBAR_ICONS +gtk-toolbar-style=3 gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR gtk-button-images=0 gtk-menu-images=0 @@ -14,4 +14,10 @@ gtk-xft-antialias=1 gtk-xft-hinting=1 gtk-xft-hintstyle=hintslight gtk-xft-rgba=rgb -gtk-application-prefer-dark-theme=0 +gtk-application-prefer-dark-theme=1 +gtk-decoration-layout=icon:minimize,maximize,close +gtk-enable-animations=true +gtk-modules=colorreload-gtk-module +gtk-primary-button-warps-slider=true +gtk-sound-theme-name=ocean +gtk-xft-dpi=98304 diff --git a/waybar/style.css b/waybar/style.css index 88b8900..8fc3d0a 100644 --- a/waybar/style.css +++ b/waybar/style.css @@ -53,7 +53,7 @@ window#waybar.hidden { */ #workspaces button.active { - background: #198844; + background: #EC0101; } /* @@ -157,7 +157,7 @@ label:focus { } #memory { - background-color: #198844; + background-color: #EC0101; color: #ffffff; } @@ -167,12 +167,12 @@ label:focus { } #backlight { - background-color: #198844; + background-color: #EC0101; color: #ffffff; } #network { - background-color: #198844; + background-color: #EC0101; color: #ffffff; } @@ -181,14 +181,14 @@ label:focus { color: #ffffff; } -#pulseaudio { - background-color: #198844; +#wireplumber { + background-color: #EC0101; color: #ffffff; } -#pulseaudio.muted { +#wireplumber.muted { background-color: #1b1d1c; - color: #198844; + color: #EC0101; } #custom-media { @@ -278,19 +278,19 @@ label:focus { } #tray { - background-color: #198844; + background-color: #EC0101; color: #ffffff; } #tray > .passive { -gtk-icon-effect: dim; - background-color: #198844; + background-color: #EC0101; color: #ffffff; } #tray > .needs-attention { -gtk-icon-effect: highlight; - background-color: #198844; + background-color: #EC0101; color: #ffffff; } @@ -301,7 +301,7 @@ label:focus { } #idle_inhibitor.activated { - background-color: #198844; + background-color: #EC0101; color: #ffffff; border-radius: 20px 0px 0px 20px; diff --git a/xsettingsd/xsettingsd.conf b/xsettingsd/xsettingsd.conf index e762fa9..622b06f 100644 --- a/xsettingsd/xsettingsd.conf +++ b/xsettingsd/xsettingsd.conf @@ -1,4 +1,4 @@ -Net/ThemeName "Flat-Remix-GTK-Green-Darkest" +Net/ThemeName "Flat-Remix-GTK-Red-Darkest" Net/IconThemeName "Cosmic" Gtk/CursorThemeName "BreezeX-Black" Net/EnableEventSounds 1 diff --git a/zsh/zshrc b/zsh/zshrc index 9acd42f..557bf93 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -44,9 +44,13 @@ bindkey "${key[End]}" end-of-line bindkey "${key[PageUp]}" history-substring-search-up bindkey "${key[PageDown]}" history-substring-search-down -MYPROMPT=$'%S%F{002}[%n@%m]\UE0B2%F{015}%s%~%S%F{002}\UE0B0%#%s\UE0B0%f ' +if (env | grep -Fq 'DISTROBOX'); then + MYPROMPT=$'%F{000}%K{004}[%n@%m]%F{015}\UE0B2%K{015}%F{000}%~%F{015}%K{004}\UE0B0%F{000}%#%F{004}%k\UE0B0%f ' +else + MYPROMPT=$'%F{015}%K{009}[%n@%m]%F{015}\UE0B2%K{015}%F{000}%~%F{015}%K{009}\UE0B0%F{015}%#%F{009}%k\UE0B0%f ' +fi function zle-line-init zle-keymap-select { - VIM_PROMPT=$'%S%F{012}[%n@%m]\UE0B2%F{015}%s%~%S%F{012}\UE0B0%#%s\UE0B0%f ' + VIM_PROMPT=$'%F{000}%K{012}[%n@%m]%F{015}\UE0B2%K{015}%F{000}%~%F{015}%K{012}\UE0B0%F{000}%#%F{012}%k\UE0B0%f ' PS1="${${KEYMAP/vicmd/$VIM_PROMPT}/main/$MYPROMPT}" zle reset-prompt } -- cgit v1.2.3 From 760d34062229dad9b8276c454262536ce0ca9e7b Mon Sep 17 00:00:00 2001 From: ZachIR Date: Thu, 1 May 2025 15:06:03 -0500 Subject: Change Zsh prompt --- zsh/zshrc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'zsh') diff --git a/zsh/zshrc b/zsh/zshrc index 557bf93..dffdc65 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -45,12 +45,12 @@ bindkey "${key[PageUp]}" history-substring-search-up bindkey "${key[PageDown]}" history-substring-search-down if (env | grep -Fq 'DISTROBOX'); then - MYPROMPT=$'%F{000}%K{004}[%n@%m]%F{015}\UE0B2%K{015}%F{000}%~%F{015}%K{004}\UE0B0%F{000}%#%F{004}%k\UE0B0%f ' + MYPROMPT=$'%F{000}%K{004}[%n@%m]%F{013}\UE0B2%K{013}%F{000}%~%F{013}%K{004}\UE0B0%F{000}%#%F{004}%k\UE0B0%f ' else - MYPROMPT=$'%F{015}%K{009}[%n@%m]%F{015}\UE0B2%K{015}%F{000}%~%F{015}%K{009}\UE0B0%F{015}%#%F{009}%k\UE0B0%f ' + MYPROMPT=$'%F{000}%K{009}[%n@%m]%F{013}\UE0B2%K{013}%F{000}%~%F{013}%K{009}\UE0B0%F{000}%#%F{009}%k\UE0B0%f ' fi function zle-line-init zle-keymap-select { - VIM_PROMPT=$'%F{000}%K{012}[%n@%m]%F{015}\UE0B2%K{015}%F{000}%~%F{015}%K{012}\UE0B0%F{000}%#%F{012}%k\UE0B0%f ' + VIM_PROMPT=$'%F{000}%K{012}[%n@%m]%F{013}\UE0B2%K{013}%F{000}%~%F{013}%K{012}\UE0B0%F{000}%#%F{012}%k\UE0B0%f ' PS1="${${KEYMAP/vicmd/$VIM_PROMPT}/main/$MYPROMPT}" zle reset-prompt } -- cgit v1.2.3 From 9f80bcde3c3ff4e35be9aaeda800ed4bed2f174c Mon Sep 17 00:00:00 2001 From: ZachIR Date: Sun, 29 Jun 2025 13:45:44 -0500 Subject: Add zsh functions path --- zsh/zshenv | 1 + 1 file changed, 1 insertion(+) (limited to 'zsh') diff --git a/zsh/zshenv b/zsh/zshenv index df0371e..3719ef4 100644 --- a/zsh/zshenv +++ b/zsh/zshenv @@ -2,5 +2,6 @@ unset HISTFILE export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}" export skip_global_compinit=1 +fpath=($XDG_CONFIG_HOME/functions $fpath) [ -f /etc/profile ] && . /etc/profile [ -f "$XDG_CONFIG_HOME/sh/profile" ] && . "$XDG_CONFIG_HOME/sh/profile" -- cgit v1.2.3 From 031c015e5a8bf3ec5f9e5b29197b551cf188a6cd Mon Sep 17 00:00:00 2001 From: zachir Date: Sun, 29 Jun 2025 21:11:05 -0500 Subject: Fix zsh colorscheme --- zsh/zshrc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'zsh') diff --git a/zsh/zshrc b/zsh/zshrc index dffdc65..f748913 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -47,10 +47,10 @@ bindkey "${key[PageDown]}" history-substring-search-down if (env | grep -Fq 'DISTROBOX'); then MYPROMPT=$'%F{000}%K{004}[%n@%m]%F{013}\UE0B2%K{013}%F{000}%~%F{013}%K{004}\UE0B0%F{000}%#%F{004}%k\UE0B0%f ' else - MYPROMPT=$'%F{000}%K{009}[%n@%m]%F{013}\UE0B2%K{013}%F{000}%~%F{013}%K{009}\UE0B0%F{000}%#%F{009}%k\UE0B0%f ' + MYPROMPT=$'%F{000}%K{002}[%n@%m]%F{006}\UE0B2%K{006}%F{000}%~%F{006}%K{002}\UE0B0%F{000}%#%F{002}%k\UE0B0%f ' fi function zle-line-init zle-keymap-select { - VIM_PROMPT=$'%F{000}%K{012}[%n@%m]%F{013}\UE0B2%K{013}%F{000}%~%F{013}%K{012}\UE0B0%F{000}%#%F{012}%k\UE0B0%f ' + VIM_PROMPT=$'%F{000}%K{012}[%n@%m]%F{006}\UE0B2%K{006}%F{000}%~%F{006}%K{012}\UE0B0%F{000}%#%F{012}%k\UE0B0%f ' PS1="${${KEYMAP/vicmd/$VIM_PROMPT}/main/$MYPROMPT}" zle reset-prompt } -- cgit v1.2.3 From 5412cb6d6b3a958429a9bf781a95ee81fd29d0b4 Mon Sep 17 00:00:00 2001 From: ZachIR Date: Sun, 29 Jun 2025 23:19:57 -0500 Subject: Make more things XDG compliant Specifically .dotnet, .zplug, and .zcompdump --- sh/profile | 2 ++ zsh/zshrc | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'zsh') diff --git a/sh/profile b/sh/profile index a97e9e8..4337cc0 100644 --- a/sh/profile +++ b/sh/profile @@ -22,6 +22,8 @@ export ADB_VENDOR_KEY="$XDG_CONFIG_HOME"/android export LESSHISTFILE=- # Fixing Paths +export ZPLUG_HOME="$XDG_DATA_HOME/zplug" +export DOTNET_CLI_HOME="$XDG_DATA_HOME"/dotnet export MBSYNCRC="$XDG_CONFIG_HOME"/isync/mbsyncrc export ATOM_HOME="$XDG_DATA_HOME"/atom export XINITRC="$XDG_CONFIG_HOME"/X11/xinitrc diff --git a/zsh/zshrc b/zsh/zshrc index f748913..532fb15 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -80,6 +80,6 @@ if [ -n "$ZPLUG_INSTALLED" ]; then fi autoload -Uz compinit -compinit +compinit -d "$XDG_CACHE_HOME"/zsh/zcompdump-"$ZSH_VERSION" #zprof -- cgit v1.2.3 From faa34b8084be0814a05512e009d9ffa1ea349670 Mon Sep 17 00:00:00 2001 From: ZachIR Date: Mon, 30 Jun 2025 00:25:49 -0500 Subject: Fix zplug install in XDG dir --- zsh/zshrc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'zsh') diff --git a/zsh/zshrc b/zsh/zshrc index 532fb15..0e87993 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -1,5 +1,13 @@ #zmodload zsh/zprof -if [ -d "$HOME/.zplug" ]; then +if [ -n "$ZPLUG_HOME" ]; then + if [ -d "$ZPLUG_HOME" ]; then + export ZPLUG_INSTALLED="y" + source "$ZPLUG_HOME/init.zsh" + fi +elif [ -d "$XDG_DATA_HOME/zplug" ]; then + export ZPLUG_INSTALLED="y" + source "$XDG_DATA_HOME/zplug/init.zsh" +elif [ -d "$HOME/.zplug" ]; then export ZPLUG_INSTALLED="y" source "$HOME/.zplug/init.zsh" fi -- cgit v1.2.3 From 9d5498e0a8be1b987c5584659a0e97116ca50079 Mon Sep 17 00:00:00 2001 From: Zach Smith Date: Mon, 30 Jun 2025 09:38:19 -0500 Subject: Define XDG_CONFIG_HOME in zshrc if it is not already --- zsh/zshrc | 1 + 1 file changed, 1 insertion(+) (limited to 'zsh') diff --git a/zsh/zshrc b/zsh/zshrc index 0e87993..f8fdac5 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -11,6 +11,7 @@ elif [ -d "$HOME/.zplug" ]; then export ZPLUG_INSTALLED="y" source "$HOME/.zplug/init.zsh" fi +[ -z "$XDG_CONFIG_HOME" ] && XDG_CONFIG_HOME="$HOME/.config" HISTFILE="$XDG_CONFIG_HOME/zsh/hist" SAVEHIST=1000 HISTSIZE=1000 -- cgit v1.2.3 From d6c382e9a65b98f31543afa604ff5185a467a725 Mon Sep 17 00:00:00 2001 From: zachir Date: Tue, 8 Jul 2025 16:02:09 -0500 Subject: Ignore hosts file in zsh completion --- zsh/zshrc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'zsh') diff --git a/zsh/zshrc b/zsh/zshrc index f8fdac5..c25f285 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -91,4 +91,6 @@ fi autoload -Uz compinit compinit -d "$XDG_CACHE_HOME"/zsh/zcompdump-"$ZSH_VERSION" +zstyle ':completion:*' hosts off + #zprof -- cgit v1.2.3 From 41bf96565f378f328acf75cf7471593f02bcb8af Mon Sep 17 00:00:00 2001 From: zachir Date: Sat, 12 Jul 2025 19:37:39 -0500 Subject: Move .zkbd to config dir --- zsh/zshrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'zsh') diff --git a/zsh/zshrc b/zsh/zshrc index c25f285..09a5e32 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -42,7 +42,7 @@ elif [ -f "$HOME"/.zshrc ]; then alias e='source ~/.zshrc' fi -source ~/.zkbd/$TERM-${${DISPLAY:t}:-$VENDOR-$OSTYPE} +source ~/.config/zsh/.zkbd/$TERM-${${DISPLAY:t}:-$VENDOR-$OSTYPE} #autoload zkbd; zkbd bindkey -v -- cgit v1.2.3 From 1e976efb21acb4a4e1046dd97e89307bba5e6baf Mon Sep 17 00:00:00 2001 From: zachir Date: Sat, 19 Jul 2025 22:43:50 -0500 Subject: Add optimization to zsh loading It requires using ZDOTDIR again --- sh/profile | 2 +- zsh/.zshenv | 7 +++++ zsh/.zshrc | 100 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ zsh/zshenv | 7 ----- zsh/zshrc | 96 --------------------------------------------------------- 5 files changed, 108 insertions(+), 104 deletions(-) create mode 100644 zsh/.zshenv create mode 100644 zsh/.zshrc delete mode 100644 zsh/zshenv delete mode 100644 zsh/zshrc (limited to 'zsh') diff --git a/sh/profile b/sh/profile index 1582d5a..e4659a5 100644 --- a/sh/profile +++ b/sh/profile @@ -40,7 +40,7 @@ export NUGET_PACKAGES="$XDG_CACHE_HOME"/NuGetPackages export RXVT_SOCKET="$XDG_RUNTIME_DIR"/urxvtd export _JAVA_OPTIONS=-Djava.util.prefs.userRoot="$XDG_CONFIG_HOME"/java export GTK2_RC_FILES="$XDG_CONFIG_HOME"/gtk-2.0/gtkrc -#export ZDOTDIR=$HOME/.config/zsh +export ZDOTDIR=$HOME/.config/zsh export CARGO_HOME="$XDG_DATA_HOME"/cargo export RUSTUP_HOME="$XDG_DATA_HOME"/rustup export WEECHAT_HOME="$XDG_CONFIG_HOME"/weechat diff --git a/zsh/.zshenv b/zsh/.zshenv new file mode 100644 index 0000000..3719ef4 --- /dev/null +++ b/zsh/.zshenv @@ -0,0 +1,7 @@ +# ZSH SPECIFIC CONFIGS +unset HISTFILE +export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}" +export skip_global_compinit=1 +fpath=($XDG_CONFIG_HOME/functions $fpath) +[ -f /etc/profile ] && . /etc/profile +[ -f "$XDG_CONFIG_HOME/sh/profile" ] && . "$XDG_CONFIG_HOME/sh/profile" diff --git a/zsh/.zshrc b/zsh/.zshrc new file mode 100644 index 0000000..791b5d1 --- /dev/null +++ b/zsh/.zshrc @@ -0,0 +1,100 @@ +#zmodload zsh/zprof +if [ -n "$ZPLUG_HOME" ]; then + if [ -d "$ZPLUG_HOME" ]; then + export ZPLUG_INSTALLED="y" + source "$ZPLUG_HOME/init.zsh" + fi +elif [ -d "$XDG_DATA_HOME/zplug" ]; then + export ZPLUG_INSTALLED="y" + source "$XDG_DATA_HOME/zplug/init.zsh" +elif [ -d "$HOME/.zplug" ]; then + export ZPLUG_INSTALLED="y" + source "$HOME/.zplug/init.zsh" +fi +[ -z "$XDG_CONFIG_HOME" ] && XDG_CONFIG_HOME="$HOME/.config" +HISTFILE="$XDG_CONFIG_HOME/zsh/hist" +SAVEHIST=1000 +HISTSIZE=1000 +setopt APPEND_HISTORY +setopt HIST_FIND_NO_DUPS +setopt HIST_EXPIRE_DUPS_FIRST +setopt HIST_VERIFY +setopt HIST_IGNORE_DUPS +setopt INC_APPEND_HISTORY +setopt HIST_REDUCE_BLANKS +setopt COMPLETE_ALIASES +setopt AUTO_CD + +_SH="zsh" + +if [ -f "$XDG_CONFIG_HOME"/sh/aliases ]; then + source "$XDG_CONFIG_HOME"/sh/aliases +fi +if [ -f "$XDG_CONFIG_HOME"/sh/functions ]; then + source "$XDG_CONFIG_HOME"/sh/functions +fi + +if [ -f "$XDG_CONFIG_HOME/zsh/zshrc" ]; then + alias e='source "$XDG_CONFIG_HOME/zsh/zshrc"' +elif [ -f "$XDG_CONFIG_HOME/zshrc" ]; then + alias e='source "$XDG_CONFIG_HOME/zshrc"' +elif [ -f "$HOME"/.zshrc ]; then + alias e='source ~/.zshrc' +fi + +source ~/.config/zsh/.zkbd/$TERM-${${DISPLAY:t}:-$VENDOR-$OSTYPE} + +#autoload zkbd; zkbd +bindkey -v +bindkey "${key[Backspace]}" backward-delete-char +bindkey "${key[Delete]}" delete-char +bindkey "${key[Home]}" beginning-of-line +bindkey "${key[End]}" end-of-line +bindkey "${key[PageUp]}" history-substring-search-up +bindkey "${key[PageDown]}" history-substring-search-down + +if (env | grep -Fq 'DISTROBOX'); then + MYPROMPT=$'%F{000}%K{004}[%n@%m]%F{013}\UE0B2%K{013}%F{000}%~%F{013}%K{004}\UE0B0%F{000}%#%F{004}%k\UE0B0%f ' +else + MYPROMPT=$'%F{000}%K{002}[%n@%m]%F{006}\UE0B2%K{006}%F{000}%~%F{006}%K{002}\UE0B0%F{000}%#%F{002}%k\UE0B0%f ' +fi +function zle-line-init zle-keymap-select { + VIM_PROMPT=$'%F{000}%K{012}[%n@%m]%F{006}\UE0B2%K{006}%F{000}%~%F{006}%K{012}\UE0B0%F{000}%#%F{012}%k\UE0B0%f ' + PS1="${${KEYMAP/vicmd/$VIM_PROMPT}/main/$MYPROMPT}" + zle reset-prompt +} + +zle -N zle-line-init +zle -N zle-keymap-select +export KEYTIMEOUT=1 + +#fpath+="$XDG_CONFIG_HOME/zsh/zfunc" + +if [ -n "$ZPLUG_INSTALLED" ]; then + # zsh history substring search + zplug "zsh-users/zsh-history-substring-search", as:plugin + + bindkey "${key[Up]}" history-substring-search-up + bindkey "${key[Down]}" history-substring-search-down + bindkey -M vicmd "${key[Up]}" history-substring-search-up + bindkey -M vicmd "${key[Down]}" history-substring-search-down + bindkey -M vicmd "k" history-substring-search-up + bindkey -M vicmd "j" history-substring-search-down + + # zsh syntax highlighting + zplug "zsh-users/zsh-syntax-highlighting", defer:2 + + # load zsh plugins + zplug load +fi + +autoload -Uz compinit +if [[ -n ${ZDOTDIR}/.zcompdump(#qN.mh+24) ]]; then + compinit +else + compinit -C; +fi; + +zstyle ':completion:*' hosts off + +#zprof diff --git a/zsh/zshenv b/zsh/zshenv deleted file mode 100644 index 3719ef4..0000000 --- a/zsh/zshenv +++ /dev/null @@ -1,7 +0,0 @@ -# ZSH SPECIFIC CONFIGS -unset HISTFILE -export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}" -export skip_global_compinit=1 -fpath=($XDG_CONFIG_HOME/functions $fpath) -[ -f /etc/profile ] && . /etc/profile -[ -f "$XDG_CONFIG_HOME/sh/profile" ] && . "$XDG_CONFIG_HOME/sh/profile" diff --git a/zsh/zshrc b/zsh/zshrc deleted file mode 100644 index 09a5e32..0000000 --- a/zsh/zshrc +++ /dev/null @@ -1,96 +0,0 @@ -#zmodload zsh/zprof -if [ -n "$ZPLUG_HOME" ]; then - if [ -d "$ZPLUG_HOME" ]; then - export ZPLUG_INSTALLED="y" - source "$ZPLUG_HOME/init.zsh" - fi -elif [ -d "$XDG_DATA_HOME/zplug" ]; then - export ZPLUG_INSTALLED="y" - source "$XDG_DATA_HOME/zplug/init.zsh" -elif [ -d "$HOME/.zplug" ]; then - export ZPLUG_INSTALLED="y" - source "$HOME/.zplug/init.zsh" -fi -[ -z "$XDG_CONFIG_HOME" ] && XDG_CONFIG_HOME="$HOME/.config" -HISTFILE="$XDG_CONFIG_HOME/zsh/hist" -SAVEHIST=1000 -HISTSIZE=1000 -setopt APPEND_HISTORY -setopt HIST_FIND_NO_DUPS -setopt HIST_EXPIRE_DUPS_FIRST -setopt HIST_VERIFY -setopt HIST_IGNORE_DUPS -setopt INC_APPEND_HISTORY -setopt HIST_REDUCE_BLANKS -setopt COMPLETE_ALIASES -setopt AUTO_CD - -_SH="zsh" - -if [ -f "$XDG_CONFIG_HOME"/sh/aliases ]; then - source "$XDG_CONFIG_HOME"/sh/aliases -fi -if [ -f "$XDG_CONFIG_HOME"/sh/functions ]; then - source "$XDG_CONFIG_HOME"/sh/functions -fi - -if [ -f "$XDG_CONFIG_HOME/zsh/zshrc" ]; then - alias e='source "$XDG_CONFIG_HOME/zsh/zshrc"' -elif [ -f "$XDG_CONFIG_HOME/zshrc" ]; then - alias e='source "$XDG_CONFIG_HOME/zshrc"' -elif [ -f "$HOME"/.zshrc ]; then - alias e='source ~/.zshrc' -fi - -source ~/.config/zsh/.zkbd/$TERM-${${DISPLAY:t}:-$VENDOR-$OSTYPE} - -#autoload zkbd; zkbd -bindkey -v -bindkey "${key[Backspace]}" backward-delete-char -bindkey "${key[Delete]}" delete-char -bindkey "${key[Home]}" beginning-of-line -bindkey "${key[End]}" end-of-line -bindkey "${key[PageUp]}" history-substring-search-up -bindkey "${key[PageDown]}" history-substring-search-down - -if (env | grep -Fq 'DISTROBOX'); then - MYPROMPT=$'%F{000}%K{004}[%n@%m]%F{013}\UE0B2%K{013}%F{000}%~%F{013}%K{004}\UE0B0%F{000}%#%F{004}%k\UE0B0%f ' -else - MYPROMPT=$'%F{000}%K{002}[%n@%m]%F{006}\UE0B2%K{006}%F{000}%~%F{006}%K{002}\UE0B0%F{000}%#%F{002}%k\UE0B0%f ' -fi -function zle-line-init zle-keymap-select { - VIM_PROMPT=$'%F{000}%K{012}[%n@%m]%F{006}\UE0B2%K{006}%F{000}%~%F{006}%K{012}\UE0B0%F{000}%#%F{012}%k\UE0B0%f ' - PS1="${${KEYMAP/vicmd/$VIM_PROMPT}/main/$MYPROMPT}" - zle reset-prompt -} - -zle -N zle-line-init -zle -N zle-keymap-select -export KEYTIMEOUT=1 - -fpath+="$XDG_CONFIG_HOME/zsh/zfunc" - -if [ -n "$ZPLUG_INSTALLED" ]; then - # zsh history substring search - zplug "zsh-users/zsh-history-substring-search", as:plugin - - bindkey "${key[Up]}" history-substring-search-up - bindkey "${key[Down]}" history-substring-search-down - bindkey -M vicmd "${key[Up]}" history-substring-search-up - bindkey -M vicmd "${key[Down]}" history-substring-search-down - bindkey -M vicmd "k" history-substring-search-up - bindkey -M vicmd "j" history-substring-search-down - - # zsh syntax highlighting - zplug "zsh-users/zsh-syntax-highlighting", defer:2 - - # load zsh plugins - zplug load -fi - -autoload -Uz compinit -compinit -d "$XDG_CACHE_HOME"/zsh/zcompdump-"$ZSH_VERSION" - -zstyle ':completion:*' hosts off - -#zprof -- cgit v1.2.3 From 1f4aad995aff13e53de23f469ae64f14ee66ce70 Mon Sep 17 00:00:00 2001 From: ZachIR Date: Mon, 21 Jul 2025 22:25:55 -0500 Subject: Replace zplug with zinit --- zsh/.zshrc | 86 +++++++++++++++++++++++++++++++++++++++----------------------- 1 file changed, 54 insertions(+), 32 deletions(-) (limited to 'zsh') diff --git a/zsh/.zshrc b/zsh/.zshrc index 791b5d1..e08bb20 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -1,16 +1,4 @@ #zmodload zsh/zprof -if [ -n "$ZPLUG_HOME" ]; then - if [ -d "$ZPLUG_HOME" ]; then - export ZPLUG_INSTALLED="y" - source "$ZPLUG_HOME/init.zsh" - fi -elif [ -d "$XDG_DATA_HOME/zplug" ]; then - export ZPLUG_INSTALLED="y" - source "$XDG_DATA_HOME/zplug/init.zsh" -elif [ -d "$HOME/.zplug" ]; then - export ZPLUG_INSTALLED="y" - source "$HOME/.zplug/init.zsh" -fi [ -z "$XDG_CONFIG_HOME" ] && XDG_CONFIG_HOME="$HOME/.config" HISTFILE="$XDG_CONFIG_HOME/zsh/hist" SAVEHIST=1000 @@ -70,31 +58,65 @@ export KEYTIMEOUT=1 #fpath+="$XDG_CONFIG_HOME/zsh/zfunc" -if [ -n "$ZPLUG_INSTALLED" ]; then - # zsh history substring search - zplug "zsh-users/zsh-history-substring-search", as:plugin - - bindkey "${key[Up]}" history-substring-search-up - bindkey "${key[Down]}" history-substring-search-down - bindkey -M vicmd "${key[Up]}" history-substring-search-up - bindkey -M vicmd "${key[Down]}" history-substring-search-down - bindkey -M vicmd "k" history-substring-search-up - bindkey -M vicmd "j" history-substring-search-down - - # zsh syntax highlighting - zplug "zsh-users/zsh-syntax-highlighting", defer:2 - - # load zsh plugins - zplug load -fi - autoload -Uz compinit if [[ -n ${ZDOTDIR}/.zcompdump(#qN.mh+24) ]]; then compinit else - compinit -C; -fi; + compinit -C +fi + +zshcache_time="$(date +%s%N)" + +autoload -Uz add-zsh-hook + +rehash_precmd() { + if [[ -a /var/cache/zsh/pacman ]]; then + local paccache_time="$(date -r /var/cache/zsh/pacman +%s%N)" + if (( zshcache_time < paccache_time )); then + rehash + zshcache_time="$paccache_time" + fi + fi +} + +add-zsh-hook -Uz precmd rehash_precmd zstyle ':completion:*' hosts off +### Added by Zinit's installer +if [[ ! -f $HOME/.local/share/zinit/zinit.git/zinit.zsh ]]; then + print -P "%F{33} %F{220}Installing %F{33}ZDHARMA-CONTINUUM%F{220} Initiative Plugin Manager (%F{33}zdharma-continuum/zinit%F{220})…%f" + command mkdir -p "$HOME/.local/share/zinit" && command chmod g-rwX "$HOME/.local/share/zinit" + command git clone https://github.com/zdharma-continuum/zinit "$HOME/.local/share/zinit/zinit.git" && \ + print -P "%F{33} %F{34}Installation successful.%f%b" || \ + print -P "%F{160} The clone has failed.%f%b" +fi + +source "$HOME/.local/share/zinit/zinit.git/zinit.zsh" +autoload -Uz _zinit +(( ${+_comps} )) && _comps[zinit]=_zinit + +# Load a few important annexes, without Turbo +# (this is currently required for annexes) +zinit light-mode for \ + zdharma-continuum/zinit-annex-as-monitor \ + zdharma-continuum/zinit-annex-bin-gem-node \ + zdharma-continuum/zinit-annex-patch-dl \ + zdharma-continuum/zinit-annex-rust + +### End of Zinit's installer chunk +zinit snippet OMZ::plugins/git/git.plugin.zsh + +zinit load 'zsh-users/zsh-history-substring-search' +zinit ice wait atload'_history_substring_search_config' + +bindkey "${key[Up]}" history-substring-search-up +bindkey "${key[Down]}" history-substring-search-down +bindkey -M vicmd "${key[Up]}" history-substring-search-up +bindkey -M vicmd "${key[Down]}" history-substring-search-down +bindkey -M vicmd "k" history-substring-search-up +bindkey -M vicmd "j" history-substring-search-down + +source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh + #zprof -- cgit v1.2.3 From a2f528f57b7b768a77623d110343474ecd894905 Mon Sep 17 00:00:00 2001 From: zsmith Date: Tue, 22 Jul 2025 11:51:04 -0500 Subject: Use zinit for syntax highlighting --- zsh/.zshrc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'zsh') diff --git a/zsh/.zshrc b/zsh/.zshrc index e08bb20..a96f1c1 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -117,6 +117,6 @@ bindkey -M vicmd "${key[Down]}" history-substring-search-down bindkey -M vicmd "k" history-substring-search-up bindkey -M vicmd "j" history-substring-search-down -source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh - +#source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh +zinit light zsh-users/zsh-syntax-highlighting #zprof -- cgit v1.2.3 From 11d957d896dbfd3502d1c1e00d8e573cbb235e2e Mon Sep 17 00:00:00 2001 From: ZachIR Date: Tue, 22 Jul 2025 23:01:46 -0500 Subject: Fix fpath in zshrc --- zsh/.zshrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'zsh') diff --git a/zsh/.zshrc b/zsh/.zshrc index a96f1c1..b70b3d4 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -56,7 +56,7 @@ zle -N zle-line-init zle -N zle-keymap-select export KEYTIMEOUT=1 -#fpath+="$XDG_CONFIG_HOME/zsh/zfunc" +fpath+="$XDG_CONFIG_HOME/zsh/functions" autoload -Uz compinit if [[ -n ${ZDOTDIR}/.zcompdump(#qN.mh+24) ]]; then -- cgit v1.2.3 From 8888b075373c9126882a8b7c50a654fb663bd206 Mon Sep 17 00:00:00 2001 From: ZachIR Date: Tue, 22 Jul 2025 23:10:18 -0500 Subject: Autoload anonsh --- zsh/.zshrc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'zsh') diff --git a/zsh/.zshrc b/zsh/.zshrc index b70b3d4..4ca4d31 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -58,6 +58,8 @@ export KEYTIMEOUT=1 fpath+="$XDG_CONFIG_HOME/zsh/functions" +autoload -Uz anonsh + autoload -Uz compinit if [[ -n ${ZDOTDIR}/.zcompdump(#qN.mh+24) ]]; then compinit -- cgit v1.2.3 From eb561e1c22629a3df4ac69e458c37330bd806fc5 Mon Sep 17 00:00:00 2001 From: zachir Date: Fri, 25 Jul 2025 19:51:31 -0500 Subject: Update zinit calls --- zsh/.zshrc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'zsh') diff --git a/zsh/.zshrc b/zsh/.zshrc index 4ca4d31..d6e7718 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -120,5 +120,6 @@ bindkey -M vicmd "k" history-substring-search-up bindkey -M vicmd "j" history-substring-search-down #source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh -zinit light zsh-users/zsh-syntax-highlighting +zinit light 'zsh-users/zsh-syntax-highlighting' +zinit ice wait atload'_history_substring_search_config' #zprof -- cgit v1.2.3