From 92fec3297bc3539046d7bced28b095b3c34c5aa9 Mon Sep 17 00:00:00 2001 From: Nguyễn Gia Phong Date: Mon, 27 Nov 2017 15:59:30 +0700 Subject: Update 2017-11-27 --- awesome/.config/awesome/rc.lua | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) (limited to 'awesome') diff --git a/awesome/.config/awesome/rc.lua b/awesome/.config/awesome/rc.lua index 39f9428..3862f21 100644 --- a/awesome/.config/awesome/rc.lua +++ b/awesome/.config/awesome/rc.lua @@ -49,7 +49,7 @@ beautiful.init("~/.config/awesome/themes/gruvbox/theme.lua") terminal = "x-terminal-emulator -e dvtm" editor = "gvim" -- And some additional applications -root_terminal = "x-terminal-emulator -e su --login --command dvtm" +root_terminal = "x-terminal-emulator -e sudo dvtm" ranger = "x-terminal-emulator -e ranger" python = "x-terminal-emulator -e python3" guile = "x-terminal-emulator -e guile" @@ -166,14 +166,14 @@ vicious.register(myswpusage, vicious.widgets.mem, mybattery = wibox.widget.textbox() vicious.register(mybattery, vicious.widgets.bat, function(widget, args) - return(" %s%03d%%"):format(args[1], args[2]) + return (" %s%03d%%"):format(args[1], args[2]) end, 5, "C11F") -- Create a volume widget myvolume_text = wibox.widget.textbox() vicious.register(myvolume_text, vicious.widgets.volume, function(widget, args) - return(" %s%03d%%"):format(args[2], args[1]) + return (" %s%03d%%"):format(args[2], args[1]) end, 1, "Master") myvolume = wibox.container.background(myvolume_text, "#458588") myvolume:buttons(awful.util.table.join( @@ -184,6 +184,18 @@ myvolume:buttons(awful.util.table.join( awful.button({}, 5, volume_lower) )) +-- Create a weather widget +myweather = wibox.widget.textbox() +vicious.register(myweather, vicious.widgets.weather, + function(widget, args) + if args["{city}"] ~= "N/A" then + return (" %s°C %s%%"):format(args["{tempc}"], + args["{humid}"]) + else + return "" + end + end, 60, "VVNB") + -- Create a wibox for each screen and add it local taglist_buttons = awful.util.table.join( awful.button({}, 1, function(t) t:view_only() end), @@ -286,8 +298,9 @@ awful.screen.connect_for_each_screen(function(s) wibox.widget.imagebox(beautiful.arrow4), myvolume, wibox.widget.imagebox(beautiful.arrow5), - wibox.container.background(s.mypromptbox, "#b16286"), - wibox.widget.imagebox(beautiful.arrow6) + wibox.container.background(myweather, "#b16286"), + wibox.widget.imagebox(beautiful.arrow6), + s.mypromptbox }, { -- Middle widget layout = wibox.layout.fixed.horizontal, -- cgit 1.4.1