|
|
|
@ -174,6 +174,10 @@ volumebox = wibox.widget.textbox() |
|
|
|
|
vicious.cache(vicious.widgets.volume) |
|
|
|
|
vicious.register(volumebox, vicious.widgets.volume, " $1 ", 3, {"Master", "-D", "pulse"}) |
|
|
|
|
|
|
|
|
|
backlightbox = wibox.widget.textbox() |
|
|
|
|
vicious.cache(vicious.contrib.xbacklight) |
|
|
|
|
vicious.register(backlightbox, vicious.contrib.xbacklight, " $1 ", 3) |
|
|
|
|
|
|
|
|
|
batwidget = wibox.widget.textbox() |
|
|
|
|
vicious.cache(vicious.widgets.bat) |
|
|
|
|
vicious.register(batwidget, vicious.widgets.bat, " $2 ", 61, "BAT1") |
|
|
|
@ -245,6 +249,7 @@ awful.screen.connect_for_each_screen(function(s) |
|
|
|
|
memwidget, |
|
|
|
|
cpuwidget, |
|
|
|
|
volumebox, |
|
|
|
|
backlightbox, |
|
|
|
|
wifiwidget, |
|
|
|
|
batwidget, |
|
|
|
|
--wibox.widget.systray(), |
|
|
|
@ -352,6 +357,29 @@ function rofi_kill () |
|
|
|
|
if rofi_pid then awful.spawn("kill "..rofi_pid) end |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
local game_mode = false |
|
|
|
|
|
|
|
|
|
function game_mode_start () |
|
|
|
|
if game_mode == true then return else game_mode = true end |
|
|
|
|
awful.spawn("killall compton") |
|
|
|
|
end_switcher() |
|
|
|
|
for s in screen do |
|
|
|
|
s.dock_trigger.visible = false |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
function game_mode_stop () |
|
|
|
|
if game_mode == false then return else game_mode = false end |
|
|
|
|
awful.spawn.with_shell("~/.config/compton/launch.sh") |
|
|
|
|
for s in screen do |
|
|
|
|
s.dock_trigger.visible = true |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
function game_mode_toggle () |
|
|
|
|
if game_mode then game_mode_stop() else game_mode_start() end |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
globalbuttons = gears.table.join( |
|
|
|
|
awful.button({ }, 1, end_switcher) |
|
|
|
@ -476,7 +504,7 @@ globalkeys = gears.table.join( |
|
|
|
|
end, |
|
|
|
|
{description = "lua execute prompt", group = "awesome"}), |
|
|
|
|
-- Menubar |
|
|
|
|
awful.key({ modkey }, "p", function() menubar.show() end, |
|
|
|
|
awful.key({ modkey }, "p", function() game_mode_toggle() end, |
|
|
|
|
{description = "show the menubar", group = "launcher"}), |
|
|
|
|
awful.key({ modkey }, "d", function() rofi_spawn("rofi -show run") end, |
|
|
|
|
{description = "launch rofi", group = "launcher"}), |
|
|
|
|