0.2.1
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
# 0.2.1 (2026/01/16)
|
||||
* DWMでうまく表示する様に
|
||||
* あたしのDWMテーマに合わせる
|
||||
|
||||
# 0.2.0 (2025/07/07)
|
||||
* .desktopファイルがなければ、$PATHから実効してみる様に
|
||||
* um.desktopファイルの追加
|
||||
|
||||
4
Makefile
4
Makefile
@@ -45,12 +45,12 @@ CFLAGS += -I/usr/local/include -I/usr/local/include/X11\
|
||||
CFLAGS += -I/usr/include/freetype2
|
||||
.endif
|
||||
|
||||
LDFLAGS = -lc -lX11 -lXft
|
||||
LDFLAGS = -lc -lX11 -lXft -lsys
|
||||
SLIB = -lxcb
|
||||
.if ${OS} == "openbsd"
|
||||
SLIB += -lfontconfig -lz -lexpat -lfreetype -lXrender -lXau -lXdmcp
|
||||
.elif ${OS} == "freebsd"
|
||||
SLIB += -lthr -lfontconfig -lfreetype -lXrender -lXau -lXdmcp -lexpat -lz -lbz2\
|
||||
SLIB += -lthr -lfontconfig -lintl -lfreetype -lXrender -lXau -lXdmcp -lexpat -lz -lbz2\
|
||||
-lpng16 -lbrotlidec -lm -lbrotlicommon
|
||||
.elif ${OS} == "netbsd"
|
||||
SLIB += -lfontconfig -lfreetype -lXau -lXdmcp -lgcc -lexpat -lz -lbz2 -lXrandr\
|
||||
|
||||
16
main.c
16
main.c
@@ -1,6 +1,8 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <X11/Xatom.h>
|
||||
|
||||
#include "src/control.h"
|
||||
#include "src/program.h"
|
||||
#include "src/display.h"
|
||||
@@ -14,7 +16,7 @@ XftFont *font;
|
||||
Visual *visual;
|
||||
|
||||
const char *sofname = "um";
|
||||
const char *version = "0.2.0";
|
||||
const char *version = "0.2.1";
|
||||
|
||||
int main() {
|
||||
Display *display;
|
||||
@@ -44,11 +46,17 @@ int main() {
|
||||
int window_y = (screen_height - window_height) / 2;
|
||||
|
||||
window = XCreateSimpleWindow(display, RootWindow(display, screen),
|
||||
window_x, window_y, window_width, window_height, 1, BLACK, BLACK);
|
||||
window_x, window_y, window_width, window_height, 1, FGCOL, FGCOL);
|
||||
if (!window) {
|
||||
cleanup(display, window, gc, &color, &selcolor, draw, font, colormap, visual);
|
||||
}
|
||||
|
||||
Atom net_wm_window_type = XInternAtom(display, "_NET_WM_WINDOW_TYPE", False);
|
||||
Atom dialog = XInternAtom(display, "_NET_WM_WINDOW_TYPE_DIALOG", False);
|
||||
|
||||
XChangeProperty(display, window, net_wm_window_type, XA_ATOM, 32,
|
||||
PropModeReplace, (unsigned char *)&dialog, 1);
|
||||
|
||||
XSetWindowBackground(display, window, BGCOL);
|
||||
|
||||
XSelectInput(display, window,
|
||||
@@ -84,12 +92,12 @@ int main() {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (!XftColorAllocName(display, visual, colormap, "white", &color)) {
|
||||
if (!XftColorAllocName(display, visual, colormap, "#ee4030", &color)) {
|
||||
cleanup(display, window, gc, &color, &selcolor, draw, font, colormap, visual);
|
||||
fprintf(stderr, "色の役割に失敗。\n");
|
||||
}
|
||||
|
||||
if (!XftColorAllocName(display, visual, colormap, "black", &selcolor)) {
|
||||
if (!XftColorAllocName(display, visual, colormap, "#120f12", &selcolor)) {
|
||||
cleanup(display, window, gc, &color, &selcolor, draw, font, colormap, visual);
|
||||
fprintf(stderr, "選択色の役割に失敗。\n");
|
||||
}
|
||||
|
||||
BIN
scrot1.png
BIN
scrot1.png
Binary file not shown.
|
Before Width: | Height: | Size: 401 KiB After Width: | Height: | Size: 146 KiB |
BIN
scrot2.png
BIN
scrot2.png
Binary file not shown.
|
Before Width: | Height: | Size: 402 KiB After Width: | Height: | Size: 140 KiB |
@@ -6,16 +6,17 @@ int topidx = 0;
|
||||
|
||||
void drawtext(
|
||||
Display *display, Window window, GC gc, int x, int y, const char *text, int sel) {
|
||||
XftColor *fgCol = (sel) ? &selcolor : &color;
|
||||
if (sel) {
|
||||
XSetForeground(display, gc, BLACK);
|
||||
XSetForeground(display, gc, BGSEL);
|
||||
XFillRectangle(
|
||||
display, window, gc, 0, y - item_height + 5, window_width, item_height);
|
||||
XSetForeground(display, gc, BLACK);
|
||||
XSetForeground(display, gc, BGCOL);
|
||||
} else {
|
||||
XSetForeground(display, gc, WHITE);
|
||||
XSetForeground(display, gc, FGSEL);
|
||||
}
|
||||
|
||||
XftDrawStringUtf8(draw, &color, font, x, y, (const FcChar8 *)text, strlen(text));
|
||||
XftDrawStringUtf8(draw, fgCol, font, x, y, (const FcChar8 *)text, strlen(text));
|
||||
}
|
||||
|
||||
void filterdisplay(
|
||||
|
||||
@@ -8,9 +8,10 @@
|
||||
#define MAX_NAME_LEN 256
|
||||
#define MAX_LINE_LENGTH 256
|
||||
|
||||
#define WHITE 0xfcfcfc
|
||||
#define BLACK 0x120f12
|
||||
#define BGCOL 0x550f75
|
||||
#define FGCOL 0xb61729
|
||||
#define FGSEL 0x120f12
|
||||
#define BGSEL 0xf35869
|
||||
#define BGCOL 0x232023
|
||||
|
||||
typedef struct {
|
||||
char name[MAX_NAME_LEN];
|
||||
|
||||
Reference in New Issue
Block a user