From 7519fe384002da489ab0f41a44e0f47cb316f72b Mon Sep 17 00:00:00 2001 From: Marco Thomas Date: Tue, 31 Mar 2026 16:48:52 +0200 Subject: [PATCH] zsh: include --- README.md | 9 ++++-- .../.config/environment.d/envvars.conf | 1 - files/shell/.shellrc.alias | 2 +- files/shell/.zshrc | 29 +++++++++++++++++++ lock.sh | 4 --- ssh-agent-location.patch | 13 +++++++++ ssh-agent.service | 10 ------- 7 files changed, 50 insertions(+), 18 deletions(-) create mode 100644 files/shell/.zshrc delete mode 100755 lock.sh create mode 100644 ssh-agent-location.patch delete mode 100644 ssh-agent.service diff --git a/README.md b/README.md index c56936b..285b88a 100644 --- a/README.md +++ b/README.md @@ -28,13 +28,14 @@ Use ./stow.sh --unstow to remove configuration - allow microphone in steam: `sudo snap connect steam:audio-record :audio-record` - gamemode configuration: - renice=10 +- diff for .ohmyzsh via patch files ## Software ### Basics ``` sudo apt install \ - kitty tmux \ + kitty tmux zsh \ git ripgrep fd-find fzf stow ``` @@ -66,6 +67,10 @@ sudo snap install \ steam ``` +``` +cargo install --locked zellij +``` + ### Manual - [Helix](https://github.com/helix-editor/helix/releases) @@ -78,7 +83,7 @@ sudo snap install \ $ mkdir -p ~/.config/nix/ $ echo "experimental-features = nix-command flakes" > ~/.config/nix/nix.conf ``` -- [woverlay](https://codeberg.org/rtx/woverlay) +- [ohmyzsh](https://ohmyz.sh/) ## Extensions diff --git a/files/environment/.config/environment.d/envvars.conf b/files/environment/.config/environment.d/envvars.conf index 2905a71..df3b13d 100644 --- a/files/environment/.config/environment.d/envvars.conf +++ b/files/environment/.config/environment.d/envvars.conf @@ -2,7 +2,6 @@ PATH=$HOME/.dots/scripts:$HOME/.cargo/bin:$HOME/.ghcup/bin:$HOME/.local/bin:$HOM EDITOR=hx VISUAL=hx _JAVA_AWT_WM_NONREPARENTING=1 -SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket" # support jp input in gnome GTK_IM_MODULE=ibus diff --git a/files/shell/.shellrc.alias b/files/shell/.shellrc.alias index 48e3314..0f2c8b2 100644 --- a/files/shell/.shellrc.alias +++ b/files/shell/.shellrc.alias @@ -41,7 +41,7 @@ t() { tmux new-session -A -s ${1:-tmux} } z() { - zellij a ${1:-dev} 2> /dev/null || zellij -s ${1:-dev} + zellij attach ${1:-dev} 2> /dev/null || zellij -s ${1:-dev} } # password hash (sed needed when using in docker-compose) diff --git a/files/shell/.zshrc b/files/shell/.zshrc new file mode 100644 index 0000000..7aaf476 --- /dev/null +++ b/files/shell/.zshrc @@ -0,0 +1,29 @@ +export ZSH="$HOME/.oh-my-zsh" + +ZSH_THEME="robbyrussell" + +# Uncomment the following line if pasting URLs and other text is messed up. +# DISABLE_MAGIC_FUNCTIONS="true" + +# Uncomment the following line to display red dots whilst waiting for completion. +# You can also set it to another string to have that shown instead of the default red dots. +# e.g. COMPLETION_WAITING_DOTS="%F{yellow}waiting...%f" +# Caution: this setting can cause issues with multiline prompts in zsh < 5.7.1 (see #5765) +COMPLETION_WAITING_DOTS="true" + +# Uncomment the following line if you want to disable marking untracked files +# under VCS as dirty. This makes repository status check for large repositories +# much, much faster. +# DISABLE_UNTRACKED_FILES_DIRTY="true" + +plugins=(git colored-man-pages rust ssh-agent) + +zstyle :omz:plugins:ssh-agent helper sshaskpass + +bindkey ^F forward-word +bindkey ^B backward-word + +source $ZSH/oh-my-zsh.sh + +[ -f ~/.shellrc.alias ] && source ~/.shellrc.alias +[ -f ~/.shellrc.local ] && source ~/.shellrc.local diff --git a/lock.sh b/lock.sh deleted file mode 100755 index 03776eb..0000000 --- a/lock.sh +++ /dev/null @@ -1,4 +0,0 @@ -export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket" - -ssh-add -D -dbus-send --type=method_call --dest=org.gnome.ScreenSaver /org/gnome/ScreenSaver org.gnome.ScreenSaver.Lock diff --git a/ssh-agent-location.patch b/ssh-agent-location.patch new file mode 100644 index 0000000..8b2951b --- /dev/null +++ b/ssh-agent-location.patch @@ -0,0 +1,13 @@ +diff --git a/plugins/ssh-agent/ssh-agent.plugin.zsh b/plugins/ssh-agent/ssh-agent.plugin.zsh +index 8354864..61462fd 100644 +--- a/plugins/ssh-agent/ssh-agent.plugin.zsh ++++ b/plugins/ssh-agent/ssh-agent.plugin.zsh +@@ -24,7 +24,7 @@ function _start_agent() { + + # start ssh-agent and setup environment + zstyle -t :omz:plugins:ssh-agent quiet || echo >&2 "Starting ssh-agent ..." +- ssh-agent -s ${lifetime:+-t} ${lifetime} | sed '/^echo/d' >! "$ssh_env_cache" ++ ssh-agent -a /tmp/agent.sock -s ${lifetime:+-t} ${lifetime} | sed '/^echo/d' >! "$ssh_env_cache" + chmod 600 "$ssh_env_cache" + . "$ssh_env_cache" > /dev/null + } diff --git a/ssh-agent.service b/ssh-agent.service deleted file mode 100644 index 9428410..0000000 --- a/ssh-agent.service +++ /dev/null @@ -1,10 +0,0 @@ -[Unit] -Description=SSH key agent - -[Service] -Type=simple -Environment=SSH_AUTH_SOCK=%t/ssh-agent.socket -ExecStart=/usr/bin/ssh-agent -D -a $SSH_AUTH_SOCK - -[Install] -WantedBy=default.target