From 73a6020865607018f6442317e7f94fb5d54a7016 Mon Sep 17 00:00:00 2001 From: "luquinha.virus" Date: Wed, 19 Aug 2020 00:24:54 -0300 Subject: change alpha with keyboard shortcut C-F11/C-F12 --- x.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'x.c') diff --git a/x.c b/x.c index d2ed474..652f3cc 100644 --- a/x.c +++ b/x.c @@ -68,6 +68,7 @@ static void clipcopy(const Arg *); static void clippaste(const Arg *); static void numlock(const Arg *); static void selpaste(const Arg *); +static void changealpha(const Arg *); static void zoom(const Arg *); static void zoomabs(const Arg *); static void zoomreset(const Arg *); @@ -303,6 +304,20 @@ numlock(const Arg *dummy) win.mode ^= MODE_NUMLOCK; } +void +changealpha(const Arg *arg) +{ + if((alpha > 0 && arg->f < 0) || (alpha < 1 && arg->f > 0)) + alpha += arg->f; + if(alpha < 0) + alpha = 0; + if(alpha > 1) + alpha = 1; + + xloadcols(); + redraw(); +} + void zoom(const Arg *arg) { -- cgit v1.2.3