dotfiles

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

commit f1541f948ccfdd0afa1b2272bf219f4c88218ccd
parent 36d41c89cdf2c90e652ba32192cefbf5b4a3704c
Author: Szymon Mikulicz <szymon.mikulicz@posteo.net>
Date:   Fri, 22 May 2026 23:43:30 +0200

Fixed greetd script

Diffstat:
Dscripts/.local/bin/fbterm-bi | 6------
Ascripts/.local/bin/fbterm_bi | 6++++++
Mscripts/.local/bin/greetd-greet | 19++++++++++++++++---
Dscripts/.local/bin/sway-env | 2--
4 files changed, 22 insertions(+), 11 deletions(-)

diff --git a/scripts/.local/bin/fbterm-bi b/scripts/.local/bin/fbterm-bi @@ -1,6 +0,0 @@ -#!/bin/sh -tput civis -fbv -ciukery "$1" -shift -export FBTERM_BACKGROUND_IMAGE=1 -exec fbterm "$@" diff --git a/scripts/.local/bin/fbterm_bi b/scripts/.local/bin/fbterm_bi @@ -0,0 +1,6 @@ +#!/bin/sh +tput civis +"${_greetd_fbv:-fbv}" -ciukery "$1" +shift +export FBTERM_BACKGROUND_IMAGE=1 +exec "${_greetd_fbterm:-fbterm}" "$@" diff --git a/scripts/.local/bin/greetd-greet b/scripts/.local/bin/greetd-greet @@ -1,9 +1,22 @@ #!/bin/sh + H="$(readlink -f $(dirname "$0")/../..)" U="$(awk "-vH=$H" -F: '{if ($6 == H) print $1}' /etc/passwd)" -export PATH="$H/.local/bin:$H/.usr/local/bin:$PATH" +export _greetd_withenv="$H/.local/bin/withenv" + +for bin in fbterm_bi fbterm fbv awww tuigreet; do + echo -n "Resolving ${bin}" + bin_path="$(env HOME="$H" "${_greetd_withenv}" "$H/.config/sway/env" which $bin 2>/dev/null)" + [ -z "$bin_path" ] && { + echo " [ERR]" + exit 1 + } || { + echo " [OK]" + } + export _greetd_${bin}="$bin_path" +done -P="$(xargs -a $H/.cache/awww/$(awww --version | cut -d' ' -f2)/* -0 sh -c 'echo "$3"' 0)" +P="$(xargs -a "$H/.cache/awww/$("${_greetd_awww}" --version | cut -d' ' -f2)"/* -0 sh -c 'echo "$3"' 0)" -exec fbterm-bi "$P" -- tuigreet -u "$U" --asterisks -c sway-env +exec "${_greetd_fbterm_bi}" "$P" -- "${_greetd_tuigreet}" -u "$U" --asterisks -c "${_greetd_withenv} $H/.config/sway/env sway" diff --git a/scripts/.local/bin/sway-env b/scripts/.local/bin/sway-env @@ -1,2 +0,0 @@ -#!/bin/sh -withenv ~/.config/sway/env sway