Skip to content

Commit

Permalink
misc: fix prettify_wm_name() + install cufetch.desktop
Browse files Browse the repository at this point in the history
  • Loading branch information
Toni500github committed Aug 30, 2024
1 parent 35bebfc commit 5cbeeae
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
CXX ?= g++
PREFIX ?= /usr
MANPREFIX ?= $(PREFIX)/share/man
APPPREFIX ?= $(PREFIX)/share/applications
VARS ?=
GUI_MODE ?= 0

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

.PHONY: $(TARGET) dist distclean fmt toml install all
7 changes: 4 additions & 3 deletions cufetch.desktop
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
#!/usr/bin/env xdg-open
[Desktop Entry]
Name=Customfetch
Comment=Highly customizable and fast fetch program
Type=Application
Path=/home/toni/stupid_projects/customfetch/
Exec=./cufetch --gui
#Path=/home/toni/stupid_projects/customfetch/
Exec=cufetch --gui
Terminal=false
Categories=Viewer;GTK;
Icon=lookswitcher
Keywords=neofetch;
Keywords=customfetch;cufetch
2 changes: 1 addition & 1 deletion src/query/unix/user.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ static std::string get_wm_name()

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

if ((wm_name = prettify_wm_name(str_tolower(proc_name))) == MAGIC_LINE)
if ((wm_name = prettify_wm_name(proc_name)) == MAGIC_LINE)
continue;

break;
Expand Down
2 changes: 1 addition & 1 deletion src/query/unix/utils/dewm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ std::string prettify_wm_name(const std::string_view name) noexcept
// https://github.com/KittyKatt/screenFetch/blob/master/screenfetch-dev#L93
// added some missing.
// ngl this looks beatiful thanks to clang-format :D
switch (fnv1a16::hash(name))
switch (fnv1a16::hash(str_tolower(name.data())))
{
case "2bwm"_fnv1a16: return "2bwm";
case "9wm"_fnv1a16: return "9wm";
Expand Down

0 comments on commit 5cbeeae

Please sign in to comment.