From ef6b5ee95a307f5f050281e61aa72bac34b7562f Mon Sep 17 00:00:00 2001 From: Sravan Balaji Date: Fri, 11 Dec 2020 11:23:14 -0500 Subject: [PATCH] Slock Changes - Replace light-locker with slock in config.def.h - Add keypress mask for slock mediakeys patch in dwm.c --- config.def.h | 7 +++---- dwm.c | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/config.def.h b/config.def.h index 640e190..f0bf909 100644 --- a/config.def.h +++ b/config.def.h @@ -36,7 +36,7 @@ static const char *const autostart[] = { // System Tray Applications "volctl", NULL, // PulseAudio Volume Control "nyrna", NULL, // Nyrna Application Suspend - "blueman-tray", NULL, // Blueman Bluetooth Manager + "blueman-applet", NULL, // Blueman Bluetooth Manager "nm-applet", NULL, // Network Manager Applet "kdeconnect-indicator", NULL, // KDE Connect "flameshot", NULL, // Flameshot Screenshot Tool @@ -48,7 +48,6 @@ static const char *const autostart[] = { "redshift", "-x", NULL, // Reset redshift display gamma "redshift-gtk", NULL, // Redshift Blue Light Filter "/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1", NULL, // GNOME Polkit Authentication Agent - "light-locker", "--lock-on-suspend", "--lock-on-lid", NULL, // LightDM Locker // Hardware Driver Applications "solaar", "--window=hide", NULL, // Logitech Mouse Driver "polychromatic-tray-applet", NULL, // Razer Keyboard Customization @@ -111,8 +110,8 @@ static const Layout layouts[] = { /* commands */ static const char *rofiruncmd[] = { "rofi", "-show", "drun", NULL }; static const char *roficlipcmd[] = { "rofi", "-show", "clipboard", NULL }; -static const char *lockcmd[] = { "light-locker-command", "--lock", NULL }; -static const char *sleepcmd[] = { "systemctl", "suspend", NULL }; +static const char *lockcmd[] = { "slock", NULL }; +static const char *sleepcmd[] = { "systemctl", "suspend", NULL }; static const char *termcmd[] = { "alacritty", NULL }; static const char *upvolcmd[] = { "/usr/bin/pactl", "set-sink-volume", "@DEFAULT_SINK@", "+1%", NULL }; static const char *downvolcmd[] = { "/usr/bin/pactl", "set-sink-volume", "@DEFAULT_SINK@", "-1%", NULL }; diff --git a/dwm.c b/dwm.c index 0b204f8..0fc99ae 100644 --- a/dwm.c +++ b/dwm.c @@ -2060,7 +2060,7 @@ setup(void) wa.cursor = cursor[CurNormal]->cursor; wa.event_mask = SubstructureRedirectMask|SubstructureNotifyMask |ButtonPressMask|PointerMotionMask|EnterWindowMask - |LeaveWindowMask|StructureNotifyMask|PropertyChangeMask; + |LeaveWindowMask|StructureNotifyMask|PropertyChangeMask|KeyPressMask; XChangeWindowAttributes(dpy, root, CWEventMask|CWCursor, &wa); XSelectInput(dpy, root, wa.event_mask); grabkeys();