{"id":13896675,"url":"https://github.com/cedlemo/blingbling","last_synced_at":"2025-04-15T01:10:33.211Z","repository":{"id":90834766,"uuid":"2599267","full_name":"cedlemo/blingbling","owner":"cedlemo","description":"Awesome WM widgets ","archived":false,"fork":false,"pushed_at":"2016-11-28T18:26:56.000Z","size":8357,"stargazers_count":148,"open_issues_count":4,"forks_count":37,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-03-28T13:05:37.985Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cedlemo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2011-10-18T14:03:43.000Z","updated_at":"2024-05-07T00:52:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"adb1b5bf-f354-4daa-9114-ed816a201af2","html_url":"https://github.com/cedlemo/blingbling","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cedlemo%2Fblingbling","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cedlemo%2Fblingbling/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cedlemo%2Fblingbling/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cedlemo%2Fblingbling/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cedlemo","download_url":"https://codeload.github.com/cedlemo/blingbling/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248986312,"owners_count":21194025,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-06T18:03:04.708Z","updated_at":"2025-04-15T01:10:33.145Z","avatar_url":"https://github.com/cedlemo.png","language":"Lua","funding_links":[],"categories":["Lua"],"sub_categories":[],"readme":"## Blingbling:\n\n[![Join the chat at https://gitter.im/cedlemo/blingbling](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/cedlemo/blingbling?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\nBlingbling is a graphical widget library for Awesome Windows Manager. The goal of the Blingbling library is to provide more fancy, customizable and easy to setup graphical widgets, popups or signals for Awesome WM.\n\nOriginally, I have written Blingbling for myself but I share it under the GNU GPL-v2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html). Testers and feedbacks are welcome!\n\n## Versions\n\nThe current version is the v2.2 and it works with Awesome WM \u003c= awesome v3.5.8 and Lua \u003c= 5.3. Don't use the master branch of blingbling, this is an advice not an obligation. Some widgets may not work as expected because I am working on them. See the installation part below, in order to install the v2.2 version.\n\n\u003cimg src=\"https://raw.github.com/cedlemo/blingbling/master/config_example/japanese2_screen.png\" width=\"576\" height=\"324\" alt=\"Screenshot\"\u003e\n\n\u003cimg src=\"https://raw.github.com/cedlemo/blingbling/master/config_example/graphs_test_screen.png\" width=\"576\" height=\"324\" alt=\"Screenshot\"\u003e\n\n\u003cimg src=\"https://raw.github.com/cedlemo/blingbling/master/config_example/screenshot_extended_calendar.png\" width=\"576\" height=\"324\" alt=\"Screenshot\"\u003e\n\n### Version: v2.2\n\n*  [line_graph](#line_graph)\n*  [progress_graph](#progress_graph)\n*  [triangular_progress_graph](#triangular_progress_graph)\n*  [value_text_box](#value_text_box)\n*  [volume](#value_text_box)\n*  [popups](#popups)\n*  [net](#net)\n*  [task_warrior](#task_warrior)\n*  [udisks_glue](#udisks_glue)\n*  [system](#system)\n*  [clock](#clock)\n*  [tagslist](#tagslist)\n*  [text_box](#text_box)\n*  [calendar](#calendar)\n*  [extended_calendar](#calendar)\n*  [grid](#grid)\n*  [transient](#transient)\n\nThis part is an adaptation of some of the wlourf awesome stuff : http://wlourf.deviantart.com/art/widgets-for-awesome-wm-v1-3-269061228.\n*  wlourf circle\n\n#### Installation\nwith `$XDG_CONFIG_HOME` usually `~/.config`\n\n*    With Git:\n\n        cd $XDG_CONFIG_HOME/awesome/\n        git clone git://github.com/cedlemo/blingbling.git\n        cd blingbling\n        git checkout v2.2\n\n*   Download with command line tools\n\n        cd $XDG_CONFIG_HOME/awesome/\n        wget https://github.com/cedlemo/blingbling/archive/v2.2.zip\n        unzip v2.2.zip blingbling\n\n*   Download with your browser go to : https://github.com/cedlemo/blingbling/tree/v2.2\n\n#### Use:\nIn your rc.lua:\n\n    require(\"blingbling\")\n\n##### Documentation\nYou can find a full documentation for each widgets in the doc directory, just open the index.html file.\n\n##### line_graph\nCreate a line graph and fill it with vicious for example (you can configure the widget with a table or with the related methods ):\n\n```lua\ncpu_graph = blingbling.line_graph({ height = 18,\n                                        width = 200,\n                                        show_text = true,\n                                        label = \"Load: $percent %\",\n                                        rounded_size = 0.3,\n                                        graph_background_color = \"#00000033\"\n                                      })\n--cpu_graph:set_height(18)\n--cpu_graph:set_width(200)\n--cpu_graph:set_show_text(true)\n--cpu_graph:set_label(\"Load: $percent %\")\n--cpu_graph:set_rounded_size(0.3)\n--cpu_graph:set_graph_background_color(\"#00000033\")\nvicious.register(cpu_graph, vicious.widgets.cpu,'$1',2)\n```\n\n##### progress_graph\nCreate some progress graphs :\n\n```lua\ncores_graph_conf ={height = 18, width = 8, rounded_size = 0.3}\ncores_graphs = {}\nfor i=1,4 do\n  cores_graphs[i] = blingbling.progress_graph( cores_graph_conf)\n  vicious.register(cores_graphs[i], vicious.widgets.cpu, \"$\"..(i+1)..\"\",1)\nend\n```\n\nAdd those widgets to your wibox:\n\n```lua\nfor i=1,4 do\n  left_layout:add(cores_graphs[i])\nend\n```\n\n##### value_text_box\nCreate a value text box:\n\n```lua\nhome_fs_usage=blingbling.value_text_box({height = 18, width = 40, v_margin = 4})\n--home_fs_usage:set_height(16)\n--home_fs_usage:set_width(40)\n--home_fs_usage:set_v_margin(2)\nhome_fs_usage:set_text_background_color(\"#00000099\")\nhome_fs_usage:set_values_text_color({{\"#88aa00ff\",0}, --all value \u003e 0 will be displayed using this color\n                          {\"#d4aa00ff\", 0.75},\n                          {\"#d45500ff\",0.77}})\n--There is no maximum number of color that users can set, just put the lower values at first. \nhome_fs_usage:set_text_color(beautiful.textbox_widget_as_label_font_color)\nhome_fs_usage:set_rounded_size(0.4)\nhome_fs_usage:set_font_size(8)\nhome_fs_usage:set_background_color(\"#00000044\")\nhome_fs_usage:set_label(\"usage: $percent %\")\n\nvicious.register(home_fs_usage, vicious.widgets.fs, \"${/home used_p}\", 120 )\n```\n\n##### triangular_progress_graph\nCreate a triangular progress graph (can be feed with vicious too):\n\n```lua\ntriangular = blingbling.triangular_progressgraph({height = 18, width = 40, bar = true, v_margin = 2, h_margin = 2})\ntriangular:set_value(0.7)\n```\n\n##### volume\nCreate a volume widget (triangular progress bar with specific methods):\n\n```lua\nvolume_master = blingbling.volume({height = 18, width = 40, bar =true, show_text = true, label =\"$percent%\", pulseaudio = true})\nvolume_master:update_master()\nvolume_master:set_master_control()\n```\n\n##### popups\nAdd popups to one or more widget with blinbling.popups module:\n\n```lua\n--Example with cpu_graph created previously with default color :\nblingbling.popups.htop(cpu_graph, { terminal =  terminal })\n\n--Example with custom colors:\nblingbling.popups.htop(cpu_graph, { title_color = beautiful.notify_font_color_1 , user_color = beautiful.notify_font_color_2 , root_color = beautiful.notify_font_color_3 , terminal =  terminal })\n```\n\n##### net\nCreate a net widget with a popup that display connection informations:\n\n```\nnetwidget = blingbling.net({interface = \"eth0\", show_text = true})\nnetwidget:set_ippopup()\n```\n\n##### task_warrior\nCreate a new task_warrior menu:\n\n```lua\ntask_w = blingbling.task_warrior({ menu_icon = file_path, project_icon = file_path, task_icon = file_path ,task_done_icon = file_path, width})\ntask_w:set_project_icon(themes_dir .. \"/test/titlebar/maximized_focus_active.png\")\n```\n\n##### udisks_glue\nCreate a menu which displays mounted media with actions like mount/unmount/detach/eject. Must be used with .udisks-glue.conf that I created. ( The name of the variable containing the widget must be the same in your rc.lua and in the .udisks-glue.conf).\n\n```lua\nudisks_glue=blingbling.udisks_glue.new({ menu_icon = themes_dir .. \"/test/titlebar/maximized_focus_active.png\"})\n```\n\nnote: Added minor update to allow udisks_glue to insert a device without mounting it. See .udisks_glue.conf\n\n##### system\nProvide buttons with menu in order to reboot or shutdown the system. User can set icon for menu, accept and cancel actions.\n\n```lua\nshutdown=blingbling.system.shutdownmenu(beautiful.shutdown,\n                                        beautiful.accept,\n                                        beautiful.cancel)\n\nreboot=blingbling.system.rebootmenu(beautiful.reboot,\n                                    beautiful.accept,\n                                    beautiful.cancel)\nlock=blingbling.system.lockmenu() --icons have been set in theme via the theme.bligbling table\nlogout=blingbling.system.logoutmenu() --icons have been set in theme via the theme.blingbling table\n```\n\n##### clock\nThis part provides a clock which displays month, day of month and day of week in japanese (kanji form)\n\n```lua\nmytextclock = blingbling.clock.japanese(\" %m、%d、%w、\u003cspan color=\\\"#999999\\\"\u003e%H\u003cspan color=\\\"\"..blingbling.helpers.rgb(20,31,82)..\"\\\"\u003e時\u003c/span\u003e%M\u003cspan color=\\\"\"..blingbling.helpers.rgb(20,31,82)..\"\\\"\u003e分\u003c/span\u003e \u003c/span\u003e\")\n```\n\n##### text_box\nThe blingbling.text_box are widget like Awesome textbox but with more parameters. \n* background_color the color used to fill the background\n* text_background_color a background color that will be set between the background and the text\n* h_margin v_margin margin between the text background and the wibox\n* rounded_size the size for rounded corners : this can be a number that applies for all corners or a table of 4 values { upper left, upper right, lower right, lower left }\n* text_color, font, font_size\n\n\n##### tagslist\nThis object is an adaptation of the taglist object from awesome. Tags are blingbling.text_box. Users can provide a style for the tags as the last argument. The style must be a table with the 4 keys corresponding to the states of a tag (normal, focus, urgent, occupied). Each value of this keys are tables with style paramaters of text_box widget. (width, height, h_margin, v_margin, background_color, text_background_color, rounded_size, text_color, font_size, font.\n\nJust replace the line \n\n```lua\nmytaglist[s] = awful.widget.taglist(s, awful.widget.taglist.filter.all, mytaglist.buttons)\n```\n\nwith\n\n```lua\nmytag[s]=blingbling.tagslist(s,  awful.widget.taglist.filter.all, mytaglist.buttons --[[, { normal = {}, focus ={}, urgent={}, occupied={} }--]])\n```\nthen add mytaglist[s] in the wibox :\n\n```lua\nleft_layout:add(wibox.layout.margin(mytag[s],0,0,1,1))\n```\n\n##### calendar\nThis widget is different from the calendar of the v2.2 version. It is just a simple [grid](#grid) displaying days of month, week numbers. There are 3 buttons on the first row of the grid that allow you to displays the previous and next month or to return to the current month. Unlike the previous version, it must be added to a wibox in order to be displayed.\n\nYou can test it with the file **config_example/calendar_rc.lua** and the simple theme **config_example/calendar_tests/**. If you want a calendar that offers the same functionnalities than the previous calendar widget, you should use the [extended_calendar](#extended_calendar).\n\n```lua\n\ncal_box = wibox({height = 200, width = 240, ontop = true, x = 200, y = 200})\ncal_box.visible = true\nlocal blingbling = require(\"blingbling\")\n\n-- cal = blingbling.calendar({locale = 'fr_FR'})\ncal = blingbling.calendar()\ncal_box:set_widget(cal)\ncal_box.visible = true\n```\n\n##### extended_calendar\nThis widget is the new version of the calendar module of blingbling v2.2. While the calendar widget is a grid that displays days of month with some little functionnalities, extended_calendar is a wibox that contains a calendar widget and other text_box widgets. It allow you to register callbacks so that when you hover your cursor on a day cell, it triggers you callback. A working example can be find here config_example/extended_calendar_rc.lua. (it needs the application *remind* and you should adapt the code with your *remind* configuration file)\n\n```lua\n-- The arguments of the callback should be vizualized as :\n-- calendar_day_widget : the widget that we focus on (it is a blingbling.text_box)\n-- month : a number for the month that is displayed by the calendar\n-- year  : a number for the year that is displayed by the calendar\n-- info_cell : the blingbling.text_box on the right of the extended_calendar grid\nlocal function print_info_enter(calendar_day_widget, month, year, info_cell)\n  local day = calendar_day_widget._layout.text\n  local month = month\n  local day = day\n  local str = day ..\"/\"..month..\"/\"..year..\" : No events for this day\"\n  info_cell:set_text(str)\nend\n\nlocal function print_info_leave(widget, month, year, info_cell)\n  info_cell:set_text(\"\")\nend\n\ncal = blingbling.extended_calendar({height = 300, width = 500, \n                                    ontop = true, x = 200, y = 200,\n                                    days_mouse_enter = print_info_enter,\n                                    days_mouse_leave = print_info_leave})\n\n```\n\n##### grid\nIt is a layout/container widget. It allows you to add child in the same way of the `GtkGrid`. The best way to see is to try the ***config_example/grid_rc.lua***.\n\n```lua\ntexts = {}\nfor i=1,5 do \n  c = tostring(i - 1)\n  texts[i] = blingbling.text_box({text = tostring(i),\n                            background_color = \"#\"..c..c..c..c..c..c,\n                            rounded_size = 0,\n                            h_margin = 0,\n                            v_margin = 0})\nend\n\ngrid:add_child(texts[1], 1, 1, 1, 1) -- child, left, top , width, height\ngrid:add_child(texts[2], 2, 1, 1, 1)\ngrid:add_child(texts[3], 1, 2, 2, 2)\ngrid:add_child(texts[4], 3, 2, 2, 2)\ngrid:add_child(texts[5], 3, 1, 2, 1)\n\ngrid_box:set_widget(grid)\n```\n##### transient\nIt is a wibox that can be displayed for a short amount of time. ( TODO : usage example)\n\n##### wlourf circle graph\nThis is the circle graph of wlourf that you can feed with vicious.\n\n```lua\ncircle = blingbling.wlourf_circle_graph({radius= 5, height = 18, width = 36, show_text = true, label = \"cpu\", h_margin = 2, v_margin = 0 --[[, font = {family = \"Times New Roman\", slang = \"italic\", weight = \"bold\"}]]})\ncircle:set_graph_colors({{\"#88aa00ff\",0}, --all value \u003e 0 will be displayed using this color\n                       {\"#d4aa00ff\", 0.5},\n                       {\"#d45500ff\",0.77}})\n--set the value directly\n--circle:add_value(0.5)\n--or use vicious\nvicious.register(circle, vicious.widgets.cpu,'$1',2)\n```\n\n##### Global theming for blingbling.\n\nYou can provide default theme for blingbling instead of configuring colors for each widgets. You just need to create a blingbling table in your theme.lua file and override values that can be find in superproperties.lua:\n\n```lua\ntheme.blingbling = {\n  htop_title_color = \"#ff0000\",\n  htop_user_color = \"#00ff00\"\n}\n```\n\n**Caution**\nIf you want that your values in the theme are used you have two possibilities:\n\n*   use `require('blingbling')` after the line containing `beautiful.init(the_theme_path)`. \n\n```lua\n.. in you rc.lua\n...\nlocal beautiful = require('beautiful')\nbeautiful.init(the_theme_path)\n.. \nlocal blingbling = require('blingbling')\nmygraph = blingbling.line_graph()\n..\n```\n*   or if you set the `require('blingbling')` before you must use this statement : `blingbling.superproperties(the_theme_path)` before using any widget.\n\n```lua\n.. in you rc.lua\nlocal blingbling = require('blingbling')\n...\nlocal beautiful = require('beautiful')\nbeautiful.init(the_theme_path)\n.. \nblingbling.superproperties.init('the_theme_path')\nmygraph = blingbling.line_graph()\n..\n```\n\nValues that can be modified are:\n\nTheme values for graphs or value_text_box objects: \n\n*  h_margin\n*  v_margin\n*  background_border\n*  background_color\n*  graph_background_color\n*  graph_background_border\n*  rounded_size\n*  graph_color\n*  graph_line_color\n*  text_color\n*  value_format\n*  font_size\n*  text_background_color\n\nTheme values for popups module:\n\n*  htop_title_color\n*  htop_user_color\n*  htop_root_color\n*  netstat_title_color\n*  nestat_established_color\n*  netstat_listen_color\n\nTheme value for taskwarrior:\n\n*  menu_width\n\nTheme values for system (icons):\n\n*  shutdown\n*  reboot\n*  lock\n*  logout\n\nTheme values for tagslist:\n\n*  tagslist.normal\n*  tagslist.focus\n*  tagslist.urgent\n*  tagslist.occupied\n\nTheme values for calendar:\n\n*  calendar.prev_next_widget_style\n*  calendar.current_date_widget_style\n*  calendar.days_of_week_widget_style\n*  calendar.days_of_month_widget_style\n*  calendar.weeks_number_widget_style\n*  calendar.corner_widget_style\n*  calendar.current_day_widget_style\n*  calendar.focus_widget_style\n*  calendar.info_cell_style\n\n\n### Version: v1.0\n\nBlingbling v1.0 works for awesome 3.4.10 and 3.4.11.\n*  Value text box\n*  Classical graph\n*  Tiled graph\n*  Progress graph\n*  Progress bar\n*  Volume graph\n*  Mpd widget\n*  Net widget\n*  Top popup\n*  Netstat popup\n*  System shutdown/Reboot button\n*  Udisks-glue widget menu\n*  Menu widget\n*  Task warrior widget\n*  Table widget layout\n*  Calendar\n\n#### Dependencies\n\nBlingbling require oocairo. The address of the website of the project is : http://oocairo.naquadah.org.\n\nCheck your package manager to see if you can install an already packaged version of oocairo for your system.\n\n#### Installation\n\n($XDG_CONFIG_HOME usually ~/.config)\n\n    cd $XDG_CONFIG_HOME/awesome/\n    git clone git://github.com/cedlemo/blingbling.git\n    cd blingbling\n    git checkout v1.0\n\n\nAuthor:\n-------\n\nCédric Le Moigne cedlemo contact: cedlemo at gmx dot com\n\nContributors\n-------\nhttps://github.com/cedlemo/blingbling/graphs/contributors\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcedlemo%2Fblingbling","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcedlemo%2Fblingbling","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcedlemo%2Fblingbling/lists"}