diff --git a/_widgets/apt-widget.md b/_widgets/apt-widget.md new file mode 100644 index 0000000..aa07516 --- /dev/null +++ b/_widgets/apt-widget.md @@ -0,0 +1,30 @@ +--- +layout: page +--- +# APT widget + +Widget which shows a list of APT packages to be updated: + +![screenshot](./screenshots/screenshot.gif) + +Features: + - scrollable list !!! (thanks to this [post](https://www.reddit.com/r/awesomewm/comments/isx89x/scrolling_a_layout_fixed_flexed_layout_widget/) of reddit) + - update single package + - update multiple packages + +## Installation + +Clone the repo under ~/.config/awesome/ folder, then in rc.lua add the following: + +```lua +local apt_widget = require("awesome-wm-widgets.apt-widget.apt-widget") + +... +s.mytasklist, -- Middle widget + { -- Right widgets + layout = wibox.layout.fixed.horizontal, + ... + apt_widget(), + ... +``` + diff --git a/_widgets/battery-widget.md b/_widgets/battery-widget.md index 3daf47b..f1f16f7 100644 --- a/_widgets/battery-widget.md +++ b/_widgets/battery-widget.md @@ -8,13 +8,13 @@ Simple and easy-to-install widget for Awesome Window Manager. This widget consists of: - an icon which shows the battery level: - ![Battery Widget](../awesome-wm-widgets/assets/img/screenshots/battery-widget/bat-wid-1.png) + ![Battery Widget](./bat-wid-1.png) - a pop-up window, which shows up when you hover over an icon: - ![Battery Widget](../awesome-wm-widgets/assets/img/screenshots/battery-widget/bat-wid-2.png) + ![Battery Widget](./bat-wid-2.png) Alternatively you can use a tooltip (check the code): - ![Battery Widget](../awesome-wm-widgets/assets/img/screenshots/battery-widget/bat-wid-22.png) + ![Battery Widget](./bat-wid-22.png) - a pop-up warning message which appears on bottom right corner when battery level is less that 15% (you can get the image [here](https://vk.com/images/stickers/1933/512.png)): - ![Battery Widget](../awesome-wm-widgets/assets/img/screenshots/battery-widget/bat-wid-3.png) + ![Battery Widget](./bat-wid-3.png) Note that widget uses the Arc icon theme, so it should be [installed](https://github.com/horst3180/arc-icon-theme#installation) first under **/usr/share/icons/Arc/** folder. diff --git a/_widgets/batteryarc-widget.md b/_widgets/batteryarc-widget.md index d572462..0559b8d 100644 --- a/_widgets/batteryarc-widget.md +++ b/_widgets/batteryarc-widget.md @@ -9,16 +9,16 @@ This widget is more informative version of [battery widget](https://github.com/s Depending of the battery status it could look following ways: - - ![10_d](../awesome-wm-widgets/assets/img/screenshots/batteryarc-widget/10_d.png) - less than 15 percent - - ![10_c](../awesome-wm-widgets/assets/img/screenshots/batteryarc-widget/10_c.png) - less than 15 percent, charging - - ![20_d](../awesome-wm-widgets/assets/img/screenshots/batteryarc-widget/20_d.png) - between 15 and 40 percent - - ![20_c](../awesome-wm-widgets/assets/img/screenshots/batteryarc-widget/20_c.png) - between 15 and 40 percent, charging - - ![80_d](../awesome-wm-widgets/assets/img/screenshots/batteryarc-widget/80_d.png) - more than 40 percent - - ![80_c](../awesome-wm-widgets/assets/img/screenshots/batteryarc-widget/80_c.png) - more than 40 percent, charging + - ![10_d](./10_d.png) - less than 15 percent + - ![10_c](./10_c.png) - less than 15 percent, charging + - ![20_d](./20_d.png) - between 15 and 40 percent + - ![20_c](./20_c.png) - between 15 and 40 percent, charging + - ![80_d](./80_d.png) - more than 40 percent + - ![80_c](./80_c.png) - more than 40 percent, charging If a battery level is low then warning popup will show up: -![warning](../awesome-wm-widgets/assets/img/screenshots/batteryarc-widget/warning.png) +![warning](./warning.png) ## Customization diff --git a/_widgets/bitbucket-widget.md b/_widgets/bitbucket-widget.md index f22f4f3..4127d03 100644 --- a/_widgets/bitbucket-widget.md +++ b/_widgets/bitbucket-widget.md @@ -49,7 +49,7 @@ And test if it works by calling the API: curl -s -n 'https://api.bitbucket.org/2.0/repositories/' ``` -Also to properly setup required parameters you can use `test_bitbucket_api.sh` script - it uses the same curl call as widget. +Also, to properly setup required parameters you can use `test_bitbucket_api.sh` script - it uses the same curl call as widget. Then clone/download repo and use widget in **rc.lua**: diff --git a/_widgets/brightness-widget.md b/_widgets/brightness-widget.md index 4107674..4b100c2 100644 --- a/_widgets/brightness-widget.md +++ b/_widgets/brightness-widget.md @@ -3,7 +3,7 @@ layout: page --- # Brightness widget -This widget represents current brightness level, depending on config parameters could be an arcchart or icon with text: ![Brightness widget](../awesome-wm-widgets/assets/img/screenshots/brightness-widget/br-wid-1.png) +This widget represents current brightness level, depending on config parameters could be an arcchart or icon with text: ![Brightness widget](./br-wid-1.png) ## Customization @@ -12,11 +12,13 @@ It is possible to customize widget by providing a table with all or some of the | Name | Default | Description | |---|---|---| | `type`| `arc` | The widget type. Could be `arc` or `icon_and_text` | -| `program` | `light` | The program used to control the brightness, either 'light' or 'xbacklight'. | +| `program` | `light` | The program used to control the brightness, either `light`, `xbacklight`, or `brightnessctl`. | | `step` | 5 | Step | +| `base` | 20 | Base level to set brightness to on left click. | | `path_to_icon` | `/usr/share/icons/Arc/status/symbolic/display-brightness-symbolic.svg` | Path to the icon | | `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 | _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). @@ -34,7 +36,7 @@ To choose the right `program` argument, first you need to check which of them wo If there is no output it means that it doesn't work, you can either try to fix it, or try to use `light`. - - using `light` command + - using `light` command: Install (on Ubuntu it's available in the apt repository) from the repo: [github.com/haikarainen/light](https://github.com/haikarainen/light) and check if it works by running @@ -45,6 +47,13 @@ To choose the right `program` argument, first you need to check which of them wo ``` If you're on Ubuntu/debian and if the brightness level doesn't change, try to do this: https://github.com/haikarainen/light/issues/113#issuecomment-632638436. + - using `brightnessctl`: + + On Ubuntu it is available in the apt repository. Install and check the ouptut of the following command. + ```bash + brightnessctl --list + ``` + Then clone this repo under **~/.config/awesome/**: ```bash diff --git a/_widgets/brightnessarc-widget.md b/_widgets/brightnessarc-widget.md deleted file mode 100644 index 7997be3..0000000 --- a/_widgets/brightnessarc-widget.md +++ /dev/null @@ -1,100 +0,0 @@ ---- -layout: page ---- -# Brightness widget - -This widget represents current brightness level: ![Brightness widget](../awesome-wm-widgets/assets/img/screenshots/brightnessarc-widget/br-wid-1.png) - -## Customization - -It is possible to customize widget by providing a table with all or some of the following config parameters: - -| Name | Default | Description | -|---|---|---| -| `get_brightness_cmd` | `light -G` | Get current screen brightness | -| `inc_brightness_cmd` | `light -A 5` | Increase brightness | -| `dec_brightness_cmd` | `light -U 5`| Decrease brightness | -| `color` | `beautiful.fg_color` | Color of the arc | -| `bg_color` | `#ffffff11` | Color of the arc's background | -| `path_to_icon` | `/usr/share/icons/Arc/status/symbolic/display-brightness-symbolic.svg` | Path to the icon | -| `timeout` | 1 | How often in seconds the widget refreshes | - -### Example: - -```lua -brightnessarc_widget({ - get_brightness_cmd = 'xbacklight -get', - inc_brightness_cmd = 'xbacklight -inc 5', - dec_brightness_cmd = 'xbacklight -dec 5' - color = '/usr/share/icons/Arc/status/symbolic/brightness-display-symbolic.svg' -}) -``` - - -## Installation - -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) - - 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 - ``` - -Then clone this repo under **~/.config/awesome/**: - -```bash -git clone https://github.com/streetturtle/awesome-wm-widgets.git ~/.config/awesome/awesome-wm-widgets -``` - -Require widget at the beginning of **rc.lua**: - -```lua -local brightnessarc_widget = require("awesome-wm-widgets.brightnessarc-widget.brightnessarc") -``` - -Add widget to the tasklist: - -```lua -s.mytasklist, -- Middle widget - { -- Right widgets - layout = wibox.layout.fixed.horizontal, - ... - -- default - brightnessarc_widget(), - -- or customized - brightnessarc_widget({ - get_brightness_cmd = 'xbacklight -get', - inc_brightness_cmd = 'xbacklight -inc 5', - dec_brightness_cmd = 'xbacklight -dec 5' - }) - } - ... -``` - -## 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/_widgets/calendar-widget.md b/_widgets/calendar-widget.md index d560b74..fc40e85 100644 --- a/_widgets/calendar-widget.md +++ b/_widgets/calendar-widget.md @@ -7,35 +7,65 @@ Calendar widget for Awesome WM - slightly improved version of the `wibox.widget. ## Features - - mouse support: scroll up - shows next month, scroll down - previous + +### Customization + +| Name | Default | Description | +|---|---|---| +| theme | `naughty` | The theme to use | +| placement | `top` | The position of the popup | +| radius | 8 | The popup radius | +| start_sunday | false | Start the week on Sunday | + - themes: - + | Name | Screenshot | |---|---| - | nord (default) | ![nord_theme](../awesome-wm-widgets/assets/img/screenshots/calendar-widget/nord.png) | - | outrun | ![outrun_theme](../awesome-wm-widgets/assets/img/screenshots/calendar-widget/outrun.png) | - | light | ![outrun_theme](../awesome-wm-widgets/assets/img/screenshots/calendar-widget/light.png) | - | dark | ![outrun_theme](../awesome-wm-widgets/assets/img/screenshots/calendar-widget/dark.png) | + | nord | ![nord_theme](./nord.png) | + | outrun | ![outrun_theme](./outrun.png) | + | light | ![outrun_theme](./light.png) | + | dark | ![outrun_theme](./dark.png) | | naughty (default) | from local theme | - + - setup widget placement - + top center - in case you clock is centered: - ![calendar_top](../awesome-wm-widgets/assets/img/screenshots/calendar-widget/calendar_top.png) + ![calendar_top](./calendar_top.png) top right - for default awesome config: - ![calendar_top_right](../awesome-wm-widgets/assets/img/screenshots/calendar-widget/calendar_top_right.png) + ![calendar_top_right](./calendar_top_right.png) bottom right - in case your wibar at the bottom: - ![calendar_bottom_right](../awesome-wm-widgets/assets/img/screenshots/calendar-widget/calendar_bottom_right.png) + ![calendar_bottom_right](./calendar_bottom_right.png) + + - setup first day of week + + By setting `start_sunday` to true: + ![calendar_start_sunday](./calendar_start_sunday.png) + + - mouse support: + move to the next and previous month. Using mouse buttons or scroll wheel. + + You can configure this by specifying the button to move to next/previous. + Usually these are configured as follows. If you want to use other mouse buttons, you can find their number using `xev`. + + | number | button | + |--------|---------------| + | 4 | scroll up | + | 5 | scroll down | + | 1 | left click | + | 2 | right click | + | 3 | middles click | + + By default `previous_month_button` is 5, `next_month_button` is 4. ## How to use -This widget needs an 'anchor' - another widget which triggers visibility of the calendar. Default `mytextclock` is the perfect candidate! +This widget needs an 'anchor' - another widget which triggers visibility of the calendar. Default `mytextclock` is the perfect candidate! Just after mytextclock is instantiated, create the widget and add the mouse listener to it. ```lua @@ -48,10 +78,14 @@ local cw = calendar_widget() -- or customized local cw = calendar_widget({ theme = 'outrun', - placement = 'bottom_right' - radius = 8 + placement = 'bottom_right', + start_sunday = true, + radius = 8, +-- with customized next/previous (see table above) + previous_month_button = 1, + next_month_button = 3, }) -mytextclock:connect_signal("button::press", +mytextclock:connect_signal("button::press", function(_, _, _, button) if button == 1 then cw.toggle() end end) diff --git a/_widgets/cpu-widget.md b/_widgets/cpu-widget.md index 15a5fff..03f2a09 100644 --- a/_widgets/cpu-widget.md +++ b/_widgets/cpu-widget.md @@ -7,7 +7,7 @@ layout: page This widget shows the average CPU load among all cores of the machine: -![screenshot](../awesome-wm-widgets/assets/img/screenshots/cpu-widget/cpu.gif) +![screenshot](./cpu.gif) ## How it works @@ -48,7 +48,7 @@ cpu_widget({ The config above results in the following widget: -![custom](../awesome-wm-widgets/assets/img/screenshots/cpu-widget/custom.png) +![custom](./custom.png) ## Installation diff --git a/_widgets/email-widget.md b/_widgets/email-widget.md index 7ca6961..f38a6bd 100644 --- a/_widgets/email-widget.md +++ b/_widgets/email-widget.md @@ -3,8 +3,8 @@ layout: page --- # Email widget -This widget consists of an icon with counter which shows number of unread emails: ![email icon](../awesome-wm-widgets/assets/img/screenshots/email-widget/em-wid-1.png) -and a popup message which appears when mouse hovers over an icon: ![email popup](../awesome-wm-widgets/assets/img/screenshots/email-widget/em-wid-2.png) +This widget consists of an icon with counter which shows number of unread emails: ![email icon](./em-wid-1.png) +and a popup message which appears when mouse hovers over an icon: ![email popup](./em-wid-2.png) Note that widget uses the Arc icon theme, so it should be [installed](https://github.com/horst3180/arc-icon-theme#installation) first under **/usr/share/icons/Arc/** folder. @@ -17,7 +17,8 @@ To install it put **email.lua** and **email-widget** folder under **~/.config/aw - add widget to awesome: ```lua -require("email") +local email_widget, email_icon = require("email") + ... s.mytasklist, -- Middle widget { -- Right widgets @@ -30,9 +31,9 @@ s.mytasklist, -- Middle widget ## How it works -This widget uses the output of two python scripts, first is called every 20 seconds - it returns number of unread emails and second is called when mouse hovers over an icon and displays content of those emails. For both of them you'll need to provide your credentials and imap server. For testing they can simply be called from console: +This widget uses the output of two python scripts, first is called every 20 seconds - it returns number of unread emails and second is called when mouse hovers over an icon and displays content of those emails. For both of them you'll need to provide your credentials and imap server. For testing, they can simply be called from console: ``` bash python ~/.config/awesome/email/count_unread_emails.py python ~/.config/awesome/email/read_emails.py -``` \ No newline at end of file +``` diff --git a/_widgets/fs-widget.md b/_widgets/fs-widget.md index ebef4aa..c86da01 100644 --- a/_widgets/fs-widget.md +++ b/_widgets/fs-widget.md @@ -3,9 +3,9 @@ layout: page --- # Filesystem Widget -This widget shows file system disk space usage which is based on the `df` output. When clicked another widget appears with more detailed information. By default it monitors the "/" mount. It can be configured with a list of mounts to monitor though only the first will show in the wibar. To have multiple mounts displayed on the wibar simply define multiple `fs_widgets` with different mounts as arguments. +This widget shows file system disk space usage which is based on the `df` output. When clicked another widget appears with more detailed information. By default, it monitors the "/" mount. It can be configured with a list of mounts to monitor though only the first will show in the wibar. To have multiple mounts displayed on the wibar simply define multiple `fs_widgets` with different mounts as arguments. -![](../awesome-wm-widgets/assets/img/screenshots/fs-widget/screenshot.png) +![](./screenshot.png) ## Customizations diff --git a/_widgets/gerrit-widget.md b/_widgets/gerrit-widget.md index a84b662..a1c2aee 100644 --- a/_widgets/gerrit-widget.md +++ b/_widgets/gerrit-widget.md @@ -5,17 +5,17 @@ layout: page It shows number of currently assigned reviews in [Gerrit](https://www.gerritcodereview.com/) to the user (by default) : - ![gerrit_widget](../awesome-wm-widgets/assets/img/screenshots/gerrit-widget/gerrit_widget.png) + ![gerrit_widget](./gerrit_widget.png) when clicked it shows reviews in a list: - ![popup](../awesome-wm-widgets/assets/img/screenshots/gerrit-widget/popup.png) + ![popup](./popup.png) left click on an item will open review in the default browser, right click will copy the review number, which you can use to checkout this review by running `git-review -d `. Also, if a new review is assigned to the user, there will be a pop-up: - ![new_review](../awesome-wm-widgets/assets/img/screenshots/gerrit-widget/new_review.png) + ![new_review](./new_review.png) ## Customization diff --git a/_widgets/github-contributions-widget.md b/_widgets/github-contributions-widget.md index 43de9cf..d8dfe48 100644 --- a/_widgets/github-contributions-widget.md +++ b/_widgets/github-contributions-widget.md @@ -5,11 +5,11 @@ layout: page The widget is inspired by the https://github-contributions.now.sh/ and relies on it's API. -It shows the contribution graph, similar to the one on the github profile page: ![screenshot](../awesome-wm-widgets/assets/img/screenshots/github-contributions-widget/screenshot.jpg) +It shows the contribution graph, similar to the one on the github profile page: ![screenshot](./screenshots/screenshot.jpg) You might wonder what could be the reason to have your github's contributions in front of you all day long? The more you contribute, the nicer widget looks! Check out [Thomashighbaugh](https://github.com/Thomashighbaugh)'s graph: -![](../awesome-wm-widgets/assets/img/screenshots/github-contributions-widget/Thomashighbaugh.png) +![](./screenshots/Thomashighbaugh.png) ## Customization @@ -32,22 +32,22 @@ Following themes are available: | Theme name | Preview | |---|---| -| standard | ![standard](../awesome-wm-widgets/assets/img/screenshots/github-contributions-widget/standard.png) | -| classic | ![classic](../awesome-wm-widgets/assets/img/screenshots/github-contributions-widget/classic.png) | -| teal | ![teal](../awesome-wm-widgets/assets/img/screenshots/github-contributions-widget/teal.png) | -| leftpad | ![leftpad](../awesome-wm-widgets/assets/img/screenshots/github-contributions-widget/leftpad.png) | -| dracula | ![dracula](../awesome-wm-widgets/assets/img/screenshots/github-contributions-widget/dracula.png) | -| pink | ![pink](../awesome-wm-widgets/assets/img/screenshots/github-contributions-widget/pink.png) | +| standard | ![standard](./screenshots/standard.png) | +| classic | ![classic](./screenshots/classic.png) | +| teal | ![teal](./screenshots/teal.png) | +| leftpad | ![leftpad](./screenshots/leftpad.png) | +| dracula | ![dracula](./screenshots/dracula.png) | +| pink | ![pink](./screenshots/pink.png) | To add a new theme, simply add a new entry in `themes` table (themes.lua) with the colors of your theme. ### Screenshots 1000 days, with border: -![screenshot1](../awesome-wm-widgets/assets/img/screenshots/github-contributions-widget/screenshot1.jpg) +![screenshot1](./screenshots/screenshot1.jpg) 365 days, no border: -![screenshot2](../awesome-wm-widgets/assets/img/screenshots/github-contributions-widget/screenshot2.jpg) +![screenshot2](./screenshots/screenshot2.jpg) ## Installation diff --git a/_widgets/github-prs-widget.md b/_widgets/github-prs-widget.md new file mode 100644 index 0000000..e43fbab --- /dev/null +++ b/_widgets/github-prs-widget.md @@ -0,0 +1,46 @@ +--- +layout: page +--- +# GitHub PRs Widget + +

