dotfiles

:)
git clone https://git.sr.ht/~ashymad/dotfiles
Log | Files | Refs | Submodules | LICENSE

commit 319012d7569801d71e06de2e311a52fe888afeca
parent 966daa2b9f411dc190559be2d32e3274fefe6dc6
Author: Szymon Mikulicz <szymon.mikulicz@posteo.net>
Date:   Tue, 25 Aug 2026 11:43:17 +0200

Merge branch 'main' of git.sr.ht:~ashymad/dotfiles

Diffstat:
Mscripts/.local/bin/greetd-greet | 18++++++++++++++----
Mscripts/.local/bin/src-git | 12+++++++-----
Mscripts/.local/bin/withenv | 2+-
Msway/.config/sway/config | 2+-
Mzsh/.zshenv | 1+
5 files changed, 24 insertions(+), 11 deletions(-)

diff --git a/scripts/.local/bin/greetd-greet b/scripts/.local/bin/greetd-greet @@ -10,13 +10,23 @@ for bin in fbterm_bi fbterm fbv awww tuigreet; do bin_path="$(env HOME="$H" "${_greetd_withenv}" -f "$H/.config/sway/env" which $bin 2>/dev/null)" [ -z "$bin_path" ] && { echo " [ERR]" - exit 1 } || { echo " [OK]" + export _greetd_${bin}="$bin_path" } - export _greetd_${bin}="$bin_path" done -P="$(xargs -a "$H/.cache/awww/$("${_greetd_awww}" --version | cut -d' ' -f2)"/* -0 sh -c 'echo "$3"' 0)" +if [ -z "${_greetd_tuigreet}" ]; then + echo "Tuigreet not found, starting agreety" + exec agreety --cmd "${_greetd_withenv} -f $H/.config/sway/env sway" +elif [ -z "${_greetd_fbterm}" ]; then + echo "Fbterm not found, starting in TTY" + exec "${_greetd_tuigreet}" -u "$U" --asterisks -c "${_greetd_withenv} -f $H/.config/sway/env sway" +elif [ -z "${_greetd_awww}" ] || [ -z "${_greetd_fbterm_bi}" ] || [ -z "${_greetd_fbv}" ]; then + echo "Fbv or awww not found, not setting background" + exec "${_greetd_fbterm}" -- "${_greetd_tuigreet}" -u "$U" --asterisks -c "${_greetd_withenv} -f $H/.config/sway/env sway" +else + P="$(xargs -a "$H/.cache/awww/$("${_greetd_awww}" --version | cut -d' ' -f2)"/* -0 sh -c 'echo "$3"' 0)" + exec "${_greetd_fbterm_bi}" "$P" -- "${_greetd_tuigreet}" -u "$U" --asterisks -c "${_greetd_withenv} -f $H/.config/sway/env sway" +fi -exec "${_greetd_fbterm_bi}" "$P" -- "${_greetd_tuigreet}" -u "$U" --asterisks -c "${_greetd_withenv} -f $H/.config/sway/env sway" diff --git a/scripts/.local/bin/src-git b/scripts/.local/bin/src-git @@ -1,15 +1,17 @@ #!/bin/sh for dir in ~/.usr/src/*; do - tag="$(git -C "$dir" tag --points-at HEAD)" + [ -d "$dir"/.git ] || continue + + tag="$(git -C "$dir" tag --sort=creatordate --points-at HEAD | tail -1)" if [ -n "$tag" ]; then - [ "$1" = "-u" ] && git -C "$dir" fetch --tags 2>/dev/null 1>&2 + [ "$1" = "-u" ] && git -C "$dir" fetch --tags remote_tag="$(git -C "$dir" for-each-ref --sort=creatordate --format '%(refname)' refs/tags | cut -d/ -f3 | tail -1)" if [ "${tag#v}" != "${remote_tag#v}" ]; then - printf "%-15s %10s -> %-10s\n" "$(basename $dir)" "$tag" "$remote_tag" + printf "%-25s %15s -> %s\n" "$(basename $dir)" "$tag" "$remote_tag" fi else - [ "$1" = "-u" ] && git -C "$dir" remote update 2>/dev/null 1>&2 + [ "$1" = "-u" ] && git -C "$dir" remote update branch="$(git -C "$dir" rev-parse --abbrev-ref HEAD)" if [ "$branch" = "HEAD" ]; then echo "No branch or tag found for $pkg" @@ -18,7 +20,7 @@ for dir in ~/.usr/src/*; do if remote="$(git -C "$dir" rev-parse --abbrev-ref --symbolic-full-name @{u} 2>/dev/null)"; then commits="$(git -C "$dir" rev-list --left-only --count "$remote...@")" if [ "$commits" != 0 ]; then - printf "%-15s %10s ++ %-10s\n" "$(basename $dir)" "$branch" "$commits" + printf "%-25s %15s ++ %s\n" "$(basename $dir)" "$branch" "$commits" fi fi fi diff --git a/scripts/.local/bin/withenv b/scripts/.local/bin/withenv @@ -23,7 +23,7 @@ subst() { | awk '{print "SHA1SUM=" $1}'; \ } 3>&1 \ | $TAC \ - | xargs sh -c 'printf "%s\n" "${@}" | '$TAC' | env "$0" envsubst' -- + | xargs sh -c 'printf "%s\n" "${@}" | '"$TAC"' | env "$0" envsubst' -- } if [ "$IGNORE" = 1 ]; then diff --git a/sway/.config/sway/config b/sway/.config/sway/config @@ -17,7 +17,7 @@ bindsym $mod+o exec find $HOME/.password-store -name '*.gpg' \ | tofi \ | xargs -I{} pass show '{}' \ | head -1 \ - | timeout 5 wl-copy -f -n + | sh -c 'timeout 5 wl-copy -f -n "$(cat -)"' bindsym $mod+h focus left bindsym $mod+j focus down diff --git a/zsh/.zshenv b/zsh/.zshenv @@ -26,3 +26,4 @@ export VIVID_THEME=rose-pine-moon [ -f "$XDG_RUNTIME_DIR/arista-ssh/agent.sock" ] && export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/arista-ssh/agent.sock" export ZSH_EXEC=1 export HOST +[ -f "$HOME/.cargo/env" ] && . "$HOME/.cargo/env"