Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Improve nix support with termite #1134

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion neofetch
Original file line number Diff line number Diff line change
Expand Up @@ -2778,6 +2778,10 @@ get_term() {
break
;;

"."*"-wrap"*)
[[ $name =~ \.(.*)-wrap.* ]] && term=${BASH_REMATCH[1]}
;;

"gnome-terminal-") term="gnome-terminal" ;;
"urxvtd") term="urxvt" ;;
*"nvim") term="Neovim Terminal" ;;
Expand Down Expand Up @@ -3027,13 +3031,24 @@ END
[[ -f "${XDG_CONFIG_HOME}/termite/config" ]] && \
termite_config="${XDG_CONFIG_HOME}/termite/config"

XDG_DIR="/etc/xdg"
OLD_IFS=$IFS
IFS=":"
for directory in $XDG_CONFIG_DIRS; do
if [[ -f "$directory/termite/config" ]]; then
XDG_DIR="$directory"
break
fi
done
IFS=$OLD_IFS

term_font="$(awk -F '= ' '/\[options\]/ {
opt=1
}
/^\s*font/ {
if(opt==1) a=$2;
opt=0
} END {print a}' "/etc/xdg/termite/config" \
} END {print a}' "$XDG_DIR/termite/config" \
"$termite_config")"
;;

Expand Down