diff options
-rw-r--r-- | CODEOWNERS | 1 | ||||
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | apt-widget/apt-widget.lua | 2 | ||||
-rw-r--r-- | brightness-widget/README.md | 1 | ||||
-rw-r--r-- | brightness-widget/brightness.lua | 7 |
5 files changed, 10 insertions, 3 deletions
diff --git a/CODEOWNERS b/CODEOWNERS new file mode 100644 index 0000000..0661fff --- /dev/null +++ b/CODEOWNERS @@ -0,0 +1 @@ +* @streetturtle @@ -46,7 +46,7 @@ Clone the repo under **~/.config/awesome/**, then follow an Installation section In case of any doubts/questions/problems: - create an [issue](https://github.com/streetturtle/awesome-wm-widgets/issues/new/choose) - raise a question on [Discussions](https://github.com/streetturtle/awesome-wm-widgets/discussions)! - - ping me on AwesomeWM's discord, here's an [invite](https://discord.gg/XYvn8R5) + - ping me on AwesomeWM's discord, here's an [invite](https://discord.gg/BPat4F87dg) # Support diff --git a/apt-widget/apt-widget.lua b/apt-widget/apt-widget.lua index 61aa3b5..c15c32f 100644 --- a/apt-widget/apt-widget.lua +++ b/apt-widget/apt-widget.lua @@ -19,7 +19,7 @@ local HOME_DIR = os.getenv("HOME") local WIDGET_DIR = HOME_DIR .. '/.config/awesome/awesome-wm-widgets/apt-widget' local ICONS_DIR = WIDGET_DIR .. '/icons/' -local LIST_PACKAGES = [[sh -c "apt list --upgradable 2>/dev/null"]] +local LIST_PACKAGES = [[sh -c "LC_ALL=c apt list --upgradable 2>/dev/null"]] --- Utility function to show warning messages local function show_warning(message) diff --git a/brightness-widget/README.md b/brightness-widget/README.md index cbf5b7e..156d109 100644 --- a/brightness-widget/README.md +++ b/brightness-widget/README.md @@ -16,6 +16,7 @@ It is possible to customize widget by providing a table with all or some of the | `font` | `Play 9` | Font | | `timeout` | 1 | How often in seconds the widget refreshes. Check the note below | | `tooltip` | false | Display brightness level in a tooltip when the mouse cursor hovers the widget | +| `percentage` | false | Display a '%' character after the brightness level | _Note:_ If brightness is controlled only by the widget (either by a mouse, or by a shortcut, then the `timeout` could be quite big, as there is no reason to synchronize the brightness level). diff --git a/brightness-widget/brightness.lua b/brightness-widget/brightness.lua index 306cc2b..b0d98cf 100644 --- a/brightness-widget/brightness.lua +++ b/brightness-widget/brightness.lua @@ -43,6 +43,7 @@ local function worker(user_args) local base = args.base or 20 local current_level = 0 -- current brightness value local tooltip = args.tooltip or false + local percentage = args.percentage or false if program == 'light' then get_brightness_cmd = 'light -G' set_brightness_cmd = 'light -S %d' -- <level> @@ -82,7 +83,11 @@ local function worker(user_args) spacing = 4, layout = wibox.layout.fixed.horizontal, set_value = function(self, level) - self:get_children_by_id('txt')[1]:set_text(level .. '%') + local display_level = level + if percentage then + display_level = display_level .. '%' + end + self:get_children_by_id('txt')[1]:set_text(display_level) end } elseif type == 'arc' then |