typo fixes plus bitbucket widget

This commit is contained in:
streetturtle 2020-02-02 13:53:06 -05:00
parent e60ee46bb3
commit 98253c319a
8 changed files with 132 additions and 14 deletions

View File

@ -7,17 +7,34 @@ Simple and easy-to-install widget for Awesome Window Manager.
This widget consists of:
- an icon which shows the battery level:
- an icon which shows the battery level:
![Battery Widget](../awesome-wm-widgets/assets/img/screenshots/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)
Alternatively you can use a tooltip (check the code):
- 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)
Alternatively you can use a tooltip (check the code):
![Battery Widget](../awesome-wm-widgets/assets/img/screenshots/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](../awesome-wm-widgets/assets/img/screenshots/battery-widgetttps://vk.com/images/stickers/1933/512.png)):
![Battery Widget](../awesome-wm-widgets/assets/img/screenshots/battery-widget/bat-wid-3.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](../awesome-wm-widgets/assets/img/screenshots/battery-widgetttps://vk.com/images/stickers/1933/512.png)):
![Battery Widget](../awesome-wm-widgets/assets/img/screenshots/battery-widget/bat-wid-3.png)
Note that widget uses the Arc icon theme, so it should be [installed](../awesome-wm-widgets/assets/img/screenshots/battery-widgetttps://github.com/horst3180/arc-icon-theme#installation) first under **/usr/share/icons/Arc/** folder.
## Customization
It is possible to customize widget by providing a table with all or some of the following config parameters:
| Name | Default | Description |
|---|---|---|
| `font` | Font | Play 8 |
| `show_current_level`| false | Show current charge level |
| `margin_right`|0| the right margin of the widget|
| `margin_left`|0| the left margin of the widget|
| `notification` | `false` | Display a notification on mouseover |
| `notification_position` | `top_right` | The notification position |
| `warning_msg_title` | _Huston, we have a problem_ | Title of the warning popup |
| `warning_msg_text` | _Battery is dying_ | Text of the warning popup |
| `warning_msg_position` | `bottom_right` | Position of the warning popup |
| `warning_msg_icon` | ~/.config/awesome/awesome-wm-widgets/batteryarc-widget/spaceman.jpg | Icon of the warning popup |
## Installation
This widget reads the output of acpi tool.
@ -29,4 +46,14 @@ $ acpi
Battery 0: Discharging, 66%, 02:34:06 remaining
```
Then refer to the [installation](../awesome-wm-widgets/assets/img/screenshots/battery-widgetttps://github.com/streetturtle/awesome-wm-widgets#installation) section of the repo.
```lua
local battery_widget = require("awesome-wm-widgets.battery-widget.battery")
...
s.mytasklist, -- Middle widget
{ -- Right widgets
layout = wibox.layout.fixed.horizontal,
...
battery_widget(),
...
```

View File

@ -30,7 +30,7 @@ It is possible to customize widget by providing a table with all or some of the
| `main_color` | `beautiful.fg_color` | Color of the text with the current charge level and the arc |
| `low_level_color` | #e53935 | Arc color when battery charge is less that 15% |
| `medium_level_color` | #c0ca33 | Arc color when battery charge is between 15% and 40% |
| `charging` | `beautiful.fg_color` | Color of the circle inside the arc when charging |
| `charging` | `#43a047` | Color of the circle inside the arc when charging |
| `warning_msg_title` | _Huston, we have a problem_ | Title of the warning popup |
| `warning_msg_text` | _Battery is dying_ | Text of the warning popup |
| `warning_msg_position` | `bottom_right` | Position of the warning popup |

View File

@ -0,0 +1,67 @@
---
layout: page
---
# Bitbucket widget
The widget shows the number of pull requests assigned to the user and when clicked shows them in the list with some additional information. When item in the list is clicked - it opens the pull request in the browser.
## How it works
Widget uses cURL to query Bitbucket's [REST API](../awesome-wm-widgets/assets/img/screenshots/bitbucket-widgetttps://developer.atlassian.com/bitbucket/api/2/reference/). In order to be authenticated, widget uses a [netrc](../awesome-wm-widgets/assets/img/screenshots/bitbucket-widgetttps://ec.haxx.se/usingcurl/usingcurl-netrc) feature of the cURL, which is basically to store basic auth credentials in a .netrc file in home folder.
Bitbucket allows using App Passwords (available in the account settings) - simply generate one for the widget and use it as password in .netrc file.
## Customization
It is possible to customize widget by providing a table with all or some of the following config parameters:
| Name | Default | Description |
|---|---|---|
| `icon` | `~/.config/awesome/awesome-wm-widgets/bitbucket-widget/bitbucket-icon-gradient-blue.svg` | Path to the icon |
| `host` | Required | Ex: _http://api.bitbucket.org_ |
| `account_id` | Required | Account ID |
| `workspace` | Required | Workspace ID|
| `repo_slug` | Required | Repository slug |
## Installation
Create a .netrc file in you home directory with following content:
```bash
machine api.bitbucket.org
login mikey@tmnt.com
password cowabunga
```
Then change file's permissions to 600 (so only you can read/write it):
```bash
chmod 600 ~/.netrc
```
And test if it works by calling the API:
```bash
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.
Then clone/download repo and use widget in **rc.lua**:
```lua
local bitbucket_widget = require("awesome-wm-widgets.bitbucket-widget.bitbucket")
...
s.mytasklist, -- Middle widget
{ -- Right widgets
layout = wibox.layout.fixed.horizontal,
...
-- default
bitbucket_widget({
host = 'https://api.bitbucket.org',
account_id = 'your-account-id',
workspace = 'workspace',
repo_slug = 'slug'
}}),
...
```

View File

@ -14,6 +14,8 @@ Calendar widget for Awesome WM - slightly improved version of the `wibox.widget.
|---|---|
|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) |
- setup widget placement
@ -32,18 +34,18 @@ Calendar widget for Awesome WM - slightly improved version of the `wibox.widget.
## 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
local calendar_widget = require("awesome-wm-widgets.calendar-widget.calendar")
-- ...
-- {{{ Wibar
-- Create a textclock widget
mytextclock = wibox.widget.textclock()
-- default
cw = calendar_widget()
local cw = calendar_widget()
-- or customized
cw = calendar_widget({
local cw = calendar_widget({
theme = 'outrun',
placement = 'bottom_right'
})

View File

@ -3,11 +3,13 @@ layout: page
---
# Jira widget
The widget shows the number of assigned tickets to the user and when clicked shows them in the list with some additional information. When item in the list is clicked - it opens the issue in browser
The widget shows the number of tickets assigned to the user and when clicked shows them in the list with some additional information. When item in the list is clicked - it opens the issue in browser.
## How it works
Widget users cURL to query JIRA's REST API. In order to be authenticated, widget uses netrc feature of the cURL, which is basically to store basic auth credentials in a .netrc file in home folder.
Widget uses cURL to query Jira's [REST API](../awesome-wm-widgets/assets/img/screenshots/jira-widgetttps://developer.atlassian.com/server/jira/platform/rest-apis/). In order to be authenticated, widget uses a [netrc](../awesome-wm-widgets/assets/img/screenshots/jira-widgetttps://ec.haxx.se/usingcurl/usingcurl-netrc) feature of the cURL, which is basically to store basic auth credentials in a .netrc file in home folder.
If you are on Atlassian Cloud, then instead of providing a password in netrc file you can set an [API token](../awesome-wm-widgets/assets/img/screenshots/jira-widgetttps://confluence.atlassian.com/cloud/api-tokens-938839638.html) which is a safer option, as you can revoke/change the token at any time.
## Customization
@ -21,6 +23,25 @@ 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:
```bash
machine turtlejira.com
login mikey@tmnt.com
password cowabunga
```
Then change file's permissions to 600 (so only you can read/write it):
```bash
chmod 600 ~/.netrc
```
And test if it works by calling the API:
```bash
curl -s -n 'https://turtleninja.com/rest/api/2/search?jql=assignee=currentuser()+AND+resolution=Unresolved'
```
Clone/download repo and use widget in **rc.lua**:
```lua

View File

@ -0,0 +1 @@
<svg id="Logos" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="80" height="80" viewBox="0 0 80 80"><defs><style>.cls-1{fill:none;}.cls-2{fill:#2684ff;}.cls-3{fill:url(#New_Gradient_Swatch_1);}</style><linearGradient id="New_Gradient_Swatch_1" x1="71.61" y1="36.15" x2="41.78" y2="59.43" gradientUnits="userSpaceOnUse"><stop offset="0.18" stop-color="#0052cc"/><stop offset="1" stop-color="#2684ff"/></linearGradient></defs><title>bitbucket-icon-gradient-blue</title><polygon class="cls-1" points="33.81 48.88 46.36 48.88 49.39 31.2 30.47 31.2 33.81 48.88"/><path class="cls-2" d="M12,13.06a1.92,1.92,0,0,0-1.9,2.23l8.14,49.56A2.62,2.62,0,0,0,20.78,67H60a1.93,1.93,0,0,0,1.9-1.62L70,15.3a1.92,1.92,0,0,0-1.9-2.23ZM46.36,48.88H33.81L30.47,31.2H49.39Z"/><path class="cls-3" d="M67.44,31.2h-18l-3,17.68H33.81L19.1,66.4a2.61,2.61,0,0,0,1.68.63H60a1.93,1.93,0,0,0,1.9-1.62Z"/></svg>

After

Width:  |  Height:  |  Size: 914 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB