Giter Club home page Giter Club logo

luastatus's People

Contributors

cdlscpmv avatar iavael avatar itspec-ru avatar layerex avatar pitcons avatar seamus-45 avatar shdown avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

luastatus's Issues

'widget-examples/ move to examples/' updates

  1. In README.md:

You will find widget examples in `contrib/widget-examples`.

Probabli, must be

You will find widget examples in the `examples/` directory.

  1. In `contrib/luastatus-9999.ebuild` may also replace

docompress -x /usr/share/doc/${PF}/widget-examples/${barlib}

with

docompress -x /usr/share/doc/${PF}/examples/${barlib}

?

Archlinux PKGBUILD

Hello,

Luastatus looks interesting. I wanted to know if you are planing to add a PKGBUILD to AUR repository of Archlinux ?

Thanks a lot,

"network-rate" uses "binary prefix" divisor (1024) rather than "si prefix" divisor (1000)

Hi.

(This is more a question, rather than a bug, because I don't know whether your current implementation is "by design" or not.)

network-rate.lua divides by 1024, and so calculates the network rate in "kibibytes per second".

Wikipedia's article on binary prefixes says:

Most computer hardware uses SI prefixes to state capacity and define other performance parameters such as data rate.

(emphasis mine!)

Is your "division by 1024" "by design", or should it be "division by 1000" in order to calculate the network rate in "kilobytes / second"?

compile failed luastatus-0.0.2 with lua-5.1

The README.md file says:

Supported Lua versions

  • 5.1
  • LuaJIT, which is currently 5.1-compatible with “some language and library extensions from Lua 5.2”
  • 5.2
  • 5.3

But with lua-5.1.5 I get error:

/var/tmp/portage/x11-misc/luastatus-9999-r2/work/luastatus-9999/luastatus/luastatus.c: In function 'check_lua_call':
/var/tmp/portage/x11-misc/luastatus-9999-r2/work/luastatus-9999/luastatus/luastatus.c:512:10: error: 'LUA_OK' undeclared (first use in this function)
     case LUA_OK:
          ^~~~~~
/var/tmp/portage/x11-misc/luastatus-9999-r2/work/luastatus-9999/luastatus/luastatus.c:512:10: note: each undeclared identifier is reported only once for each function it appears in
make[2]: *** [luastatus/CMakeFiles/luastatus.dir/build.make:63: luastatus/CMakeFiles/luastatus.dir/luastatus.c.o] Error 1

LUA_OK declared in lua 5.2, but not in lua 5.1.
Need to correct either the source code or a README.md file.

E539: Illegal character <,>

I'm using lualine with lsp-status and I get the following error when I'm trying phpactor:

Error executing vim.schedule lua callback: ...acker/start/lualine.nvim/lua/lualine/utils/nvim_opts.lua:77: E539: Illegal character <,>                                                                                                                                                        
stack traceback:
        [C]: in function 'nvim_win_set_option'
        ...acker/start/lualine.nvim/lua/lualine/utils/nvim_opts.lua:77: in function 'setter_fn'
        ...acker/start/lualine.nvim/lua/lualine/utils/nvim_opts.lua:50: in function 'set_opt'
        ...acker/start/lualine.nvim/lua/lualine/utils/nvim_opts.lua:74: in function 'set'
        ...nvim/site/pack/packer/start/lualine.nvim/lua/lualine.lua:432: in function 'refresh'
        ...nvim/site/pack/packer/start/lualine.nvim/lua/lualine.lua:353: in function <...nvim/site/pack/packer/start/lualine.nvim/lua/lualine.lua:352>

Sometimes I see that error using other language servers. I've already seen a similar issue but there it was related to the VIM script encoding.

Ideas for barlibs

  • dzen/dzen2
  • xmobar
  • yabar
  • dvtm

Obscure ones:

  • alopex
  • Spectrwm (apparently too broken for luastatus: only supports updating once-per-N seconds)
  • notion (apparently sort of broken too)
  • WMFS (stardard way to update status bar content is to fork wmfs -c status …)
  • wmii (uses fucking 9P for updating status bar content!!!)

signal_dbm does not update

I tried placing my laptop far away from the router, then close to it, but the signal does not change. It only updates when I reconnect to the network but then it just stays with the first signal detected.

mpd error

When I run luastatus from the terminal, an error pops up:

luastatus: ([email protected]) warning: (candiate) connect: Connection refused

But mpd works fine. I can control it my with bindings and whatnot. What does this error mean?

ошибка в виджете mem-free.lua

Виджет contrib/widget-examples/i3/mem-free.lua
Переменной mem_uev присваивается значение в самом начале и оно не обновляется, виджет показывает одно и то же значение.
Если первую строку (с присвоением значения mem_uev) перенести в функцию get_mem_seg, то всё начинает работать, виджет обновляется.

-mem_uev = assert(io.open('/proc/meminfo', 'r'))

function get_mem_seg()
local result = '[-?-]'

  • mem_uev = assert(io.open('/proc/meminfo', 'r'))
    mem_uev:seek('set', 0)
    for line in mem_uev:lines() do
    local key, value, um = string.match(line, '(.): +(.) +(.*)')

Support for separate-state events

Suppose you want to generate events from within a widget. Then you write:

widget = {
    plugin = 'timer',
    opts = {period = 0},
    cb = function() -- yes, you can drop the argument if you don't care about it
        -- wait for event
        -- return something
    end,
}

But then you can’t respond to barlib’s events because the Lua state’s mutex is (almost) always acquired by the cb function.
It would be good to support something like

widget = {
    ...
    event = [[
        local t = ...
        if t.button == 1 then
            luastatus.spawn{'notify-send', 'Hi there!'}
        end
    ]],
}

(Now, the widget.event function can be invoked with argument t from another Lua state by performing a C equivalent of loadstring(widget.event)(t)).

Segmentation fault when using mpd plugin

I'm trying to use an mpd module, however whenever I try to start luastatus with it, I get a seg fault.

I'm using lemonbar, however I've also tried it with the dwm option and with stdout.

So far, I've tried reinstalling, that didn't fix my issue. Since my other modules work fine, I'm assuming that this could be a problem with the plugin itself.

Here is what I put in the mpd.lua file (I tried several variations of this, including the one in the examples directory, none worked):

lib = require 'lib'
utf8 = require 'utf8'

text, time, total, is_playing = nil, nil, nil, false
timeout = 2
titlewidth = 40

widget = {
    plugin = 'mpd',
    opts = {
        timeout = timeout,
    },
    cb = function(t)
        return {full_tex = t.song.Title}
    end
}

Here is how I launch lemonbar (This works fine with all my other modules):

luastatus-lemonbar-launcher -p -a"$CLICKABLE_AREAS" \
    -p -g"$PANEL_WIDTH"x"$PANEL_HEIGHT"+"$PANEL_HORIZONTAL_OFFSET"+"$PANEL_VERTICAL_OFFSET" \
    -p -f"$PANEL_FONT" -p -f"$PANEL_ICON_FONT" -p -F"$COLOR_DEFAULT_FG" -p -B"$COLOR_DEFAULT_BG" \
    -p -u"$UNDERLINE_HEIGHT" -p -n"$PANEL_WM_NAME" -- -l trace -Bseparator=' ' \
    mpd.lua \

And finally, here is the output from the various commands I've run:

Lemonbar

luastatus: debug: initializing widget 'left.lua'
luastatus: debug: running file 'left.lua'
luastatus: debug: loading plugin from file '/usr/local/lib/luastatus/plugins/plugin-timer.so'
luastatus: debug: plugin successfully loaded
luastatus: debug: widget successfully initialized
luastatus: debug: initializing widget 'mpd.lua'
luastatus: debug: running file 'mpd.lua'
luastatus: debug: loading plugin from file '/usr/local/lib/luastatus/plugins/plugin-mpd.so'
luastatus: debug: plugin successfully loaded
./start-lemonbar-luastatus.sh: line 27: 179831 Segmentation fault      (core dumped) luastatus-lemonbar-launcher -p -a"$CLICKABLE_AREAS" -p -g"$PANEL_WIDTH"x"$PANEL_HEIGHT"+"$PANEL_HORIZONTAL_OFFSET"+"$PANEL_VERTICAL_OFFSET" -p -f"$PANEL_FONT" -p -f"$PANEL_ICON_FONT" -p -F"$COLOR_DEFAULT_FG" -p -B"$COLOR_DEFAULT_BG" -p -u"$UNDERLINE_HEIGHT" -p -n"$PANEL_WM_NAME" -- -l trace -Bseparator=' ' mpd.lua

Stdout

luastatus-stdout-wrapper mpd.lua
[1]    178718 segmentation fault (core dumped)  luastatus-stdout-wrapper mpd.lua

Dwm

luastatus -b dwm -B separator=' • ' mpd.lua
[1]    178489 segmentation fault (core dumped)  luastatus -b dwm -B separator=' • ' mpd.lua

io.popen causing luastatus to hang

I've been trying to write a widget for displaying the amount of new unread emails. It successfully calculates the number of new mail, but when running it with the lemonbar wrapper and other widgets like cpu-temperature (which also invokes io.popen) the bar will freeze and no longer update.
Here's the script in question;

widget = {
    plugin = 'inotify',
    opts = {
        watch = { [os.getenv("HOME") .. "/.config/mutt/.mailsynclastrun"] = { "attrib" } },
        greet = true
    },
    cb = function()
        local pp = assert(io.popen([[/usr/bin/find /home/intr/.local/share/mail/*/[Ii][Nn][Bb][Oo][Xx]/new/* -type f | wc -l]], 'r'))
        m = pp:read("*a")
        pp:close()
        return '� ' .. m
    end
}

Strangely, the same thing happens when trying to use the bluetooth example widget. I'm positive that io.popen is the function causing it to hang, as I've added a boatload of print statements to narrow it down.
I'm not a lua dev by any means, but I'd love to get this to work. Googling has brought me basically nowhere, so I was wondering if you could explain what I'm doing wrong (or if it's some sort of bug in luastatus.)
Thanks in advance.

pulse plugin is disabled by default

Every time I have to reinstall luastatus, I always have to open the CMakeLists.txt file and change the pulse plugin from OFF to ON. Is there a reason why this is disabled by default?

Interconnection with sinx stats aggregator

I built sinx a while ago, to simplify scheduled stats collection.

It's backed by a redis storage and a pretty simple UX, and I wanted to know your thoughts about providing a plugin to extract data from sinx right away.

Segfault while using barlib lemonbar

Steps to reproduce:

  1. Create two simple widgets like:
widget = {
  plugin = 'timer',
  cb = function(t)
    return 'test'
  end,
}
  1. run luastatus-lemonbar-wrapper 1.widget 2.widget

MPD plugin does not update its status, e.g. status.time regularly

Greetings, long time no see :)
I tried to upgrade my mpd widget to show the progress bar of playing song and shuffle/repeat icons, but it does not work this way.
t.what='update' occurs only after song changing or user interaction.
I tried to use timeout callback, but table t is empty in this case.
Is there any way to call report_status manually?

нумерация ревизий ebuild'ов (package revision)

Предлагаю немного упорядочить ebuild'ы для Gentoo

  1. Для релизов ревизия (package revision) ebuild'а изначально не требуется.
    То есть для релиза 0.3.0 имя файла ebuild'а должно было быть luastatus-0.3.0.ebuild,
    релиз соответствует ревизии r0 и в имени файла отсутствует. В релизе 0.3.0 имя файла было сразу luastatus-0.3.0-r1.ebuild, что не совсем корректно, но допустимо.
    Разумеется этот пункт имеет отношение только к последующим релизам, нет смысла менять старые.
    Про переменные, используемые в ebuild'ах, в частности PR (package revision), можно посмотреть здесь https://devmanual.gentoo.org/ebuild-writing/variables/

  2. Для "live ebuilds" (luastatus-9999) нумерацию ревизий наверное лучше вовсе убрать,
    так как слишком часто добавляются новые фичи (barlibs, plugins). Либо при каждом изменении ebuild'а логично было бы увеличивать номер ревизии. Вообще говоря, "live ebuild" уже подрузамевает меняющиеся исходники в процессе разработки, и в portage большинство live ebuild'ов не имеют номеров ревизий.

  3. При выпуске релиза нет смысла включать в него ebuild'ы старых релизов.
    То есть в релизе 0.4.0 по идее должны быть только два ebuild'а
    luastatus-0.4.0.ebuild
    luastatus-9999.ebuild
    Разумеется на момент выпуска релиза, в нашем случае, оба файла должны быть одинаковыми.

Некорректно работают вызовы из шелла

Давно не обновлялся, примерно с 2017 года.
Сегодня, 15.06.2019 обновил, пересобрал...
никак не пойму, каким образом адекватно работать с вызовами комманд шелла? Раньше была команда luastatus.dollar([ command ]), однако сейчас ругается на ее отсутствие.
пробовал через os.execute, но значения полученные от команды превращаются в "true", потому, что если в интерпретаторе lua сделать тоже самое, то получается вывод:

Lua 5.3.5  Copyright (C) 1994-2018 Lua.org, PUC-Rio
> os.execute(os.getenv('HOME')..'/.config/luastatus/cryptocurr.bash')
BTC:$8641.20 LTC:$135.22 DASH:$153.38 ETH:$262.56
true	exit	0

т.е. значение просто выводится в терминал lua, а в значение подставляется слово "true"..

через такую конструкцию:

widget = {
    plugin = 'timer',
    opts = {period = 120}, -- всё равно раз в день обновляется же
    cb = function(t)
        command = os.getenv('HOME')..'/.config/luastatus/cryptocurr.bash'
        local handle = io.popen(command)
        local result = string.format('%s', handle:read("*a"))
        handle:close()

        return {full_text=result, color='#BFB630'}
    end,
}

вывод получается, но почему то, если вывод делается с помощью скриптов шелла или прогой в шелле, то в конец добавляется перевод строки, из-за чего происходит такое -- информация залазиет наверх.

при этом если данные берутся из скрипта на питоне, то при идентичной конструкции скрипта lua вывод происходит нормально (курсы валют оранжевым цветом):

widget = {
    plugin = 'timer',
    opts = {period = 600}, -- всё равно раз в день обновляется же
    cb = function()
        command = os.getenv('HOME')..'/.config/i3/currency.py'
        local handle = io.popen(command)
        local result = string.format('%s', handle:read("*a"))
        handle:close()

        return {full_text=result, color='#ff8000'}
    end,
}

Ошибка установки документации в gentoo linux

При использовании USE-флага "doc" получаем ошибку:
/var/tmp/portage/x11-misc/luastatus-9999/work/luastatus-9999/generate-man.sh: строка 8: rst2man: команда не найдена

В системе действительно нет команды "rst2man".
А пакет dev-python/docutils содержит команду "/usr/bin/rst2man.py".

P.S.
На всякий случай проверил на двух разных системах с gentoo linux: с архитектурами x86 и amd64. Результат тот же.

Error occurs when trying to use multiple widgets that use the mpd plugin

When trying to use multiple widgets using the mpd plugin, the error occurred "Error: status_command process exited unexpectedly (exit 0)"

Simple sample widget mpd-test.lua
widget = { plugin = 'mpd', opts = {timeout = 2}, cb = function(t) return {full_text = "test"} end }

i3 config:
status_command cd ~/.config/luastatus && exec luastatus-i3-wrapper -B no_separators mpd-test.lua
Works properly

status_command cd ~/.config/luastatus && exec luastatus-i3-wrapper -B no_separators mpd-test.lua mpd-test.lua
Get error: "Error: status_command process exited unexpectedly (exit 0)"

This behavior started with version 0.5.0. Version 0.4.0 worked correctly.

alsa-interactive-gauge.lua example: usability

При нажатии на "text block" раскрывается "gauge block",
при этом "text block" оказывается слева от "gauge block".

На мой взгляд это не очень удобно.
Чтобы повторно нажать на "text block" приходится передвигать мышь.
Визуально перескакивание "text block" выглядит так же не очень здорово (опять же, на мой взгляд).

Предлагаю при нажатии на "text block" его позицию не менять. "gauge block" раскрывается слева (так же как и было).

В коде достаточно изменить r[1] на r[2], r[2] на r[1] в 'cb', приерно так:

       local r = {}
        if gauge then
            local fg, bg = '#dcdcdc', '#444444'
            if t.mute then
                fg, bg = '#e03838', '#4a1414'
            end
            r[1] = {full_text=mk_gauge(level), color=fg, background=bg, instance='gauge'}
        end

        if t.mute then
            r[2] = {full_text='[mute]', color='#e03838'}
        else
            r[2] = {full_text=string.format('[%3d%%]', round(level * 100)), color='#718ba6'}
        end
        text_block_nchars = #r[2].full_text -- please note this does not work with Unicode.

Simplifying the battery plugin

  1. How about removing use_props_naming_scheme and detecting the naming scheme in the plugin itself? It is not hard to do, but it will free the user from the small nuances.

  2. Is there a particular reason not to use uevent? Can it be absent? If not, then maybe
    the no_uevent option is unnecessary.

I can come up with a pull request, but I think it is better to discuss these things.

IMAP plugin not working

First things first, big thanks to luastatus developers and contributors!

The IMAP plugin seems to not work properly with an Outlook account. The log from verbose mode and the source code of the widget are shown below. The log seems to repeat infinitely, with only the aXXXX number incrementing, and the widget's cb() function is never called (even with nil argument).

$ luastatus-i3-wrapper outlook.lua
{"version":1,"click_events":true,"stop_signal":0,"cont_signal":0}
[
>	a0001 LOGIN [redacted]@outlook.com [redacted]
<	* OK The Microsoft Exchange IMAP4 service is ready. [redacted]
<	a0001 OK LOGIN completed.
>	a0002 SELECT Inbox
<	* 2 EXISTS
<	* 0 RECENT
<	* FLAGS (\Seen \Answered \Flagged \Deleted \Draft $MDNSent)
<	* OK [PERMANENTFLAGS (\Seen \Answered \Flagged \Deleted \Draft $MDNSent)] Permanent flags
<	* OK [UNSEEN 1] Is the first unseen message
<	* OK [UIDVALIDITY 14] UIDVALIDITY value
<	* OK [UIDNEXT 341] The next unique identifier value
<	a0002 OK [READ-WRITE] SELECT completed.
>	a0003 STATUS inbox (UNSEEN)
<	* STATUS Inbox (UNSEEN 2)
<	a0003 OK STATUS completed.
>	a0004 STATUS inbox (UNSEEN)
<	* STATUS Inbox (UNSEEN 2)
<	a0004 OK STATUS completed.
>	a0005 STATUS inbox (UNSEEN)
<	* STATUS Inbox (UNSEEN 2)
<	a0005 OK STATUS completed.
... ad infinitum
credentials = require "credentials"

widget = luastatus.require_plugin("imap").widget {
    verbose = true,
    host = "outlook.office365.com",
    port = 993,
    mailbox = "Inbox",
    use_ssl = true,
    timeout = 2 * 60,
    handshake_timeout = 10,
    login = credentials.outlook.login,
    password = credentials.outlook.password,
    error_sleep_period = 60,

    cb = function(unseen)
        local color_urgent = "#e45649"
        local label = "MAIL:"

        if unseen == nil then
            return nil
        elseif unseen == 0 then
            return { full_text = label .. unseen }
        else
            return { full_text = label .. unseen, color = color_urgent }
        end
    end
}

Could someone please verify/check my "new" mem-usage widget?

Hi.

At the moment:
The mem-usage widget "requires"
the mem-usage-linux plugin which "requires"
the timer plugin.

But for me, personally, this middle layer of indirection (the mem-usage-linux plugin) doesn't help me. For me, it just makes the code harder to understand and follow (this might be because I am new to lua and luastatus).

So, I am trying to combine the mem-usage widget and the mem-usage-linux plugin into 1 file: a new mem-usage widget that "requires" the timer plugin.

Here's what I have so far:

widget = {
    plugin = './plugins/timer/plugin-timer.so',
    opts = {period = 2},
    cb = function()
        local f = assert(io.open('/proc/meminfo', 'r'))
        local r = {}
        for line in f:lines() do
            local key, value, unit = line:match('(%w+):%s+(%w+)%s+(%w+)')
            if key == 'MemTotal' then
                r.total = {value = tonumber(value), unit = unit}
            elseif key == 'MemAvailable' then
                r.avail = {value = tonumber(value), unit = unit}
            end
        end
        f:close()
        local used_kb = r.total.value - r.avail.value
        return string.format('[%3.2f GiB]', used_kb / 1024 / 1024)
    end
}

I can "successfully" run this new widget and it produces what appears to be correct output, thus:

[1.10 GiB]
[1.03 GiB]
[1.02 GiB]
[1.03 GiB]
[1.00 GiB]
[0.99 GiB]
[0.98 GiB]
[0.99 GiB]
[0.98 GiB]
[0.99 GiB]
[1.01 GiB]
[1.00 GiB]
[0.99 GiB]
[1.02 GiB]

and it appears to only produce new output when the value changes (which, I think, is like the other widgets), so I think this is correct. But... I am new to lua and luastatus, so I don't feel sure that my code is functionally equivalent. Could somebody who possesses more lua-fu than me please have a look at this code and confirm whether or not it is functionally equivalent to the original source, and also whether or not it can be made more simple/easier to understand?

Thank you! Jaime

ebuild for gentoo linux

contrib/luastatus-9999.ebuild
было бы не плохо файлы с виджетами тоже устанавливать в систему.

Я сделал так, добавив src_install()

src_install() {
    default
    dodir /usr/share/${PN}/contrib/widget-examples
    insinto /usr/share/${PN}/contrib/widget-examples

    for i in ${BARLIBS}
    do
        if use ${i}
        then
            doins -r contrib/widget-examples/$(echo ${i} | sed -e 's:'${PN}'_barlibs_::')
        fi
    done
}

Ещё у меня были проблемы при использовании ebuild'а из contrib, git запрашивал пароль.
Так что по-моему лучше заменить
EGIT_REPO_URI="[email protected]:shdown/${PN}.git"
на
EGIT_REPO_URI="https://github.com/shdown/${PN}"

вариант с моими изменениями

# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI=6
CMAKE_IN_SOURCE_BUILD=1
inherit cmake-utils

DESCRIPTION="Universal status bar content generator"
HOMEPAGE="https://github.com/shdown/luastatus"

if [[ ${PV} == *9999* ]]; then
	inherit git-r3
	SRC_URI=""
	EGIT_REPO_URI="https://github.com/shdown/${PN}"
	KEYWORDS="~amd64 ~x86"
else
	SRC_URI="https://github.com/shdown/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
	KEYWORDS="amd64 x86"
fi

BARLIBS="
	${PN}_barlibs_dwm
	${PN}_barlibs_i3
	${PN}_barlibs_lemonbar
"

PLUGINS="
	+${PN}_plugins_alsa
	+${PN}_plugins_fs
	+${PN}_plugins_mpd
	+${PN}_plugins_pipe
	+${PN}_plugins_timer
	+${PN}_plugins_xkb
	+${PN}_plugins_xtitle
"

LICENSE="GPL-3"
SLOT="0"
IUSE="luajit ${BARLIBS} ${PLUGINS}"

DEPEND=""
RDEPEND="${DEPEND}
	luajit? ( dev-lang/luajit:2 )
	!luajit? ( dev-lang/lua:0 )
	${PN}_plugins_xtitle? ( x11-libs/libxcb x11-libs/xcb-util-wm )
	${PN}_plugins_xkb? ( x11-libs/libX11 )
	${PN}_plugins_alsa? ( media-libs/alsa-lib )
	${PN}_barlibs_dwm? ( x11-libs/libxcb )
	${PN}_barlibs_i3? ( >=dev-libs/yajl-2.1.0 )
"

src_configure() {
	local mycmakeargs=(
		$(use luajit && echo -DWITH_LUA_LIBRARY=luajit)
		-DBUILD_BARLIB_DWM=$(usex ${PN}_barlibs_dwm)
		-DBUILD_BARLIB_I3=$(usex ${PN}_barlibs_i3)
		-DBUILD_BARLIB_LEMONBAR=$(usex ${PN}_barlibs_lemonbar)
		-DBUILD_PLUGIN_ALSA=$(usex ${PN}_plugins_alsa)
		-DBUILD_PLUGIN_FS=$(usex ${PN}_plugins_fs)
		-DBUILD_PLUGIN_MPD=$(usex ${PN}_plugins_mpd)
		-DBUILD_PLUGIN_PIPE=$(usex ${PN}_plugins_pipe)
		-DBUILD_PLUGIN_TIMER=$(usex ${PN}_plugins_timer)
		-DBUILD_PLUGIN_XKB=$(usex ${PN}_plugins_xkb)
		-DBUILD_PLUGIN_XTITLE=$(usex ${PN}_plugins_xtitle)
	)
	cmake-utils_src_configure
}

src_install() {
    default
    dodir /usr/share/${PN}/contrib/widget-examples
    insinto /usr/share/${PN}/contrib/widget-examples

    for i in ${BARLIBS}
    do
        if use ${i}
        then
            doins -r contrib/widget-examples/$(echo ${i} | sed -e 's:'${PN}'_barlibs_::')
        fi
    done
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.