Last active
March 1, 2025 04:36
-
-
Save dardo82/9a1f8d55959acb3ccc3674a724d10e1a to your computer and use it in GitHub Desktop.
FBterm with BG
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env zsh | |
BG_DIR="/usr/share/backgrounds" | |
OSID=$(awk -F= "/LIKE/"'{print $2}' /etc/os-release) | |
BG="$BG_DIR/**/*${(C)OSID}*.png"; BG=$(eval echo "$BG") | |
FONT_NAME=$( awk -F= "/FONT/"'{print $2}' /etc/vconsole.conf) | |
FONT_ALIAS=$(fc-list | awk "/$FONT_NAME/"'{print $2}') | |
FONT_SIZE="${${FONT_NAME#*-}:1:2}" | |
export FBTERM_BACKGROUND_IMAGE="1" | |
fbv -ciuker "${1:-$BG}" <<< "q"; echo -en "\e[?25l" | |
fbterm -n "${3:-$FONT_ALIAS}" -s "${2:-$FONT_SIZE}" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment