update dotfiles

This commit is contained in:
Simonas Narbutas
2019-04-04 12:58:21 +02:00
parent 9ed2094406
commit 84c6f841ce
8 changed files with 27 additions and 24 deletions

View File

@@ -119,7 +119,7 @@ menubar.utils.terminal = terminal -- Set the terminal for applications that requ
-- Keyboard map indicator and switcher
mykeyboardlayout = awful.widget.keyboardlayout()
-- Volume
volumewidget = wibox.widget.textbox(awful.spawn.easy_async("pamixer --sink 0 --get-volume",function(stdout, stderr, reason, exit_code)
volumewidget = wibox.widget.textbox(awful.spawn.easy_async("pamixer --sink ${pamixer --list-sinks |tail -1 |cut -d' ' -f1} --get-volume",function(stdout, stderr, reason, exit_code)
volumewidget:set_text(" 🔈:"..stdout)
end))
-- Battery
@@ -384,12 +384,12 @@ globalkeys = gears.table.join(
awful.key({ }, "XF86AudioMute",
function ()
awful.util.spawn("pamixer --sink 0 -t", false)
awful.spawn.easy_async("pamixer --sink 0 --get-mute", function(stdout, stderr, reason, exit_code)
awful.spawn.easy_async_with_shell("pamixer --sink $(pamixer --list-sinks |tail -1 |cut -d' ' -f1) --get-mute", function(stdout, stderr, reason, exit_code)
naughty.notify {title = "mute", text = stdout, timeout = 0.5}
if string.match(stdout, "true" ) then
volumewidget:set_text(" 🔇 ")
else
awful.spawn.easy_async("pamixer --sink 0 --get-volume", function(stdout, stderr, reason, exit_code)
awful.spawn.easy_async_with_shell("pamixer --sink $(pamixer --list-sinks |tail -1 |cut -d' ' -f1) --get-volume", function(stdout, stderr, reason, exit_code)
volumewidget:set_text(" 🔈:"..stdout)
naughty.notify {title = "Inc", text = stdout, timeout = 0.5}
end)
@@ -405,17 +405,17 @@ globalkeys = gears.table.join(
end),
awful.key({ }, "XF86AudioLowerVolume",
function ()
awful.spawn.easy_async("pamixer --sink 0 -d 5 --get-volume", function(stdout, stderr, reason, exit_code)
awful.spawn.easy_async_with_shell("pamixer --sink $(pamixer --list-sinks |tail -1 |cut -d' ' -f1) -d 5 --get-volume", function(stdout, stderr, reason, exit_code)
volumewidget:set_text(" 🔈:"..stdout)
naughty.notify {title = "Inc", text = stdout, timeout = 0.5}
naughty.notify {title = "🔈↓", text = stdout, timeout = 0.5}
end)
end),
awful.key({ }, "XF86AudioRaiseVolume",
function ()
awful.spawn.easy_async("pamixer --sink 0 -i 5 --get-volume", function(stdout, stderr, reason, exit_code)
awful.spawn.easy_async_with_shell("pamixer --sink $(pamixer --list-sinks |tail -1 |cut -d' ' -f1) -i 5 --get-volume", function(stdout, stderr, reason, exit_code)
volumewidget:set_text(" 🔈:"..stdout)
naughty.notify {title = "Dec", text = stdout, timeout = 0.5}
naughty.notify {title = "🔈↑", text = stdout, timeout = 0.5}
end)
end),
awful.key({ "Control", "Mod4" }, "Up",