添加快捷键将窗口移动到其他 tag 和 monitor

This commit is contained in:
2025-08-30 18:47:44 +08:00
parent c5e2b4c081
commit ad1d413c62
5 changed files with 143 additions and 6 deletions

View File

@@ -128,6 +128,7 @@ typedef enum atom_t {
atom_net_wm_fullscreen,
atom__xrootpmap_id,
atom_esetroot_pmap_id,
atom_zswm_client_info, /* 自定义属性,用于存储所在 monitor 和 tags */
} atom_t;
xcb_atom_t get_xcb_atom(atom_t atom);
bool send_event(xcb_window_t window, atom_t atom);
@@ -139,6 +140,13 @@ typedef enum wm_state_t {
int32_t get_window_state(xcb_window_t window);
void set_window_state(xcb_window_t window, wm_state_t state);
void set_window_list(xcb_window_t *list, uint32_t length);
typedef struct client_info_t {
uint32_t tags;
uint32_t monitor_index;
} client_tag_info_t;
bool get_window_tag(xcb_window_t window, client_tag_info_t *client_info);
void set_window_tag(xcb_window_t window, client_tag_info_t *client_info);
void remove_window_tag(xcb_window_t window);
bool get_pointer_position(int32_t *x, int32_t *y);