awesome, добавляем левую панель

стараюсь, здесь больше возможностей, да и комп меньше нагружается
Кто ищет, тот всегда найдет.
как убрать лишнее сообщение, отправлено ошибочно
Кто ищет, тот всегда найдет.
olgmen
А на код самих виджетов можно глянуть?
https://github.com/warlock90000/awesome
а почему нет
local beautiful = require("beautiful")
local awful = require("awful")
local wibox = require("wibox")
local gears = require("gears")
local dpi = beautiful.xresources.apply_dpi
local naughty			= require("naughty")

local capi = {
  screen = screen,
  client = client,
}

local widgets = require("actionless.widgets")
local tasklist_addon = require("actionless.tasklist_addon")
local persistent = require("actionless.persistent")
local lain = require("lain")
local helpers      = require("lain.helpers")
local markup     = lain.util.markup
--local config = require("config")
local widget_loader = {}

function widget_loader.init(awesome_context)
	local w = awesome_context.widgets
	local conf = awesome_context.config
	local modkey = awesome_context.modkey

	local lcarslist_enabled = persistent.lcarslist.get()

	local topwibox = {}

-- launcher ============================================================

	mylauncher = awful.widget.launcher({ image = beautiful.awesome_icon, menu = context.menu.mainmenu })

-- CLOSE button ========================================================

	manage_client = widgets.manage_client({ awesome_context = awesome_context, })

-- Keyboard map indicator and switcher =================================

	mykeyboardlayout = awful.widget.keyboardlayout()
	keyboardbg = wibox.container.background(mykeyboardlayout, beautiful.bg_normal, gears.shape.rectangle)
	keyboardwidget = wibox.container.margin(keyboardbg, 0, 0, 0, 0)

-- Create a textclock widget ===========================================

	mytextclock = wibox.widget.textclock("%H:%M")
	mytextclock.font = "sans 18"
	mytextclock.align  = "center"
	widgets.calendar:attach(mytextclock)
	clockbg = wibox.container.background(mytextclock, beautiful.bg_normal, gears.shape.rectangle)
	clockwidget = wibox.container.margin(clockbg, 0, 0, 8, 4)

-- network =============================================================

-- записываем данные из vnstati (графики) в /tmp
os.execute( 'LC_ALL=C vnstati -vs -ne -i ' .. context.config.eth_if .. ' -o /tmp/vnstat_summary.png' )
os.execute( 'LC_ALL=C vnstati -t -ne -i ' .. context.config.eth_if .. ' -o /tmp/vnstat_summary_h.png' )

local net_summary		= "/tmp/vnstat_summary.png"
local net_summary_h		= "/tmp/vnstat_summary_h.png"

-- vnstat_image notification
local vnstat_image = {}
vnstat_image.notification = nil

function vnstat_image:hide()
	if self.notification ~= nil then
		naughty.destroy(self.notification)
		self.notification = nil
	end
end

function vnstat_image:show()
	self:hide()
	self.notification = naughty.notify({
	icon = net_summary,
	position = 'top_left',
	timeout = 20,
	})
end

function vnstat_image:show1()
	self:hide()
	self.notification = naughty.notify({
	icon = net_summary_h,
	position = 'top_left',
	timeout = 20,
	})
end

function vnstat_image:attach(widget, args)

  widget:connect_signal("mouse::enter", function () self:show() end)
  widget:connect_signal("mouse::leave", function () self:hide() end)
  widget:buttons(awful.util.table.join(
    awful.button({ }, 1, function () self:show1() end)
	))
