Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
neofetch
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ximper Linux
neofetch
Commits
38825bfd
Commit
38825bfd
authored
Jan 08, 2017
by
Dylan Araps
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Term Font: Added full support for alacritty
parent
9ab0f615
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
40 deletions
+42
-40
neofetch
neofetch
+42
-40
No files found.
neofetch
View file @
38825bfd
...
@@ -1544,56 +1544,19 @@ get_term_font() {
...
@@ -1544,56 +1544,19 @@ get_term_font() {
case "
$term
" in
case "
$term
" in
"
alacritty
"*)
"
alacritty
"*)
term_font="
$(
awk
-F
':|#'
'/family:/ {print $2}'
"
${
XDG_CONFIG_HOME
}
/alacritty.yml"
)
"
term_font="
$(
awk
-F
':|#'
'/normal:/ {getline; print}'
"
${
XDG_CONFIG_HOME
}
/alacritty/alacritty.yml"
)
"
;;
term_font="
${
term_font
/*family
:
}
"
term_font="
${
term_font
/
$'
\n
'
*
}
"
"
urxvt
" | "
urxvtd
" | "
xterm
")
term_font="
$(
grep
-i
-F
"
${
term
/d
}
*font"
< <
(
xrdb
-query
)
)
"
term_font="
${
term_font
/*font
:
}
"
term_font="
$(
trim
"
$term_font
"
)
"
# Xresources has two different font formats, this checks which
# one is in use and formats it accordingly.
case "
$term_font
" in
*"
xft:
"*)
term_font="
${
term_font
/xft
:
}
"
term_font="
${
term_font
/
:
*
}
"
;;
"
-
"*) term_font="
$(
awk
-F
'\\-'
'{printf $3}'
<<<
"
$term_font
"
)
" ;;
esac
;;
"
xfce4-terminal
")
term_font="
$(
awk
-F
'='
'/^FontName/ {a=$2} END{print a}'
"
${
XDG_CONFIG_HOME
}
/xfce4/terminal/terminalrc"
)
"
;;
"
termite
")
term_font="
$(
awk
-F
'= '
'/^font/ {a=$2} END{print a}'
"
${
XDG_CONFIG_HOME
}
/termite/config"
)
"
;;
"
mintty
")
term_font="
$(
awk
-F
'='
'!/^($|#)/ && /Font/ {printf $2; exit}'
"
${
HOME
}
/.minttyrc"
)
"
;;
;;
"
Apple_Terminal
")
"
Apple_Terminal
")
term_font="
$(
osascript
-e
'tell application "Terminal" to font name of window frontmost'
)
"
term_font="
$(
osascript
-e
'tell application "Terminal" to font name of window frontmost'
)
"
;;
;;
"
terminology
")
term_font="
$(
strings
"
${
XDG_CONFIG_HOME
}
/terminology/config/standard/base.cfg"
|
awk
'/^font\.name$/{print a}{a=$0}'
)
"
term_font="
${
term_font
/.pcf
}
"
term_font="
${
term_font
/
:
*
}
"
;;
"
Hyper
"*)
"
Hyper
"*)
term_font="
$(
awk
-F
","
'/fontFamily/ {a=$1} END{print a}'
"
${
HOME
}
/.hyper.js"
|
awk
-F
"'"
'{a=$2} END{print a}'
)
"
term_font="
$(
awk
-F
","
'/fontFamily/ {a=$1} END{print a}'
"
${
HOME
}
/.hyper.js"
|
awk
-F
"'"
'{a=$2} END{print a}'
)
"
;;
;;
"
sakura
"*)
term_font="
$(
awk
-F
'='
'/^font=/ {a=$2} END{print a}'
"
${
XDG_CONFIG_HOME
}
/sakura/sakura.conf"
)
"
;;
"
konsole
"*)
"
konsole
"*)
# Get Process ID of current konsole window / tab
# Get Process ID of current konsole window / tab
child="
$(
get_ppid
"
$$
"
)
"
child="
$(
get_ppid
"
$$
"
)
"
...
@@ -1616,6 +1579,45 @@ get_term_font() {
...
@@ -1616,6 +1579,45 @@ get_term_font() {
profile_filename="
${
profile_filename
/
$'
\n
'
*
}
"
profile_filename="
${
profile_filename
/
$'
\n
'
*
}
"
[[ "
$profile_filename
" ]] && term_font="
$(
awk
-F
'=|,'
'/Font=/ {print $2 " " $3}'
"
$profile_filename
"
)
"
[[ "
$profile_filename
" ]] && term_font="
$(
awk
-F
'=|,'
'/Font=/ {print $2 " " $3}'
"
$profile_filename
"
)
"
;;
;;
"
mintty
")
term_font="
$(
awk
-F
'='
'!/^($|#)/ && /Font/ {printf $2; exit}'
"
${
HOME
}
/.minttyrc"
)
"
;;
"
sakura
"*)
term_font="
$(
awk
-F
'='
'/^font=/ {a=$2} END{print a}'
"
${
XDG_CONFIG_HOME
}
/sakura/sakura.conf"
)
"
;;
"
terminology
")
term_font="
$(
strings
"
${
XDG_CONFIG_HOME
}
/terminology/config/standard/base.cfg"
|
awk
'/^font\.name$/{print a}{a=$0}'
)
"
term_font="
${
term_font
/.pcf
}
"
term_font="
${
term_font
/
:
*
}
"
;;
"
termite
")
term_font="
$(
awk
-F
'= '
'/^font/ {a=$2} END{print a}'
"
${
XDG_CONFIG_HOME
}
/termite/config"
)
"
;;
"
urxvt
" | "
urxvtd
" | "
xterm
")
term_font="
$(
grep
-i
-F
"
${
term
/d
}
*font"
< <
(
xrdb
-query
)
)
"
term_font="
${
term_font
/*font
:
}
"
term_font="
$(
trim
"
$term_font
"
)
"
# Xresources has two different font formats, this checks which
# one is in use and formats it accordingly.
case "
$term_font
" in
*"
xft:
"*)
term_font="
${
term_font
/xft
:
}
"
term_font="
${
term_font
/
:
*
}
"
;;
"
-
"*) term_font="
$(
awk
-F
'\\-'
'{printf $3}'
<<<
"
$term_font
"
)
" ;;
esac
;;
"
xfce4-terminal
")
term_font="
$(
awk
-F
'='
'/^FontName/ {a=$2} END{print a}'
"
${
XDG_CONFIG_HOME
}
/xfce4/terminal/terminalrc"
)
"
;;
esac
esac
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment