From 7b678e6ff3b257fa2b3e8a8739dae0f92d9441d0 Mon Sep 17 00:00:00 2001 From: buffet Date: Mon, 31 May 2021 23:18:16 +0000 Subject: [PATCH] Add brightnessctl --- awesome/.config/awesome/configuration/apps.lua | 3 +++ awesome/.config/awesome/configuration/keys/global.lua | 10 ++++++++-- install.py | 1 + 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/awesome/.config/awesome/configuration/apps.lua b/awesome/.config/awesome/configuration/apps.lua index 09d1aca..c1a08ac 100644 --- a/awesome/.config/awesome/configuration/apps.lua +++ b/awesome/.config/awesome/configuration/apps.lua @@ -17,6 +17,9 @@ apps = { -- Your default screenshot tool screenshot = "flameshot gui", + -- brightness + brightness_up = "brightnessctl s 5%+", + brightness_down = "brightnessctl s 5%-", } apps.editor_cmd = apps.terminal .. " -e " .. apps.editor diff --git a/awesome/.config/awesome/configuration/keys/global.lua b/awesome/.config/awesome/configuration/keys/global.lua index dcda208..73fbed5 100644 --- a/awesome/.config/awesome/configuration/keys/global.lua +++ b/awesome/.config/awesome/configuration/keys/global.lua @@ -125,7 +125,7 @@ globalKeys = gears.table.join( awful.key({ modkey }, "r", function () awful.screen.focused().mypromptbox:run() end, {description = "run prompt", group = "launcher"}), - awful.key({ modkey }, "x", + awful.key({ modkey, "Control" }, "x", function () awful.prompt.run { prompt = "Run Lua code: ", @@ -140,7 +140,13 @@ globalKeys = gears.table.join( awful.key({ modkey }, "p", function () awful.spawn(apps.screenshot) end, {description = "take screenshot", group = "apps"}), awful.key({ modkey }, "i", function () awful.spawn(apps.browser) end, - {description = "open browser", group = "apps"}) + {description = "open browser", group = "apps"}), + + -- Brightness + awful.key({ modkey }, "x", function () awful.spawn(apps.brightness_up) end, + {description = "brightness up", group = "apps"}), + awful.key({ modkey }, "z", function () awful.spawn(apps.brightness_down) end, + {description = "brightness down", group = "apps"}) ) -- Bind all key numbers to tags. diff --git a/install.py b/install.py index bcbc0bd..c33892a 100644 --- a/install.py +++ b/install.py @@ -25,6 +25,7 @@ DOTS = ['alacritty', 'bash', 'direnv', 'git', 'nvim', 'profile', 'xinit'] dependencies = [ 'acpi', 'alacritty', + 'brightnessctl', 'clang', 'curl', 'firefox',