end
	local nettext = wibox.widget {
		markup = 'Tele2',
		forced_height    = dpi(15),
		color            = beautiful.fg_normal,
		background_color = beautiful.bg_normal,
		align  = 'center',
		widget           = wibox.widget.textbox,
	}
	vnstat_image:attach(nettext)
	mynetbg = wibox.container.background(nettext, beautiful.bg_normal, gears.shape.rectangle)
	mynettext = wibox.container.margin(mynetbg, 0, 0, 4, 0)

	os.execute('LC_ALL=C vnstat -i ' .. context.config.eth_if .. ' -m | grep "$(LANG=en_GB.UTF-8 date +"%b \'%y")" | awk \'{print $9" "$10}\'> ~/.eth')
	eth_text = helpers.first_line('/home/olgmen/.eth') or 0

	local netsum = wibox.widget {
		markup = ' Total : ' .. eth_text,
		forced_height    = dpi(15),
		color            = beautiful.fg_normal,
		background_color = beautiful.bg_normal,
		widget           = wibox.widget.textbox,
	}
	mynetsumbg = wibox.container.background(netsum, beautiful.bg_normal, gears.shape.rectangle)
	mynetsum = wibox.container.margin(mynetsumbg, 0, 0, 0, 4)

	netdown = wibox.widget {
		forced_height    = dpi(15),
		color            = beautiful.fg_normal,
		background_color = beautiful.bg_normal,
		widget           = wibox.widget.textbox,
	}

	mynetdown = lain.widgets.net({
		notify = "off",
		settings  = function()
			netdown:set_text(" down : " .. (net_now.received))
		end
	})
	mynetdownbg = wibox.container.background(netdown, beautiful.bg_normal, gears.shape.rectangle)
	mynetdown = wibox.container.margin(mynetdownbg, 0, 0, 0, 0)

	local downbar = wibox.widget {
		forced_height    = dpi(15),
		forced_width     = dpi(40),
		color            = beautiful.fg_normal,
		background_color = beautiful.bg_normal,
		margins          = 3,
		paddings         = 1,
		ticks            = true,
		ticks_size       = 2,
		widget           = wibox.widget.progressbar,
	}

	mydownbar = lain.widgets.net({
		notify = "off",
		settings  = function()
			downbar:set_value(net_now.received / 100)
		end
	})
	local downbg = wibox.container.background(downbar, beautiful.bg_normal, gears.shape.rectangle)
	mydownbar = wibox.container.margin(downbg, 0, 0, 0, 0)

	local netup = wibox.widget {
		forced_height    = dpi(15),
		color            = beautiful.fg_normal,
		background_color = beautiful.bg_normal,
		widget           = wibox.widget.textbox,
	}

	mynetup = lain.widgets.net({
		notify = "off",
		settings  = function()
			netup:set_text(" up      : " .. (net_now.sent))
		end
	})
	mynetupbg = wibox.container.background(netup, beautiful.bg_normal, gears.shape.rectangle)
	mynetup = wibox.container.margin(mynetupbg, 0, 0, 0, 0)
-- cpu =================================================================

	local cputext = wibox.widget {
		forced_height    = dpi(15),
		color            = beautiful.fg_normal,
		background_color = beautiful.bg_normal,
		widget           = wibox.widget.textbox,
	}

	local cpu1text = wibox.widget {
		forced_height    = dpi(15),
		color            = beautiful.fg_normal,
		background_color = beautiful.bg_normal,
		widget           = wibox.widget.textbox,
	}

	local cpu0bar = wibox.widget {
		forced_height    = dpi(15),
		forced_width     = dpi(40),
		color            = beautiful.fg_normal,
		background_color = beautiful.bg_normal,
		margins          = 3,
		paddings         = 1,
		ticks            = true,
		ticks_size       = 2,
		widget           = wibox.widget.progressbar,
	}

	local cpu1bar = wibox.widget {
		forced_height    = dpi(15),
		forced_width     = dpi(40),
		color            = beautiful.fg_normal,
		background_color = beautiful.bg_normal,
		margins          = 3,
		paddings         = 1,
		ticks            = true,
		ticks_size       = 2,
		widget           = wibox.widget.progressbar,
	}

	mycpu = lain.widgets.cpu({
		settings  = function()
			cputext:set_text(" Cpu 1    "..cpu_now[1].usage.." % ")
		end
	})
	mycpubg = wibox.container.background(cputext, beautiful.bg_normal, gears.shape.rectangle)
	mycpu = wibox.container.margin(mycpubg, 0, 0, 4, 0)

	mycpu1 = lain.widgets.cpu({
		settings  = function()
			cpu1text:set_text(" Cpu 2    "..cpu_now[2].usage.." % ")
		end
	})
	mycpu1bg = wibox.container.background(cpu1text, beautiful.bg_normal, gears.shape.rectangle)
	mycpu1 = wibox.container.margin(mycpu1bg, 0, 0, 4, 0)

	mycpu0bar = lain.widgets.cpu({
		settings  = function()
			cpu0bar:set_value(cpu_now[1].usage / 100)
		end
	})
	local cpu0bg = wibox.container.background(cpu0bar, beautiful.bg_normal, gears.shape.rectangle)
	mycpu0bar = wibox.container.margin(cpu0bg, 0, 0, 0, 0)

	mycpu1bar = lain.widgets.cpu({
		settings  = function()
			cpu1bar:set_value(cpu_now[2].usage / 100)
		end
	})

	local cpu1bg = wibox.container.background(cpu1bar, beautiful.bg_normal, gears.shape.rectangle)
	mycpu1bar = wibox.container.margin(cpu1bg, 0, 0, 0, 4)

-- fs ==================================================================
-- shows root and home partitions percentage used

	local fstext = wibox.widget {
		forced_height    = dpi(15),
		color            = beautiful.fg_normal,
		background_color = beautiful.bg_normal,
		widget           = wibox.widget.textbox,
	}

	myfs = lain.widgets.fs({
		partition = "/",
		options = "--exclude-type=tmpfs",
		notification_preset = { fg = beautiful.fg_normal, bg = beautiful.bg_normal, font = beautiful.font },
		settings  = function()
			fstext:set_text(" HDD     " .. fs_now.used .. "%")
		end
	})
	myfsbg = wibox.container.background(fstext, beautiful.bg_normal, gears.shape.rectangle)
	myfs = wibox.container.margin(myfsbg, 0, 0, 4, 0)

	local fsbar = wibox.widget {
		forced_height    = dpi(15),
		forced_width     = dpi(40),
		color            = beautiful.fg_normal,
		background_color = beautiful.bg_normal,
		margins          = 3,
		paddings         = 1,
		ticks            = true,
		ticks_size       = 2,
		widget           = wibox.widget.progressbar,
	}
	fs = lain.widgets.fs({
		partition = "/",
		options = "--exclude-type=tmpfs",
		notification_preset = { fg = beautiful.fg_normal, bg = beautiful.bg_normal, font = beautiful.font },
		settings  = function()
			if tonumber(fs_now.used) < 90 then
				fsbar:set_color(beautiful.fg_normal)
			else
				fsbar:set_color("#EB8F8F")
			end
			fsbar:set_value(fs_now.used / 100)
			end
	})

	local fsbg = wibox.container.background(fsbar, beautiful.bg_normal, gears.shape.rectangle)
	fswidget = wibox.container.margin(fsbg, 0, 0, 0, 4)
  return awesome_context
end

return widget_loader
Кто ищет, тот всегда найдет.
Пасибо, интересно разобраться
https://github.com/warlock90000/awesome
Haron_Prime
Раньше уважаемый olgmen был большим спецом по конькам.
Уау... Неужели тот самый? :)

Haron_Prime
Сейчас переключился на awesome
И это правильно! Всем давно пора. )) Там практически неограниченные возможности...

olgmen, спасибо за участие... :)
R.V.
Неужели тот самый?
других не имеется )))
в своё время он мне здорово помог с коньками, за что я ему до сих пор весьма признателен
и с луа я познакомился именно благодаря его конькам (хотя знакомство и шапочное)
Gnome 2 >> Unity >> KDE 4 >> Openbox >> Awesome >> Xmonad
GitHub , BitBuket
Ну, раз так... )) Тогда только он, наверное, сможет реализовать в баре Awesome WM вот это. Будем надеяться... :)
а в чём там проблема?
просто ставим bashets
прописываем
local bashets = require("bashets")
и выводим в панель awesome выхлоп любого скрипта или команды
к примеру

local function temp_output()
    local f = io.popen("cat /home/haron/.config/gis-weather/cur_temp")
    local out = f:read("*a")
    f:close()
    return { out }
end
myweatherbox1 = wibox.widget.textbox()
vicious.register(myweatherbox1, temp_output, "<span color=\"#90d0f0\" font=\"Terminus Re33 14\">$1</span>", 10)
Gnome 2 >> Unity >> KDE 4 >> Openbox >> Awesome >> Xmonad
GitHub , BitBuket
Ну, так это уже более года не обновлявшийся bashets нужен еще. Я думаю, проще можно.
Например, вписать в ~/.config/awesome/vicious/widgets/net_linux.lua.
 
Зарегистрироваться или войдите чтобы оставить сообщение.