Skip to content

Commit 5cbeeae

Browse files
committed
misc: fix prettify_wm_name() + install cufetch.desktop
1 parent 35bebfc commit 5cbeeae

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
CXX ?= g++
22
PREFIX ?= /usr
33
MANPREFIX ?= $(PREFIX)/share/man
4+
APPPREFIX ?= $(PREFIX)/share/applications
45
VARS ?=
56
GUI_MODE ?= 0
67

@@ -82,5 +83,7 @@ install: $(TARGET)
8283
sed -e "s/@VERSION@/$(VERSION)/g" -e "s/@BRANCH@/$(BRANCH)/g" < cufetch.1 > $(DESTDIR)$(MANPREFIX)/man1/cufetch.1
8384
chmod 644 $(DESTDIR)$(MANPREFIX)/man1/cufetch.1
8485
cd assets/ && find ascii/ -type f -exec install -Dm 644 "{}" "$(DESTDIR)$(PREFIX)/share/customfetch/{}" \;
86+
mkdir -p $(DESTDIR)$(APPPREFIX)
87+
cp -f cufetch.desktop $(DESTDIR)$(APPPREFIX)
8588

8689
.PHONY: $(TARGET) dist distclean fmt toml install all

cufetch.desktop

100644100755
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1+
#!/usr/bin/env xdg-open
12
[Desktop Entry]
23
Name=Customfetch
34
Comment=Highly customizable and fast fetch program
45
Type=Application
5-
Path=/home/toni/stupid_projects/customfetch/
6-
Exec=./cufetch --gui
6+
#Path=/home/toni/stupid_projects/customfetch/
7+
Exec=cufetch --gui
78
Terminal=false
89
Categories=Viewer;GTK;
910
Icon=lookswitcher
10-
Keywords=neofetch;
11+
Keywords=customfetch;cufetch

src/query/unix/user.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ static std::string get_wm_name()
6464

6565
debug("WM proc_name = {}", proc_name);
6666

67-
if ((wm_name = prettify_wm_name(str_tolower(proc_name))) == MAGIC_LINE)
67+
if ((wm_name = prettify_wm_name(proc_name)) == MAGIC_LINE)
6868
continue;
6969

7070
break;

src/query/unix/utils/dewm.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ std::string prettify_wm_name(const std::string_view name) noexcept
6464
// https://github.com/KittyKatt/screenFetch/blob/master/screenfetch-dev#L93
6565
// added some missing.
6666
// ngl this looks beatiful thanks to clang-format :D
67-
switch (fnv1a16::hash(name))
67+
switch (fnv1a16::hash(str_tolower(name.data())))
6868
{
6969
case "2bwm"_fnv1a16: return "2bwm";
7070
case "9wm"_fnv1a16: return "9wm";

0 commit comments

Comments
 (0)