+ GitHub issues by-label +

+ +The widget shows the number of pull requests assigned to the user and when clicked shows additional information, such as + - author's name and avatar (opens user profile page when clicked); + - PR name (opens MR when clicked); + - name of the repository; + - when was created; + - number of comments; + +

+ +

+ +## Customization + +It is possible to customize widget by providing a table with all or some of the following config parameters: + +| Name | Default | Description | +|---|---|---| +| `reviewer` | Required | github user login | + +## Installation + +Install and setup [GitHub CLI](https://cli.github.com/) +Clone/download repo and use widget in **rc.lua**: + +```lua +local github_prs_widget = require("awesome-wm-widgets.github-prs-widget") +... +s.mytasklist, -- Middle widget +{ -- Right widgets + layout = wibox.layout.fixed.horizontal, + ... + github_prs_widget { + reviewer = 'streetturtle' + }, +} +... +``` diff --git a/_widgets/gitlab-widget.md b/_widgets/gitlab-widget.md index 0d52392..c0cd29c 100644 --- a/_widgets/gitlab-widget.md +++ b/_widgets/gitlab-widget.md @@ -15,7 +15,7 @@ The widget shows the number of merge requests assigned to the user and when clic - number of comments; - number of approvals. -![screenshot](../awesome-wm-widgets/assets/img/screenshots/gitlab-widget/screenshot.png) +![screenshot](./screenshot.png) ## Customization @@ -24,7 +24,7 @@ It is possible to customize widget by providing a table with all or some of the | Name | Default | Description | |---|---|---| | `icon` | `./icons/gitlab-icon.svg` | Path to the icon | -| `host` | Required | e.g _https://gitlab.yourcomapny.com_ | +| `host` | Required | e.g _https://gitlab.yourcompany.com_ | | `access_token` | Required | e.g _h2v531iYASDz6McxYk4A_ | | `timeout` | 60 | How often in seconds the widget should be refreshed | diff --git a/_widgets/jira-widget.md b/_widgets/jira-widget.md index 575504f..91de0ba 100644 --- a/_widgets/jira-widget.md +++ b/_widgets/jira-widget.md @@ -28,7 +28,7 @@ It is possible to customize widget by providing a table with all or some of the ## Installation -Create a .netrc file in you home directory with following content: +Create a .netrc file in your home directory with following content: ```bash machine turtlejira.com diff --git a/_widgets/logout-menu-widget.md b/_widgets/logout-menu-widget.md index f644573..845ce58 100644 --- a/_widgets/logout-menu-widget.md +++ b/_widgets/logout-menu-widget.md @@ -5,7 +5,7 @@ layout: page This widget shows a menu with options to log out from the current session, lock, reboot, suspend and power off the computer, similar to [logout-popup-widget](https://github.com/streetturtle/awesome-wm-widgets/tree/master/logout-popup-widget): -![demo](../awesome-wm-widgets/assets/img/screenshots/logout-menu-widget/logout-menu.gif) +![demo](./logout-menu.gif) ## Installation diff --git a/_widgets/logout-popup-widget.md b/_widgets/logout-popup-widget.md index 6a1c029..ef2751b 100644 --- a/_widgets/logout-popup-widget.md +++ b/_widgets/logout-popup-widget.md @@ -3,10 +3,10 @@ layout: page --- # Logout Popup Widget -Widget which allows to perform lock, reboot, log out, power off and sleep actions. It can be called either by a shortcut, or by clicking on a widget in wibar. +Widget which allows performing lock, reboot, log out, power off and sleep actions. It can be called either by a shortcut, or by clicking on a widget in wibar.

- screenshot + screenshot

When the widget is shown, following shortcuts can be used: @@ -61,6 +61,7 @@ Then | `bg_color` | `beautiful.bg_normal` | The color the background of the | | `accent_color` | `beautiful.bg_focus` | The color of the buttons | | `text_color` | `beautiful.fg_normal` | The color of text | +| `label_color` | `beautiful.fg_normal` | The color of the button's label | | `phrases` | `{'Goodbye!'}` | The table with phrase(s) to show, if more than one provided, the phrase is chosen randomly. Leave empty (`{}`) to hide the phrase | | `onlogout` | `function() awesome.quit() end` | Function which is called when the logout button is pressed | | `onlock` | `function() awful.spawn.with_shell("systemctl suspend") end` | Function which is called when the lock button is pressed | @@ -70,10 +71,10 @@ Then Some color themes for inspiration: -![nord](../awesome-wm-widgets/assets/img/screenshots/logout-popup-widget/logout-nord.png) -![outrun](../awesome-wm-widgets/assets/img/screenshots/logout-popup-widget/logout-outrun.png) -![dark](../awesome-wm-widgets/assets/img/screenshots/logout-popup-widget/logout-dark.png) -![dracula](../awesome-wm-widgets/assets/img/screenshots/logout-popup-widget/logout-dracula.png) +![nord](./logout-nord.png) +![outrun](./logout-outrun.png) +![dark](./logout-dark.png) +![dracula](./logout-dracula.png) ```lua logout.launch{ diff --git a/_widgets/logout-widget.md b/_widgets/logout-widget.md deleted file mode 100644 index 95b9e74..0000000 --- a/_widgets/logout-widget.md +++ /dev/null @@ -1,86 +0,0 @@ ---- -layout: page ---- -# Logout widget - -Widget which allows to perform lock, reboot, log out, power off and sleep actions. It can be called either by a shortcut, or by clicking on a widget in wibar. - -

