diff options
author | Mike Crute <mike@crute.us> | 2019-02-02 09:59:21 -0800 |
---|---|---|
committer | Mike Crute <mike@crute.us> | 2019-02-02 09:59:21 -0800 |
commit | 9ef3ecd341b5f542febc21888732426dbf6578b4 (patch) | |
tree | de5aab34786a32e7f294933cffde504b8aa64186 /.config | |
parent | fdfe9d0be968387f946d9a80080bb444b42257fd (diff) | |
download | dotfiles-9ef3ecd341b5f542febc21888732426dbf6578b4.tar.bz2 dotfiles-9ef3ecd341b5f542febc21888732426dbf6578b4.tar.xz dotfiles-9ef3ecd341b5f542febc21888732426dbf6578b4.zip |
Handle system installed light binary
Diffstat (limited to '.config')
-rw-r--r-- | .config/awesome/mcrute.lua | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/.config/awesome/mcrute.lua b/.config/awesome/mcrute.lua index 4aef4c2..2cf2071 100644 --- a/.config/awesome/mcrute.lua +++ b/.config/awesome/mcrute.lua | |||
@@ -204,6 +204,11 @@ function move_mouse_top_right() | |||
204 | end | 204 | end |
205 | 205 | ||
206 | function add_global_keys(globalkeys) | 206 | function add_global_keys(globalkeys) |
207 | light = os.getenv("HOME") .. "/.local/bin/light" | ||
208 | if not gears.filesystem.file_readable(light) then | ||
209 | light = "light" | ||
210 | end | ||
211 | |||
207 | return gears.table.join(globalkeys, | 212 | return gears.table.join(globalkeys, |
208 | -- Audio Controls | 213 | -- Audio Controls |
209 | awful.key({ }, "XF86AudioMute", make_spawn("/usr/bin/pactl set-sink-mute @DEFAULT_SINK@ toggle")), | 214 | awful.key({ }, "XF86AudioMute", make_spawn("/usr/bin/pactl set-sink-mute @DEFAULT_SINK@ toggle")), |
@@ -217,10 +222,10 @@ function add_global_keys(globalkeys) | |||
217 | awful.key({ }, "XF86AudioNext", make_spawn("dbus-send --type=method_call --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next")), | 222 | awful.key({ }, "XF86AudioNext", make_spawn("dbus-send --type=method_call --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next")), |
218 | 223 | ||
219 | -- Backlight Controls | 224 | -- Backlight Controls |
220 | awful.key({ "Shift" }, "XF86MonBrightnessUp", make_spawn(os.getenv("HOME") .. "/.local/bin/light -A 1")), | 225 | awful.key({ "Shift" }, "XF86MonBrightnessUp", make_spawn(light .. " -A 1")), |
221 | awful.key({ "Shift" }, "XF86MonBrightnessDown", make_spawn(os.getenv("HOME") .. "/.local/bin/light -U 1")), | 226 | awful.key({ "Shift" }, "XF86MonBrightnessDown", make_spawn(light .. " -U 1")), |
222 | awful.key({ }, "XF86MonBrightnessUp", make_spawn(os.getenv("HOME") .. "/.local/bin/light -A 5")), | 227 | awful.key({ }, "XF86MonBrightnessUp", make_spawn(light .. " -A 5")), |
223 | awful.key({ }, "XF86MonBrightnessDown", make_spawn(os.getenv("HOME") .. "/.local/bin/light -U 5")), | 228 | awful.key({ }, "XF86MonBrightnessDown", make_spawn(light .. " -U 5")), |
224 | 229 | ||
225 | -- Suspend and Hibernate for Mac Keyboard | 230 | -- Suspend and Hibernate for Mac Keyboard |
226 | awful.key({ modkey, "Control" }, "XF86Eject", make_spawn("/usr/bin/sudo /bin/systemctl hibernate")), | 231 | awful.key({ modkey, "Control" }, "XF86Eject", make_spawn("/usr/bin/sudo /bin/systemctl hibernate")), |