Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add win+(shift)+h/j/k/l to move focus window or switch two window #19

Merged
merged 1 commit into from
Feb 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 17 additions & 5 deletions DEF/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,18 @@ static Key keys[] = {
/* modifier key function argument */
{ MODKEY, XK_equal, togglesystray, {0} }, /* super + | 切换 托盘栏显示状态 */

//-----------------------------------------------------------------------------
{ MODKEY, XK_h, focusdir, {.i = 0 } }, // 切换聚焦窗口
{ MODKEY, XK_j, focusdir, {.i = 1 } }, // 切换聚焦窗口
{ MODKEY, XK_k, focusdir, {.i = 2 } }, // 切换聚焦窗口
{ MODKEY, XK_l, focusdir, {.i = 3 } }, // 切换聚焦窗口
//-----------------------------------------------------------------------------
{ MODKEY|ShiftMask, XK_h, ExchangeClient, {.i = 0} }, // 移动窗口
{ MODKEY|ShiftMask, XK_j, ExchangeClient, {.i = 1 } }, // 移动窗口
{ MODKEY|ShiftMask, XK_k, ExchangeClient, {.i = 2 } }, // 移动窗口
{ MODKEY|ShiftMask, XK_l, ExchangeClient, {.i = 3} }, // 移动窗口
//-----------------------------------------------------------------------------

{ MODKEY, XK_Tab, focusstack, {.i = +1} }, /* super tab | 本tag内切换聚焦窗口 */
{ MODKEY|ShiftMask, XK_Tab, focusstack, {.i = -1} }, /* super shift tab | 本tag内切换聚焦窗口 */
{ MODKEY, XK_Up, focusstack, {.i = -1} }, /* super up | 本tag内切换聚焦窗口 */
Expand All @@ -141,8 +153,8 @@ static Key keys[] = {
{ MODKEY, XK_comma, setmfact, {.f = -0.05} }, /* super , | 缩小主工作区 */
{ MODKEY, XK_period, setmfact, {.f = +0.05} }, /* super . | 放大主工作区 */

{ MODKEY, XK_h, hidewin, {0} }, /* super h | 隐藏 窗口 */
{ MODKEY|ShiftMask, XK_h, restorewin, {0} }, /* super shift h | 取消隐藏 窗口 */
// { MODKEY, XK_h, hidewin, {0} }, /* super h | 隐藏 窗口 */
// { MODKEY|ShiftMask, XK_h, restorewin, {0} }, /* super shift h | 取消隐藏 窗口 */

{ MODKEY|ShiftMask, XK_Return, zoom, {0} }, /* super shift enter | 将当前聚焦窗口置为主窗口 */

Expand Down Expand Up @@ -188,11 +200,11 @@ static Key keys[] = {
{ MODKEY|ShiftMask, XK_d, spawn, SHCMD("~/scripts/call_rofi.sh drun") }, /* super shift d | rofi: 执行drun */
{ MODKEY, XK_p, spawn, SHCMD("~/scripts/call_rofi.sh custom") }, /* super p | rofi: 执行自定义脚本 */
{ MODKEY|ShiftMask, XK_p, spawn, SHCMD("~/scripts/call_rofi.sh window") }, /* super shift p | rofi: 执行window */
{ MODKEY, XK_k, spawn, SHCMD("~/scripts/blurlock.sh") }, /* super k | 锁定屏幕 */
// { MODKEY, XK_k, spawn, SHCMD("~/scripts/blurlock.sh") }, /* super k | 锁定屏幕 */
{ MODKEY|ShiftMask, XK_Up, spawn, SHCMD("~/scripts/set_vol.sh up") }, /* super shift up | 音量加 */
{ MODKEY|ShiftMask, XK_Down, spawn, SHCMD("~/scripts/set_vol.sh down") }, /* super shift down | 音量减 */
{ MODKEY|ShiftMask, XK_a, spawn, SHCMD("flameshot gui -c -p ~/Pictures/screenshots") }, /* super shift a | 截图 */
{ MODKEY|ShiftMask, XK_k, spawn, SHCMD("~/scripts/screenkey.sh") }, /* super shift k | 打开键盘输入显示 */
// { MODKEY|ShiftMask, XK_k, spawn, SHCMD("~/scripts/screenkey.sh") }, /* super shift k | 打开键盘输入显示 */
{ MODKEY|ShiftMask, XK_q, spawn, SHCMD("kill -9 $(xprop | grep _NET_WM_PID | awk '{print $3}')") }, /* super shift q | 选中某个窗口并强制kill */
{ ShiftMask|ControlMask, XK_c, spawn, SHCMD("xclip -o | xclip -selection c") }, /* super shift c | 进阶复制 */

Expand All @@ -207,7 +219,7 @@ static Key keys[] = {
TAGKEYS(XK_m, 5, "~/scripts/music_player.sh")
TAGKEYS(XK_0, 6, "linuxqq")
TAGKEYS(XK_w, 7, "/opt/apps/com.qq.weixin.deepin/files/run.sh")
TAGKEYS(XK_l, 8, "/opt/apps/com.qq.weixin.work.deepin/files/run.sh")
// TAGKEYS(XK_l, 8, "/opt/apps/com.qq.weixin.work.deepin/files/run.sh")
};
static Button buttons[] = {
/* click event mask button function argument */
Expand Down
Loading