From cc538471133a0180937deff086cfef5a465acda1 Mon Sep 17 00:00:00 2001 From: copycat-killer Date: Sun, 29 Jan 2017 14:45:26 +0100 Subject: [PATCH] lain: new commit --- lain | 2 +- themes/copland/theme.lua | 5 ++--- themes/rainbow/theme.lua | 28 ++++++++++++++++++++++++++++ 3 files changed, 31 insertions(+), 4 deletions(-) diff --git a/lain b/lain index 2e5d0fb..f914e64 160000 --- a/lain +++ b/lain @@ -1 +1 @@ -Subproject commit 2e5d0fbabcdaaeff9937c06e1db095569327957b +Subproject commit f914e6411e53186843ad628e321d6ada2f128466 diff --git a/themes/copland/theme.lua b/themes/copland/theme.lua index dec4966..db6583d 100644 --- a/themes/copland/theme.lua +++ b/themes/copland/theme.lua @@ -253,9 +253,6 @@ theme.volume = lain.widgets.alsabar({ } }) theme.volume.tooltip.wibox.fg = theme.fg_focus -local volumebg = wibox.container.background(theme.volume.bar, "#474747", gears.shape.rectangle) -local volumewidget = wibox.container.margin(volumebg, 2, 7, 4, 4) - theme.volume.bar:buttons(awful.util.table.join ( awful.button({}, 1, function() awful.spawn.with_shell(string.format("%s -e alsamixer", terminal)) @@ -277,6 +274,8 @@ theme.volume.bar:buttons(awful.util.table.join ( theme.volume.update() end) )) +local volumebg = wibox.container.background(theme.volume.bar, "#474747", gears.shape.rectangle) +local volumewidget = wibox.container.margin(volumebg, 2, 7, 4, 4) -- Weather theme.weather = lain.widgets.weather({ diff --git a/themes/rainbow/theme.lua b/themes/rainbow/theme.lua index ac86774..5783f6c 100644 --- a/themes/rainbow/theme.lua +++ b/themes/rainbow/theme.lua @@ -166,6 +166,29 @@ theme.volume = lain.widgets.alsabar({ ticks = true, width = 67, notification_preset = { font = theme.font } }) +theme.volume.tooltip.wibox.fg = theme.fg_focus +theme.volume.tooltip.wibox.font = theme.font +theme.volume.bar:buttons(awful.util.table.join ( + awful.button({}, 1, function() + awful.spawn.with_shell(string.format("%s -e alsamixer", terminal)) + end), + awful.button({}, 2, function() + awful.spawn(string.format("%s set %s 100%%", theme.volume.cmd, theme.volume.channel)) + theme.volume.update() + end), + awful.button({}, 3, function() + awful.spawn(string.format("%s set %s toggle", theme.volume.cmd, theme.volume.togglechannel or theme.volume.channel)) + theme.volume.update() + end), + awful.button({}, 4, function() + awful.spawn(string.format("%s set %s 1%%+", theme.volume.cmd, theme.volume.channel)) + theme.volume.update() + end), + awful.button({}, 5, function() + awful.spawn(string.format("%s set %s 1%%-", theme.volume.cmd, theme.volume.channel)) + theme.volume.update() + end) +)) local volumebg = wibox.container.background(theme.volume.bar, "#585858", gears.shape.rectangle) local volumewidget = wibox.container.margin(volumebg, 7, 7, 5, 5) @@ -175,6 +198,10 @@ theme.weather = lain.widgets.weather({ notification_preset = { font = theme.font, fg = white } }) +local mybase = lain.widgets.abase({ + cmd = "echo 123" +}) + -- Separators local first = wibox.widget.textbox(markup.font("Misc Tamsyn 4", " ")) local spr = wibox.widget.textbox(' ') @@ -241,6 +268,7 @@ function theme.at_screen_connect(s) theme.mpd.widget, --mail.widget, theme.fs.widget, + mybase.widget, volumewidget, mytextclock, },