mirror of
https://github.com/swaywm/sway.git
synced 2025-10-29 05:40:18 -04:00
Implement scroll wheel workspace switching
This commit is contained in:
parent
8d1425bde9
commit
ae14dfc7ae
3 changed files with 49 additions and 4 deletions
|
|
@ -8,6 +8,14 @@
|
|||
#include "swaybar/ipc.h"
|
||||
#include "ipc-client.h"
|
||||
|
||||
void ipc_send_workspace_command(struct swaybar *bar, const char *ws) {
|
||||
const char *fmt = "workspace \"%s\"";
|
||||
uint32_t size = snprintf(NULL, 0, fmt, ws);
|
||||
char command[size];
|
||||
snprintf(command, size, fmt, ws);
|
||||
ipc_single_command(bar->ipc_socketfd, IPC_COMMAND, command, &size);
|
||||
}
|
||||
|
||||
char *parse_font(const char *font) {
|
||||
char *new_font = NULL;
|
||||
if (strncmp("pango:", font, 6) == 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue