Fix #7: Add "Other" catch-all category to the launcher. map_category() now returns "Other" instead of "" for unrecognized .desktop Categories, and an "Other" tab is added to the CATS list so those apps are discoverable instead of silently hidden. Fix #8: Respect ICCCM WM_NORMAL_HINTS. client_add() reads PMinSize, PResizeInc, and PBaseSize from the window's size hints. The resize drag handler in events.c clamps to min_w/min_h and snaps to the width_inc/height_inc grid, fixing jank in character-cell terminal emulators (xterm, Alacritty). Fix #10: Optional freedesktop icon loading via imlib2. The launcher now parses the Icon= field from .desktop files and attempts to render a PNG icon from Papirus-Dark (or hicolor fallback). When imlib2 is not present the existing letter-square is shown unchanged. launcher/Makefile auto-detects imlib2 via pkg-config and sets -DHAVE_IMLIB2. Fix #11: True 4-desktop support in the WM. Each Client carries a desktop field (assigned at map time from wm->cur_desktop). Clicking a workspace button in the deskbar sends _NET_CURRENT_DESKTOP; the WM now handles it via wm_switch_desktop() which unmaps frames on the leaving desktop, maps frames on the arriving desktop, and re-focuses. _NET_WM_DESKTOP is set per window so the deskbar can filter db_update_apps() to show only current-desktop windows (sticky windows with desktop 0xFFFFFFFF are always shown).
32 lines
803 B
Makefile
32 lines
803 B
Makefile
CC = gcc
|
|
|
|
PKG_XFT_C := $(shell pkg-config --cflags xft x11 2>/dev/null)
|
|
PKG_XFT_L := $(shell pkg-config --libs xft x11 2>/dev/null)
|
|
ifeq ($(PKG_XFT_C),)
|
|
PKG_XFT_C := -I/opt/homebrew/include
|
|
PKG_XFT_L := -L/opt/homebrew/lib -lXft -lfontconfig
|
|
endif
|
|
|
|
# Optional: imlib2 for freedesktop icon loading
|
|
PKG_IL_C := $(shell pkg-config --cflags imlib2 2>/dev/null)
|
|
PKG_IL_L := $(shell pkg-config --libs imlib2 2>/dev/null)
|
|
ifneq ($(PKG_IL_C),)
|
|
PKG_XFT_C += $(PKG_IL_C) -DHAVE_IMLIB2
|
|
PKG_XFT_L += $(PKG_IL_L)
|
|
endif
|
|
|
|
CFLAGS = -Wall -Wextra -O2 $(PKG_XFT_C)
|
|
LDFLAGS = $(PKG_XFT_L)
|
|
|
|
SRC = src/launcher.c
|
|
BIN = orionlauncher
|
|
|
|
.PHONY: all clean install
|
|
all: $(BIN)
|
|
$(BIN): $(SRC)
|
|
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
|
|
install: $(BIN)
|
|
install -Dm755 $(BIN) /usr/local/bin/$(BIN)
|
|
clean:
|
|
rm -f $(BIN)
|