+autosuspend on lid close
This commit is contained in:
parent
dfe809886a
commit
91190eb4b8
3
.gitignore
vendored
3
.gitignore
vendored
@ -42,6 +42,9 @@ nuclear/Cache/
|
||||
net.imput.helium/
|
||||
*helium*
|
||||
Proton\ Mail/
|
||||
mozilla/
|
||||
firefox/
|
||||
chromium/
|
||||
|
||||
# weechat
|
||||
weechat/sec.conf
|
||||
|
||||
3
.xinitrc
Normal file → Executable file
3
.xinitrc
Normal file → Executable file
@ -8,4 +8,7 @@ export XDG_CURRENT_DESKTOP=dwm
|
||||
export XDG_SESSION_DESKTOP=dwm
|
||||
export XDG_SESSION_TYPE=x11
|
||||
|
||||
# QT apps use xdg portal settings
|
||||
export QT_USE_PORTAL=1
|
||||
|
||||
exec dbus-run-session -- /usr/local/bin/dwm
|
||||
|
||||
@ -1,5 +1,8 @@
|
||||
[FileDialog]
|
||||
history=@Invalid()
|
||||
lastVisited=file:///home/c2ny/Documents
|
||||
qtVersion=5.15.18
|
||||
history=file:///home/c2ny, file:///home/c2ny/Documents, file:///home/c2ny/Downloads
|
||||
lastVisited=file:///home/c2ny/Downloads
|
||||
qtVersion=6.10.0
|
||||
shortcuts=file:, file:///home/c2ny
|
||||
sidebarWidth=98
|
||||
treeViewHeader=@ByteArray(\0\0\0\xff\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x1\xec\0\0\0\x4\x1\x1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x64\xff\xff\xff\xff\0\0\0\x81\0\0\0\0\0\0\0\x4\0\0\0\xff\0\0\0\x1\0\0\0\0\0\0\0?\0\0\0\x1\0\0\0\0\0\0\0@\0\0\0\x1\0\0\0\0\0\0\0n\0\0\0\x1\0\0\0\0\0\0\x3\xe8\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x1)
|
||||
viewMode=Detail
|
||||
|
||||
@ -34,7 +34,7 @@ sudo xbps-install -y clang git unzip ninja cmake git rsync patch
|
||||
sudo xbps-install -y neovim firefox telegram-desktop xcompmgr xorg-minimal xorg-fonts
|
||||
sudo xbps-install -y xf86-input-evdev xf86-input-libinput xtools dbus elogind
|
||||
sudo xbps-install -y feh noto-fonts-ttf noto-fonts-emoji xdg-desktop-portal xdg-desktop-portal-gtk\
|
||||
xclip xset pavucontrol pipewire redshift setxkbmap lldb xsetroot\
|
||||
xclip xset pavucontrol pipewire redshift setxkbmap lldb xsetroot wget xss-lock \
|
||||
libXinerama-devel libXft-devel libX11-devel pkg-config freetype-devel \
|
||||
zip unzip flatpak pulseaudio playerctl fastfetch btop keepassxc cronie nitrogen \
|
||||
man-pages-devel man-pages-posix noto-fonts-cjk libXrandr-devel libXpm-devel imlib2-devel
|
||||
@ -79,11 +79,15 @@ sudo ln -s /usr/share/examples/pipewire/20-pipewire-pulse.conf /etc/pipewire/pip
|
||||
|
||||
# dwm
|
||||
cd ~/.config/dwm-6.6/
|
||||
sudo make install && make clean
|
||||
sudo make install clean
|
||||
|
||||
# slock
|
||||
cd ~/.config/slock-1.6
|
||||
sudo make install && make clean
|
||||
sudo make install clean
|
||||
|
||||
# slstatus
|
||||
cd ~/.config/slstatus-1.1
|
||||
sudo make install clean
|
||||
|
||||
# st
|
||||
cd ~/.config/st-0.9.3/
|
||||
@ -92,7 +96,7 @@ ln -s $(realpath scripts/*) ~/.local/bin
|
||||
|
||||
# dmenu
|
||||
cd ~/.config/dmenu-5.4
|
||||
sudo make install && make clean
|
||||
sudo make install clean
|
||||
|
||||
# fonts
|
||||
mkdir -p ~/.local/share/fonts
|
||||
|
||||
@ -353,8 +353,7 @@
|
||||
"type": "generic",
|
||||
"default": [
|
||||
"nemo.desktop",
|
||||
"org.mozilla.firefox.desktop",
|
||||
"net.thunderbird.Thunderbird.desktop",
|
||||
"firefox.desktop",
|
||||
"org.gnome.Terminal.desktop"
|
||||
],
|
||||
"value": [
|
||||
@ -363,5 +362,5 @@
|
||||
"org.telegram.desktop._b1807ce1df22ee6402707058cb72785d.desktop"
|
||||
]
|
||||
},
|
||||
"__md5__": "9e7302e8001913ced95816fd420dc8e0"
|
||||
"__md5__": "b7d0a7558cf87c22c50195c9d408485f"
|
||||
}
|
||||
@ -1,19 +0,0 @@
|
||||
{
|
||||
"section1": {
|
||||
"type": "section",
|
||||
"description": "Appearance"
|
||||
},
|
||||
"show-icon": {
|
||||
"type": "radiogroup",
|
||||
"default": "printers",
|
||||
"description": "Show printer icon",
|
||||
"options": {
|
||||
"Always": "always",
|
||||
"When printers exist": "printers",
|
||||
"When printing": "jobs"
|
||||
},
|
||||
"tooltip": "Choose when to show the printer icon in the panel",
|
||||
"value": "printers"
|
||||
},
|
||||
"__md5__": "93e5a8d56ccfdbf949efa8b7e5b6ef9d"
|
||||
}
|
||||
BIN
dconf/user
BIN
dconf/user
Binary file not shown.
@ -1,11 +1,16 @@
|
||||
/* See LICENSE file for copyright and license details. */
|
||||
|
||||
/*
|
||||
* Packages needed for dwm to work properly:
|
||||
* xset redshift nitrogen brightnessctl playerctl flameshot xss-lock
|
||||
*/
|
||||
|
||||
/* appearance */
|
||||
static const unsigned int borderpx = 3; /* border pixel of windows */
|
||||
static const unsigned int snap = 32; /* snap pixel */
|
||||
static const int showbar = 10; /* 0 means no bar */
|
||||
static const int topbar = 1; /* 0 means bottom bar */
|
||||
static const char *fonts[] = { "CommitMono:size=15" };
|
||||
static const char *fonts[] = { "0xProto:size=15" };
|
||||
static const char dmenufont[] = "CommitMono:size=17";
|
||||
|
||||
// static const char col_foreground[] = "#BCC4C9";
|
||||
@ -16,9 +21,9 @@ static const char dmenufont[] = "CommitMono:size=17";
|
||||
// static const char col_norm_border[] = "#182221";
|
||||
|
||||
static const char col_foreground[] = "#788799";
|
||||
static const char col_foreground2[] = "#8792A4";
|
||||
static const char col_foreground2[] = "#6A7587"; // was #8792A4
|
||||
static const char col_background[] = "#e5e6e8";
|
||||
static const char col_background2[] = "#CFCFD1";
|
||||
static const char col_background2[] = "#D0D0D2"; // was #CFCFD1
|
||||
static const char col_sel_border[] = "#f78ade";
|
||||
static const char col_norm_border[] = "#5a6a7c";
|
||||
|
||||
@ -60,7 +65,8 @@ static const char *const autostart[] = {
|
||||
"nitrogen", "--restore", NULL,
|
||||
// "/home/plky/.config/dwmstat.sh", NULL,
|
||||
"slstatus", NULL,
|
||||
"redshift", "-l", "40.7:-74.0", "-t", "6500:3600", NULL,
|
||||
// doesnt work??
|
||||
"redshift", "-l", "40.7:-74.0", "-t", "6800:3600", NULL,
|
||||
"xcompmgr", NULL,
|
||||
|
||||
// screen blank/off after 1h
|
||||
@ -68,6 +74,8 @@ static const char *const autostart[] = {
|
||||
"xset", "+dpms", NULL,
|
||||
"xset", "dpms", "3600", "3600", "3600", NULL,
|
||||
|
||||
"xss-lock", "--", "cinnamon-screensaver-command", "--lock", NULL,
|
||||
|
||||
NULL
|
||||
};
|
||||
|
||||
|
||||
@ -176,6 +176,8 @@ drw_clr_create(Drw *drw, Clr *dest, const char *clrname)
|
||||
DefaultColormap(drw->dpy, drw->screen),
|
||||
clrname, dest))
|
||||
die("error, cannot allocate color '%s'", clrname);
|
||||
|
||||
dest->pixel |= 0xff << 24;
|
||||
}
|
||||
|
||||
/* Wrapper to create color schemes. The caller has to call free(3) on the
|
||||
|
||||
448
dwm-6.6/drw.c.orig
Normal file
448
dwm-6.6/drw.c.orig
Normal file
@ -0,0 +1,448 @@
|
||||
/* See LICENSE file for copyright and license details. */
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xft/Xft.h>
|
||||
|
||||
#include "drw.h"
|
||||
#include "util.h"
|
||||
|
||||
#define UTF_INVALID 0xFFFD
|
||||
|
||||
static int
|
||||
utf8decode(const char *s_in, long *u, int *err)
|
||||
{
|
||||
static const unsigned char lens[] = {
|
||||
/* 0XXXX */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
/* 10XXX */ 0, 0, 0, 0, 0, 0, 0, 0, /* invalid */
|
||||
/* 110XX */ 2, 2, 2, 2,
|
||||
/* 1110X */ 3, 3,
|
||||
/* 11110 */ 4,
|
||||
/* 11111 */ 0, /* invalid */
|
||||
};
|
||||
static const unsigned char leading_mask[] = { 0x7F, 0x1F, 0x0F, 0x07 };
|
||||
static const unsigned int overlong[] = { 0x0, 0x80, 0x0800, 0x10000 };
|
||||
|
||||
const unsigned char *s = (const unsigned char *)s_in;
|
||||
int len = lens[*s >> 3];
|
||||
*u = UTF_INVALID;
|
||||
*err = 1;
|
||||
if (len == 0)
|
||||
return 1;
|
||||
|
||||
long cp = s[0] & leading_mask[len - 1];
|
||||
for (int i = 1; i < len; ++i) {
|
||||
if (s[i] == '\0' || (s[i] & 0xC0) != 0x80)
|
||||
return i;
|
||||
cp = (cp << 6) | (s[i] & 0x3F);
|
||||
}
|
||||
/* out of range, surrogate, overlong encoding */
|
||||
if (cp > 0x10FFFF || (cp >> 11) == 0x1B || cp < overlong[len - 1])
|
||||
return len;
|
||||
|
||||
*err = 0;
|
||||
*u = cp;
|
||||
return len;
|
||||
}
|
||||
|
||||
Drw *
|
||||
drw_create(Display *dpy, int screen, Window root, unsigned int w, unsigned int h)
|
||||
{
|
||||
Drw *drw = ecalloc(1, sizeof(Drw));
|
||||
|
||||
drw->dpy = dpy;
|
||||
drw->screen = screen;
|
||||
drw->root = root;
|
||||
drw->w = w;
|
||||
drw->h = h;
|
||||
drw->drawable = XCreatePixmap(dpy, root, w, h, DefaultDepth(dpy, screen));
|
||||
drw->gc = XCreateGC(dpy, root, 0, NULL);
|
||||
XSetLineAttributes(dpy, drw->gc, 1, LineSolid, CapButt, JoinMiter);
|
||||
|
||||
return drw;
|
||||
}
|
||||
|
||||
void
|
||||
drw_resize(Drw *drw, unsigned int w, unsigned int h)
|
||||
{
|
||||
if (!drw)
|
||||
return;
|
||||
|
||||
drw->w = w;
|
||||
drw->h = h;
|
||||
if (drw->drawable)
|
||||
XFreePixmap(drw->dpy, drw->drawable);
|
||||
drw->drawable = XCreatePixmap(drw->dpy, drw->root, w, h, DefaultDepth(drw->dpy, drw->screen));
|
||||
}
|
||||
|
||||
void
|
||||
drw_free(Drw *drw)
|
||||
{
|
||||
XFreePixmap(drw->dpy, drw->drawable);
|
||||
XFreeGC(drw->dpy, drw->gc);
|
||||
drw_fontset_free(drw->fonts);
|
||||
free(drw);
|
||||
}
|
||||
|
||||
/* This function is an implementation detail. Library users should use
|
||||
* drw_fontset_create instead.
|
||||
*/
|
||||
static Fnt *
|
||||
xfont_create(Drw *drw, const char *fontname, FcPattern *fontpattern)
|
||||
{
|
||||
Fnt *font;
|
||||
XftFont *xfont = NULL;
|
||||
FcPattern *pattern = NULL;
|
||||
|
||||
if (fontname) {
|
||||
/* Using the pattern found at font->xfont->pattern does not yield the
|
||||
* same substitution results as using the pattern returned by
|
||||
* FcNameParse; using the latter results in the desired fallback
|
||||
* behaviour whereas the former just results in missing-character
|
||||
* rectangles being drawn, at least with some fonts. */
|
||||
if (!(xfont = XftFontOpenName(drw->dpy, drw->screen, fontname))) {
|
||||
fprintf(stderr, "error, cannot load font from name: '%s'\n", fontname);
|
||||
return NULL;
|
||||
}
|
||||
if (!(pattern = FcNameParse((FcChar8 *) fontname))) {
|
||||
fprintf(stderr, "error, cannot parse font name to pattern: '%s'\n", fontname);
|
||||
XftFontClose(drw->dpy, xfont);
|
||||
return NULL;
|
||||
}
|
||||
} else if (fontpattern) {
|
||||
if (!(xfont = XftFontOpenPattern(drw->dpy, fontpattern))) {
|
||||
fprintf(stderr, "error, cannot load font from pattern.\n");
|
||||
return NULL;
|
||||
}
|
||||
} else {
|
||||
die("no font specified.");
|
||||
}
|
||||
|
||||
font = ecalloc(1, sizeof(Fnt));
|
||||
font->xfont = xfont;
|
||||
font->pattern = pattern;
|
||||
font->h = xfont->ascent + xfont->descent;
|
||||
font->dpy = drw->dpy;
|
||||
|
||||
return font;
|
||||
}
|
||||
|
||||
static void
|
||||
xfont_free(Fnt *font)
|
||||
{
|
||||
if (!font)
|
||||
return;
|
||||
if (font->pattern)
|
||||
FcPatternDestroy(font->pattern);
|
||||
XftFontClose(font->dpy, font->xfont);
|
||||
free(font);
|
||||
}
|
||||
|
||||
Fnt*
|
||||
drw_fontset_create(Drw* drw, const char *fonts[], size_t fontcount)
|
||||
{
|
||||
Fnt *cur, *ret = NULL;
|
||||
size_t i;
|
||||
|
||||
if (!drw || !fonts)
|
||||
return NULL;
|
||||
|
||||
for (i = 1; i <= fontcount; i++) {
|
||||
if ((cur = xfont_create(drw, fonts[fontcount - i], NULL))) {
|
||||
cur->next = ret;
|
||||
ret = cur;
|
||||
}
|
||||
}
|
||||
return (drw->fonts = ret);
|
||||
}
|
||||
|
||||
void
|
||||
drw_fontset_free(Fnt *font)
|
||||
{
|
||||
if (font) {
|
||||
drw_fontset_free(font->next);
|
||||
xfont_free(font);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
drw_clr_create(Drw *drw, Clr *dest, const char *clrname)
|
||||
{
|
||||
if (!drw || !dest || !clrname)
|
||||
return;
|
||||
|
||||
if (!XftColorAllocName(drw->dpy, DefaultVisual(drw->dpy, drw->screen),
|
||||
DefaultColormap(drw->dpy, drw->screen),
|
||||
clrname, dest))
|
||||
die("error, cannot allocate color '%s'", clrname);
|
||||
}
|
||||
|
||||
/* Wrapper to create color schemes. The caller has to call free(3) on the
|
||||
* returned color scheme when done using it. */
|
||||
Clr *
|
||||
drw_scm_create(Drw *drw, const char *clrnames[], size_t clrcount)
|
||||
{
|
||||
size_t i;
|
||||
Clr *ret;
|
||||
|
||||
/* need at least two colors for a scheme */
|
||||
if (!drw || !clrnames || clrcount < 2 || !(ret = ecalloc(clrcount, sizeof(XftColor))))
|
||||
return NULL;
|
||||
|
||||
for (i = 0; i < clrcount; i++)
|
||||
drw_clr_create(drw, &ret[i], clrnames[i]);
|
||||
return ret;
|
||||
}
|
||||
|
||||
void
|
||||
drw_setfontset(Drw *drw, Fnt *set)
|
||||
{
|
||||
if (drw)
|
||||
drw->fonts = set;
|
||||
}
|
||||
|
||||
void
|
||||
drw_setscheme(Drw *drw, Clr *scm)
|
||||
{
|
||||
if (drw)
|
||||
drw->scheme = scm;
|
||||
}
|
||||
|
||||
void
|
||||
drw_rect(Drw *drw, int x, int y, unsigned int w, unsigned int h, int filled, int invert)
|
||||
{
|
||||
if (!drw || !drw->scheme)
|
||||
return;
|
||||
XSetForeground(drw->dpy, drw->gc, invert ? drw->scheme[ColBg].pixel : drw->scheme[ColFg].pixel);
|
||||
if (filled)
|
||||
XFillRectangle(drw->dpy, drw->drawable, drw->gc, x, y, w, h);
|
||||
else
|
||||
XDrawRectangle(drw->dpy, drw->drawable, drw->gc, x, y, w - 1, h - 1);
|
||||
}
|
||||
|
||||
int
|
||||
drw_text(Drw *drw, int x, int y, unsigned int w, unsigned int h, unsigned int lpad, const char *text, int invert)
|
||||
{
|
||||
int ty, ellipsis_x = 0;
|
||||
unsigned int tmpw, ew, ellipsis_w = 0, ellipsis_len, hash, h0, h1;
|
||||
XftDraw *d = NULL;
|
||||
Fnt *usedfont, *curfont, *nextfont;
|
||||
int utf8strlen, utf8charlen, utf8err, render = x || y || w || h;
|
||||
long utf8codepoint = 0;
|
||||
const char *utf8str;
|
||||
FcCharSet *fccharset;
|
||||
FcPattern *fcpattern;
|
||||
FcPattern *match;
|
||||
XftResult result;
|
||||
int charexists = 0, overflow = 0;
|
||||
/* keep track of a couple codepoints for which we have no match. */
|
||||
static unsigned int nomatches[128], ellipsis_width, invalid_width;
|
||||
static const char invalid[] = "<EFBFBD>";
|
||||
|
||||
if (!drw || (render && (!drw->scheme || !w)) || !text || !drw->fonts)
|
||||
return 0;
|
||||
|
||||
if (!render) {
|
||||
w = invert ? invert : ~invert;
|
||||
} else {
|
||||
XSetForeground(drw->dpy, drw->gc, drw->scheme[invert ? ColFg : ColBg].pixel);
|
||||
XFillRectangle(drw->dpy, drw->drawable, drw->gc, x, y, w, h);
|
||||
if (w < lpad)
|
||||
return x + w;
|
||||
d = XftDrawCreate(drw->dpy, drw->drawable,
|
||||
DefaultVisual(drw->dpy, drw->screen),
|
||||
DefaultColormap(drw->dpy, drw->screen));
|
||||
x += lpad;
|
||||
w -= lpad;
|
||||
}
|
||||
|
||||
usedfont = drw->fonts;
|
||||
if (!ellipsis_width && render)
|
||||
ellipsis_width = drw_fontset_getwidth(drw, "...");
|
||||
if (!invalid_width && render)
|
||||
invalid_width = drw_fontset_getwidth(drw, invalid);
|
||||
while (1) {
|
||||
ew = ellipsis_len = utf8err = utf8charlen = utf8strlen = 0;
|
||||
utf8str = text;
|
||||
nextfont = NULL;
|
||||
while (*text) {
|
||||
utf8charlen = utf8decode(text, &utf8codepoint, &utf8err);
|
||||
for (curfont = drw->fonts; curfont; curfont = curfont->next) {
|
||||
charexists = charexists || XftCharExists(drw->dpy, curfont->xfont, utf8codepoint);
|
||||
if (charexists) {
|
||||
drw_font_getexts(curfont, text, utf8charlen, &tmpw, NULL);
|
||||
if (ew + ellipsis_width <= w) {
|
||||
/* keep track where the ellipsis still fits */
|
||||
ellipsis_x = x + ew;
|
||||
ellipsis_w = w - ew;
|
||||
ellipsis_len = utf8strlen;
|
||||
}
|
||||
|
||||
if (ew + tmpw > w) {
|
||||
overflow = 1;
|
||||
/* called from drw_fontset_getwidth_clamp():
|
||||
* it wants the width AFTER the overflow
|
||||
*/
|
||||
if (!render)
|
||||
x += tmpw;
|
||||
else
|
||||
utf8strlen = ellipsis_len;
|
||||
} else if (curfont == usedfont) {
|
||||
text += utf8charlen;
|
||||
utf8strlen += utf8err ? 0 : utf8charlen;
|
||||
ew += utf8err ? 0 : tmpw;
|
||||
} else {
|
||||
nextfont = curfont;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (overflow || !charexists || nextfont || utf8err)
|
||||
break;
|
||||
else
|
||||
charexists = 0;
|
||||
}
|
||||
|
||||
if (utf8strlen) {
|
||||
if (render) {
|
||||
ty = y + (h - usedfont->h) / 2 + usedfont->xfont->ascent;
|
||||
XftDrawStringUtf8(d, &drw->scheme[invert ? ColBg : ColFg],
|
||||
usedfont->xfont, x, ty, (XftChar8 *)utf8str, utf8strlen);
|
||||
}
|
||||
x += ew;
|
||||
w -= ew;
|
||||
}
|
||||
if (utf8err && (!render || invalid_width < w)) {
|
||||
if (render)
|
||||
drw_text(drw, x, y, w, h, 0, invalid, invert);
|
||||
x += invalid_width;
|
||||
w -= invalid_width;
|
||||
}
|
||||
if (render && overflow)
|
||||
drw_text(drw, ellipsis_x, y, ellipsis_w, h, 0, "...", invert);
|
||||
|
||||
if (!*text || overflow) {
|
||||
break;
|
||||
} else if (nextfont) {
|
||||
charexists = 0;
|
||||
usedfont = nextfont;
|
||||
} else {
|
||||
/* Regardless of whether or not a fallback font is found, the
|
||||
* character must be drawn. */
|
||||
charexists = 1;
|
||||
|
||||
hash = (unsigned int)utf8codepoint;
|
||||
hash = ((hash >> 16) ^ hash) * 0x21F0AAAD;
|
||||
hash = ((hash >> 15) ^ hash) * 0xD35A2D97;
|
||||
h0 = ((hash >> 15) ^ hash) % LENGTH(nomatches);
|
||||
h1 = (hash >> 17) % LENGTH(nomatches);
|
||||
/* avoid expensive XftFontMatch call when we know we won't find a match */
|
||||
if (nomatches[h0] == utf8codepoint || nomatches[h1] == utf8codepoint)
|
||||
goto no_match;
|
||||
|
||||
fccharset = FcCharSetCreate();
|
||||
FcCharSetAddChar(fccharset, utf8codepoint);
|
||||
|
||||
if (!drw->fonts->pattern) {
|
||||
/* Refer to the comment in xfont_create for more information. */
|
||||
die("the first font in the cache must be loaded from a font string.");
|
||||
}
|
||||
|
||||
fcpattern = FcPatternDuplicate(drw->fonts->pattern);
|
||||
FcPatternAddCharSet(fcpattern, FC_CHARSET, fccharset);
|
||||
FcPatternAddBool(fcpattern, FC_SCALABLE, FcTrue);
|
||||
|
||||
FcConfigSubstitute(NULL, fcpattern, FcMatchPattern);
|
||||
FcDefaultSubstitute(fcpattern);
|
||||
match = XftFontMatch(drw->dpy, drw->screen, fcpattern, &result);
|
||||
|
||||
FcCharSetDestroy(fccharset);
|
||||
FcPatternDestroy(fcpattern);
|
||||
|
||||
if (match) {
|
||||
usedfont = xfont_create(drw, NULL, match);
|
||||
if (usedfont && XftCharExists(drw->dpy, usedfont->xfont, utf8codepoint)) {
|
||||
for (curfont = drw->fonts; curfont->next; curfont = curfont->next)
|
||||
; /* NOP */
|
||||
curfont->next = usedfont;
|
||||
} else {
|
||||
xfont_free(usedfont);
|
||||
nomatches[nomatches[h0] ? h1 : h0] = utf8codepoint;
|
||||
no_match:
|
||||
usedfont = drw->fonts;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (d)
|
||||
XftDrawDestroy(d);
|
||||
|
||||
return x + (render ? w : 0);
|
||||
}
|
||||
|
||||
void
|
||||
drw_map(Drw *drw, Window win, int x, int y, unsigned int w, unsigned int h)
|
||||
{
|
||||
if (!drw)
|
||||
return;
|
||||
|
||||
XCopyArea(drw->dpy, drw->drawable, win, drw->gc, x, y, w, h, x, y);
|
||||
XSync(drw->dpy, False);
|
||||
}
|
||||
|
||||
unsigned int
|
||||
drw_fontset_getwidth(Drw *drw, const char *text)
|
||||
{
|
||||
if (!drw || !drw->fonts || !text)
|
||||
return 0;
|
||||
return drw_text(drw, 0, 0, 0, 0, 0, text, 0);
|
||||
}
|
||||
|
||||
unsigned int
|
||||
drw_fontset_getwidth_clamp(Drw *drw, const char *text, unsigned int n)
|
||||
{
|
||||
unsigned int tmp = 0;
|
||||
if (drw && drw->fonts && text && n)
|
||||
tmp = drw_text(drw, 0, 0, 0, 0, 0, text, n);
|
||||
return MIN(n, tmp);
|
||||
}
|
||||
|
||||
void
|
||||
drw_font_getexts(Fnt *font, const char *text, unsigned int len, unsigned int *w, unsigned int *h)
|
||||
{
|
||||
XGlyphInfo ext;
|
||||
|
||||
if (!font || !text)
|
||||
return;
|
||||
|
||||
XftTextExtentsUtf8(font->dpy, font->xfont, (XftChar8 *)text, len, &ext);
|
||||
if (w)
|
||||
*w = ext.xOff;
|
||||
if (h)
|
||||
*h = font->h;
|
||||
}
|
||||
|
||||
Cur *
|
||||
drw_cur_create(Drw *drw, int shape)
|
||||
{
|
||||
Cur *cur;
|
||||
|
||||
if (!drw || !(cur = ecalloc(1, sizeof(Cur))))
|
||||
return NULL;
|
||||
|
||||
cur->cursor = XCreateFontCursor(drw->dpy, shape);
|
||||
|
||||
return cur;
|
||||
}
|
||||
|
||||
void
|
||||
drw_cur_free(Drw *drw, Cur *cursor)
|
||||
{
|
||||
if (!cursor)
|
||||
return;
|
||||
|
||||
XFreeCursor(drw->dpy, cursor->cursor);
|
||||
free(cursor);
|
||||
}
|
||||
BIN
dwm-6.6/drw.o
BIN
dwm-6.6/drw.o
Binary file not shown.
BIN
dwm-6.6/dwm
BIN
dwm-6.6/dwm
Binary file not shown.
@ -2295,7 +2295,7 @@ main(int argc, char *argv[])
|
||||
die("pledge");
|
||||
#endif /* __OpenBSD__ */
|
||||
scan();
|
||||
runAutostart();
|
||||
// runAutostart();
|
||||
run();
|
||||
cleanup();
|
||||
XCloseDisplay(dpy);
|
||||
|
||||
BIN
dwm-6.6/dwm.o
BIN
dwm-6.6/dwm.o
Binary file not shown.
27
dwm-6.6/patches/dwm-fixborders-6.2.diff
Normal file
27
dwm-6.6/patches/dwm-fixborders-6.2.diff
Normal file
@ -0,0 +1,27 @@
|
||||
From 1529909466206016f2101457bbf37c67195714c8 Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Leszczak <szatan@gecc.xyz>
|
||||
Date: Fri, 22 Nov 2019 10:46:53 +0800
|
||||
Subject: [PATCH] Fix transparent borders
|
||||
|
||||
When terminal has transparency then its borders also become transparent.
|
||||
Fix it by removing transparency from any pixels drawn.
|
||||
---
|
||||
drw.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/drw.c b/drw.c
|
||||
index 8fd1ca4..490a592 100644
|
||||
--- a/drw.c
|
||||
+++ b/drw.c
|
||||
@@ -202,6 +202,8 @@ drw_clr_create(Drw *drw, Clr *dest, const char *clrname)
|
||||
DefaultColormap(drw->dpy, drw->screen),
|
||||
clrname, dest))
|
||||
die("error, cannot allocate color '%s'", clrname);
|
||||
+
|
||||
+ dest->pixel |= 0xff << 24;
|
||||
}
|
||||
|
||||
/* Wrapper to create color schemes. The caller has to call free(3) on the
|
||||
--
|
||||
2.26.2
|
||||
|
||||
BIN
dwm-6.6/util.o
BIN
dwm-6.6/util.o
Binary file not shown.
@ -1,4 +1,5 @@
|
||||
[General]
|
||||
contrastOpacity=188
|
||||
drawThickness=2
|
||||
saveAsFileExtension=jpg
|
||||
savePath=/home/c2ny/Pictures/Screenshots
|
||||
|
||||
@ -7,10 +7,10 @@ ubisoft = True
|
||||
steam = True
|
||||
|
||||
[lutris]
|
||||
width = 1164
|
||||
height = 712
|
||||
window_x = 341
|
||||
window_y = 104
|
||||
width = 1025
|
||||
height = 962
|
||||
window_x = 20
|
||||
window_y = 46
|
||||
maximized = False
|
||||
selected_category = category:all
|
||||
show_advanced_options = False
|
||||
|
||||
@ -30,6 +30,8 @@ x-scheme-handler/jetbrains=jetbrains-toolbox.desktop
|
||||
x-scheme-handler/about=helium.desktop
|
||||
x-scheme-handler/unknown=helium.desktop
|
||||
x-scheme-handler/discord-1038970224050962582=nuclear.desktop
|
||||
x-scheme-handler/tg=org.telegram.desktop.desktop
|
||||
x-scheme-handler/tonsite=org.telegram.desktop.desktop
|
||||
|
||||
[Added Associations]
|
||||
x-scheme-handler/http=userapp-Firefox-J7KBH3.desktop;
|
||||
@ -42,3 +44,5 @@ application/x-extension-shtml=userapp-Firefox-J7KBH3.desktop;
|
||||
application/xhtml+xml=userapp-Firefox-J7KBH3.desktop;
|
||||
application/x-extension-xhtml=userapp-Firefox-J7KBH3.desktop;
|
||||
application/x-extension-xht=userapp-Firefox-J7KBH3.desktop;
|
||||
x-scheme-handler/tg=org.telegram.desktop.desktop;org.telegram.desktop._b1807ce1df22ee6402707058cb72785d.desktop;
|
||||
x-scheme-handler/tonsite=org.telegram.desktop.desktop;org.telegram.desktop._b1807ce1df22ee6402707058cb72785d.desktop;
|
||||
|
||||
12
nemo-compare.conf
Normal file
12
nemo-compare.conf
Normal file
@ -0,0 +1,12 @@
|
||||
[DEFAULT]
|
||||
diff_engine_path = meld
|
||||
diff_engine_path_3way = meld
|
||||
diff_engine_path_multi =
|
||||
defined_comparators = meld
|
||||
|
||||
[Settings]
|
||||
diff_engine_path = meld
|
||||
diff_engine_path_3way = meld
|
||||
diff_engine_path_multi =
|
||||
defined_comparators = ,meld
|
||||
|
||||
@ -1,22 +1,22 @@
|
||||
[desktop-monitor-0]
|
||||
nemo-icon-view-keep-aligned=true
|
||||
nemo-icon-view-auto-layout=true
|
||||
nemo-icon-view-layout-timestamp=1769287850
|
||||
nemo-icon-view-layout-timestamp=1769319652
|
||||
|
||||
[trash]
|
||||
nemo-icon-position-timestamp=1769287851
|
||||
nemo-icon-position-timestamp=1769305174
|
||||
nemo-icon-position=91,229
|
||||
monitor=0
|
||||
icon-scale=1
|
||||
|
||||
[home]
|
||||
nemo-icon-position-timestamp=1769287851
|
||||
nemo-icon-position-timestamp=1769305174
|
||||
nemo-icon-position=91,129
|
||||
monitor=0
|
||||
icon-scale=1
|
||||
|
||||
[computer]
|
||||
nemo-icon-position-timestamp=1769287851
|
||||
nemo-icon-position-timestamp=1769305174
|
||||
nemo-icon-position=91,29
|
||||
monitor=0
|
||||
icon-scale=1
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
[geometry]
|
||||
posx=15
|
||||
posy=15
|
||||
sizex=1886
|
||||
sizey=1012
|
||||
posy=41
|
||||
sizex=1884
|
||||
sizey=1018
|
||||
|
||||
[nitrogen]
|
||||
view=icon
|
||||
|
||||
@ -1,2 +1,2 @@
|
||||
last=
|
||||
last=324707cf-5217-4b39-ab69-79a1e477ae78
|
||||
checkonlogin=1
|
||||
|
||||
Binary file not shown.
0
slock-1.6/img.jpg
Executable file → Normal file
0
slock-1.6/img.jpg
Executable file → Normal file
|
Before Width: | Height: | Size: 88 KiB After Width: | Height: | Size: 88 KiB |
BIN
slock-1.6/slock
BIN
slock-1.6/slock
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user