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
e4224c4f
Unverified
Commit
e4224c4f
authored
Dec 17, 2017
by
Dylan Araps
Committed by
GitHub
Dec 17, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #881 from dylanaraps/wayland
wm: Better wayland detection
parents
80a34bdf
4870a863
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
15 deletions
+30
-15
neofetch
neofetch
+30
-15
No files found.
neofetch
View file @
e4224c4f
...
...
@@ -677,7 +677,7 @@ get_de() {
esac
# Fallback to using xprop.
[[
-n
"
$DISPLAY
" && -z "
$de
" ]] &&
\
[[ "
$DISPLAY
" && -z "
$de
" ]] &&
\
de="
$(
xprop
-root
|
awk
'/KDE_SESSION_VERSION|^_MUFFIN|xfce4|xfce5/'
)
"
# Format strings.
...
...
@@ -703,7 +703,27 @@ get_wm() {
# If function was run, stop here.
((wm_run == 1)) && return
if [[ -n "
$DISPLAY
" && "
$os
" != "
Mac OS X
" ]]; then
if [[ "
$WAYLAND_DISPLAY
" ]]; then
wm="
$(
ps
-e
|
grep
-m
1
-o
-F
\
-e
"asc"
\
-e
"fireplace"
\
-e
"grefsen"
\
-e
"mazecompositor"
\
-e
"maynard"
\
-e
"motorcar"
\
-e
"orbment"
\
-e
"orbital"
\
-e
"perceptia"
\
-e
"rustland"
\
-e
"sway"
\
-e
"velox"
\
-e
"wavy"
\
-e
"wayhouse"
\
-e
"way-cooler"
\
-e
"westford"
\
-e
"weston"
)
"
elif [[ "
$DISPLAY
" && "
$os
" != "
Mac OS X
" ]]; then
id="
$(
xprop
-root
-notype
_NET_SUPPORTING_WM_CHECK
)
"
id="
${
id
##*
}
"
wm="
$(
xprop
-id
"
$id
"
-notype
-len
100
-f
_NET_WM_NAME 8t
)
"
...
...
@@ -714,13 +734,6 @@ get_wm() {
# Window Maker does not set _NET_WM_NAME
[[
"
$wm
"
=~
"WINDOWMAKER"
]] && wm=
"wmaker"
# Fallback for Wayland wms.
[[
"
$wm
"
==
"xwlc"
]] && \
wm=
"
$(
ps
-e
|
grep
-m
1
-o
-F
-e
"sway"
\
-e
"orbment"
\
-e
"orbital"
\
-e
"way-cooler"
)
"
else
case
"
$os
"
in
"Mac OS X"
)
...
...
@@ -736,11 +749,13 @@ get_wm() {
;;
"Windows"
)
wm=
"
$(
tasklist |
grep
-m
1
-o
-F
-e
"bugn"
\
-e
"Windawesome"
\
-e
"blackbox"
\
-e
"emerge"
\
-e
"litestep"
)
"
wm=
"
$(
tasklist |
grep
-m
1
-o
-F
\
-e
"bugn"
\
-e
"Windawesome"
\
-e
"blackbox"
\
-e
"emerge"
\
-e
"litestep"
)
"
[[
"
$wm
"
==
"blackbox"
]] && wm=
"bbLean (Blackbox)"
wm=
"
${
wm
:+
$wm
,
}
Explorer"
;;
...
...
@@ -1634,7 +1649,7 @@ get_style() {
# Fix weird output when the function is run multiple times.
unset gtk2_theme gtk3_theme theme path
if [[
-n
"
$DISPLAY
" && "
$os
" != "
Mac OS X
" ]]; then
if [[ "
$DISPLAY
" && "
$os
" != "
Mac OS X
" ]]; then
# Get DE if user has disabled the function.
((de_run != 1)) && get_de
...
...
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