1 Star 1 Fork 0

krealseu/dwm

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
scratchtagwins.c 1.23 KB
一键复制 编辑 原始数据 按行查看 历史
krealseu 提交于 2023-01-25 23:29 . scratchpads补丁更换为
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <X11/XF86keysym.h>
# define SCRATCHTAGWIN(name, id) \
static const char * name [] = { # id, \
"tabbed", \
"-p", "s+1", \
"-n", # name, \
"-g", "720x480", \
"-c", "st", "-w", \
NULL \
} \
# define SCRATCHTAGWIN_RULE(name, id) \
{ NULL, # name, NULL, 0, 1, 1, -1, '0' + id } \
# define SCRATCHTAGWIN_KEY(name, id) \
{ WINKEY, XK_ ## id, togglescratch, {.v = name } }, \
{ WINKEY|ShiftMask,XK_ ## id, makescratchtagwin,{.i = '0' + id } }, \
static void makescratchtagwin (const Arg * arg)
{
if (selmon -> sel)
{
if (arg -> i != 0)
{
_Bool exists = 0;
for (Client * c = selmon -> clients; c; c = c -> next)
if (c -> scratchkey == arg -> i)
{
exists = 1;
break;
}
if (exists) return;
}
selmon -> sel -> scratchkey = arg -> i;
if (arg -> i != 0)
{
selmon -> sel -> tags = 0,
selmon -> sel -> isfloating = 1;
}
else
selmon -> sel -> tags = selmon -> tagset [selmon -> seltags];
focus (selmon -> sel);
arrange (selmon);
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/krealseu/dwm.git
git@gitee.com:krealseu/dwm.git
krealseu
dwm
dwm
master

搜索帮助

D67c1975 1850385 1daf7b77 1850385