From 5d68c683a11a36d4e3c3696da35c7bd0af89e41d Mon Sep 17 00:00:00 2001 From: Tim Keller Date: Mon, 9 Jun 2025 20:46:44 -0500 Subject: use runtime_dir for xauthority --- zprofile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zprofile b/zprofile index f03ef41..c2ea419 100755 --- a/zprofile +++ b/zprofile @@ -14,7 +14,6 @@ export SUDO='doas' export XDG_CACHE_HOME="$HOME/.cache" export ANSIBLE_GALAXY_CACHE_DIR="${XDG_CACHE_HOME}/ansible/galaxy_cache" export DOCKER_CONFIG="$XDG_CACHE_HOME/docker" -export XAUTHORITY="$XDG_CACHE_HOME/Xauthority" export XDG_CONFIG_HOME="$HOME/.config" export ANSIBLE_HOME="${XDG_CONFIG_HOME}/ansible" @@ -39,6 +38,8 @@ export XDG_STATE_HOME="$HOME/.local/state" export LESSHISTFILE='-' # Disable this, but it would be considered a state file export ZHISTFILE="$XDG_STATE_HOME/zsh/zhistory" # Used to set HISTFILE in zshrc without exporting since HISTFILE is generic to most shells, and desired behavior is for zsh to have its own history file +export XAUTHORITY="$XDG_RUNTIME_DIR/Xauthority" + # Path setopt nullglob # Set in case .local/bin doesn't exist for lbin in "$HOME/.local/bin"{/,/*/}; do export PATH="${lbin%/}:$PATH"; done 2>/dev/null # Add ~/.local/bin and all sub dirs -- cgit v1.2.3 From 00831456496616cbf7696c7b34f341a4d6bcfb34 Mon Sep 17 00:00:00 2001 From: Tim Keller Date: Fri, 27 Jun 2025 11:28:07 -0500 Subject: dont bother checking if display exists for vicursor --- zscripts/vicursor.zsh | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/zscripts/vicursor.zsh b/zscripts/vicursor.zsh index 3e4320d..a66ad64 100755 --- a/zscripts/vicursor.zsh +++ b/zscripts/vicursor.zsh @@ -2,20 +2,17 @@ # Change cursor shape for different vi modes # Copied from LARBS -if [ -n "$DISPLAY" ]; then - function zle-keymap-select () { - case $KEYMAP in - vicmd) echo -n '\e[1 q';; # block - viins|main) echo -n '\e[5 q';; # beam - esac - } - zle -N zle-keymap-select - zle-line-init() { - #zle -K viins # initiate `vi insert` as keymap (can be removed if `bindkey -V` has been set elsewhere) - echo -n "\e[5 q" - } - zle -N zle-line-init - echo -n '\e[5 q' # Use beam shape cursor on startup - preexec() { echo -n '\e[5 q' ;} # Use beam shape cursor for each new prompt -fi - +function zle-keymap-select () { + case $KEYMAP in + vicmd) echo -n '\e[1 q';; # block + viins|main) echo -n '\e[5 q';; # beam + esac +} +zle -N zle-keymap-select +zle-line-init() { + #zle -K viins # initiate `vi insert` as keymap (can be removed if `bindkey -V` has been set elsewhere) + echo -n "\e[5 q" +} +zle -N zle-line-init +echo -n '\e[5 q' # Use beam shape cursor on startup +preexec() { echo -n '\e[5 q' ;} # Use beam shape cursor for each new prompt -- cgit v1.2.3 From 973dfaf6058981914d13bbcdb4467f4c9aa13ffa Mon Sep 17 00:00:00 2001 From: Tim Keller Date: Wed, 27 Aug 2025 13:12:30 -0500 Subject: add git commit fix function and dockeraliases for docker compose --- zscripts/dockeraliases.zsh | 19 +++++++++++++++++++ zscripts/nicegit.zsh | 7 +++++++ 2 files changed, 26 insertions(+) create mode 100644 zscripts/dockeraliases.zsh diff --git a/zscripts/dockeraliases.zsh b/zscripts/dockeraliases.zsh new file mode 100644 index 0000000..93a969c --- /dev/null +++ b/zscripts/dockeraliases.zsh @@ -0,0 +1,19 @@ +#!/usr/bin/env zsh + +alias \ + dc="docker compose" \ + dcl="docker compose logs -f" \ + dcb="docker compose build" \ + dcu="docker compose up" \ + dcd="docker compose down" \ + dcr="docker compose restart" \ + + +function dce() { + local shells=("/bin/bash" "/bin/sh") + local service=$1 + shift + for shell in ${shells[@]}; do + docker compose exec -it $service $shell $@ && return + done +} diff --git a/zscripts/nicegit.zsh b/zscripts/nicegit.zsh index 3538284..e191bd0 100755 --- a/zscripts/nicegit.zsh +++ b/zscripts/nicegit.zsh @@ -24,6 +24,13 @@ function gc() { git commit -m "$commit" } +function gcf() { + issue="$1" + [ -z "$issue" ] && return + shift + gc "$@\n\nfixes: $issue" +} + function __is_diff() { ! git diff --quiet HEAD $REF -- $DIR } -- cgit v1.2.3