home-manager: update+manage .zshrc and .zprofile
This commit is contained in:
parent
2052fd9397
commit
baa26603ef
28
.zprofile
28
.zprofile
@ -21,10 +21,11 @@ add_to_path "/opt/metasploit-framework/bin"
|
|||||||
add_to_path "$HOME/.local/share/flatpak/exports/bin"
|
add_to_path "$HOME/.local/share/flatpak/exports/bin"
|
||||||
add_to_path "/var/lib/flatpak/exports/bin"
|
add_to_path "/var/lib/flatpak/exports/bin"
|
||||||
add_to_path "$HOME/.local/share/JetBrains/Toolbox/bin"
|
add_to_path "$HOME/.local/share/JetBrains/Toolbox/bin"
|
||||||
|
add_to_path "$HOME/.local/share/JetBrains/Toolbox/scripts"
|
||||||
|
|
||||||
export EDITOR='vim'
|
export EDITOR='vim'
|
||||||
export TERM='xterm-256color'
|
export TERM='xterm-256color'
|
||||||
export kee="surtur"
|
export kee="$HOSTNAME"
|
||||||
export SSH_KEY_PATH="$HOME/.ssh/$kee"
|
export SSH_KEY_PATH="$HOME/.ssh/$kee"
|
||||||
|
|
||||||
if [ ! -S ~/.ssh/ssh_auth_sock ]; then
|
if [ ! -S ~/.ssh/ssh_auth_sock ]; then
|
||||||
@ -33,10 +34,6 @@ if [ ! -S ~/.ssh/ssh_auth_sock ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
if [ ! -S $HOME/.ssh/ssh_auth_sock ]; then
|
|
||||||
eval `ssh-agent` > /dev/null
|
|
||||||
ln -sf "$SSH_AUTH_SOCK" $HOME/.ssh/ssh_auth_sock
|
|
||||||
fi
|
|
||||||
export SSH_AUTH_SOCK=$HOME/.ssh/ssh_auth_sock
|
export SSH_AUTH_SOCK=$HOME/.ssh/ssh_auth_sock
|
||||||
|
|
||||||
if ! [ -f /run/.containerenv ]; then
|
if ! [ -f /run/.containerenv ]; then
|
||||||
@ -59,6 +56,8 @@ unfunction add_to_path
|
|||||||
|
|
||||||
if [[ -z $DISPLAY ]]; then
|
if [[ -z $DISPLAY ]]; then
|
||||||
export QT_QPA_PLATFORMTHEME=wayland
|
export QT_QPA_PLATFORMTHEME=wayland
|
||||||
|
# proper theme support?
|
||||||
|
# export QT_QPA_PLATFORMTHEME=qt5ct
|
||||||
export QT_QPA_PLATFORM=wayland
|
export QT_QPA_PLATFORM=wayland
|
||||||
export QT_AUTO_SCREEN_SCALE_FACTOR=0
|
export QT_AUTO_SCREEN_SCALE_FACTOR=0
|
||||||
export MOZ_DBUS_REMOTE=1
|
export MOZ_DBUS_REMOTE=1
|
||||||
@ -70,17 +69,26 @@ if [[ -z $DISPLAY ]]; then
|
|||||||
export NO_AT_BRIDGE=1
|
export NO_AT_BRIDGE=1
|
||||||
export TDESKTOP_USE_PORTAL=1
|
export TDESKTOP_USE_PORTAL=1
|
||||||
export XDG_SESSION_TYPE=wayland
|
export XDG_SESSION_TYPE=wayland
|
||||||
export LIBVA_DRIVER_NAME="i965"
|
if [[ "${HOSTNAME}" == "surtur" ]]; then
|
||||||
|
export LIBVA_DRIVER_NAME="i965"
|
||||||
|
fi
|
||||||
|
|
||||||
. ~/.zsh/bemenu-dracula/bemenu-dracula
|
test -f ~/.zsh/bemenu-dracula/bemenu-dracula && . ~/.zsh/bemenu-dracula/bemenu-dracula
|
||||||
|
|
||||||
if [[ $(tty) == /dev/tty1 ]]; then
|
# if [[ $(tty) == /dev/tty1 ]]; then
|
||||||
|
if [ -z "${WAYLAND_DISPLAY}" ] && [ "${XDG_VTNR}" -eq 1 ]; then
|
||||||
export GTK_IM_MODULE=ibus
|
export GTK_IM_MODULE=ibus
|
||||||
export QT_IM_MODULE=ibus
|
export QT_IM_MODULE=ibus
|
||||||
export XMODIFIERS=@im=ibus
|
export XMODIFIERS=@im=ibus
|
||||||
|
export SAL_USE_VCLPLUGIN=gtk3 # for libreoffice
|
||||||
export XDG_CURRENT_DESKTOP=sway
|
export XDG_CURRENT_DESKTOP=sway
|
||||||
exec systemd-cat --identifier=sway sway > $XDG_RUNTIME_DIR/sway.log 2>&1
|
if [[ "${HOSTNAME}" == "leo" ]]; then
|
||||||
elif [[ $(tty) == /dev/tty2 ]]; then
|
# needs vulkan libs.
|
||||||
|
export WLRRENDERER=vulkan
|
||||||
|
fi
|
||||||
|
# exec systemd-cat --identifier=sway sway > /var/tmp/sway.log 2>&1
|
||||||
|
sway -d -V >> /var/tmp/sway.log 2>&1
|
||||||
|
elif [ "${XDG_VTNR}" -eq 2 ]; then
|
||||||
export MOZ_ENABLE_WAYLAND=1
|
export MOZ_ENABLE_WAYLAND=1
|
||||||
export XDG_SESSION_TYPE=wayland
|
export XDG_SESSION_TYPE=wayland
|
||||||
exec systemd-cat --identifier=gnome-session gnome
|
exec systemd-cat --identifier=gnome-session gnome
|
||||||
|
51
.zshrc
51
.zshrc
@ -1,4 +1,10 @@
|
|||||||
|
# zmodload zsh/zprof
|
||||||
|
# autoload -U compinit && compinit
|
||||||
|
# zstyle ':omz:update' mode auto
|
||||||
|
|
||||||
[ ! -d ~/.oh-my-zsh ] && sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
|
[ ! -d ~/.oh-my-zsh ] && sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
|
||||||
|
|
||||||
|
ZSH_DISABLE_COMPFIX=true
|
||||||
ZSH=$HOME/.oh-my-zsh
|
ZSH=$HOME/.oh-my-zsh
|
||||||
ZSH_CACHE_DIR="$ZSH/cache"
|
ZSH_CACHE_DIR="$ZSH/cache"
|
||||||
|
|
||||||
@ -6,11 +12,10 @@
|
|||||||
# necessary to include "/usr/share/zsh/"$(zsh --version| cut -d ' ' -f2)/functions"
|
# necessary to include "/usr/share/zsh/"$(zsh --version| cut -d ' ' -f2)/functions"
|
||||||
# due to a breakage on fedora zsh version 5.8.1 (zsh.x86_64 5.8.1-1.fc35 @updates)
|
# due to a breakage on fedora zsh version 5.8.1 (zsh.x86_64 5.8.1-1.fc35 @updates)
|
||||||
fpath=(
|
fpath=(
|
||||||
~/.zfunc
|
~/.zfunc
|
||||||
~/.local/share/zsh/site-functions
|
${ASDF_DIR}/completions
|
||||||
${ASDF_DIR}/completions
|
/usr/share/zsh/"$(zsh --version| cut -d ' ' -f2)/functions"
|
||||||
/usr/share/zsh/"$(zsh --version| cut -d ' ' -f2)/functions"
|
$fpath
|
||||||
$fpath
|
|
||||||
)
|
)
|
||||||
|
|
||||||
eval "$(sheldon source)"
|
eval "$(sheldon source)"
|
||||||
@ -57,18 +62,27 @@
|
|||||||
# keep backgroud processess at full speed
|
# keep backgroud processess at full speed
|
||||||
setopt NOBGNICE
|
setopt NOBGNICE
|
||||||
|
|
||||||
setopt inc_append_history
|
# Uncomment the following line if you want to change the command execution time
|
||||||
setopt extended_history
|
# stamp shown in the history command output.
|
||||||
# Uncomment the following line if you want to change the command execution time
|
# The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
|
||||||
# stamp shown in the history command output.
|
|
||||||
# The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
|
|
||||||
HIST_STAMPS="dd.mm.yyyy"
|
HIST_STAMPS="dd.mm.yyyy"
|
||||||
|
HISTSIZE=10000000
|
||||||
|
SAVEHIST=10000000
|
||||||
|
setopt inc_append_history
|
||||||
|
setopt extended_history # write the history file in the ":start:elapsed;command" format
|
||||||
setopt share_history
|
setopt share_history
|
||||||
|
setopt hist_expire_dups_first # expire duplicate entries first when trimming history
|
||||||
setopt hist_ignore_dups
|
setopt hist_ignore_dups
|
||||||
setopt hist_ignore_all_dups
|
setopt hist_ignore_all_dups
|
||||||
setopt hist_save_no_dups
|
setopt hist_save_no_dups
|
||||||
setopt hist_ignore_space
|
setopt hist_ignore_space
|
||||||
HISTCONTROL=ignoredups:erasedups
|
setopt hist_reduce_blanks # remove superfluous blanks before recording entry
|
||||||
|
setopt hist_verify # don't execute immediately after expansion
|
||||||
|
# HISTCONTROL=ignoredups:erasedups
|
||||||
|
|
||||||
|
# don't expand aliases _before_ completion has finished
|
||||||
|
# like: git comm-[tab]
|
||||||
|
# setopt complete_aliases # THIS HAS ISSUES
|
||||||
|
|
||||||
# Would you like to use another custom folder than $ZSH/custom?
|
# Would you like to use another custom folder than $ZSH/custom?
|
||||||
# ZSH_CUSTOM=/path/to/new-custom-folder
|
# ZSH_CUSTOM=/path/to/new-custom-folder
|
||||||
@ -120,10 +134,19 @@
|
|||||||
export FZF_DEFAULT_OPTS="--height=60% --inline-info --color=fg:#f8f8f2,bg:#282a36,hl:#bd93f9 --color=fg+:#f8f8f2,bg+:#44475a,hl+:#bd93f9 --color=info:#ffb86c,prompt:#50fa7b,pointer:#ff79c6 --color=marker:#ff79c6,spinner:#ffb86c,header:#6272a4"
|
export FZF_DEFAULT_OPTS="--height=60% --inline-info --color=fg:#f8f8f2,bg:#282a36,hl:#bd93f9 --color=fg+:#f8f8f2,bg+:#44475a,hl+:#bd93f9 --color=info:#ffb86c,prompt:#50fa7b,pointer:#ff79c6 --color=marker:#ff79c6,spinner:#ffb86c,header:#6272a4"
|
||||||
export FZF_CTRL_T_OPTS="--preview 'bat --style=numbers --color=always --line-range :200 {}'"
|
export FZF_CTRL_T_OPTS="--preview 'bat --style=numbers --color=always --line-range :200 {}'"
|
||||||
|
|
||||||
zvm_after_init_commands+=('[ -f /usr/share/fzf/shell/key-bindings.zsh ] && source /usr/share/fzf/shell/key-bindings.zsh')
|
# if [[ "$(hostnamectl hostname)" == "leo" ]]; then
|
||||||
|
if [[ "$(hostname -s)" == "leo" ]]; then
|
||||||
|
local fzf_bindings="/usr/share/fzf/key-bindings.zsh"
|
||||||
|
else
|
||||||
|
local fzf_bindings="/usr/share/fzf/shell/key-bindings.zsh"
|
||||||
|
fi
|
||||||
|
zvm_after_init_commands+=("[ -f $fzf_bindings ] && source $fzf_bindings")
|
||||||
|
unset fzf_bindings
|
||||||
|
# ZVM_INSERT_MODE_CURSOR=$ZVM_CURSOR_BLINKING_BLOCK
|
||||||
|
|
||||||
# User configuration
|
# User configuration
|
||||||
source ~/.dotenv
|
source ~/.dotenv
|
||||||
|
source ${XDG_RUNTIME_DIR}/secrets/envs
|
||||||
source ~/.zsh/aliases.zsh
|
source ~/.zsh/aliases.zsh
|
||||||
source ~/.zsh/functions.zsh
|
source ~/.zsh/functions.zsh
|
||||||
|
|
||||||
@ -144,15 +167,17 @@
|
|||||||
export VISUAL='vim'
|
export VISUAL='vim'
|
||||||
export SYSTEMD_EDITOR='vim --clean'
|
export SYSTEMD_EDITOR='vim --clean'
|
||||||
export TERM='xterm-256color'
|
export TERM='xterm-256color'
|
||||||
|
# export TERM='xterm-kitty'
|
||||||
export GTK_IM_MODULE=ibus
|
export GTK_IM_MODULE=ibus
|
||||||
export QT_IM_MODULE=ibus
|
export QT_IM_MODULE=ibus
|
||||||
export XMODIFIERS=@im=ibus
|
export XMODIFIERS=@im=ibus
|
||||||
# export ARCHFLAGS="-arch x86_64"
|
# export ARCHFLAGS="-arch x86_64"
|
||||||
export kee="surtur"
|
export kee=${kee:-$(hostname -s)}
|
||||||
SSH_KEY_PATH="$HOME/.ssh/$kee"
|
SSH_KEY_PATH="$HOME/.ssh/$kee"
|
||||||
|
|
||||||
eval $(TERM=xterm-kitty dircolors)
|
eval $(TERM=xterm-kitty dircolors)
|
||||||
|
|
||||||
|
# pretend we're dockerd for rootless podman.
|
||||||
export DOCKER_HOST=unix://$XDG_RUNTIME_DIR/podman/podman.sock
|
export DOCKER_HOST=unix://$XDG_RUNTIME_DIR/podman/podman.sock
|
||||||
|
|
||||||
|
|
||||||
|
@ -139,9 +139,15 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
# begin zsh-related.
|
# begin zsh-related.
|
||||||
|
".zshrc" = {
|
||||||
|
source = ./.zshrc;
|
||||||
|
};
|
||||||
".zshenv" = {
|
".zshenv" = {
|
||||||
source = ./.zshenv;
|
source = ./.zshenv;
|
||||||
};
|
};
|
||||||
|
".zprofile" = {
|
||||||
|
source = ./.zprofile;
|
||||||
|
};
|
||||||
".zsh" = {
|
".zsh" = {
|
||||||
source = ./.zsh;
|
source = ./.zsh;
|
||||||
recursive = true;
|
recursive = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user