添加状态栏和调整音量的快捷键

This commit is contained in:
2025-08-27 06:51:07 +08:00
parent 96629c3045
commit c5e2b4c081
10 changed files with 552 additions and 9 deletions

View File

@@ -1,5 +1,6 @@
#pragma once
#include <X11/XF86keysym.h>
#include <X11/keysym.h>
#include <stdbool.h>
#include <stdint.h>
@@ -95,6 +96,7 @@ const keybinding_t keys[] = {
{ALT, XK_k, focus_stack, {.b = false}},
{SUPER | SHIFT, XK_j, focus_monitor, {.b = true}},
{SUPER | SHIFT, XK_k, focus_monitor, {.b = false}},
{
SUPER,
XK_a,
@@ -109,6 +111,14 @@ const keybinding_t keys[] = {
},
{ALT | CTRL, XK_r, raise_or_run, {.ptr = (char *[]){"St", "st"}}},
{SUPER, XK_q, raise_or_run, {.ptr = (char *[]){"firefox", "firefox-bin"}}},
{SUPER, XK_Up, change_volume, {.i = 1}},
{SUPER, XK_Down, change_volume, {.i = -1}},
{SUPER | SHIFT, XK_m, toggle_mute, {0}},
{0, XF86XK_AudioRaiseVolume, change_volume, {.i = 1}},
{0, XF86XK_AudioLowerVolume, change_volume, {.i = -1}},
{0, XF86XK_AudioMute, toggle_mute, {0}},
{SUPER, XK_1, select_tag, {.ui = 1 << 0}},
{SUPER, XK_2, select_tag, {.ui = 1 << 1}},
{SUPER, XK_3, select_tag, {.ui = 1 << 2}},
@@ -142,4 +152,5 @@ const uint32_t bar_y_padding = 1;
const uint32_t tag_x_padding = 10;
const uint32_t layout_symbol_x_padding = 10;
const uint32_t client_name_x_padding = 10;
const uint32_t status_x_padding = 6;
const uint32_t border_width = 1;