From a970128c03ed92f7842415f454584eecce59913e Mon Sep 17 00:00:00 2001 From: streetturtle Date: Mon, 4 Feb 2019 20:38:56 -0500 Subject: Update run-shell.lua --- run-shell/run-shell.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run-shell/run-shell.lua b/run-shell/run-shell.lua index a50400f..f661e53 100644 --- a/run-shell/run-shell.lua +++ b/run-shell/run-shell.lua @@ -4,7 +4,7 @@ -- https://github.com/streetturtle/awesome-wm-widgets/tree/master/run-shell -- @author Pavel Makhov --- @copyright 2018 Pavel Makhov +-- @copyright 2019 Pavel Makhov ------------------------------------------------- local capi = { -- cgit v1.2.3 From 2fda7354283b831a89ece55a3007039834d406e2 Mon Sep 17 00:00:00 2001 From: streetturtle Date: Tue, 5 Feb 2019 15:33:35 -0500 Subject: Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f7f8b97..84915bc 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,8 @@ From left to right: - [battery-widget](https://github.com/streetturtle/AwesomeWM/tree/master/battery-widget) - [ram-widget](https://github.com/streetturtle/AwesomeWM/tree/master/ram-widget) - [translate-widget](https://github.com/streetturtle/AwesomeWM/tree/master/translate-widget) (not on the screenshot) -- [spotify-shell](https://github.com/streetturtle/AwesomeWM/tree/master/spotify-shell) +- [spotify-shell](https://github.com/streetturtle/AwesomeWM/tree/master/spotify-shell) (not on the screenshot) +- [run-shell](https://github.com/streetturtle/AwesomeWM/tree/master/run-shell) (not on the screenshot) Some of these widgets use [Arc icon theme](https://github.com/horst3180/arc-icon-theme) by default but it could be easily changed to any other icon theme or custom icons. If you want to have separators between widgets like on the screenshot create text widget with ` : ` and place it between widgets: -- cgit v1.2.3 From ccefb79bbb7ff2ebbae2873e2c61a7de2f3bfd52 Mon Sep 17 00:00:00 2001 From: streetturtle Date: Tue, 5 Feb 2019 15:40:08 -0500 Subject: Update README.md --- run-shell/README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/run-shell/README.md b/run-shell/README.md index ca7b268..1e4a175 100644 --- a/run-shell/README.md +++ b/run-shell/README.md @@ -6,6 +6,12 @@ Blurs background and shows widget with run prompt: ## Installation +1. To blur / pixelate the background this widget used [ffmpeg](https://www.ffmpeg.org/) and [frei0r](https://frei0r.dyne.org/) plugins (if you want to pixelate the background), which you need to install. Installation of those depends on your distribution, for ffmpeg just follow the installation section of the site, for frei0r I was able to install it simply running + + ``` + sudo apt-get install frei0r-plugins + ``` + 1. Clone this repo under **~/.config/awesome/**: ```bash -- cgit v1.2.3 From 6b05fc1093ee54d59831821bc59f217a9b617a5a Mon Sep 17 00:00:00 2001 From: streetturtle Date: Tue, 5 Feb 2019 15:40:39 -0500 Subject: Update README.md --- run-shell/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/run-shell/README.md b/run-shell/README.md index 1e4a175..9f267fc 100644 --- a/run-shell/README.md +++ b/run-shell/README.md @@ -1,12 +1,12 @@ # Run Shell -Blurs background and shows widget with run prompt: +Blurs / pixelates background and shows widget with run prompt: ![screenshot](./screenshot.png) ## Installation -1. To blur / pixelate the background this widget used [ffmpeg](https://www.ffmpeg.org/) and [frei0r](https://frei0r.dyne.org/) plugins (if you want to pixelate the background), which you need to install. Installation of those depends on your distribution, for ffmpeg just follow the installation section of the site, for frei0r I was able to install it simply running +1. To blur / pixelate the background this widget used [ffmpeg](https://www.ffmpeg.org/) and [frei0r](https://frei0r.dyne.org/) plugins (if you want to pixelate the background), which you need to install. Installation of those depends on your distribution, for ffmpeg just follow the installation section of the site, for frei0r I was able to install it by simply running ``` sudo apt-get install frei0r-plugins -- cgit v1.2.3 From d961bd491fc3be527b44a5bc426b64191c63c135 Mon Sep 17 00:00:00 2001 From: Pavel Makhov Date: Tue, 5 Feb 2019 16:04:21 -0500 Subject: add pixelate screenshot --- run-shell/README.md | 4 +++- run-shell/blur.png | Bin 0 -> 329592 bytes run-shell/pixelate.png | Bin 0 -> 329592 bytes run-shell/screenshot.png | Bin 329592 -> 0 bytes 4 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 run-shell/blur.png create mode 100644 run-shell/pixelate.png delete mode 100644 run-shell/screenshot.png diff --git a/run-shell/README.md b/run-shell/README.md index 9f267fc..039a23c 100644 --- a/run-shell/README.md +++ b/run-shell/README.md @@ -2,7 +2,9 @@ Blurs / pixelates background and shows widget with run prompt: -![screenshot](./screenshot.png) +![screenshot](./blur.png) + +![screenshot](./pixelate.png) ## Installation diff --git a/run-shell/blur.png b/run-shell/blur.png new file mode 100644 index 0000000..4e8b54c Binary files /dev/null and b/run-shell/blur.png differ diff --git a/run-shell/pixelate.png b/run-shell/pixelate.png new file mode 100644 index 0000000..4e8b54c Binary files /dev/null and b/run-shell/pixelate.png differ diff --git a/run-shell/screenshot.png b/run-shell/screenshot.png deleted file mode 100644 index 4e8b54c..0000000 Binary files a/run-shell/screenshot.png and /dev/null differ -- cgit v1.2.3 From 314d7d2bf93d946ac5303993572bd235b0a6236b Mon Sep 17 00:00:00 2001 From: Pavel Makhov Date: Tue, 5 Feb 2019 16:05:11 -0500 Subject: add pixelate screenshot --- run-shell/pixelate.png | Bin 329592 -> 133469 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/run-shell/pixelate.png b/run-shell/pixelate.png index 4e8b54c..fedf320 100644 Binary files a/run-shell/pixelate.png and b/run-shell/pixelate.png differ -- cgit v1.2.3 From f5599c693a8a2463571da752af6bd2b501fd3001 Mon Sep 17 00:00:00 2001 From: Shaun Smiley Date: Fri, 8 Feb 2019 08:21:21 -0800 Subject: fix volumebar_widget require line in README --- volumebar-widget/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/volumebar-widget/README.md b/volumebar-widget/README.md index 2198f6d..d6b9117 100644 --- a/volumebar-widget/README.md +++ b/volumebar-widget/README.md @@ -14,7 +14,7 @@ Supports Clone repo, include widget and use it in **rc.lua**: ```lua - require("volumebar") +local volumebar_widget = require("awesome-wm-widgets.volumebar-widget.volumebar") ... s.mytasklist, -- Middle widget { -- Right widgets -- cgit v1.2.3 From f95c2015ea0a498e1082b70a897311068e3841a1 Mon Sep 17 00:00:00 2001 From: Pavel Makhov Date: Mon, 11 Feb 2019 08:34:28 -0500 Subject: remove brightness widget update when brightness is changed by keypress --- brightness-widget/brightness.lua | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/brightness-widget/brightness.lua b/brightness-widget/brightness.lua index 1b2e8a6..075765c 100644 --- a/brightness-widget/brightness.lua +++ b/brightness-widget/brightness.lua @@ -14,8 +14,8 @@ local spawn = require("awful.spawn") local PATH_TO_ICON = "/usr/share/icons/Arc/status/symbolic/display-brightness-symbolic.svg" local GET_BRIGHTNESS_CMD = "light -G" -- "xbacklight -get" -local INC_BRIGHTNESS_CMD = "light -A 1" -- "xbacklight -inc 5" -local DEC_BRIGHTNESS_CMD = "light -U 1" -- "xbacklight -dec 5" +local INC_BRIGHTNESS_CMD = "light -A 5" -- "xbacklight -inc 5" +local DEC_BRIGHTNESS_CMD = "light -U 5" -- "xbacklight -dec 5" local brightness_text = wibox.widget.textbox() brightness_text:set_font('Play 9') @@ -45,10 +45,6 @@ brightness_widget:connect_signal("button::press", function(_,_,_,button) if (button == 4) then spawn(INC_BRIGHTNESS_CMD, false) elseif (button == 5) then spawn(DEC_BRIGHTNESS_CMD, false) end - - spawn.easy_async(GET_BRIGHTNESS_CMD, function(stdout, stderr, exitreason, exitcode) - update_widget(brightness_widget, stdout, stderr, exitreason, exitcode) - end) end) watch(GET_BRIGHTNESS_CMD, 1, update_widget, brightness_text) -- cgit v1.2.3 From 0cce59c09a283e459dec7fcc484ae5236f4ee64e Mon Sep 17 00:00:00 2001 From: streetturtle Date: Mon, 11 Feb 2019 08:40:32 -0500 Subject: Update README.md --- brightness-widget/README.md | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/brightness-widget/README.md b/brightness-widget/README.md index fa123c1..a2aecf7 100644 --- a/brightness-widget/README.md +++ b/brightness-widget/README.md @@ -1,12 +1,10 @@ # Brightness widget -![Brightness widget](./br-wid-1.png) - -This widget represents current brightness level. +This widget represents current brightness level: ![Brightness widget](./br-wid-1.png) ## Installation -Firstly you need to get the current brightness level. There are two options: +First you need to get the current brightness level. There are two options: - using `xbacklight` command (depending on your video card (I guess) it may or may not work) @@ -30,8 +28,32 @@ Firstly you need to get the current brightness level. There are two options: light -G 49.18 ``` + Depending on the chosen option change `GET_BRIGHTNESS_CMD` variable in **brightness.lua**. +Then clone this repo under **~/.config/awesome/**: + +```bash +git clone https://github.com/streetturtle/awesome-wm-widgets.git ~/.config/awesome/ +``` + +Require widget at the beginning of **rc.lua**: + +```lua +local brightness_widget = require("awesome-wm-widgets.brightness-widget.brightness") +``` + +Add widget to the tasklist: + +```lua +s.mytasklist, -- Middle widget + { -- Right widgets + layout = wibox.layout.fixed.horizontal, + ... + brightness_widget, + ... +``` + Then in **rc.lua** add the import on top of the file and then add widget to the wibox: ```lua -- cgit v1.2.3 From e972b55c0c3b18409adec1a6655bbdc4dcddbb53 Mon Sep 17 00:00:00 2001 From: streetturtle Date: Mon, 11 Feb 2019 08:41:46 -0500 Subject: Update README.md --- brightness-widget/README.md | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/brightness-widget/README.md b/brightness-widget/README.md index a2aecf7..5d592b6 100644 --- a/brightness-widget/README.md +++ b/brightness-widget/README.md @@ -54,19 +54,6 @@ s.mytasklist, -- Middle widget ... ``` -Then in **rc.lua** add the import on top of the file and then add widget to the wibox: - -```lua -require("awesome-wm-widgets.brightness-widget.brightness") -... --- Add widgets to the wibox -s.mywibox:setup { -... -{ -- Right widgets -... -brightness_widget -``` - ## Controls In order to change brightness by shortcuts you can add them to the `globalkeys` table in the **rc.lua**: -- cgit v1.2.3 From b1756027ed46ff1232845504a877dde38562f6e2 Mon Sep 17 00:00:00 2001 From: Pavel Makhov Date: Wed, 13 Feb 2019 11:43:57 -0500 Subject: brightnessarc widget --- brightnessarc-widget/README.md | 56 ++++++++++++++++++++++++++++++++ brightnessarc-widget/br-wid-1.png | Bin 0 -> 1355 bytes brightnessarc-widget/brightnessarc.lua | 57 +++++++++++++++++++++++++++++++++ 3 files changed, 113 insertions(+) create mode 100644 brightnessarc-widget/README.md create mode 100644 brightnessarc-widget/br-wid-1.png create mode 100644 brightnessarc-widget/brightnessarc.lua diff --git a/brightnessarc-widget/README.md b/brightnessarc-widget/README.md new file mode 100644 index 0000000..fa123c1 --- /dev/null +++ b/brightnessarc-widget/README.md @@ -0,0 +1,56 @@ +# Brightness widget + +![Brightness widget](./br-wid-1.png) + +This widget represents current brightness level. + +## Installation + +Firstly you need to get the current brightness level. There are two options: + + - using `xbacklight` command (depending on your video card (I guess) it may or may not work) + + To check if it works install xbackligth and check if it works: + + ```bash + sudo apt-get install xbacklight + xbacklight -get + ``` + + If there is no output it means that it doesn't work, but there is a second option: + + - using `light` command + + Install it from this git repo: [github.com/haikarainen/light](https://github.com/haikarainen/light) and check if it works but running + + ```bash + git clone https://github.com/haikarainen/light.git && \ + cd ./light && \ + sudo make && sudo make install \ + light -G + 49.18 + ``` +Depending on the chosen option change `GET_BRIGHTNESS_CMD` variable in **brightness.lua**. + +Then in **rc.lua** add the import on top of the file and then add widget to the wibox: + +```lua +require("awesome-wm-widgets.brightness-widget.brightness") +... +-- Add widgets to the wibox +s.mywibox:setup { +... +{ -- Right widgets +... +brightness_widget +``` + +## Controls + +In order to change brightness by shortcuts you can add them to the `globalkeys` table in the **rc.lua**: + +```lua +awful.key({ modkey }, ";", function () awful.spawn("light -A 5") end, {description = "increase brightness", group = "custom"}), +awful.key({ modkey, "Shift"}, ";", function () awful.spawn("light -U 5") end, {description = "decrease brightness", group = "custom"}), +``` +On laptop you can use `XF86MonBrightnessUp` and `XF86MonBrightnessDown` keys. diff --git a/brightnessarc-widget/br-wid-1.png b/brightnessarc-widget/br-wid-1.png new file mode 100644 index 0000000..f9200eb Binary files /dev/null and b/brightnessarc-widget/br-wid-1.png differ diff --git a/brightnessarc-widget/brightnessarc.lua b/brightnessarc-widget/brightnessarc.lua new file mode 100644 index 0000000..9bd2826 --- /dev/null +++ b/brightnessarc-widget/brightnessarc.lua @@ -0,0 +1,57 @@ +------------------------------------------------- +-- Brightness Widget for Awesome Window Manager +-- Shows the brightness level of the laptop display +-- More details could be found here: +-- https://github.com/streetturtle/awesome-wm-widgets/tree/master/brightness-widget + +-- @author Pavel Makhov +-- @copyright 2017 Pavel Makhov +------------------------------------------------- + +local wibox = require("wibox") +local watch = require("awful.widget.watch") +local spawn = require("awful.spawn") +local naughty = require("naughty") + +local PATH_TO_ICON = "/usr/share/icons/Arc/status/symbolic/display-brightness-symbolic.svg" +local GET_BRIGHTNESS_CMD = "light -G" -- "xbacklight -get" +local INC_BRIGHTNESS_CMD = "light -A 5" -- "xbacklight -inc 5" +local DEC_BRIGHTNESS_CMD = "light -U 5" -- "xbacklight -dec 5" + +local icon = { + id = "icon", + image = PATH_TO_ICON, + resize = true, + widget = wibox.widget.imagebox, +} + +local brightnessarc = wibox.widget { + icon, + max_value = 1, + thickness = 2, + start_angle = 4.71238898, -- 2pi*3/4 + forced_height = 18, + forced_width = 18, + bg = "#ffffff11", + paddings = 2, + widget = wibox.container.arcchart +} + +local brightnessarc_widget = wibox.container.mirror(brightnessarc, { horizontal = true }) + +local update_widget = function(widget, stdout, stderr, exitreason, exitcode) + local brightness_level = string.match(stdout, "(%d?%d?)") + brightness_level = tonumber(string.format("% 3d", brightness_level)) + + widget.value = brightness_level / 100; +end, + +brightnessarc:connect_signal("button::press", function(_,_,_,button) + if (button == 4) then spawn(INC_BRIGHTNESS_CMD, false) + elseif (button == 5) then spawn(DEC_BRIGHTNESS_CMD, false) + end +end) + +watch(GET_BRIGHTNESS_CMD, 1, update_widget, brightnessarc) + +return brightnessarc_widget -- cgit v1.2.3 From f19362afdfc248f96c3513b7be1d6b22bcae75e3 Mon Sep 17 00:00:00 2001 From: Aurélien LAJOIE Date: Wed, 20 Feb 2019 14:24:36 +0100 Subject: [weather] Check if the response is not null before decoding it. With network glitch you can have sometimes empty answer, this was triggering an exception. --- weather-widget/weather.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weather-widget/weather.lua b/weather-widget/weather.lua index 484c2c6..d5f07f8 100644 --- a/weather-widget/weather.lua +++ b/weather-widget/weather.lua @@ -97,7 +97,7 @@ weather_timer:connect_signal("timeout", function () .. secrets.weather_widget_city .. '&appid=' .. secrets.weather_widget_api_key .. '&units=' .. secrets.weather_widget_units) - if (status ~= 200) then + if (status ~= 200 and resp_json ~= nil) then local err_resp = json.decode(resp_json) naughty.notify{ title = 'Weather Widget Error', -- cgit v1.2.3 From 98bcfd09d3dd894fbfb0f5c005aeb3cba67e8a59 Mon Sep 17 00:00:00 2001 From: streetturtle Date: Sun, 24 Feb 2019 08:57:37 -0500 Subject: Update README.md --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 84915bc..5160147 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,8 @@ # Awesome WM widgets - + +![stars](https://img.shields.io/github/stars/streetturtle/awesome-wm-widgets.svg) +![forks](https://img.shields.io/github/forks/streetturtle/awesome-wm-widgets.svg) + Set of super simple widgets compatible with Awesome Window Manager v.4+. ![screenshot](./screenshot.png) -- cgit v1.2.3