From 56c19349a15e5c7eec01a40b71bea4a7b2532849 Mon Sep 17 00:00:00 2001 From: korei999 Date: Thu, 4 Jan 2024 01:45:57 +0200 Subject: [PATCH] disable pointer warp --- config.def.h | 10 +++------- dwl.c | 14 +++++++------- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/config.def.h b/config.def.h index fdd7624..8795978 100644 --- a/config.def.h +++ b/config.def.h @@ -151,10 +151,9 @@ static const char* Term[] = { "footclient", NULL }; static const char* TermAlt[] = { "foot", "--maximized", NULL }; static const char* Menu[] = { "fuzzel", NULL }; static const char* PowerMenu[] = { "powermenu.sh", NULL }; -static const char* AudioUpdate[] = { "pkill", "-RTMIN+12", "someblocks", NULL }; -static const char* AudioLower[] = { "wpctl", "set-volume", "-l", "1", "@DEFAULT_AUDIO_SINK@", "3%-", NULL }; -static const char* AudioRaise[] = { "wpctl", "set-volume", "-l", "1", "@DEFAULT_AUDIO_SINK@", "3%+", NULL }; -static const char* AudioMute[] = { "wpctl", "set-mute", "@DEFAULT_AUDIO_SINK@", "toggle", NULL }; +static const char* AudioLower[] = { "vol.sh", "l", NULL }; +static const char* AudioRaise[] = { "vol.sh", "r", NULL }; +static const char* AudioMute[] = { "vol.sh", "m", NULL }; static const char* MuteMic[] = { "MuteMic.sh", NULL }; static const char* AudioPlayPause[] = { "playerctl", "play-pause", NULL }; static const char* AudioPause[] = { "playerctl", "pause", NULL }; @@ -192,9 +191,6 @@ static const Key keys[] = { { 0, Key_XF86AudioMute, spawn, { .v = AudioMute } }, { 0, Key_XF86AudioMicMute, spawn, { .v = MuteMic } }, { SUPER, Key_n, spawn, { .v = MuteMic } }, - { 0, Key_XF86AudioLowerVolume, spawn, { .v = AudioUpdate } }, - { 0, Key_XF86AudioRaiseVolume, spawn, { .v = AudioUpdate } }, - { 0, Key_XF86AudioMute, spawn, { .v = AudioUpdate } }, { 0, Key_XF86MonBrightnessUp, spawn, { .v = BMonUp } }, { 0, Key_XF86MonBrightnessDown, spawn, { .v = BMonDown } }, { 0, Key_Print, spawn, { .v = Print } }, diff --git a/dwl.c b/dwl.c index 8a28ead..fc45f7f 100644 --- a/dwl.c +++ b/dwl.c @@ -1158,16 +1158,16 @@ void cursorwarptohint(void) { Client *c = NULL; - double sx, sy; + // double sx, sy; toplevel_from_wlr_surface(active_constraint->surface, &c, NULL); /* TODO: wlroots 0.18: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4478 */ - if (c && (active_constraint->current.committed & WLR_POINTER_CONSTRAINT_V1_STATE_CURSOR_HINT)) { - sx = active_constraint->current.cursor_hint.x + c->mon->m.x + c->bw; - sy = active_constraint->current.cursor_hint.y + c->mon->m.y + c->bw; - wlr_cursor_warp(cursor, NULL, sx - c->geom.x, sy - c->geom.y); - wlr_seat_pointer_warp(seat, sx, sy); - } + // if (c && (active_constraint->current.committed & WLR_POINTER_CONSTRAINT_V1_STATE_CURSOR_HINT)) { + // sx = active_constraint->current.cursor_hint.x + c->mon->m.x + c->bw; + // sy = active_constraint->current.cursor_hint.y + c->mon->m.y + c->bw; + // wlr_cursor_warp(cursor, NULL, sx - c->geom.x, sy - c->geom.y); + // wlr_seat_pointer_warp(seat, sx, sy); + // } } void