- screenshot -

- -When the widget is shown, following shortcuts can be used: - - Escape - hide widget - - s - shutdown - - r - reboot - - u - suspend - - k - lock - - l - log out - -# Installation - -Clone this (if not cloned yet) and the [awesome-buttons](https://github.com/streetturtle/awesome-buttons) repos under **./.config/awesome/** - -```bash -cd ./.config/awesome/ -git clone https://github.com/streetturtle/awesome-wm-widgets -git clone https://github.com/streetturtle/awesome-buttons -``` -Then - -- to show by a shortcut - define a shortcut in `globalkeys`: - - ```lua - local logout = require("awesome-wm-widgets.experiments.logout-widget.logout") - ... - globalkeys = gears.table.join( - ... - awful.key({ modkey }, "l", function() logout.launch() end, {description = "Show logout screen", group = "custom"}), - ``` - -- to show by clicking on a widget in wibar - add widget to the wibar: - - ```lua - local logout = require("awesome-wm-widgets.logout-widget.logout") - - s.mytasklist, -- Middle widget - { -- Right widgets - layout = wibox.layout.fixed.horizontal, - ... - logout.widget{}, - ... - ``` - -# Customisation - -| Name | Default | Description | -|---|---|---| -| `icon` | `power.svg` | If used as widget - the path to the widget's icon | -| `icon_size` | `40` | Size of the icon | -| `icon_margin` | `16` | Margin around the icon | -| `bg_color` | `beautiful.bg_normal` | The color the background of the | -| `accent_color` | `beautiful.bg_focus` | The color of the buttons | -| `text_color` | `beautiful.fg_normal` | The color of text | -| `phrases` | `{'Goodbye!'}` | The table with phrase(s) to show, if more than one provided, the phrase is chosen randomly. Leave empty (`{}`) to hide the phrase | -| `onlogout` | `function() awesome.quit() end` | Function which is called when the logout button is pressed | -| `onlock` | `function() awful.spawn.with_shell("systemctl suspend") end` | Function which is called when the lock button is pressed | -| `onreboot` | `function() awful.spawn.with_shell("reboot") end` | Function which is called when the reboot button is pressed | -| `onsuspend` | `function() awful.spawn.with_shell("systemctl suspend") end` | Function which is called when the suspend button is pressed | -| `onpoweroff` | `function() awful.spawn.with_shell("shutdown now") end` | Function which is called when the poweroff button is pressed | - -Some color themes for inspiration: - -![nord](../awesome-wm-widgets/assets/img/screenshots/logout-widget/logout-nord.png) -![outrun](../awesome-wm-widgets/assets/img/screenshots/logout-widget/logout-outrun.png) -![dark](../awesome-wm-widgets/assets/img/screenshots/logout-widget/logout-dark.png) -![dracula](../awesome-wm-widgets/assets/img/screenshots/logout-widget/logout-dracula.png) - -```lua -logout.launch{ - bg_color = "#261447", accent_color = "#ff4365", text_color = '#f706cf', icon_size = 40, icon_margin = 16, -- outrun - -- bg_color = "#0b0c10", accent_color = "#1f2833", text_color = '#66fce1', -- dark - -- bg_color = "#3B4252", accent_color = "#88C0D0", text_color = '#D8DEE9', -- nord - -- bg_color = "#282a36", accent_color = "#ff79c6", phrases = {}, -- dracula, no phrase - phrases = {"exit(0)", "Don't forget to be awesome.", "Yippee ki yay!"}, -} -``` diff --git a/_widgets/mpris-widget.md b/_widgets/mpris-widget.md index e820b07..1504338 100644 --- a/_widgets/mpris-widget.md +++ b/_widgets/mpris-widget.md @@ -24,6 +24,6 @@ s.mytasklist, -- Middle widget { -- Right widgets layout = wibox.layout.fixed.horizontal, ... - mpris_widget, + mpris_widget(), ... ``` diff --git a/_widgets/net-speed-widget.md b/_widgets/net-speed-widget.md index 91daea0..fcdb211 100644 --- a/_widgets/net-speed-widget.md +++ b/_widgets/net-speed-widget.md @@ -3,4 +3,23 @@ layout: page --- # Net Speed Widget -The widget and readme is in progress \ No newline at end of file +The widget and readme is in progress + +## Installation + +Please refer to the [installation](https://github.com/streetturtle/awesome-wm-widgets#installation) section of the repo. + +Clone repo, include widget and use it in **rc.lua**: + +```lua +local net_speed_widget = require("awesome-wm-widgets.net-speed-widget.net-speed") +... +s.mytasklist, -- Middle widget + { -- Right widgets + layout = wibox.layout.fixed.horizontal, + ... + net_speed_widget(), + ... + } + ... +``` diff --git a/_widgets/ram-widget.md b/_widgets/ram-widget.md index 129882c..8049419 100644 --- a/_widgets/ram-widget.md +++ b/_widgets/ram-widget.md @@ -5,7 +5,9 @@ layout: page This widget shows the RAM usage. When clicked another widget appears with more detailed information: -![screenshot](../awesome-wm-widgets/assets/img/screenshots/ram-widget/out.gif) +![screenshot](./out.gif) + +Note: this widget is compatible with Awesome v4.3+, as it is using [awful.popup](https://awesomewm.org/doc/api/classes/awful.popup.html) ## Customization @@ -21,4 +23,20 @@ It is possible to customize widget by providing a table with all or some of the ## Installation -Please refer to the [installation](https://github.com/streetturtle/awesome-wm-widgets#installation) section of the repo. \ No newline at end of file +Please refer to the [installation](https://github.com/streetturtle/awesome-wm-widgets#installation) section of the repo. + +Clone repo, include widget and use it in **rc.lua**: + +```lua +local ram_widget = require("awesome-wm-widgets.ram-widget.ram-widget") +... +s.mytasklist, -- Middle widget + { -- Right widgets + layout = wibox.layout.fixed.horizontal, + ... + ram_widget(), + ... + } + ... +``` + diff --git a/_widgets/spotify-widget.md b/_widgets/spotify-widget.md index 543e10c..f42f789 100644 --- a/_widgets/spotify-widget.md +++ b/_widgets/spotify-widget.md @@ -3,7 +3,7 @@ layout: page --- # Spotify widget -This widget displays currently playing song on [Spotify for Linux](https://www.spotify.com/download/linux/) client: ![screenshot](../awesome-wm-widgets/assets/img/screenshots/spotify-widget/spo-wid-1.png) +This widget displays currently playing song on [Spotify for Linux](https://www.spotify.com/download/linux/) client: ![screenshot](./spo-wid-1.png) Some features: @@ -56,10 +56,10 @@ spotify_widget({ Gives following widget Playing: -![screenshot](../awesome-wm-widgets/assets/img/screenshots/spotify-widget/spotify-widget-custom-playing.png) +![screenshot](./spotify-widget-custom-playing.png) Paused: -![screenshot](../awesome-wm-widgets/assets/img/screenshots/spotify-widget/spotify-widget-custom-paused.png) +![screenshot](./spotify-widget-custom-paused.png) ## Installation diff --git a/_widgets/stackoverflow-widget.md b/_widgets/stackoverflow-widget.md index cab6d99..2190ead 100644 --- a/_widgets/stackoverflow-widget.md +++ b/_widgets/stackoverflow-widget.md @@ -5,7 +5,7 @@ layout: page When clicked, widget shows latest questions from stackoverflow.com with a given tag(s). -![screenshot](../awesome-wm-widgets/assets/img/screenshots/stackoverflow-widget/screenshot.png) +![screenshot](./screenshot.png) ## Customization diff --git a/_widgets/todo-widget.md b/_widgets/todo-widget.md index 1d69a80..8c884c2 100644 --- a/_widgets/todo-widget.md +++ b/_widgets/todo-widget.md @@ -3,9 +3,9 @@ layout: page --- # ToDo Widget -This widget displays a list of to do items and allows to mark item as done/undone, delete an item and create new ones: +This widget displays a list of todo items and allows marking item as done/undone, delete an item and create new ones: -![screenshot](../awesome-wm-widgets/assets/img/screenshots/todo-widget/todo.gif) +![screenshot](./todo.gif) # Installation @@ -28,4 +28,4 @@ Also note that widget uses [Arc Icons](https://github.com/horst3180/arc-icon-the # Theming -Widget uses your theme's colors. In case you want to have different colors, without changing your theme, please create an issue for it. I'll extract them as a widget parameters. +Widget uses your theme's colors. In case you want to have different colors, without changing your theme, please create an issue for it. I'll extract them as widget parameters. diff --git a/_widgets/volume-widget.md b/_widgets/volume-widget.md index b90f1d6..9ef0578 100644 --- a/_widgets/volume-widget.md +++ b/_widgets/volume-widget.md @@ -12,9 +12,11 @@ From left to right: `horizontal_bar`, `vertical_bar`, `icon`, `icon_and_text`, ` A right-click on the widget opens a popup where you can choose a sink/source: ![sink-sources](screenshots/volume-sink-sources.png) +Left click toggles mute and middle click opens a mixer ([pavucontrol](https://freedesktop.org/software/pulseaudio/pavucontrol/) by default). + ### Features - - switch between sinks/sources by right clicking on the widget; + - switch between sinks/sources by right click on the widget; - more responsive than previous versions of volume widget, which were refreshed once a second; - 5 predefined customizable looks; @@ -33,17 +35,19 @@ s.mytasklist, -- Middle widget volume_widget(), -- customized volume_widget{ - type = 'arc' + widget_type = 'arc' }, ``` +Note that widget uses following command the get the current volume: `amixer -D pulse sget Master`, so please make sure that it works for you, otherwise you need to set parameter `device = 'default'`. + ### Shortcuts To improve responsiveness of the widget when volume level is changed by a shortcut use corresponding methods of the widget: ```lua -awful.key({ modkey }, "]", function() volume_widget:inc() end), -awful.key({ modkey }, "[", function() volume_widget:dec() end), +awful.key({ modkey }, "]", function() volume_widget:inc(5) end), +awful.key({ modkey }, "[", function() volume_widget:dec(5) end), awful.key({ modkey }, "\\", function() volume_widget:toggle() end), ``` @@ -55,9 +59,12 @@ It is possible to customize the widget by providing a table with all or some of | Name | Default | Description | |---|---|---| -| `type`| `icon_and_text`| Widget type, one of `horizontal_bar`, `vertical_bar`, `icon`, `icon_and_text`, `arc` | +| `mixer_cmd` | `pavucontrol` | command to run on middle click (e.g. a mixer program) | +| `step` | `5` | How much the volume is raised or lowered at once (in %) | +| `widget_type`| `icon_and_text`| Widget type, one of `horizontal_bar`, `vertical_bar`, `icon`, `icon_and_text`, `arc` | +| `device` | `pulse` | Select the device name to control | -Depending on the chosen widget type add parameters from the corresponding section below: +Depends on the chosen widget type add parameters from the corresponding section below: #### `icon` parameters diff --git a/_widgets/volumearc-widget.md b/_widgets/volumearc-widget.md deleted file mode 100644 index 20038be..0000000 --- a/_widgets/volumearc-widget.md +++ /dev/null @@ -1,72 +0,0 @@ ---- -layout: page ---- -# Volumearc widget - -Almost the same as [volumebar widget](https://github.com/streetturtle/awesome-wm-widgets/tree/master/volumebar-widget), but using [arcchart](https://awesomewm.org/doc/api/classes/wibox.container.arcchart.html): - -![screenshot](../awesome-wm-widgets/assets/img/screenshots/volumearc-widget/out.gif) - -Supports - - scroll up - increase volume, - - scroll down - decrease volume, - - left click - mute/unmute. - -## Customization - -It is possible to customize widget by providing a table with all or some of the following config parameters: - -| Name | Default | Description | -|---|---|---| -| `main_color` | `beautiful.fg_normal` | Color of the arc | -| `bg_color` | `#ffffff11` | Color of the arc's background | -| `mute_color` | `beautiful.fg_urgent` | Color of the arc when mute | -| `path_to_icon` | /usr/share/icons/Arc/status/symbolic/audio-volume-muted-symbolic.svg | Path to the icon | -| `thickness` | 2 | The arc thickness | -| `height` | `beautiful.fg_normal` | Widget height | -| `timeout` | 1 | How often in seconds the widget refreshes | -| `get_volume_cmd` | `amixer -D pulse sget Master` | Get current volume level | -| `inc_volume_cmd` | `amixer -D pulse sset Master 5%+` | Increase volume level | -| `dec_volume_cmd` | `amixer -D pulse sset Master 5%-` | Decrease volume level | -| `tog_volume_cmd` | `amixer -D pulse sset Master toggle` | Mute / unmute | -| `button_press` | `function(_, _, _, button) end` | Overwrite the 'button\_press' signal for this widget | - -### Example: - -```lua -volumearc_widget({ - main_color = '#af13f7', - mute_color = '#ff0000', - thickness = 5, - height = 25, - button_press = function(_, _, _, button) -- Overwrites the button press behaviour to open pavucontrol when clicked - if (button == 1) then awful.spawn('pavucontrol --tab=3', false) - end - end -}) -``` - -The config above results in the following widget: - -![custom](../awesome-wm-widgets/assets/img/screenshots/volumearc-widget/custom.png) - -## Installation - -1. Clone this repo under **~/.config/awesome/** - - ```bash - git clone https://github.com/streetturtle/awesome-wm-widgets.git ~/.config/awesome/awesome-wm-widgets - ``` - -1. Require volumearc widget at the beginning of **rc.lua**: - -```lua -local volumearc_widget = require("awesome-wm-widgets.volumearc-widget.volumearc") -... -s.mytasklist, -- Middle widget - { -- Right widgets - layout = wibox.layout.fixed.horizontal, - ... - volumearc_widget(), - ... -``` diff --git a/_widgets/volumebar-widget.md b/_widgets/volumebar-widget.md deleted file mode 100644 index cda9ada..0000000 --- a/_widgets/volumebar-widget.md +++ /dev/null @@ -1,88 +0,0 @@ ---- -layout: page ---- -# Volumebar widget - -Almost the same as volume widget, but more minimalistic: - -![screenshot](../awesome-wm-widgets/assets/img/screenshots/volumebar-widget/out.gif) - -Supports - - scroll up - increase volume, - - scroll down - decrease volume, - - left click - mute/unmute. - -## Customization - -It is possible to customize widget by providing a table with all or some of the following config parameters: - -| Name | Default | Description | -|---|---|---| -| `main_color` | `beautiful.fg_normal` | Color of the bar | -| `bg_color` | `#ffffff11` | Color of the bar's background | -| `mute_color` | `beautiful.fg_urgent` | Color of the bar when mute | -| `width` | 50 | The bar width | -| `shape` | `bar` | [gears.shape](https://awesomewm.org/doc/api/libraries/gears.shape.html), could be `octogon`, `hexagon`, `powerline`, etc | -| `margins` | `10` | Top and bottom margin (if your wibar is 22 px high, bar will be 2 px (22 - 2*10)) | -| `timeout` | 1 | How often in seconds the widget refreshes | -| `get_volume_cmd` | `amixer -D pulse sget Master` | Get current volume level | -| `inc_volume_cmd` | `amixer -D pulse sset Master 5%+` | Increase volume level | -| `dec_volume_cmd` | `amixer -D pulse sset Master 5%-` | Decrease volume level | -| `tog_volume_cmd` | `amixer -D pulse sset Master toggle` | Mute / unmute | - -### Example: - - ```lua - volumebar_widget({ - main_color = '#af13f7', - mute_color = '#ff0000', - width = 80, - shape = 'rounded_bar', - margins = 8 -}) - ``` - -Above config results in following widget: - -![custom](../awesome-wm-widgets/assets/img/screenshots/volumebar-widget/custom.png) - - -## Installation - -1. Clone this repo under **~/.config/awesome/** - - ```bash - git clone https://github.com/streetturtle/awesome-wm-widgets.git ~/.config/awesome/ - ``` - -1. Require volumebar widget at the beginning of **rc.lua**: - - ```lua - local volumebar_widget = require("awesome-wm-widgets.volumebar-widget.volumebar") - ``` - -1. Add widget to the tasklist: - - ```lua - s.mytasklist, -- Middle widget - { -- Right widgets - layout = wibox.layout.fixed.horizontal, - ... - --[[default]] - volumebar_widget(), - --[[or customized]] - volumebar_widget({ - main_color = '#af13f7', - mute_color = '#ff0000', - width = 80, - shape = 'rounded_bar', -- octogon, hexagon, powerline, etc - -- bar's height = wibar's height minus 2x margins - margins = 8 - }), - - ... - ``` - -## Troubleshooting - -If the bar is not showing up, try to decrease top or bottom margin - widget uses hardcoded margins for vertical alignment, so if your wibox is too small then bar is simply hidden by the margins. diff --git a/_widgets/weather-widget.md b/_widgets/weather-widget.md index b57f90b..ff24f07 100644 --- a/_widgets/weather-widget.md +++ b/_widgets/weather-widget.md @@ -11,7 +11,7 @@ layout: page

