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
b6b1dfc2
Unverified
Commit
b6b1dfc2
authored
Feb 03, 2018
by
Dylan Araps
Committed by
GitHub
Feb 03, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #904 from JadeMatrix/master
macOS fixes & improvements
parents
2ba3fc01
279a1e58
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
13 deletions
+48
-13
neofetch
neofetch
+48
-13
No files found.
neofetch
View file @
b6b1dfc2
...
@@ -926,14 +926,19 @@ get_wm_theme() {
...
@@ -926,14 +926,19 @@ get_wm_theme() {
;;
;;
"Quartz Compositor"
)
"Quartz Compositor"
)
wm_theme=
"
$(
PlistBuddy
-c
"Print AppleAquaColorVariant"
\
global_preferences=
"
${
HOME
}
/Library/Preferences/.GlobalPreferences.plist"
"
${
HOME
}
/Library/Preferences/.GlobalPreferences.plist"
)
"
wm_theme=
"
$(
PlistBuddy
-c
"Print AppleInterfaceStyle"
"
$global_preferences
"
)
"
wm_theme_color=
"
$(
PlistBuddy
-c
"Print AppleAquaColorVariant"
"
$global_preferences
"
)
"
if [[ -z
"
$wm_theme
"
]] || ((wm_theme == 1)); then
[[ -z
"
$wm_theme
"
]] && wm_theme=
"Light"
wm_theme=
"Blue"
if [[ -z
"
$wm_theme_color
"
]] || ((wm_theme_color == 1)); then
wm_theme_color=
"Blue"
else
else
wm_theme=
"Graphite"
wm_theme
_color
=
"Graphite"
fi
fi
wm_theme=
"
$wm_theme_color
(
$wm_theme
)"
;;
;;
*
"Explorer"
)
*
"Explorer"
)
...
@@ -1522,7 +1527,7 @@ get_memory() {
...
@@ -1522,7 +1527,7 @@ get_memory() {
}
}
get_song() {
get_song() {
player="
$(
ps
-e
|
grep
-m
1
-o
-F
\
player="
$(
ps
-e
|
grep
-m
1
-o
\
-e
"Google Play"
\
-e
"Google Play"
\
-e
"Spotify"
\
-e
"Spotify"
\
-e
"amarok"
\
-e
"amarok"
\
...
@@ -1537,7 +1542,7 @@ get_song() {
...
@@ -1537,7 +1542,7 @@ get_song() {
-e
"exaile"
\
-e
"exaile"
\
-e
"gnome-music"
\
-e
"gnome-music"
\
-e
"guayadeque"
\
-e
"guayadeque"
\
-e
"iTunes
.app
"
\
-e
"iTunes
$
"
\
-e
"juk"
\
-e
"juk"
\
-e
"lollypop"
\
-e
"lollypop"
\
-e
"mocp"
\
-e
"mocp"
\
...
@@ -1603,13 +1608,29 @@ get_song() {
...
@@ -1603,13 +1608,29 @@ get_song() {
"
Linux
") get_song_dbus "
spotify
" ;;
"
Linux
") get_song_dbus "
spotify
" ;;
"
Mac OS X
")
"
Mac OS X
")
song="
$(
osascript
-e
'tell application "Spotify" to artist of current track as string & " - " & name of current track as string'
)
"
song="
$(
osascript
<<
END
if application "Spotify" is running then
tell application "Spotify"
artist of current track as string & \
" - " & name of current track as string
end tell
end if
END
)
"
;;
;;
esac
esac
;;
;;
"
itunes
"*)
"
itunes
"*)
song="
$(
osascript
-e
'tell application "iTunes" to artist of current track as string & " - " & name of current track as string'
)
"
song="
$(
osascript
<<
END
if application "iTunes" is running then
tell application "iTunes"
artist of current track as string & \
" - " & name of current track as string
end tell
end if
END
)
"
;;
;;
"
banshee
"*)
"
banshee
"*)
...
@@ -1965,7 +1986,10 @@ get_term_font() {
...
@@ -1965,7 +1986,10 @@ get_term_font() {
;;
;;
"
Apple_Terminal
")
"
Apple_Terminal
")
term_font="
$(
osascript
-e
'tell application "Terminal" to font name of window frontmost'
)
"
term_font="
$(
osascript
<<
END
tell application "Terminal" to font name of window frontmost
END
)
"
;;
;;
"
iTerm2
")
"
iTerm2
")
...
@@ -1976,7 +2000,11 @@ get_term_font() {
...
@@ -1976,7 +2000,11 @@ get_term_font() {
# See: https://groups.google.com/forum/#!topic/iterm2-discuss/0tO3xZ4Zlwg
# See: https://groups.google.com/forum/#!topic/iterm2-discuss/0tO3xZ4Zlwg
local
current_profile_name profiles_count profile_name diff_font none_ascii
local
current_profile_name profiles_count profile_name diff_font none_ascii
current_profile_name
=
"
$(
osascript
-e
'tell application "iTerm2" to profile name of current session of current window'
)
"
current_profile_name
=
"
$(
osascript
<<
END
tell application "iTerm2" to profile name \
of current session of current window
END
)
"
# Warning: Dynamic profiles are not taken into account here!
# Warning: Dynamic profiles are not taken into account here!
# https://www.iterm2.com/documentation-dynamic-profiles.html
# https://www.iterm2.com/documentation-dynamic-profiles.html
...
@@ -2620,7 +2648,10 @@ get_image_source() {
...
@@ -2620,7 +2648,10 @@ get_image_source() {
get_wallpaper
()
{
get_wallpaper
()
{
case
"
$os
"
in
case
"
$os
"
in
"Mac OS X"
)
"Mac OS X"
)
image
=
"
$(
osascript
-e
'tell application "System Events" to picture of current desktop'
)
"
image
=
"
$(
osascript
<<
END
tell application "System Events" to picture of current desktop
END
)
"
;;
;;
"Windows"
)
"Windows"
)
...
@@ -3232,7 +3263,11 @@ strip_sequences() {
...
@@ -3232,7 +3263,11 @@ strip_sequences() {
}
}
uppercase() {
uppercase() {
((bash_version >= 4)) && printf "
%s
" "
${
1
^
}
"
if ((bash_version >= 4)); then
printf "
%s
" "
${
1
^
}
"
else
printf "
%s
" "
$1
"
fi
}
}
# COLORS
# COLORS
...
...
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