This commit is contained in:
vincent 2018-11-13 21:28:03 +01:00
parent b62c47c4fb
commit 899e6e93d5
8 changed files with 72 additions and 11 deletions

View File

@ -127,16 +127,24 @@ mykeyboardlayout = awful.widget.keyboardlayout()
-- Create a textclock widget -- Create a textclock widget
mytextclock = wibox.widget.textclock() mytextclock = wibox.widget.textclock()
local spr_right = wibox.widget.imagebox(beautiful.spr_right)
local cpuicon = wibox.widget.imagebox(beautiful.cpu_icon,true)
local cpu = lain.widget.cpu({ local cpu = lain.widget.cpu({
settings = function() settings = function()
widget:set_markup(markup.fontfg(beautiful.font, "#e33a6e", cpu_now.usage .. "% ")) widget:set_markup(markup.fontfg(beautiful.font,beautiful.fg_normal, cpu_now.usage .. "% "))
end end
}) })
local mymem = lain.widget.mem({
settings = function()
widget:set_markup(markup.fontfg(beautiful.font,beautiful.fg_normal, mem_now.perc .. "% "))
end
})
-- Net -- Net
local netdownicon = wibox.widget.imagebox(beautiful.widget_netdown) local netdownicon = wibox.widget.imagebox(beautiful.net_down)
local netdowninfo = wibox.widget.textbox() local netdowninfo = wibox.widget.textbox()
local netupicon = wibox.widget.imagebox(beautiful.widget_netup) local netupicon = wibox.widget.imagebox(beautiful.net_up)
local netupinfo = lain.widget.net({ local netupinfo = lain.widget.net({
settings = function() settings = function()
@ -145,7 +153,40 @@ local netupinfo = lain.widget.net({
end end
}) })
local mpdicon = wibox.widget.imagebox() ---redshift widget
local myredshift = wibox.widget{
checked = false,
check_color = "#EB8F8F",
border_color = "#EB8F8F",
border_width = 1,
shape = gears.shape.square,
widget = wibox.widget.checkbox
}
local myredshift_text = wibox.widget{
align = "center",
widget = wibox.widget.textbox,
}
local myredshift_stack = wibox.widget{
myredshift,
myredshift_text,
layout = wibox.layout.stack
}
lain.widget.contrib.redshift:attach(
myredshift,
function (active)
if active then
myredshift_text:set_markup(markup(beautiful.bg_normal, "<b>R</b>"))
else
myredshift_text:set_markup(markup(beautiful.fg_normal, "R"))
end
myredshift.checked = active
end
)
local mpdicon = wibox.widget.imagebox(beautiful.mpd)
local mpd = lain.widget.mpd({ local mpd = lain.widget.mpd({
settings = function() settings = function()
mpd_notification_preset = { mpd_notification_preset = {
@ -252,18 +293,24 @@ awful.screen.connect_for_each_screen(function(s)
mylauncher, mylauncher,
s.mytaglist, s.mytaglist,
s.mypromptbox, s.mypromptbox,
spr_right,
mpdicon, mpdicon,
mpd.widget mpd.widget
}, },
nil -- Middle widget nil -- Middle widget
,{ -- Right widgets ,{ -- Right widgets
layout = wibox.layout.fixed.horizontal, layout = wibox.layout.fixed.horizontal,
--myredshift_stack,
netdownicon, netdownicon,
netdowninfo, netdowninfo,
netupicon, netupicon,
netupinfo.widget, netupinfo.widget,
cpuicon, cpuicon,
cpu , cpu ,
mymemicon,
mymem,
baticon,
bat,
mykeyboardlayout, mykeyboardlayout,
wibox.widget.systray(), wibox.widget.systray(),
mytextclock, mytextclock,
@ -632,3 +679,5 @@ client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_n
--include autorun file --include autorun file
awful.spawn.with_shell("~/.config/awesome/autorun.sh") awful.spawn.with_shell("~/.config/awesome/autorun.sh")
--debug variable:
--naughty.notify({preset=naughty.config.presets.normal, title="debug", text=beautiful.cpu_icon})

Binary file not shown.

After

Width:  |  Height:  |  Size: 229 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 365 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 320 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 323 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 B

View File

@ -7,13 +7,14 @@ local xresources = require("beautiful.xresources")
local dpi = xresources.apply_dpi local dpi = xresources.apply_dpi
local gfs = require("gears.filesystem") local gfs = require("gears.filesystem")
local themes_path = gfs.get_themes_dir() local themes_path =os.getenv("HOME") .. "/.config/awesome/themes/default/"
local icon_dir = themes_path .. "icons/"
local theme = {} local theme = {}
theme.font = "sans 8" theme.font = "Roboto Bold 10"
theme.bg_normal = "#222222" theme.bg_normal = "#242424"
theme.bg_focus = "#535d6c" theme.bg_focus = "#535d6c"
theme.bg_urgent = "#ff0000" theme.bg_urgent = "#ff0000"
theme.bg_minimize = "#444444" theme.bg_minimize = "#444444"
@ -32,7 +33,7 @@ theme.border_marked = "#91231c"
theme.wibar_height = dpi(25) theme.wibar_height = dpi(28)
-- There are other variable sets -- There are other variable sets
-- overriding the default one when -- overriding the default one when
-- defined, the sets are: -- defined, the sets are:
@ -120,6 +121,17 @@ theme.layout_cornerne = themes_path.."default/layouts/cornernew.png"
theme.layout_cornersw = themes_path.."default/layouts/cornersww.png" theme.layout_cornersw = themes_path.."default/layouts/cornersww.png"
theme.layout_cornerse = themes_path.."default/layouts/cornersew.png" theme.layout_cornerse = themes_path.."default/layouts/cornersew.png"
--icon
theme.cpu_icon = icon_dir.."cpu.png"
theme.net_up = icon_dir .. "net_up.png"
theme.net_down = icon_dir .. "net_down.png"
theme.spr_right = icon_dir .. "spr_right.png"
theme.mpd = icon_dir .. "mpd.png"
-- Generate Awesome icon: -- Generate Awesome icon:
theme.awesome_icon = theme_assets.awesome_icon( theme.awesome_icon = theme_assets.awesome_icon(
theme.menu_height, theme.bg_focus, theme.fg_focus theme.menu_height, theme.bg_focus, theme.fg_focus

View File

@ -16,8 +16,8 @@ export SSH_AUTH_SOCK
numlockx & numlockx &
compton -b & compton -b &
#config pad #config pad
xinput set-prop 13 283 1 & xinput set-prop 13 289 1 &
xinput set-prop 13 291 1 & xinput set-prop 13 297 1 &
# exec dbus-launch i3 # exec dbus-launch i3
case $1 in case $1 in
i3 ) exec dbus-launch i3;; i3 ) exec dbus-launch i3;;