-The widget showing current, hourly and daily weather forecast. +The widget showing current, hourly and daily weather forecast:

screenshot @@ -53,7 +53,7 @@ To add your custom icons, create a folder with the pack name under `/icons` and #### Custom font, icons -![example1](../awesome-wm-widgets/assets/img/screenshots/weather-widget/example1.png) +![example1](./example1.png) ```lua weather_curl_widget({ @@ -72,7 +72,7 @@ weather_curl_widget({ #### Only current weather -![example2](../awesome-wm-widgets/assets/img/screenshots/weather-widget/example2.png) +![example2](./example2.png) ```lua weather_curl_widget({ @@ -136,11 +136,11 @@ weather_curl_widget({ Only negative temperature: -![negative](../awesome-wm-widgets/assets/img/screenshots/weather-widget/negative.png) +![negative](./negative.png) Both positive and negative tempertature: -![both](../awesome-wm-widgets/assets/img/screenshots/weather-widget/both.png) +![both](./both.png) ## How it works diff --git a/_widgets/word-clock-widget.md b/_widgets/word-clock-widget.md index 8d35185..3736a7b 100644 --- a/_widgets/word-clock-widget.md +++ b/_widgets/word-clock-widget.md @@ -5,7 +5,7 @@ layout: page Widget displaying current time using words: -![screenshot](../awesome-wm-widgets/assets/img/screenshots/word-clock-widget/halfpastthree.png) +![screenshot](./screenshots/halfpastthree.png) ## Customization @@ -45,7 +45,7 @@ s.mytasklist, -- Middle widget is_human_readable = true, } ``` -![](../awesome-wm-widgets/assets/img/screenshots/word-clock-widget/halfpastthree_color.png) +![](./screenshots/halfpastthree_color.png) ```lua @@ -54,7 +54,7 @@ word_clock{ is_human_readable = true, } ``` -![](../awesome-wm-widgets/assets/img/screenshots/word-clock-widget/twentythreepastnine.png) +![](./screenshots/twentythreepastnine.png) ```lua @@ -64,7 +64,7 @@ word_clock{ military_time = true } ``` -![](../awesome-wm-widgets/assets/img/screenshots/word-clock-widget/twentythreepasttwentyone.png) +![](./screenshots/twentythreepasttwentyone.png) ```lua @@ -74,4 +74,4 @@ word_clock{ main_color = '#0f0', } ``` -![](../awesome-wm-widgets/assets/img/screenshots/word-clock-widget/onetwentyseven.png) +![](./screenshots/onetwentyseven.png)