diff options
author | Přemysl Janouch <p.janouch@gmail.com> | 2016-01-27 20:22:49 +0100 |
---|---|---|
committer | Přemysl Janouch <p.janouch@gmail.com> | 2016-01-27 20:22:49 +0100 |
commit | 2825c899617cefc872198296f83572ec3504db93 (patch) | |
tree | cea42879f0cb488950576827ea87088bac4ab213 /dwmstatus.c | |
parent | 99081814671c28f30540e81af7ae73096ba4b9e0 (diff) | |
download | desktop-tools-2825c899617cefc872198296f83572ec3504db93.tar.gz desktop-tools-2825c899617cefc872198296f83572ec3504db93.tar.xz desktop-tools-2825c899617cefc872198296f83572ec3504db93.zip |
Add gdm-switch-user, run by dwmstatus
Diffstat (limited to 'dwmstatus.c')
-rw-r--r-- | dwmstatus.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/dwmstatus.c b/dwmstatus.c index 11c78ef..241c435 100644 --- a/dwmstatus.c +++ b/dwmstatus.c @@ -2638,6 +2638,18 @@ on_volume_set (struct app_context *ctx, int arg) } static void +on_lock (struct app_context *ctx, int arg) +{ + (void) arg; + + // One of these will work + char *argv_gdm[] = { "gdm-switch-user", NULL }; + spawn (ctx, argv_gdm); + char *argv_ldm[] = { "dm-tool", "lock", NULL }; + spawn (ctx, argv_ldm); +} + +static void on_brightness (struct app_context *ctx, int arg) { char *value = xstrdup_printf ("%d", arg); @@ -2655,6 +2667,9 @@ struct } g_keys[] = { + // This key should be labeled L on normal Qwert[yz] layouts + { Mod4Mask, XK_n, on_lock, 0 }, + // MPD { Mod4Mask, XK_Up, on_mpd_play, 0 }, { Mod4Mask, XK_Down, on_mpd_stop, 0 }, |