awesome+Alacritty changes; rm awesome ext package tracking
- `awesome/binding/clientkeys.lua`: - added cyclefocus (Mod + Tab to cycle through clients of same type) - `awesome/binding/globalkeys.lua`: - i shrimply removed things i'm not using - `awesome/deco/statusbar.lua`: - completely remove keyboard layout widget - re-enable systray - NOTE: i might replace this with something else later. or not, as there's an MR to fix the transparency issues. dunno what i'll be doing for sure - `awesome/main/menu.lua`: - change the 'quit' option in the 'awesome' menu to be accessible under another nested menu, to stop me from quitting accidentally when aiming for restart and having my hand twitch (this has happened multiple times now!) - other standard adding and adjusting of other software that shows up in the menus - `awesome/main/rules.lua`: - remove rules i don't need - add rule for steam to force it to float since it plays like shit with tiled WMs or other weirder desktop setups - add rule for pokemon infinite fusion to force it to float since i just don't like the idea of games being effected by tiling usually - NOTE: i might change this to something that bars its resolution from being messed with instead; dunno if that's a thing i can do - `awesome/main/startup.lua`: - get rid of autostart entry for `redshift` as it does not work right - _technically,_ it **does** work, but the problem is that it re-applies itself whenever i restart awesome if it's in the autostart no matter what i try doing. i think there's no solution for this so i'm trying other non-awesome-related things - get rid of unused include - `awesome/main/user-variables.lua`: - literally just removed comments i didn't need - `alacritty/alacritty.yml`: - added scrolling settings
|
@ -128,6 +128,7 @@ $RECYCLE.BIN/
|
|||
# Icon must end with two \r
|
||||
Icon
|
||||
|
||||
|
||||
# Thumbnails
|
||||
._*
|
||||
|
||||
|
@ -147,3 +148,6 @@ Network Trash Folder
|
|||
Temporary Items
|
||||
.apdisk
|
||||
|
||||
# awesome widgets/modules/etc that should not be included
|
||||
awesome/awesome-wm-widgets/
|
||||
awesome/cyclefocus/
|
|
@ -61,25 +61,9 @@ window:
|
|||
# auto pick-up. Set this to `None` to use the default theme variant.
|
||||
#decorations_theme_variant: None
|
||||
|
||||
# Resize increments
|
||||
#
|
||||
# Prefer resizing window by discrete steps equal to cell dimensions.
|
||||
#resize_increments: false
|
||||
|
||||
#scrolling:
|
||||
# Maximum number of lines in the scrollback buffer.
|
||||
# Specifying '0' will disable scrolling.
|
||||
#history: 10000
|
||||
|
||||
# Scrolling distance multiplier.
|
||||
#multiplier: 3
|
||||
|
||||
# Transparent cell backgrounds
|
||||
#
|
||||
# Whether or not `window.opacity` applies to all cell backgrounds or only to
|
||||
# the default background. When set to `true` all cells will be transparent
|
||||
# regardless of their background color.
|
||||
#transparent_background_colors: false
|
||||
scrolling:
|
||||
history: 150
|
||||
transparent_background_colors: true
|
||||
|
||||
# Bell
|
||||
#
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
# awesome config
|
||||
## Deps
|
||||
- picom
|
||||
- [Fira Code](https://github.com/tonsky/FiraCode)
|
||||
- pactl (fc38 `pulseaudio-utils`)
|
||||
- [Fira Code](https://github.com/tonsky/FiraCode) *(technically optional, but the `spacestation` theme uses it)*
|
||||
- pactl [fc38 `pulseaudio-utils`] (for `volume_widget`)
|
||||
## Credits
|
||||
### Widgets/modules/etc I use
|
||||
- `volume_widget` comes from [streetturtle's widgets](https://github.com/streetturtle/awesome-wm-widgets) (MIT)
|
||||
_You'll need to download these yourself if you're taking bits from my dotfiles_
|
||||
- `volume_widget` comes from [awesome-wm-widgets by streetturtle](https://github.com/streetturtle/awesome-wm-widgets) (MIT)
|
||||
- `cyclefocus` comes from [awesome-cyclefocus by blueyed](https://github.com/blueyed/awesome-cyclefocus) (GPL 2.0)
|
||||
### Other people's dotfiles I took from
|
||||
- Modularization is from [epsi-rns' awesome dotfiles](https://gitlab.com/epsi-rns/dotfiles) (MIT)
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
self = false
|
||||
|
||||
globals = {
|
||||
"screen",
|
||||
"mouse",
|
||||
"root",
|
||||
"client"
|
||||
}
|
||||
|
||||
read_globals = {
|
||||
"awesome",
|
||||
"button",
|
||||
"dbus",
|
||||
"drawable",
|
||||
"drawin",
|
||||
"key",
|
||||
"keygrabber",
|
||||
"mousegrabber",
|
||||
"selection",
|
||||
"tag",
|
||||
"window",
|
||||
"table.unpack",
|
||||
"math.atan2",
|
||||
}
|
|
@ -1,89 +0,0 @@
|
|||
# Calendar Widget
|
||||
|
||||
Calendar widget for Awesome WM - slightly improved version of the `wibox.widget.calendar`.
|
||||
|
||||
## Features
|
||||
|
||||
|
||||
### 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 | ![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](./calendar_top.png)
|
||||
|
||||
top right - for default awesome config:
|
||||
|
||||
![calendar_top_right](./calendar_top_right.png)
|
||||
|
||||
bottom right - in case your wibar at the bottom:
|
||||
|
||||
![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!
|
||||
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")
|
||||
-- ...
|
||||
-- Create a textclock widget
|
||||
mytextclock = wibox.widget.textclock()
|
||||
-- default
|
||||
local cw = calendar_widget()
|
||||
-- or customized
|
||||
local cw = calendar_widget({
|
||||
theme = 'outrun',
|
||||
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",
|
||||
function(_, _, _, button)
|
||||
if button == 1 then cw.toggle() end
|
||||
end)
|
||||
```
|
|
@ -1,258 +0,0 @@
|
|||
-------------------------------------------------
|
||||
-- Calendar Widget for Awesome Window Manager
|
||||
-- Shows the current month and supports scroll up/down to switch month
|
||||
-- More details could be found here:
|
||||
-- https://github.com/streetturtle/awesome-wm-widgets/tree/master/calendar-widget
|
||||
|
||||
-- @author Pavel Makhov
|
||||
-- @copyright 2019 Pavel Makhov
|
||||
-------------------------------------------------
|
||||
|
||||
local awful = require("awful")
|
||||
local beautiful = require("beautiful")
|
||||
local wibox = require("wibox")
|
||||
local gears = require("gears")
|
||||
local naughty = require("naughty")
|
||||
|
||||
local calendar_widget = {}
|
||||
|
||||
local function worker(user_args)
|
||||
|
||||
local calendar_themes = {
|
||||
nord = {
|
||||
bg = '#2E3440',
|
||||
fg = '#D8DEE9',
|
||||
focus_date_bg = '#88C0D0',
|
||||
focus_date_fg = '#000000',
|
||||
weekend_day_bg = '#3B4252',
|
||||
weekday_fg = '#88C0D0',
|
||||
header_fg = '#E5E9F0',
|
||||
border = '#4C566A'
|
||||
},
|
||||
outrun = {
|
||||
bg = '#0d0221',
|
||||
fg = '#D8DEE9',
|
||||
focus_date_bg = '#650d89',
|
||||
focus_date_fg = '#2de6e2',
|
||||
weekend_day_bg = '#261447',
|
||||
weekday_fg = '#2de6e2',
|
||||
header_fg = '#f6019d',
|
||||
border = '#261447'
|
||||
},
|
||||
dark = {
|
||||
bg = '#000000',
|
||||
fg = '#ffffff',
|
||||
focus_date_bg = '#ffffff',
|
||||
focus_date_fg = '#000000',
|
||||
weekend_day_bg = '#444444',
|
||||
weekday_fg = '#ffffff',
|
||||
header_fg = '#ffffff',
|
||||
border = '#333333'
|
||||
},
|
||||
light = {
|
||||
bg = '#ffffff',
|
||||
fg = '#000000',
|
||||
focus_date_bg = '#000000',
|
||||
focus_date_fg = '#ffffff',
|
||||
weekend_day_bg = '#AAAAAA',
|
||||
weekday_fg = '#000000',
|
||||
header_fg = '#000000',
|
||||
border = '#CCCCCC'
|
||||
},
|
||||
monokai = {
|
||||
bg = '#272822',
|
||||
fg = '#F8F8F2',
|
||||
focus_date_bg = '#AE81FF',
|
||||
focus_date_fg = '#ffffff',
|
||||
weekend_day_bg = '#75715E',
|
||||
weekday_fg = '#FD971F',
|
||||
header_fg = '#F92672',
|
||||
border = '#75715E'
|
||||
},
|
||||
naughty = {
|
||||
bg = beautiful.notification_bg or beautiful.bg,
|
||||
fg = beautiful.notification_fg or beautiful.fg,
|
||||
focus_date_bg = beautiful.notification_fg or beautiful.fg,
|
||||
focus_date_fg = beautiful.notification_bg or beautiful.bg,
|
||||
weekend_day_bg = beautiful.bg_focus,
|
||||
weekday_fg = beautiful.fg,
|
||||
header_fg = beautiful.fg,
|
||||
border = beautiful.border_normal
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
local args = user_args or {}
|
||||
|
||||
if args.theme ~= nil and calendar_themes[args.theme] == nil then
|
||||
naughty.notify({
|
||||
preset = naughty.config.presets.critical,
|
||||
title = 'Calendar Widget',
|
||||
text = 'Theme "' .. args.theme .. '" not found, fallback to default'})
|
||||
args.theme = 'naughty'
|
||||
end
|
||||
|
||||
local theme = args.theme or 'naughty'
|
||||
local placement = args.placement or 'top'
|
||||
local radius = args.radius or 8
|
||||
local next_month_button = args.next_month_button or 4
|
||||
local previous_month_button = args.previous_month_button or 5
|
||||
local start_sunday = args.start_sunday or false
|
||||
|
||||
local styles = {}
|
||||
local function rounded_shape(size)
|
||||
return function(cr, width, height)
|
||||
gears.shape.rounded_rect(cr, width, height, size)
|
||||
end
|
||||
end
|
||||
|
||||
styles.month = {
|
||||
padding = 4,
|
||||
bg_color = calendar_themes[theme].bg,
|
||||
border_width = 0,
|
||||
}
|
||||
|
||||
styles.normal = {
|
||||
markup = function(t) return t end,
|
||||
shape = rounded_shape(4)
|
||||
}
|
||||
|
||||
styles.focus = {
|
||||
fg_color = calendar_themes[theme].focus_date_fg,
|
||||
bg_color = calendar_themes[theme].focus_date_bg,
|
||||
markup = function(t) return '<b>' .. t .. '</b>' end,
|
||||
shape = rounded_shape(4)
|
||||
}
|
||||
|
||||
styles.header = {
|
||||
fg_color = calendar_themes[theme].header_fg,
|
||||
bg_color = calendar_themes[theme].bg,
|
||||
markup = function(t) return '<b>' .. t .. '</b>' end
|
||||
}
|
||||
|
||||
styles.weekday = {
|
||||
fg_color = calendar_themes[theme].weekday_fg,
|
||||
bg_color = calendar_themes[theme].bg,
|
||||
markup = function(t) return '<b>' .. t .. '</b>' end,
|
||||
}
|
||||
|
||||
local function decorate_cell(widget, flag, date)
|
||||
if flag == 'monthheader' and not styles.monthheader then
|
||||
flag = 'header'
|
||||
end
|
||||
|
||||
-- highlight only today's day
|
||||
if flag == 'focus' then
|
||||
local today = os.date('*t')
|
||||
if not (today.month == date.month and today.year == date.year) then
|
||||
flag = 'normal'
|
||||
end
|
||||
end
|
||||
|
||||
local props = styles[flag] or {}
|
||||
if props.markup and widget.get_text and widget.set_markup then
|
||||
widget:set_markup(props.markup(widget:get_text()))
|
||||
end
|
||||
-- Change bg color for weekends
|
||||
local d = { year = date.year, month = (date.month or 1), day = (date.day or 1) }
|
||||
local weekday = tonumber(os.date('%w', os.time(d)))
|
||||
local default_bg = (weekday == 0 or weekday == 6)
|
||||
and calendar_themes[theme].weekend_day_bg
|
||||
or calendar_themes[theme].bg
|
||||
local ret = wibox.widget {
|
||||
{
|
||||
{
|
||||
widget,
|
||||
halign = 'center',
|
||||
widget = wibox.container.place
|
||||
},
|
||||
margins = (props.padding or 2) + (props.border_width or 0),
|
||||
widget = wibox.container.margin
|
||||
},
|
||||
shape = props.shape,
|
||||
shape_border_color = props.border_color or '#000000',
|
||||
shape_border_width = props.border_width or 0,
|
||||
fg = props.fg_color or calendar_themes[theme].fg,
|
||||
bg = props.bg_color or default_bg,
|
||||
widget = wibox.container.background
|
||||
}
|
||||
|
||||
return ret
|
||||
end
|
||||
|
||||
local cal = wibox.widget {
|
||||
date = os.date('*t'),
|
||||
font = beautiful.get_font(),
|
||||
fn_embed = decorate_cell,
|
||||
long_weekdays = true,
|
||||
start_sunday = start_sunday,
|
||||
widget = wibox.widget.calendar.month
|
||||
}
|
||||
|
||||
local popup = awful.popup {
|
||||
ontop = true,
|
||||
visible = false,
|
||||
shape = rounded_shape(radius),
|
||||
offset = { y = 5 },
|
||||
border_width = 1,
|
||||
border_color = calendar_themes[theme].border,
|
||||
widget = cal
|
||||
}
|
||||
|
||||
popup:buttons(
|
||||
awful.util.table.join(
|
||||
awful.button({}, next_month_button, function()
|
||||
local a = cal:get_date()
|
||||
a.month = a.month + 1
|
||||
cal:set_date(nil)
|
||||
cal:set_date(a)
|
||||
popup:set_widget(cal)
|
||||
end),
|
||||
awful.button({}, previous_month_button, function()
|
||||
local a = cal:get_date()
|
||||
a.month = a.month - 1
|
||||
cal:set_date(nil)
|
||||
cal:set_date(a)
|
||||
popup:set_widget(cal)
|
||||
end)
|
||||
)
|
||||
)
|
||||
|
||||
function calendar_widget.toggle()
|
||||
|
||||
if popup.visible then
|
||||
-- to faster render the calendar refresh it and just hide
|
||||
cal:set_date(nil) -- the new date is not set without removing the old one
|
||||
cal:set_date(os.date('*t'))
|
||||
popup:set_widget(nil) -- just in case
|
||||
popup:set_widget(cal)
|
||||
popup.visible = not popup.visible
|
||||
else
|
||||
if placement == 'top' then
|
||||
awful.placement.top(popup, { margins = { top = 30 }, parent = awful.screen.focused() })
|
||||
elseif placement == 'top_right' then
|
||||
awful.placement.top_right(popup, { margins = { top = 30, right = 10}, parent = awful.screen.focused() })
|
||||
elseif placement == 'top_left' then
|
||||
awful.placement.top_left(popup, { margins = { top = 30, left = 10}, parent = awful.screen.focused() })
|
||||
elseif placement == 'bottom_right' then
|
||||
awful.placement.bottom_right(popup, { margins = { bottom = 30, right = 10},
|
||||
parent = awful.screen.focused() })
|
||||
elseif placement == 'bottom_left' then
|
||||
awful.placement.bottom_left(popup, { margins = { bottom = 30, left = 10},
|
||||
parent = awful.screen.focused() })
|
||||
else
|
||||
awful.placement.top(popup, { margins = { top = 30 }, parent = awful.screen.focused() })
|
||||
end
|
||||
|
||||
popup.visible = true
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
return calendar_widget
|
||||
|
||||
end
|
||||
|
||||
return setmetatable(calendar_widget, { __call = function(_, ...)
|
||||
return worker(...)
|
||||
end })
|
Before Width: | Height: | Size: 82 KiB |
Before Width: | Height: | Size: 8.2 KiB |
Before Width: | Height: | Size: 64 KiB |
Before Width: | Height: | Size: 130 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 9.6 KiB |
|
@ -1,71 +0,0 @@
|
|||
# CPU widget
|
||||
|
||||
[![GitHub issues by-label](https://img.shields.io/github/issues-raw/streetturtle/awesome-wm-widgets/cpu)](https://github.com/streetturtle/awesome-wm-widgets/labels/cpu)
|
||||
|
||||
This widget shows the average CPU load among all cores of the machine:
|
||||
|
||||
![screenshot](./cpu.gif)
|
||||
|
||||
## How it works
|
||||
|
||||
To measure the load I took Paul Colby's bash [script](http://colby.id.au/calculating-cpu-usage-from-proc-stat/) and rewrote it in Lua, which was quite simple.
|
||||
So awesome simply reads the first line of /proc/stat:
|
||||
|
||||
```bash
|
||||
$ cat /proc/stat | grep '^cpu '
|
||||
cpu 197294 718 50102 2002182 3844 0 2724 0 0 0
|
||||
```
|
||||
|
||||
and calculates the percentage.
|
||||
|
||||
## Customization
|
||||
|
||||
It is possible to customize widget by providing a table with all or some of the following config parameters:
|
||||
|
||||
| Name | Default | Description |
|
||||
|---|---|---|
|
||||
| `width` | 50 | Width of the widget |
|
||||
| `step_width` | 2 | Width of the step |
|
||||
| `step_spacing` | 1 | Space size between steps |
|
||||
| `color` | `beautiful.fg_normal` | Color of the graph |
|
||||
| `enable_kill_button` | `false` | Show button which kills the process |
|
||||
| `process_info_max_length` | `-1` | Truncate the process information. Some processes may have a very long list of parameters which won't fit in the screen, this options allows to truncate it to the given length. |
|
||||
| `timeout` | 1 | How often in seconds the widget refreshes |
|
||||
|
||||
### Example
|
||||
|
||||
```lua
|
||||
cpu_widget({
|
||||
width = 70,
|
||||
step_width = 2,
|
||||
step_spacing = 0,
|
||||
color = '#434c5e'
|
||||
})
|
||||
```
|
||||
|
||||
The config above results in the following widget:
|
||||
|
||||
![custom](./custom.png)
|
||||
|
||||
## Installation
|
||||
|
||||
Clone/download repo and use widget in **rc.lua**:
|
||||
|
||||
```lua
|
||||
local cpu_widget = require("awesome-wm-widgets.cpu-widget.cpu-widget")
|
||||
...
|
||||
s.mytasklist, -- Middle widget
|
||||
{ -- Right widgets
|
||||
layout = wibox.layout.fixed.horizontal,
|
||||
...
|
||||
-- default
|
||||
cpu_widget(),
|
||||
-- or custom
|
||||
cpu_widget({
|
||||
width = 70,
|
||||
step_width = 2,
|
||||
step_spacing = 0,
|
||||
color = '#434c5e'
|
||||
})
|
||||
...
|
||||
```
|
|
@ -1,339 +0,0 @@
|
|||
-------------------------------------------------
|
||||
-- CPU Widget for Awesome Window Manager
|
||||
-- Shows the current CPU utilization
|
||||
-- More details could be found here:
|
||||
-- https://github.com/streetturtle/awesome-wm-widgets/tree/master/cpu-widget
|
||||
|
||||
-- @author Pavel Makhov
|
||||
-- @copyright 2020 Pavel Makhov
|
||||
-------------------------------------------------
|
||||
|
||||
local awful = require("awful")
|
||||
local watch = require("awful.widget.watch")
|
||||
local wibox = require("wibox")
|
||||
local beautiful = require("beautiful")
|
||||
local gears = require("gears")
|
||||
|
||||
local CMD = [[sh -c "grep '^cpu.' /proc/stat; ps -eo '%p|%c|%C|' -o "%mem" -o '|%a' --sort=-%cpu ]]
|
||||
.. [[| head -11 | tail -n +2"]]
|
||||
|
||||
-- A smaller command, less resource intensive, used when popup is not shown.
|
||||
local CMD_slim = [[grep --max-count=1 '^cpu.' /proc/stat]]
|
||||
|
||||
local HOME_DIR = os.getenv("HOME")
|
||||
local WIDGET_DIR = HOME_DIR .. '/.config/awesome/awesome-wm-widgets/cpu-widget'
|
||||
|
||||
local cpu_widget = {}
|
||||
local cpu_rows = {
|
||||
spacing = 4,
|
||||
layout = wibox.layout.fixed.vertical,
|
||||
}
|
||||
local is_update = true
|
||||
local process_rows = {
|
||||
layout = wibox.layout.fixed.vertical,
|
||||
}
|
||||
|
||||
-- Splits the string by separator
|
||||
-- @return table with separated substrings
|
||||
local function split(string_to_split, separator)
|
||||
if separator == nil then separator = "%s" end
|
||||
local t = {}
|
||||
|
||||
for str in string.gmatch(string_to_split, "([^".. separator .."]+)") do
|
||||
table.insert(t, str)
|
||||
end
|
||||
|
||||
return t
|
||||
end
|
||||
|
||||
-- Checks if a string starts with a another string
|
||||
local function starts_with(str, start)
|
||||
return str:sub(1, #start) == start
|
||||
end
|
||||
|
||||
|
||||
local function create_textbox(args)
|
||||
return wibox.widget{
|
||||
text = args.text,
|
||||
align = args.align or 'left',
|
||||
markup = args.markup,
|
||||
forced_width = args.forced_width or 40,
|
||||
widget = wibox.widget.textbox
|
||||
}
|
||||
end
|
||||
|
||||
local function create_process_header(params)
|
||||
local res = wibox.widget{
|
||||
create_textbox{markup = '<b>PID</b>'},
|
||||
create_textbox{markup = '<b>Name</b>'},
|
||||
{
|
||||
create_textbox{markup = '<b>%CPU</b>'},
|
||||
create_textbox{markup = '<b>%MEM</b>'},
|
||||
params.with_action_column and create_textbox{forced_width = 20} or nil,
|
||||
layout = wibox.layout.align.horizontal
|
||||
},
|
||||
layout = wibox.layout.ratio.horizontal
|
||||
}
|
||||
res:ajust_ratio(2, 0.2, 0.47, 0.33)
|
||||
|
||||
return res
|
||||
end
|
||||
|
||||
local function create_kill_process_button()
|
||||
return wibox.widget{
|
||||
{
|
||||
id = "icon",
|
||||
image = WIDGET_DIR .. '/window-close-symbolic.svg',
|
||||
resize = false,
|
||||
opacity = 0.1,
|
||||
widget = wibox.widget.imagebox
|
||||
},
|
||||
widget = wibox.container.background
|
||||
}
|
||||
end
|
||||
|
||||
local function worker(user_args)
|
||||
|
||||
local args = user_args or {}
|
||||
|
||||
local width = args.width or 50
|
||||
local step_width = args.step_width or 2
|
||||
local step_spacing = args.step_spacing or 1
|
||||
local color = args.color or beautiful.fg_normal
|
||||
local background_color = args.background_color or "#00000000"
|
||||
local enable_kill_button = args.enable_kill_button or false
|
||||
local process_info_max_length = args.process_info_max_length or -1
|
||||
local timeout = args.timeout or 1
|
||||
|
||||
local cpugraph_widget = wibox.widget {
|
||||
max_value = 100,
|
||||
background_color = background_color,
|
||||
forced_width = width,
|
||||
step_width = step_width,
|
||||
step_spacing = step_spacing,
|
||||
widget = wibox.widget.graph,
|
||||
color = "linear:0,0:0,20:0,#FF0000:0.3,#FFFF00:0.6," .. color
|
||||
}
|
||||
|
||||
-- This timer periodically executes the heavy command while the popup is open.
|
||||
-- It is stopped when the popup is closed and only the slim command is run then.
|
||||
-- This greatly improves performance while the popup is closed at the small cost
|
||||
-- of a slightly longer popup opening time.
|
||||
local popup_timer = gears.timer {
|
||||
timeout = timeout
|
||||
}
|
||||
|
||||
local popup = awful.popup{
|
||||
ontop = true,
|
||||
visible = false,
|
||||
shape = gears.shape.rounded_rect,
|
||||
border_width = 1,
|
||||
border_color = beautiful.bg_normal,
|
||||
maximum_width = 300,
|
||||
offset = { y = 5 },
|
||||
widget = {}
|
||||
}
|
||||
|
||||
-- Do not update process rows when mouse cursor is over the widget
|
||||
popup:connect_signal("mouse::enter", function() is_update = false end)
|
||||
popup:connect_signal("mouse::leave", function() is_update = true end)
|
||||
|
||||
cpugraph_widget:buttons(
|
||||
awful.util.table.join(
|
||||
awful.button({}, 1, function()
|
||||
if popup.visible then
|
||||
popup.visible = not popup.visible
|
||||
-- When the popup is not visible, stop the timer
|
||||
popup_timer:stop()
|
||||
else
|
||||
popup:move_next_to(mouse.current_widget_geometry)
|
||||
-- Restart the timer, when the popup becomes visible
|
||||
-- Emit the signal to start the timer directly and not wait the timeout first
|
||||
popup_timer:start()
|
||||
popup_timer:emit_signal("timeout")
|
||||
end
|
||||
end)
|
||||
)
|
||||
)
|
||||
|
||||
--- By default graph widget goes from left to right, so we mirror it and push up a bit
|
||||
cpu_widget = wibox.widget {
|
||||
{
|
||||
cpugraph_widget,
|
||||
reflection = {horizontal = true},
|
||||
layout = wibox.container.mirror
|
||||
},
|
||||
bottom = 2,
|
||||
color = background_color,
|
||||
widget = wibox.container.margin
|
||||
}
|
||||
|
||||
-- This part runs constantly, also when the popup is closed.
|
||||
-- It updates the graph widget in the bar.
|
||||
local maincpu = {}
|
||||
watch(CMD_slim, timeout, function(widget, stdout)
|
||||
|
||||
local _, user, nice, system, idle, iowait, irq, softirq, steal, _, _ =
|
||||
stdout:match('(%w+)%s+(%d+)%s(%d+)%s(%d+)%s(%d+)%s(%d+)%s(%d+)%s(%d+)%s(%d+)%s(%d+)%s(%d+)')
|
||||
|
||||
local total = user + nice + system + idle + iowait + irq + softirq + steal
|
||||
|
||||
local diff_idle = idle - tonumber(maincpu['idle_prev'] == nil and 0 or maincpu['idle_prev'])
|
||||
local diff_total = total - tonumber(maincpu['total_prev'] == nil and 0 or maincpu['total_prev'])
|
||||
local diff_usage = (1000 * (diff_total - diff_idle) / diff_total + 5) / 10
|
||||
|
||||
maincpu['total_prev'] = total
|
||||
maincpu['idle_prev'] = idle
|
||||
|
||||
widget:add_value(diff_usage)
|
||||
end,
|
||||
cpugraph_widget
|
||||
)
|
||||
|
||||
-- This part runs whenever the timer is fired.
|
||||
-- It therefore only runs when the popup is open.
|
||||
local cpus = {}
|
||||
popup_timer:connect_signal('timeout', function()
|
||||
awful.spawn.easy_async(CMD, function(stdout, _, _, _)
|
||||
local i = 1
|
||||
local j = 1
|
||||
for line in stdout:gmatch("[^\r\n]+") do
|
||||
if starts_with(line, 'cpu') then
|
||||
|
||||
if cpus[i] == nil then cpus[i] = {} end
|
||||
|
||||
local name, user, nice, system, idle, iowait, irq, softirq, steal, _, _ =
|
||||
line:match('(%w+)%s+(%d+)%s(%d+)%s(%d+)%s(%d+)%s(%d+)%s(%d+)%s(%d+)%s(%d+)%s(%d+)%s(%d+)')
|
||||
|
||||
local total = user + nice + system + idle + iowait + irq + softirq + steal
|
||||
|
||||
local diff_idle = idle - tonumber(cpus[i]['idle_prev'] == nil and 0 or cpus[i]['idle_prev'])
|
||||
local diff_total = total - tonumber(cpus[i]['total_prev'] == nil and 0 or cpus[i]['total_prev'])
|
||||
local diff_usage = (1000 * (diff_total - diff_idle) / diff_total + 5) / 10
|
||||
|
||||
cpus[i]['total_prev'] = total
|
||||
cpus[i]['idle_prev'] = idle
|
||||
|
||||
local row = wibox.widget
|
||||
{
|
||||
create_textbox{text = name},
|
||||
create_textbox{text = math.floor(diff_usage) .. '%'},
|
||||
{
|
||||
max_value = 100,
|
||||
value = diff_usage,
|
||||
forced_height = 20,
|
||||
forced_width = 150,
|
||||
paddings = 1,
|
||||
margins = 4,
|
||||
border_width = 1,
|
||||
border_color = beautiful.bg_focus,
|
||||
background_color = beautiful.bg_normal,
|
||||
bar_border_width = 1,
|
||||
bar_border_color = beautiful.bg_focus,
|
||||
color = "linear:150,0:0,0:0,#D08770:0.3,#BF616A:0.6," .. beautiful.fg_normal,
|
||||
widget = wibox.widget.progressbar,
|
||||
|
||||
},
|
||||
layout = wibox.layout.ratio.horizontal
|
||||
}
|
||||
row:ajust_ratio(2, 0.15, 0.15, 0.7)
|
||||
cpu_rows[i] = row
|
||||
i = i + 1
|
||||
else
|
||||
if is_update == true then
|
||||
|
||||
local columns = split(line, '|')
|
||||
|
||||
local pid = columns[1]
|
||||
local comm = columns[2]
|
||||
local cpu = columns[3]
|
||||
local mem = columns[4]
|
||||
local cmd = columns[5]
|
||||
|
||||
local kill_proccess_button = enable_kill_button and create_kill_process_button() or nil
|
||||
|
||||
local pid_name_rest = wibox.widget{
|
||||
create_textbox{text = pid},
|
||||
create_textbox{text = comm},
|
||||
{
|
||||
create_textbox{text = cpu, align = 'center'},
|
||||
create_textbox{text = mem, align = 'center'},
|
||||
kill_proccess_button,
|
||||
layout = wibox.layout.fixed.horizontal
|
||||
},
|
||||
layout = wibox.layout.ratio.horizontal
|
||||
}
|
||||
pid_name_rest:ajust_ratio(2, 0.2, 0.47, 0.33)
|
||||
|
||||
local row = wibox.widget {
|
||||
{
|
||||
pid_name_rest,
|
||||
top = 4,
|
||||
bottom = 4,
|
||||
widget = wibox.container.margin
|
||||
},
|
||||
widget = wibox.container.background
|
||||
}
|
||||
|
||||
row:connect_signal("mouse::enter", function(c) c:set_bg(beautiful.bg_focus) end)
|
||||
row:connect_signal("mouse::leave", function(c) c:set_bg(beautiful.bg_normal) end)
|
||||
|
||||
if enable_kill_button then
|
||||
row:connect_signal("mouse::enter", function() kill_proccess_button.icon.opacity = 1 end)
|
||||
row:connect_signal("mouse::leave", function() kill_proccess_button.icon.opacity = 0.1 end)
|
||||
|
||||
kill_proccess_button:buttons(
|
||||
awful.util.table.join( awful.button({}, 1, function()
|
||||
row:set_bg('#ff0000')
|
||||
awful.spawn.with_shell('kill -9 ' .. pid)
|
||||
end) ) )
|
||||
end
|
||||
|
||||
awful.tooltip {
|
||||
objects = { row },
|
||||
mode = 'outside',
|
||||
preferred_positions = {'bottom'},
|
||||
timer_function = function()
|
||||
local text = cmd
|
||||
if process_info_max_length > 0 and text:len() > process_info_max_length then
|
||||
text = text:sub(0, process_info_max_length - 3) .. '...'
|
||||
end
|
||||
|
||||
return text
|
||||
:gsub('%s%-', '\n\t-') -- put arguments on a new line
|
||||
:gsub(':/', '\n\t\t:/') -- java classpath uses : to separate jars
|
||||
end,
|
||||
}
|
||||
|
||||
process_rows[j] = row
|
||||
|
||||
j = j + 1
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
popup:setup {
|
||||
{
|
||||
cpu_rows,
|
||||
{
|
||||
orientation = 'horizontal',
|
||||
forced_height = 15,
|
||||
color = beautiful.bg_focus,
|
||||
widget = wibox.widget.separator
|
||||
},
|
||||
create_process_header{with_action_column = enable_kill_button},
|
||||
process_rows,
|
||||
layout = wibox.layout.fixed.vertical,
|
||||
},
|
||||
margins = 8,
|
||||
widget = wibox.container.margin
|
||||
}
|
||||
end)
|
||||
end)
|
||||
|
||||
return cpu_widget
|
||||
end
|
||||
|
||||
return setmetatable(cpu_widget, { __call = function(_, ...)
|
||||
return worker(...)
|
||||
end })
|
Before Width: | Height: | Size: 255 KiB |
Before Width: | Height: | Size: 89 KiB |
Before Width: | Height: | Size: 1.9 KiB |
|
@ -1,95 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
id="svg7384"
|
||||
version="1.1"
|
||||
height="16"
|
||||
width="16"
|
||||
inkscape:version="0.48.5 r10040"
|
||||
sodipodi:docname="window-close-symbolic.svg">
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1366"
|
||||
inkscape:window-height="723"
|
||||
id="namedview15"
|
||||
showgrid="true"
|
||||
inkscape:zoom="14.75"
|
||||
inkscape:cx="14.600061"
|
||||
inkscape:cy="10.005214"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="23"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg7384">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid2992" />
|
||||
</sodipodi:namedview>
|
||||
<title
|
||||
id="title9167">Gnome Symbolic Icon Theme</title>
|
||||
<metadata
|
||||
id="metadata90">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title>Gnome Symbolic Icon Theme</dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs7386" />
|
||||
<g
|
||||
transform="translate(-60,-518)"
|
||||
id="layer9"
|
||||
style="display:inline" />
|
||||
<g
|
||||
transform="translate(-60,-518)"
|
||||
id="layer10" />
|
||||
<g
|
||||
transform="translate(-60,-518)"
|
||||
id="layer11" />
|
||||
<g
|
||||
id="g2996"
|
||||
transform="matrix(0.75,0,0,0.75,2,2.0546875)">
|
||||
<g
|
||||
id="layer12"
|
||||
transform="translate(-60,-518)">
|
||||
<g
|
||||
style="display:inline"
|
||||
id="layer4-4-1"
|
||||
transform="translate(19,-242)">
|
||||
<path
|
||||
style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;color:#bebebe;fill:#bebebe;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.78124988;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new;font-family:Andale Mono;-inkscape-font-specification:Andale Mono"
|
||||
id="path10839-9"
|
||||
d="m 45,764 1,0 c 0.01037,-1.2e-4 0.02079,-4.6e-4 0.03125,0 0.254951,0.0112 0.50987,0.12858 0.6875,0.3125 L 49,766.59375 51.3125,764.3125 C 51.578125,764.082 51.759172,764.007 52,764 l 1,0 0,1 c 0,0.28647 -0.03434,0.55065 -0.25,0.75 l -2.28125,2.28125 2.25,2.25 C 52.906938,770.46942 52.999992,770.7347 53,771 l 0,1 -1,0 c -0.265301,-10e-6 -0.530586,-0.0931 -0.71875,-0.28125 L 49,769.4375 46.71875,771.71875 C 46.530586,771.90694 46.26529,772 46,772 l -1,0 0,-1 c -3e-6,-0.26529 0.09306,-0.53058 0.28125,-0.71875 l 2.28125,-2.25 L 45.28125,765.75 C 45.070508,765.55537 44.97809,765.28075 45,765 l 0,-1 z"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
transform="translate(-60,-518)"
|
||||
id="layer13" />
|
||||
<g
|
||||
transform="translate(-60,-518)"
|
||||
id="layer14" />
|
||||
<g
|
||||
transform="translate(-60,-518)"
|
||||
id="layer15" />
|
||||
</svg>
|
Before Width: | Height: | Size: 3.6 KiB |
|
@ -1,36 +0,0 @@
|
|||
# Email widget
|
||||
|
||||
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.
|
||||
|
||||
## Installation
|
||||
|
||||
To install it put **email.lua** and **email-widget** folder under **~/.config/awesome**. Then
|
||||
|
||||
- in **email.lua** change path to python scripts;
|
||||
- in python scripts add your credentials (note that password should be encrypted using pgp for example);
|
||||
- add widget to awesome:
|
||||
|
||||
```lua
|
||||
local email_widget, email_icon = require("email")
|
||||
|
||||
...
|
||||
s.mytasklist, -- Middle widget
|
||||
{ -- Right widgets
|
||||
layout = wibox.layout.fixed.horizontal,
|
||||
...
|
||||
email_icon,
|
||||
email_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:
|
||||
|
||||
``` bash
|
||||
python ~/.config/awesome/email/count_unread_emails.py
|
||||
python ~/.config/awesome/email/read_emails.py
|
||||
```
|
|
@ -1,16 +0,0 @@
|
|||
#!/usr/bin/python
|
||||
|
||||
import imaplib
|
||||
import re
|
||||
|
||||
M=imaplib.IMAP4_SSL("mail.teenagemutantninjaturtles.com", 993)
|
||||
M.login("mickey@tmnt.com","cowabunga")
|
||||
|
||||
status, counts = M.status("INBOX","(MESSAGES UNSEEN)")
|
||||
|
||||
if status == "OK":
|
||||
unread = re.search(r'UNSEEN\s(\d+)', counts[0].decode('utf-8')).group(1)
|
||||
else:
|
||||
unread = "N/A"
|
||||
|
||||
print(unread)
|
Before Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 38 KiB |
|
@ -1,44 +0,0 @@
|
|||
local wibox = require("wibox")
|
||||
local awful = require("awful")
|
||||
local naughty = require("naughty")
|
||||
local watch = require("awful.widget.watch")
|
||||
|
||||
local path_to_icons = "/usr/share/icons/Arc/actions/22/"
|
||||
|
||||
local email_widget = wibox.widget.textbox()
|
||||
email_widget:set_font('Play 9')
|
||||
|
||||
local email_icon = wibox.widget.imagebox()
|
||||
email_icon:set_image(path_to_icons .. "/mail-mark-new.png")
|
||||
|
||||
watch(
|
||||
"python /home/<username>/.config/awesome/email-widget/count_unread_emails.py", 20,
|
||||
function(_, stdout)
|
||||
local unread_emails_num = tonumber(stdout) or 0
|
||||
if (unread_emails_num > 0) then
|
||||
email_icon:set_image(path_to_icons .. "/mail-mark-unread.png")
|
||||
email_widget:set_text(stdout)
|
||||
elseif (unread_emails_num == 0) then
|
||||
email_icon:set_image(path_to_icons .. "/mail-message-new.png")
|
||||
email_widget:set_text("")
|
||||
end
|
||||
end
|
||||
)
|
||||
|
||||
|
||||
local function show_emails()
|
||||
awful.spawn.easy_async([[bash -c 'python /home/<username>/.config/awesome/email-widget/read_unread_emails.py']],
|
||||
function(stdout)
|
||||
naughty.notify{
|
||||
text = stdout,
|
||||
title = "Unread Emails",
|
||||
timeout = 5, hover_timeout = 0.5,
|
||||
width = 400,
|
||||
}
|
||||
end
|
||||
)
|
||||
end
|
||||
|
||||
email_icon:connect_signal("mouse::enter", function() show_emails() end)
|
||||
|
||||
return email_widget, email_icon
|
|
@ -1,44 +0,0 @@
|
|||
#!/usr/bin/python
|
||||
|
||||
import imaplib
|
||||
import email
|
||||
import datetime
|
||||
|
||||
def process_mailbox(M):
|
||||
rv, data = M.search(None, "(UNSEEN)")
|
||||
if rv != 'OK':
|
||||
print "No messages found!"
|
||||
return
|
||||
|
||||
for num in data[0].split():
|
||||
rv, data = M.fetch(num, '(BODY.PEEK[])')
|
||||
if rv != 'OK':
|
||||
print "ERROR getting message", num
|
||||
return
|
||||
msg = email.message_from_bytes(data[0][1])
|
||||
for header in [ 'From', 'Subject', 'Date' ]:
|
||||
hdr = email.header.make_header(email.header.decode_header(msg[header]))
|
||||
if header == 'Date':
|
||||
date_tuple = email.utils.parsedate_tz(str(hdr))
|
||||
if date_tuple:
|
||||
local_date = datetime.datetime.fromtimestamp(email.utils.mktime_tz(date_tuple))
|
||||
print("{}: {}".format(header, local_date.strftime("%a, %d %b %Y %H:%M:%S")))
|
||||
else:
|
||||
print('{}: {}'.format(header, hdr))
|
||||
# with code below you can process text of email
|
||||
# if msg.is_multipart():
|
||||
# for payload in msg.get_payload():
|
||||
# if payload.get_content_maintype() == 'text':
|
||||
# print payload.get_payload()
|
||||
# else:
|
||||
# print msg.get_payload()
|
||||
|
||||
|
||||
M=imaplib.IMAP4_SSL("mail.teenagemutantninjaturtles.com", 993)
|
||||
M.login("mickey@tmnt.com","cowabunga")
|
||||
|
||||
rv, data = M.select("INBOX")
|
||||
if rv == 'OK':
|
||||
process_mailbox(M)
|
||||
M.close()
|
||||
M.logout()
|
|
@ -1,29 +0,0 @@
|
|||
# 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.
|
||||
|
||||
![](./screenshot.png)
|
||||
|
||||
## Customizations
|
||||
|
||||
It is possible to customize widget by providing a table with all or some of the following config parameters:
|
||||
|
||||
| Name | Default | Description |
|
||||
|---|---|---|
|
||||
| `mounts` | `{'/'}` | Table with mounts to monitor, check the output from a `df` command for available options (column 'Mounted on') |
|
||||
| `timeout` | 60 | How often in seconds the widget refreshes |
|
||||
|
||||
## Installation
|
||||
|
||||
Clone/download repo and use the widget in **rc.lua**:
|
||||
|
||||
```lua
|
||||
local fs_widget = require("awesome-wm-widgets.fs-widget.fs-widget")
|
||||
...
|
||||
s.mywibox:setup {
|
||||
s.mytasklist, -- Middle widget
|
||||
{ -- Right widgets
|
||||
fs_widget(), --default
|
||||
fs_widget({ mounts = { '/', '/mnt/music' } }), -- multiple mounts
|
||||
...
|
||||
```
|
|
@ -1,190 +0,0 @@
|
|||
local awful = require("awful")
|
||||
local watch = require("awful.widget.watch")
|
||||
local wibox = require("wibox")
|
||||
local beautiful = require("beautiful")
|
||||
local gears = require("gears")
|
||||
|
||||
local storage_bar_widget = {}
|
||||
|
||||
--- Table with widget configuration, consists of three sections:
|
||||
--- - general - general configuration
|
||||
--- - widget - configuration of the widget displayed on the wibar
|
||||
--- - popup - configuration of the popup
|
||||
local config = {}
|
||||
|
||||
-- general
|
||||
config.mounts = { '/' }
|
||||
config.refresh_rate = 60
|
||||
|
||||
-- wibar widget
|
||||
config.widget_width = 40
|
||||
config.widget_bar_color = '#aaaaaa'
|
||||
config.widget_onclick_bg = '#ff0000'
|
||||
config.widget_border_color = '#535d6c66'
|
||||
config.widget_background_color = '#22222233'
|
||||
|
||||
-- popup
|
||||
config.popup_bg = '#22222233'
|
||||
config.popup_border_width = 1
|
||||
config.popup_border_color = '#535d6c66'
|
||||
config.popup_bar_color = '#aaaaaa'
|
||||
config.popup_bar_background_color = '#22222233'
|
||||
config.popup_bar_border_color = '#535d6c66'
|
||||
|
||||
local function worker(user_args)
|
||||
local args = user_args or {}
|
||||
|
||||
-- Setup config for the widget instance.
|
||||
-- The `_config` table will keep the first existing value after checking
|
||||
-- in this order: user parameter > beautiful > module default.
|
||||
local _config = {}
|
||||
for prop, value in pairs(config) do
|
||||
_config[prop] = args[prop] or beautiful[prop] or value
|
||||
end
|
||||
|
||||
storage_bar_widget = wibox.widget {
|
||||
{
|
||||
id = 'progressbar',
|
||||
color = _config.widget_bar_color,
|
||||
max_value = 100,
|
||||
forced_height = 20,
|
||||
forced_width = _config.widget_width,
|
||||
paddings = 2,
|
||||
margins = 4,
|
||||
border_width = 1,
|
||||
border_radius = 2,
|
||||
border_color = _config.widget_border_color,
|
||||
background_color = _config.widget_background_color,
|
||||
widget = wibox.widget.progressbar
|
||||
},
|
||||
shape = function(cr, width, height)
|
||||
gears.shape.rounded_rect(cr, width, height, 4)
|
||||
end,
|
||||
widget = wibox.container.background,
|
||||
set_value = function(self, new_value)
|
||||
self:get_children_by_id("progressbar")[1].value = new_value
|
||||
end
|
||||
}
|
||||
|
||||
local disk_rows = {
|
||||
{ widget = wibox.widget.textbox },
|
||||
spacing = 4,
|
||||
layout = wibox.layout.fixed.vertical,
|
||||
}
|
||||
|
||||
local disk_header = wibox.widget {
|
||||
{
|
||||
markup = '<b>Mount</b>',
|
||||
forced_width = 150,
|
||||
align = 'left',
|
||||
widget = wibox.widget.textbox,
|
||||
},
|
||||
{
|
||||
markup = '<b>Used</b>',
|
||||
align = 'left',
|
||||
widget = wibox.widget.textbox,
|
||||
},
|
||||
layout = wibox.layout.ratio.horizontal
|
||||
}
|
||||
disk_header:ajust_ratio(1, 0, 0.3, 0.7)
|
||||
|
||||
local popup = awful.popup {
|
||||
bg = _config.popup_bg,
|
||||
ontop = true,
|
||||
visible = false,
|
||||
shape = gears.shape.rounded_rect,
|
||||
border_width = _config.popup_border_width,
|
||||
border_color = _config.popup_border_color,
|
||||
maximum_width = 400,
|
||||
offset = { y = 5 },
|
||||
widget = {}
|
||||
}
|
||||
|
||||
storage_bar_widget:buttons(
|
||||
awful.util.table.join(
|
||||
awful.button({}, 1, function()
|
||||
if popup.visible then
|
||||
popup.visible = not popup.visible
|
||||
storage_bar_widget:set_bg('#00000000')
|
||||
else
|
||||
storage_bar_widget:set_bg(_config.widget_background_color)
|
||||
popup:move_next_to(mouse.current_widget_geometry)
|
||||
end
|
||||
end)
|
||||
)
|
||||
)
|
||||
|
||||
local disks = {}
|
||||
watch([[bash -c "df | tail -n +2"]], _config.refresh_rate,
|
||||
function(widget, stdout)
|
||||
for line in stdout:gmatch("[^\r\n$]+") do
|
||||
local filesystem, size, used, avail, perc, mount =
|
||||
line:match('([%p%w]+)%s+([%d%w]+)%s+([%d%w]+)%s+([%d%w]+)%s+([%d]+)%%%s+([%p%w]+)')
|
||||
|
||||
disks[mount] = {}
|
||||
disks[mount].filesystem = filesystem
|
||||
disks[mount].size = size
|
||||
disks[mount].used = used
|
||||
disks[mount].avail = avail
|
||||
disks[mount].perc = perc
|
||||
disks[mount].mount = mount
|
||||
|
||||
if disks[mount].mount == _config.mounts[1] then
|
||||
widget:set_value(tonumber(disks[mount].perc))
|
||||
end
|
||||
end
|
||||
|
||||
for k, v in ipairs(_config.mounts) do
|
||||
|
||||
local row = wibox.widget {
|
||||
{
|
||||
text = disks[v].mount,
|
||||
forced_width = 150,
|
||||
widget = wibox.widget.textbox
|
||||
},
|
||||
{
|
||||
color = _config.popup_bar_color,
|
||||
max_value = 100,
|
||||
value = tonumber(disks[v].perc),
|
||||
forced_height = 20,
|
||||
paddings = 1,
|
||||
margins = 4,
|
||||
border_width = 1,
|
||||
border_color = _config.popup_bar_border_color,
|
||||
background_color = _config.popup_bar_background_color,
|
||||
bar_border_width = 1,
|
||||
bar_border_color = _config.popup_bar_border_color,
|
||||
widget = wibox.widget.progressbar,
|
||||
},
|
||||
{
|
||||
text = math.floor(disks[v].used / 1024 / 1024)
|
||||
.. '/'
|
||||
.. math.floor(disks[v].size / 1024 / 1024) .. 'GB('
|
||||
.. math.floor(disks[v].perc) .. '%)',
|
||||
widget = wibox.widget.textbox
|
||||
},
|
||||
layout = wibox.layout.ratio.horizontal
|
||||
}
|
||||
row:ajust_ratio(2, 0.3, 0.3, 0.4)
|
||||
|
||||
disk_rows[k] = row
|
||||
end
|
||||
popup:setup {
|
||||
{
|
||||
disk_header,
|
||||
disk_rows,
|
||||
layout = wibox.layout.fixed.vertical,
|
||||
},
|
||||
margins = 8,
|
||||
widget = wibox.container.margin
|
||||
}
|
||||
end,
|
||||
storage_bar_widget
|
||||
)
|
||||
|
||||
return storage_bar_widget
|
||||
end
|
||||
|
||||
return setmetatable(storage_bar_widget, { __call = function(_, ...)
|
||||
return worker(...)
|
||||
end })
|
Before Width: | Height: | Size: 20 KiB |
|
@ -1,45 +0,0 @@
|
|||
# Logout Menu Widget
|
||||
|
||||
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](./logout-menu.gif)
|
||||
|
||||
## Installation
|
||||
|
||||
Clone this repo (if not cloned yet) under **./.config/awesome/**
|
||||
|
||||
```bash
|
||||
cd ./.config/awesome/
|
||||
git clone https://github.com/streetturtle/awesome-wm-widgets
|
||||
```
|
||||
Then add the widget to the wibar:
|
||||
|
||||
```lua
|
||||
local logout_menu_widget = require("awesome-wm-widgets.logout-menu-widget.logout-menu")
|
||||
|
||||
s.mytasklist, -- Middle widget
|
||||
{ -- Right widgets
|
||||
layout = wibox.layout.fixed.horizontal,
|
||||
...
|
||||
-- default
|
||||
logout_menu_widget(),
|
||||
-- custom
|
||||
logout_menu_widget{
|
||||
font = 'Play 14',
|
||||
onlock = function() awful.spawn.with_shell('i3lock-fancy') end
|
||||
}
|
||||
...
|
||||
```
|
||||
|
||||
## Customization
|
||||
|
||||
It is possible to customize the widget by providing a table with all or some of the following config parameters:
|
||||
|
||||
| Name | Default | Description |
|
||||
|---|---|---|
|
||||
| `font` | `beautiful.font` | Font of the menu items |
|
||||
| `onlogout` | `function() awesome.quit() end` | Function which is called when the logout item is clicked |
|
||||
| `onlock` | `function() awful.spawn.with_shell("i3lock") end` | Function which is called when the lock item is clicked |
|
||||
| `onreboot` | `function() awful.spawn.with_shell("reboot") end` | Function which is called when the reboot item is clicked |
|
||||
| `onsuspend` | `function() awful.spawn.with_shell("systemctl suspend") end` | Function which is called when the suspend item is clicked |
|
||||
| `onpoweroff` | `function() awful.spawn.with_shell("shutdown now") end` | Function which is called when the poweroff item is clicked |
|
|
@ -1 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#ECEFF4" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-lock"><rect x="3" y="11" width="18" height="11" rx="2" ry="2"></rect><path d="M7 11V7a5 5 0 0 1 10 0v4"></path></svg>
|
Before Width: | Height: | Size: 316 B |
|
@ -1 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#ECEFF4" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-log-out"><path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"></path><polyline points="16 17 21 12 16 7"></polyline><line x1="21" y1="12" x2="9" y2="12"></line></svg>
|
Before Width: | Height: | Size: 362 B |
|
@ -1 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#ECEFF4" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-moon"><path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path></svg>
|
Before Width: | Height: | Size: 276 B |
|
@ -1 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#BF616A" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-power"><path d="M18.36 6.64a9 9 0 1 1-12.73 0"></path><line x1="12" y1="2" x2="12" y2="12"></line></svg>
|
Before Width: | Height: | Size: 303 B |
|
@ -1 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#ECEFF4" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-power"><path d="M18.36 6.64a9 9 0 1 1-12.73 0"></path><line x1="12" y1="2" x2="12" y2="12"></line></svg>
|
Before Width: | Height: | Size: 303 B |
|
@ -1 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#ECEFF4" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-refresh-cw"><polyline points="23 4 23 10 17 10"></polyline><polyline points="1 20 1 14 7 14"></polyline><path d="M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"></path></svg>
|
Before Width: | Height: | Size: 395 B |
Before Width: | Height: | Size: 46 KiB |
|
@ -1,136 +0,0 @@
|
|||
-------------------------------------------------
|
||||
-- Logout Menu Widget for Awesome Window Manager
|
||||
-- More details could be found here:
|
||||
-- https://github.com/streetturtle/awesome-wm-widgets/tree/master/logout-menu-widget
|
||||
|
||||
-- @author Pavel Makhov
|
||||
-- @copyright 2020 Pavel Makhov
|
||||
-------------------------------------------------
|
||||
|
||||
local awful = require("awful")
|
||||
local wibox = require("wibox")
|
||||
local gears = require("gears")
|
||||
local beautiful = require("beautiful")
|
||||
|
||||
local HOME = os.getenv('HOME')
|
||||
local ICON_DIR = HOME .. '/.config/awesome/awesome-wm-widgets/logout-menu-widget/icons/'
|
||||
|
||||
local logout_menu_widget = wibox.widget {
|
||||
{
|
||||
{
|
||||
image = ICON_DIR .. 'power_w.svg',
|
||||
resize = true,
|
||||
widget = wibox.widget.imagebox,
|
||||
},
|
||||
margins = 4,
|
||||
layout = wibox.container.margin
|
||||
},
|
||||
shape = function(cr, width, height)
|
||||
gears.shape.rounded_rect(cr, width, height, 4)
|
||||
end,
|
||||
widget = wibox.container.background,
|
||||
}
|
||||
|
||||
local popup = awful.popup {
|
||||
ontop = true,
|
||||
visible = false,
|
||||
shape = function(cr, width, height)
|
||||
gears.shape.rounded_rect(cr, width, height, 4)
|
||||
end,
|
||||
border_width = 1,
|
||||
border_color = beautiful.bg_focus,
|
||||
maximum_width = 400,
|
||||
offset = { y = 5 },
|
||||
widget = {}
|
||||
}
|
||||
|
||||
local function worker(user_args)
|
||||
local rows = { layout = wibox.layout.fixed.vertical }
|
||||
|
||||
local args = user_args or {}
|
||||
|
||||
local font = args.font or beautiful.font
|
||||
|
||||
local onlogout = args.onlogout or function () awesome.quit() end
|
||||
local onlock = args.onlock or function() awful.spawn.with_shell("i3lock") end
|
||||
local onreboot = args.onreboot or function() awful.spawn.with_shell("reboot") end
|
||||
local onsuspend = args.onsuspend or function() awful.spawn.with_shell("systemctl suspend") end
|
||||
local onpoweroff = args.onpoweroff or function() awful.spawn.with_shell("shutdown now") end
|
||||
|
||||
local menu_items = {
|
||||
{ name = 'Log out', icon_name = 'log-out.svg', command = onlogout },
|
||||
{ name = 'Lock', icon_name = 'lock.svg', command = onlock },
|
||||
{ name = 'Reboot', icon_name = 'refresh-cw.svg', command = onreboot },
|
||||
{ name = 'Suspend', icon_name = 'moon.svg', command = onsuspend },
|
||||
{ name = 'Power off', icon_name = 'power.svg', command = onpoweroff },
|
||||
}
|
||||
|
||||
for _, item in ipairs(menu_items) do
|
||||
|
||||
local row = wibox.widget {
|
||||
{
|
||||
{
|
||||
{
|
||||
image = ICON_DIR .. item.icon_name,
|
||||
resize = false,
|
||||
widget = wibox.widget.imagebox
|
||||
},
|
||||
{
|
||||
text = item.name,
|
||||
font = font,
|
||||
widget = wibox.widget.textbox
|
||||
},
|
||||
spacing = 12,
|
||||
layout = wibox.layout.fixed.horizontal
|
||||
},
|
||||
margins = 8,
|
||||
layout = wibox.container.margin
|
||||
},
|
||||
bg = beautiful.bg_normal,
|
||||
widget = wibox.container.background
|
||||
}
|
||||
|
||||
row:connect_signal("mouse::enter", function(c) c:set_bg(beautiful.bg_focus) end)
|
||||
row:connect_signal("mouse::leave", function(c) c:set_bg(beautiful.bg_normal) end)
|
||||
|
||||
local old_cursor, old_wibox
|
||||
row:connect_signal("mouse::enter", function()
|
||||
local wb = mouse.current_wibox
|
||||
old_cursor, old_wibox = wb.cursor, wb
|
||||
wb.cursor = "hand1"
|
||||
end)
|
||||
row:connect_signal("mouse::leave", function()
|
||||
if old_wibox then
|
||||
old_wibox.cursor = old_cursor
|
||||
old_wibox = nil
|
||||
end
|
||||
end)
|
||||
|
||||
row:buttons(awful.util.table.join(awful.button({}, 1, function()
|
||||
popup.visible = not popup.visible
|
||||
item.command()
|
||||
end)))
|
||||
|
||||
table.insert(rows, row)
|
||||
end
|
||||
popup:setup(rows)
|
||||
|
||||
logout_menu_widget:buttons(
|
||||
awful.util.table.join(
|
||||
awful.button({}, 1, function()
|
||||
if popup.visible then
|
||||
popup.visible = not popup.visible
|
||||
logout_menu_widget:set_bg('#00000000')
|
||||
else
|
||||
popup:move_next_to(mouse.current_widget_geometry)
|
||||
logout_menu_widget:set_bg(beautiful.bg_focus)
|
||||
end
|
||||
end)
|
||||
)
|
||||
)
|
||||
|
||||
return logout_menu_widget
|
||||
|
||||
end
|
||||
|
||||
return worker
|
|
@ -1,84 +0,0 @@
|
|||
# Logout Popup Widget
|
||||
|
||||
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.
|
||||
|
||||
<p align="center">
|
||||
<img src="https://github.com/streetturtle/awesome-wm-widgets/raw/master/logout-popup-widget/screenshot.gif" alt="screenshot">
|
||||
</p>
|
||||
|
||||
When the widget is shown, following shortcuts can be used:
|
||||
- <kbd>Escape</kbd> - hide widget
|
||||
- <kbd>s</kbd> - shutdown
|
||||
- <kbd>r</kbd> - reboot
|
||||
- <kbd>u</kbd> - suspend
|
||||
- <kbd>k</kbd> - lock
|
||||
- <kbd>l</kbd> - 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_popup = require("awesome-wm-widgets.logout-popup-widget.logout-popup")
|
||||
...
|
||||
globalkeys = gears.table.join(
|
||||
...
|
||||
awful.key({ modkey }, "l", function() logout_popup.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_popup = require("awesome-wm-widgets.logout-popup-widget.logout-popup")
|
||||
|
||||
s.mytasklist, -- Middle widget
|
||||
{ -- Right widgets
|
||||
layout = wibox.layout.fixed.horizontal,
|
||||
...
|
||||
logout_popup.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 |
|
||||
| `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 |
|
||||
| `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](./logout-nord.png)
|
||||
![outrun](./logout-outrun.png)
|
||||
![dark](./logout-dark.png)
|
||||
![dracula](./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!"},
|
||||
}
|
||||
```
|
Before Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 44 KiB |
Before Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 49 KiB |
|
@ -1,187 +0,0 @@
|
|||
-------------------------------------------------
|
||||
-- Logout widget for Awesome Window Manager
|
||||
-- More details could be found here:
|
||||
-- https://github.com/streetturtle/awesome-wm-widgets/tree/master/logout-widget
|
||||
|
||||
-- @author Pavel Makhov
|
||||
-- @copyright 2020 Pavel Makhov
|
||||
-------------------------------------------------
|
||||
|
||||
local awful = require("awful")
|
||||
local capi = {keygrabber = keygrabber }
|
||||
local wibox = require("wibox")
|
||||
local gears = require("gears")
|
||||
local beautiful = require("beautiful")
|
||||
local awesomebuttons = require("awesome-buttons.awesome-buttons")
|
||||
|
||||
|
||||
local HOME_DIR = os.getenv("HOME")
|
||||
local WIDGET_DIR = HOME_DIR .. '/.config/awesome/awesome-wm-widgets/logout-popup-widget'
|
||||
|
||||
|
||||
local w = wibox {
|
||||
bg = beautiful.fg_normal,
|
||||
max_widget_size = 500,
|
||||
ontop = true,
|
||||
height = 200,
|
||||
width = 400,
|
||||
shape = function(cr, width, height)
|
||||
gears.shape.rounded_rect(cr, width, height, 8)
|
||||
end
|
||||
}
|
||||
|
||||
local action = wibox.widget {
|
||||
text = ' ',
|
||||
widget = wibox.widget.textbox
|
||||
}
|
||||
|
||||
local phrase_widget = wibox.widget{
|
||||
align = 'center',
|
||||
widget = wibox.widget.textbox
|
||||
}
|
||||
|
||||
local function create_button(icon_name, action_name, accent_color, label_color, onclick, icon_size, icon_margin)
|
||||
|
||||
local button = awesomebuttons.with_icon {
|
||||
type = 'basic',
|
||||
icon = icon_name,
|
||||
color = accent_color,
|
||||
icon_size = icon_size,
|
||||
icon_margin = icon_margin,
|
||||
onclick = function()
|
||||
onclick()
|
||||
w.visible = false
|
||||
capi.keygrabber.stop()
|
||||
end
|
||||
}
|
||||
button:connect_signal("mouse::enter", function()
|
||||
action:set_markup('<span color="' .. label_color .. '">' .. action_name .. '</span>')
|
||||
end)
|
||||
|
||||
button:connect_signal("mouse::leave", function() action:set_markup('<span> </span>') end)
|
||||
|
||||
return button
|
||||
end
|
||||
|
||||
local function launch(args)
|
||||
args = args or {}
|
||||
|
||||
local bg_color = args.bg_color or beautiful.bg_normal
|
||||
local accent_color = args.accent_color or beautiful.bg_focus
|
||||
local text_color = args.text_color or beautiful.fg_normal
|
||||
local label_color = args.label_color or beautiful.fg_focus
|
||||
local phrases = args.phrases or {'Goodbye!'}
|
||||
local icon_size = args.icon_size or 40
|
||||
local icon_margin = args.icon_margin or 16
|
||||
|
||||
local onlogout = args.onlogout or function () awesome.quit() end
|
||||
local onlock = args.onlock or function() awful.spawn.with_shell("i3lock") end
|
||||
local onreboot = args.onreboot or function() awful.spawn.with_shell("reboot") end
|
||||
local onsuspend = args.onsuspend or function() awful.spawn.with_shell("systemctl suspend") end
|
||||
local onpoweroff = args.onpoweroff or function() awful.spawn.with_shell("shutdown now") end
|
||||
|
||||
w:set_bg(bg_color)
|
||||
if #phrases > 0 then
|
||||
phrase_widget:set_markup(
|
||||
'<span color="'.. text_color .. '" size="20000">' .. phrases[ math.random( #phrases ) ] .. '</span>')
|
||||
end
|
||||
|
||||
w:setup {
|
||||
{
|
||||
phrase_widget,
|
||||
{
|
||||
{
|
||||
create_button('log-out', 'Log Out (l)',
|
||||
accent_color, label_color, onlogout, icon_size, icon_margin),
|
||||
create_button('lock', 'Lock (k)',
|
||||
accent_color, label_color, onlock, icon_size, icon_margin),
|
||||
create_button('refresh-cw', 'Reboot (r)',
|
||||
accent_color, label_color, onreboot, icon_size, icon_margin),
|
||||
create_button('moon', 'Suspend (u)',
|
||||
accent_color, label_color, onsuspend, icon_size, icon_margin),
|
||||
create_button('power', 'Power Off (s)',
|
||||
accent_color, label_color, onpoweroff, icon_size, icon_margin),
|
||||
id = 'buttons',
|
||||
spacing = 8,
|
||||
layout = wibox.layout.fixed.horizontal
|
||||
},
|
||||
valign = 'center',
|
||||
layout = wibox.container.place
|
||||
},
|
||||
{
|
||||
action,
|
||||
haligh = 'center',
|
||||
layout = wibox.container.place
|
||||
},
|
||||
spacing = 32,
|
||||
layout = wibox.layout.fixed.vertical
|
||||
},
|
||||
id = 'a',
|
||||
shape_border_width = 1,
|
||||
valign = 'center',
|
||||
layout = wibox.container.place
|
||||
}
|
||||
|
||||
w.screen = mouse.screen
|
||||
w.visible = true
|
||||
|
||||
awful.placement.centered(w)
|
||||
capi.keygrabber.run(function(_, key, event)
|
||||
if event == "release" then return end
|
||||
if key then
|
||||
if key == 'Escape' then
|
||||
phrase_widget:set_text('')
|
||||
capi.keygrabber.stop()
|
||||
w.visible = false
|
||||
elseif key == 's' then onpoweroff()
|
||||
elseif key == 'r' then onreboot()
|
||||
elseif key == 'u' then onsuspend()
|
||||
elseif key == 'k' then onlock()
|
||||
elseif key == 'l' then onlogout()
|
||||
end
|
||||
|
||||
if key == 'Escape' or string.match("srukl", key) then
|
||||
phrase_widget:set_text('')
|
||||
capi.keygrabber.stop()
|
||||
w.visible = false
|
||||
end
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
local function widget(args)
|
||||
local icon = args.icon or WIDGET_DIR .. '/power.svg'
|
||||
|
||||
local res = wibox.widget {
|
||||
{
|
||||
{
|
||||
image = icon,
|
||||
widget = wibox.widget.imagebox
|
||||
},
|
||||
margins = 4,
|
||||
layout = wibox.container.margin
|
||||
},
|
||||
layout = wibox.layout.fixed.horizontal,
|
||||
}
|
||||
|
||||
res:buttons(
|
||||
awful.util.table.join(
|
||||
awful.button({}, 1, function()
|
||||
if w.visible then
|
||||
phrase_widget:set_text('')
|
||||
capi.keygrabber.stop()
|
||||
w.visible = false
|
||||
else
|
||||
launch(args)
|
||||
end
|
||||
end)
|
||||
))
|
||||
|
||||
return res
|
||||
|
||||
end
|
||||
|
||||
return {
|
||||
launch = launch,
|
||||
widget = widget
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#ECEFF4" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-power"><path d="M18.36 6.64a9 9 0 1 1-12.73 0"></path><line x1="12" y1="2" x2="12" y2="12"></line></svg>
|
Before Width: | Height: | Size: 303 B |
Before Width: | Height: | Size: 436 KiB |
Before Width: | Height: | Size: 127 KiB |
|
@ -1,26 +0,0 @@
|
|||
# MPRIS Widget (In progress)
|
||||
|
||||
Music Player Info widget cy @mgabs
|
||||
|
||||
# Prerequisite
|
||||
|
||||
Install `playerctl` (mpris implementation), should be available in repo, e.g for Ubuntu:
|
||||
|
||||
```bash
|
||||
sudo apt-get install playerctl
|
||||
```
|
||||
|
||||
## Installation
|
||||
|
||||
To use this widget clone repo under **~/.config/awesome/** and then add it in **rc.lua**:
|
||||
|
||||
```lua
|
||||
local mpris_widget = require("awesome-wm-widgets.mpris-widget")
|
||||
...
|
||||
s.mytasklist, -- Middle widget
|
||||
{ -- Right widgets
|
||||
layout = wibox.layout.fixed.horizontal,
|
||||
...
|
||||
mpris_widget(),
|
||||
...
|
||||
```
|
|
@ -1,187 +0,0 @@
|
|||
-------------------------------------------------
|
||||
-- mpris based Arc Widget for Awesome Window Manager
|
||||
-- Modelled after Pavel Makhov's work
|
||||
-- @author Mohammed Gaber
|
||||
-- requires - playerctl
|
||||
-- @copyright 2020
|
||||
-------------------------------------------------
|
||||
local awful = require("awful")
|
||||
local beautiful = require("beautiful")
|
||||
local watch = require("awful.widget.watch")
|
||||
local wibox = require("wibox")
|
||||
local gears = require("gears")
|
||||
|
||||
local GET_MPD_CMD = "playerctl -p %s -f '{{status}};{{xesam:artist}};{{xesam:title}}' metadata"
|
||||
|
||||
local TOGGLE_MPD_CMD = "playerctl play-pause"
|
||||
local NEXT_MPD_CMD = "playerctl next"
|
||||
local PREV_MPD_CMD = "playerctl previous"
|
||||
local LIST_PLAYERS_CMD = "playerctl -l"
|
||||
|
||||
local PATH_TO_ICONS = "/usr/share/icons/Arc"
|
||||
local PAUSE_ICON_NAME = PATH_TO_ICONS .. "/actions/24/player_pause.png"
|
||||
local PLAY_ICON_NAME = PATH_TO_ICONS .. "/actions/24/player_play.png"
|
||||
local STOP_ICON_NAME = PATH_TO_ICONS .. "/actions/24/player_stop.png"
|
||||
local LIBRARY_ICON_NAME = PATH_TO_ICONS .. "/actions/24/music-library.png"
|
||||
|
||||
local default_player = ''
|
||||
|
||||
local icon = wibox.widget {
|
||||
id = "icon",
|
||||
widget = wibox.widget.imagebox,
|
||||
image = PLAY_ICON_NAME
|
||||
}
|
||||
|
||||
local mpris_widget = wibox.widget{
|
||||
{
|
||||
id = 'artist',
|
||||
widget = wibox.widget.textbox
|
||||
},
|
||||
{
|
||||
icon,
|
||||
max_value = 1,
|
||||
value = 0,
|
||||
thickness = 2,
|
||||
start_angle = 4.71238898, -- 2pi*3/4
|
||||
forced_height = 24,
|
||||
forced_width = 24,
|
||||
rounded_edge = true,
|
||||
bg = "#ffffff11",
|
||||
paddings = 0,
|
||||
widget = wibox.container.arcchart
|
||||
},
|
||||
{
|
||||
id = 'title',
|
||||
widget = wibox.widget.textbox
|
||||
},
|
||||
layout = wibox.layout.fixed.horizontal,
|
||||
set_text = function(self, artist, title)
|
||||
self:get_children_by_id('artist')[1]:set_text(artist)
|
||||
self:get_children_by_id('title')[1]:set_text(title)
|
||||
end
|
||||
}
|
||||
|
||||
local rows = { layout = wibox.layout.fixed.vertical }
|
||||
|
||||
local popup = awful.popup{
|
||||
bg = beautiful.bg_normal,
|
||||
ontop = true,
|
||||
visible = false,
|
||||
shape = gears.shape.rounded_rect,
|
||||
border_width = 1,
|
||||
border_color = beautiful.bg_focus,
|
||||
maximum_width = 400,
|
||||
offset = { y = 5 },
|
||||
widget = {}
|
||||
}
|
||||
|
||||
local function rebuild_popup()
|
||||
awful.spawn.easy_async(LIST_PLAYERS_CMD, function(stdout, _, _, _)
|
||||
for i = 0, #rows do rows[i]=nil end
|
||||
for player_name in stdout:gmatch("[^\r\n]+") do
|
||||
if player_name ~='' and player_name ~=nil then
|
||||
|
||||
local checkbox = wibox.widget{
|
||||
{
|
||||
checked = player_name == default_player,
|
||||
color = beautiful.bg_normal,
|
||||
paddings = 2,
|
||||
shape = gears.shape.circle,
|
||||
forced_width = 20,
|
||||
forced_height = 20,
|
||||
check_color = beautiful.fg_urgent,
|
||||
widget = wibox.widget.checkbox
|
||||
},
|
||||
valign = 'center',
|
||||
layout = wibox.container.place,
|
||||
}
|
||||
|
||||
checkbox:connect_signal("button::press", function()
|
||||
default_player = player_name
|
||||
rebuild_popup()
|
||||
end)
|
||||
|
||||
table.insert(rows, wibox.widget {
|
||||
{
|
||||
{
|
||||
checkbox,
|
||||
{
|
||||
{
|
||||
text = player_name,
|
||||
align = 'left',
|
||||
widget = wibox.widget.textbox
|
||||
},
|
||||
left = 10,
|
||||
layout = wibox.container.margin
|
||||
},
|
||||
spacing = 8,
|
||||
layout = wibox.layout.align.horizontal
|
||||
},
|
||||
margins = 4,
|
||||
layout = wibox.container.margin
|
||||
},
|
||||
bg = beautiful.bg_normal,
|
||||
widget = wibox.container.background
|
||||
})
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
popup:setup(rows)
|
||||
end
|
||||
|
||||
local function worker()
|
||||
|
||||
-- retrieve song info
|
||||
local current_song, artist, player_status
|
||||
|
||||
local update_graphic = function(widget, stdout, _, _, _)
|
||||
local words = gears.string.split(stdout, ';')
|
||||
player_status = words[1]
|
||||
artist = words[2]
|
||||
current_song = words[3]
|
||||
if current_song ~= nil then
|
||||
if string.len(current_song) > 18 then
|
||||
current_song = string.sub(current_song, 0, 9) .. ".."
|
||||
end
|
||||
end
|
||||
|
||||
if player_status == "Playing" then
|
||||
icon.image = PLAY_ICON_NAME
|
||||
widget.colors = {beautiful.widget_main_color}
|
||||
widget:set_text(artist, current_song)
|
||||
elseif player_status == "Paused" then
|
||||
icon.image = PAUSE_ICON_NAME
|
||||
widget.colors = {beautiful.widget_main_color}
|
||||
widget:set_text(artist, current_song)
|
||||
elseif player_status == "Stopped" then
|
||||
icon.image = STOP_ICON_NAME
|
||||
else -- no player is running
|
||||
icon.image = LIBRARY_ICON_NAME
|
||||
widget.colors = {beautiful.widget_red}
|
||||
end
|
||||
end
|
||||
|
||||
mpris_widget:buttons(
|
||||
awful.util.table.join(
|
||||
awful.button({}, 3, function()
|
||||
if popup.visible then
|
||||
popup.visible = not popup.visible
|
||||
else
|
||||
rebuild_popup()
|
||||
popup:move_next_to(mouse.current_widget_geometry)
|
||||
end
|
||||
end),
|
||||
awful.button({}, 4, function() awful.spawn(NEXT_MPD_CMD, false) end),
|
||||
awful.button({}, 5, function() awful.spawn(PREV_MPD_CMD, false) end),
|
||||
awful.button({}, 1, function() awful.spawn(TOGGLE_MPD_CMD, false) end)
|
||||
)
|
||||
)
|
||||
|
||||
watch(string.format(GET_MPD_CMD, "'" .. default_player .. "'"), 1, update_graphic, mpris_widget)
|
||||
|
||||
return mpris_widget
|
||||
|
||||
end
|
||||
|
||||
return setmetatable(mpris_widget, {__call = function(_, ...) return worker(...) end})
|
|
@ -1,22 +0,0 @@
|
|||
# Net Speed Widget
|
||||
|
||||
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(),
|
||||
...
|
||||
}
|
||||
...
|
||||
```
|
|
@ -1,10 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" version="1.1">
|
||||
<defs>
|
||||
<style id="current-color-scheme" type="text/css">
|
||||
.ColorScheme-Text { color:#dfdfdf; } .ColorScheme-Highlight { color:#4285f4; }
|
||||
</style>
|
||||
</defs>
|
||||
<g transform="matrix(1,0,0,1,4,4)">
|
||||
<path class="ColorScheme-Text" d="M 7,2 V 10 L 3.5,6.5 2,8 8,14 14,8 12.5,6.5 9,10 V 2 Z" style="fill:currentColor"/>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 410 B |
|
@ -1,10 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" version="1.1">
|
||||
<defs>
|
||||
<style id="current-color-scheme" type="text/css">
|
||||
.ColorScheme-Text { color:#dfdfdf; } .ColorScheme-Highlight { color:#4285f4; }
|
||||
</style>
|
||||
</defs>
|
||||
<g transform="matrix(1,0,0,1,4,4)">
|
||||
<path class="ColorScheme-Text" d="M 7,14 V 6 L 3.5,9.5 2,8 8,2 14,8 12.5,9.5 9,6 V 14 Z" style="fill:currentColor"/>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 409 B |
|
@ -1,126 +0,0 @@
|
|||
-------------------------------------------------
|
||||
-- Net Speed Widget for Awesome Window Manager
|
||||
-- Shows current upload/download speed
|
||||
-- More details could be found here:
|
||||
-- https://github.com/streetturtle/awesome-wm-widgets/tree/master/net-speed-widget
|
||||
|
||||
-- @author Pavel Makhov
|
||||
-- @copyright 2020 Pavel Makhov
|
||||
-------------------------------------------------
|
||||
|
||||
local watch = require("awful.widget.watch")
|
||||
local wibox = require("wibox")
|
||||
|
||||
local HOME_DIR = os.getenv("HOME")
|
||||
local WIDGET_DIR = HOME_DIR .. '/.config/awesome/awesome-wm-widgets/net-speed-widget/'
|
||||
local ICONS_DIR = WIDGET_DIR .. 'icons/'
|
||||
|
||||
local net_speed_widget = {}
|
||||
|
||||
local function convert_to_h(bytes)
|
||||
local speed
|
||||
local dim
|
||||
local bits = bytes * 8
|
||||
if bits < 1000 then
|
||||
speed = bits
|
||||
dim = 'b/s'
|
||||
elseif bits < 1000000 then
|
||||
speed = bits/1000
|
||||
dim = 'kb/s'
|
||||
elseif bits < 1000000000 then
|
||||
speed = bits/1000000
|
||||
dim = 'mb/s'
|
||||
elseif bits < 1000000000000 then
|
||||
speed = bits/1000000000
|
||||
dim = 'gb/s'
|
||||
else
|
||||
speed = tonumber(bits)
|
||||
dim = 'b/s'
|
||||
end
|
||||
return math.floor(speed + 0.5) .. dim
|
||||
end
|
||||
|
||||
local function split(string_to_split, separator)
|
||||
if separator == nil then separator = "%s" end
|
||||
local t = {}
|
||||
|
||||
for str in string.gmatch(string_to_split, "([^".. separator .."]+)") do
|
||||
table.insert(t, str)
|
||||
end
|
||||
|
||||
return t
|
||||
end
|
||||
|
||||
local function worker(user_args)
|
||||
|
||||
local args = user_args or {}
|
||||
|
||||
local interface = args.interface or '*'
|
||||
local timeout = args.timeout or 1
|
||||
local width = args.width or 55
|
||||
|
||||
net_speed_widget = wibox.widget {
|
||||
{
|
||||
id = 'rx_speed',
|
||||
forced_width = width,
|
||||
align = 'right',
|
||||
widget = wibox.widget.textbox
|
||||
},
|
||||
{
|
||||
image = ICONS_DIR .. 'down.svg',
|
||||
widget = wibox.widget.imagebox
|
||||
},
|
||||
{
|
||||
image = ICONS_DIR .. 'up.svg',
|
||||
widget = wibox.widget.imagebox
|
||||
},
|
||||
{
|
||||
id = 'tx_speed',
|
||||
forced_width = width,
|
||||
align = 'left',
|
||||
widget = wibox.widget.textbox
|
||||
},
|
||||
layout = wibox.layout.fixed.horizontal,
|
||||
set_rx_text = function(self, new_rx_speed)
|
||||
self:get_children_by_id('rx_speed')[1]:set_text(tostring(new_rx_speed))
|
||||
end,
|
||||
set_tx_text = function(self, new_tx_speed)
|
||||
self:get_children_by_id('tx_speed')[1]:set_text(tostring(new_tx_speed))
|
||||
end
|
||||
}
|
||||
|
||||
-- make sure these are not shared across different worker/widgets (e.g. two monitors)
|
||||
-- otherwise the speed will be randomly split among the worker in each monitor
|
||||
local prev_rx = 0
|
||||
local prev_tx = 0
|
||||
|
||||
local update_widget = function(widget, stdout)
|
||||
|
||||
local cur_vals = split(stdout, '\r\n')
|
||||
|
||||
local cur_rx = 0
|
||||
local cur_tx = 0
|
||||
|
||||
for i, v in ipairs(cur_vals) do
|
||||
if i%2 == 1 then cur_rx = cur_rx + v end
|
||||
if i%2 == 0 then cur_tx = cur_tx + v end
|
||||
end
|
||||
|
||||
local speed_rx = (cur_rx - prev_rx) / timeout
|
||||
local speed_tx = (cur_tx - prev_tx) / timeout
|
||||
|
||||
widget:set_rx_text(convert_to_h(speed_rx))
|
||||
widget:set_tx_text(convert_to_h(speed_tx))
|
||||
|
||||
prev_rx = cur_rx
|
||||
prev_tx = cur_tx
|
||||
end
|
||||
|
||||
watch(string.format([[bash -c "cat /sys/class/net/%s/statistics/*_bytes"]], interface),
|
||||
timeout, update_widget, net_speed_widget)
|
||||
|
||||
return net_speed_widget
|
||||
|
||||
end
|
||||
|
||||
return setmetatable(net_speed_widget, { __call = function(_, ...) return worker(...) end })
|
|
@ -1,55 +0,0 @@
|
|||
# Pactl volume widget
|
||||
|
||||
This is a volume widget that uses `pactl` only for controlling volume and
|
||||
selecting sinks and sources. Hence, it can be used with PulseAudio or PipeWire
|
||||
likewise, unlike the original Volume widget.
|
||||
|
||||
Other than that it is heavily based on the original widget, including its
|
||||
customization and icon options. For screenshots, see the original widget.
|
||||
|
||||
## Installation
|
||||
|
||||
Clone the repo under **~/.config/awesome/** and add widget in **rc.lua**:
|
||||
|
||||
```lua
|
||||
local volume_widget = require('awesome-wm-widgets.pactl-widget.volume')
|
||||
...
|
||||
s.mytasklist, -- Middle widget
|
||||
{ -- Right widgets
|
||||
layout = wibox.layout.fixed.horizontal,
|
||||
...
|
||||
-- default
|
||||
volume_widget(),
|
||||
-- customized
|
||||
volume_widget{
|
||||
widget_type = 'arc'
|
||||
},
|
||||
```
|
||||
|
||||
### Shortcuts
|
||||
|
||||
To improve responsiveness of the widget when volume level is changed by a shortcut use corresponding methods of the widget:
|
||||
|
||||
```lua
|
||||
awful.key({}, "XF86AudioRaiseVolume", function () volume_widget:inc(5) end),
|
||||
awful.key({}, "XF86AudioLowerVolume", function () volume_widget:dec(5) end),
|
||||
awful.key({}, "XF86AudioMute", function () volume_widget:toggle() end),
|
||||
```
|
||||
|
||||
## Customization
|
||||
|
||||
It is possible to customize the widget by providing a table with all or some of
|
||||
the following config parameters:
|
||||
|
||||
### Generic parameter
|
||||
|
||||
| Name | Default | Description |
|
||||
|---|---|---|
|
||||
| `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` | `@DEFAULT_SINK@` | Select the device name to control |
|
||||
| `tooltip` | `false` | Display volume level in a tooltip when the mouse cursor hovers the widget |
|
||||
|
||||
For more details on parameters depending on the chosen widget type, please
|
||||
refer to the original Volume widget.
|
|
@ -1,124 +0,0 @@
|
|||
local spawn = require("awful.spawn")
|
||||
local utils = require("awesome-wm-widgets.pactl-widget.utils")
|
||||
|
||||
local pactl = {}
|
||||
|
||||
|
||||
function pactl.volume_increase(device, step)
|
||||
spawn('pactl set-sink-volume ' .. device .. ' +' .. step .. '%', false)
|
||||
end
|
||||
|
||||
function pactl.volume_decrease(device, step)
|
||||
spawn('pactl set-sink-volume ' .. device .. ' -' .. step .. '%', false)
|
||||
end
|
||||
|
||||
function pactl.mute_toggle(device)
|
||||
spawn('pactl set-sink-mute ' .. device .. ' toggle', false)
|
||||
end
|
||||
|
||||
function pactl.get_volume(device)
|
||||
local stdout = utils.popen_and_return('pactl get-sink-volume ' .. device)
|
||||
|
||||
local volsum, volcnt = 0, 0
|
||||
for vol in string.gmatch(stdout, "(%d?%d?%d)%%") do
|
||||
vol = tonumber(vol)
|
||||
if vol ~= nil then
|
||||
volsum = volsum + vol
|
||||
volcnt = volcnt + 1
|
||||
end
|
||||
end
|
||||
|
||||
if volcnt == 0 then
|
||||
return nil
|
||||
end
|
||||
|
||||
return volsum / volcnt
|
||||
end
|
||||
|
||||
function pactl.get_mute(device)
|
||||
local stdout = utils.popen_and_return('pactl get-sink-mute ' .. device)
|
||||
if string.find(stdout, "yes") then
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
function pactl.get_sinks_and_sources()
|
||||
local default_sink = utils.trim(utils.popen_and_return('pactl get-default-sink'))
|
||||
local default_source = utils.trim(utils.popen_and_return('pactl get-default-source'))
|
||||
|
||||
local sinks = {}
|
||||
local sources = {}
|
||||
|
||||
local device
|
||||
local ports
|
||||
local key
|
||||
local value
|
||||
local in_section
|
||||
|
||||
for line in utils.popen_and_return('pactl list'):gmatch('[^\r\n]*') do
|
||||
|
||||
if string.match(line, '^%a+ #') then
|
||||
in_section = nil
|
||||
end
|
||||
|
||||
local is_sink_line = string.match(line, '^Sink #')
|
||||
local is_source_line = string.match(line, '^Source #')
|
||||
|
||||
if is_sink_line or is_source_line then
|
||||
in_section = "main"
|
||||
|
||||
device = {
|
||||
id = line:match('#(%d+)'),
|
||||
is_default = false
|
||||
}
|
||||
if is_sink_line then
|
||||
table.insert(sinks, device)
|
||||
else
|
||||
table.insert(sources, device)
|
||||
end
|
||||
end
|
||||
|
||||
-- Found a new subsection
|
||||
if in_section ~= nil and string.match(line, '^\t%a+:$') then
|
||||
in_section = utils.trim(line):lower()
|
||||
in_section = string.sub(in_section, 1, #in_section-1)
|
||||
|
||||
if in_section == 'ports' then
|
||||
ports = {}
|
||||
device['ports'] = ports
|
||||
end
|
||||
end
|
||||
|
||||
-- Found a key-value pair
|
||||
if string.match(line, "^\t*[^\t]+: ") then
|
||||
local t = utils.split(line, ':')
|
||||
key = utils.trim(t[1]):lower():gsub(' ', '_')
|
||||
value = utils.trim(t[2])
|
||||
end
|
||||
|
||||
-- Key value pair on 1st level
|
||||
if in_section ~= nil and string.match(line, "^\t[^\t]+: ") then
|
||||
device[key] = value
|
||||
|
||||
if key == "name" and (value == default_sink or value == default_source) then
|
||||
device['is_default'] = true
|
||||
end
|
||||
end
|
||||
|
||||
-- Key value pair in ports section
|
||||
if in_section == "ports" and string.match(line, "^\t\t[^\t]+: ") then
|
||||
ports[key] = value
|
||||
end
|
||||
end
|
||||
|
||||
return sinks, sources
|
||||
end
|
||||
|
||||
function pactl.set_default(type, name)
|
||||
spawn('pactl set-default-' .. type .. ' "' .. name .. '"', false)
|
||||
end
|
||||
|
||||
|
||||
return pactl
|
|
@ -1,28 +0,0 @@
|
|||
local utils = {}
|
||||
|
||||
|
||||
function utils.trim(str)
|
||||
return string.match(str, "^%s*(.-)%s*$")
|
||||
end
|
||||
|
||||
function utils.split(string_to_split, separator)
|
||||
if separator == nil then separator = "%s" end
|
||||
local t = {}
|
||||
|
||||
for str in string.gmatch(string_to_split, "([^".. separator .."]+)") do
|
||||
table.insert(t, str)
|
||||
end
|
||||
|
||||
return t
|
||||
end
|
||||
|
||||
function utils.popen_and_return(cmd)
|
||||
local handle = io.popen(cmd)
|
||||
local result = handle:read("*a")
|
||||
handle:close()
|
||||
|
||||
return result
|
||||
end
|
||||
|
||||
|
||||
return utils
|
|
@ -1,243 +0,0 @@
|
|||
-------------------------------------------------
|
||||
-- A purely pactl-based volume widget based on the original Volume widget
|
||||
-- More details could be found here:
|
||||
-- https://github.com/streetturtle/awesome-wm-widgets/tree/master/pactl-widget
|
||||
|
||||
-- @author Stefan Huber
|
||||
-- @copyright 2023 Stefan Huber
|
||||
-------------------------------------------------
|
||||
|
||||
local awful = require("awful")
|
||||
local wibox = require("wibox")
|
||||
local spawn = require("awful.spawn")
|
||||
local gears = require("gears")
|
||||
local beautiful = require("beautiful")
|
||||
|
||||
local pactl = require("awesome-wm-widgets.pactl-widget.pactl")
|
||||
local utils = require("awesome-wm-widgets.pactl-widget.utils")
|
||||
|
||||
|
||||
local widget_types = {
|
||||
icon_and_text = require("awesome-wm-widgets.volume-widget.widgets.icon-and-text-widget"),
|
||||
icon = require("awesome-wm-widgets.volume-widget.widgets.icon-widget"),
|
||||
arc = require("awesome-wm-widgets.volume-widget.widgets.arc-widget"),
|
||||
horizontal_bar = require("awesome-wm-widgets.volume-widget.widgets.horizontal-bar-widget"),
|
||||
vertical_bar = require("awesome-wm-widgets.volume-widget.widgets.vertical-bar-widget")
|
||||
}
|
||||
local volume = {}
|
||||
|
||||
local rows = { layout = wibox.layout.fixed.vertical }
|
||||
|
||||
local popup = awful.popup{
|
||||
bg = beautiful.bg_normal,
|
||||
ontop = true,
|
||||
visible = false,
|
||||
shape = gears.shape.rounded_rect,
|
||||
border_width = 1,
|
||||
border_color = beautiful.bg_focus,
|
||||
maximum_width = 400,
|
||||
offset = { y = 5 },
|
||||
widget = {}
|
||||
}
|
||||
|
||||
local function build_main_line(device)
|
||||
if device.active_port ~= nil and device.ports[device.active_port] ~= nil then
|
||||
return device.description .. ' · ' .. utils.split(device.ports[device.active_port], " ")[1]
|
||||
else
|
||||
return device.description
|
||||
end
|
||||
end
|
||||
|
||||
local function build_rows(devices, on_checkbox_click, device_type)
|
||||
local device_rows = { layout = wibox.layout.fixed.vertical }
|
||||
for _, device in pairs(devices) do
|
||||
|
||||
local checkbox = wibox.widget {
|
||||
checked = device.is_default,
|
||||
color = beautiful.bg_normal,
|
||||
paddings = 2,
|
||||
shape = gears.shape.circle,
|
||||
forced_width = 20,
|
||||
forced_height = 20,
|
||||
check_color = beautiful.fg_urgent,
|
||||
widget = wibox.widget.checkbox
|
||||
}
|
||||
|
||||
checkbox:connect_signal("button::press", function()
|
||||
pactl.set_default(device_type, device.name)
|
||||
on_checkbox_click()
|
||||
end)
|
||||
|
||||
local row = wibox.widget {
|
||||
{
|
||||
{
|
||||
{
|
||||
checkbox,
|
||||
valign = 'center',
|
||||
layout = wibox.container.place,
|
||||
},
|
||||
{
|
||||
{
|
||||
text = build_main_line(device),
|
||||
align = 'left',
|
||||
widget = wibox.widget.textbox
|
||||
},
|
||||
left = 10,
|
||||
layout = wibox.container.margin
|
||||
},
|
||||
spacing = 8,
|
||||
layout = wibox.layout.align.horizontal
|
||||
},
|
||||
margins = 4,
|
||||
layout = wibox.container.margin
|
||||
},
|
||||
bg = beautiful.bg_normal,
|
||||
widget = wibox.container.background
|
||||
}
|
||||
|
||||
row:connect_signal("mouse::enter", function(c) c:set_bg(beautiful.bg_focus) end)
|
||||
row:connect_signal("mouse::leave", function(c) c:set_bg(beautiful.bg_normal) end)
|
||||
|
||||
local old_cursor, old_wibox
|
||||
row:connect_signal("mouse::enter", function()
|
||||
local wb = mouse.current_wibox
|
||||
old_cursor, old_wibox = wb.cursor, wb
|
||||
wb.cursor = "hand1"
|
||||
end)
|
||||
row:connect_signal("mouse::leave", function()
|
||||
if old_wibox then
|
||||
old_wibox.cursor = old_cursor
|
||||
old_wibox = nil
|
||||
end
|
||||
end)
|
||||
|
||||
row:connect_signal("button::press", function()
|
||||
pactl.set_default(device_type, device.name)
|
||||
on_checkbox_click()
|
||||
end)
|
||||
|
||||
table.insert(device_rows, row)
|
||||
end
|
||||
|
||||
return device_rows
|
||||
end
|
||||
|
||||
local function build_header_row(text)
|
||||
return wibox.widget{
|
||||
{
|
||||
markup = "<b>" .. text .. "</b>",
|
||||
align = 'center',
|
||||
widget = wibox.widget.textbox
|
||||
},
|
||||
bg = beautiful.bg_normal,
|
||||
widget = wibox.container.background
|
||||
}
|
||||
end
|
||||
|
||||
local function rebuild_popup()
|
||||
for i = 0, #rows do
|
||||
rows[i]=nil
|
||||
end
|
||||
|
||||
local sinks, sources = pactl.get_sinks_and_sources()
|
||||
table.insert(rows, build_header_row("SINKS"))
|
||||
table.insert(rows, build_rows(sinks, function() rebuild_popup() end, "sink"))
|
||||
table.insert(rows, build_header_row("SOURCES"))
|
||||
table.insert(rows, build_rows(sources, function() rebuild_popup() end, "source"))
|
||||
|
||||
popup:setup(rows)
|
||||
end
|
||||
|
||||
local function worker(user_args)
|
||||
|
||||
local args = user_args or {}
|
||||
|
||||
local mixer_cmd = args.mixer_cmd or 'pavucontrol'
|
||||
local widget_type = args.widget_type
|
||||
local refresh_rate = args.refresh_rate or 1
|
||||
local step = args.step or 5
|
||||
local device = args.device or '@DEFAULT_SINK@'
|
||||
local tooltip = args.tooltip or false
|
||||
|
||||
if widget_types[widget_type] == nil then
|
||||
volume.widget = widget_types['icon_and_text'].get_widget(args.icon_and_text_args)
|
||||
else
|
||||
volume.widget = widget_types[widget_type].get_widget(args)
|
||||
end
|
||||
|
||||
local function update_graphic(widget)
|
||||
local vol = pactl.get_volume(device)
|
||||
if vol ~= nil then
|
||||
widget:set_volume_level(vol)
|
||||
end
|
||||
|
||||
if pactl.get_mute(device) then
|
||||
widget:mute()
|
||||
else
|
||||
widget:unmute()
|
||||
end
|
||||
end
|
||||
|
||||
function volume:inc(s)
|
||||
pactl.volume_increase(device, s or step)
|
||||
update_graphic(volume.widget)
|
||||
end
|
||||
|
||||
function volume:dec(s)
|
||||
pactl.volume_decrease(device, s or step)
|
||||
update_graphic(volume.widget)
|
||||
end
|
||||
|
||||
function volume:toggle()
|
||||
pactl.mute_toggle(device)
|
||||
update_graphic(volume.widget)
|
||||
end
|
||||
|
||||
function volume:popup()
|
||||
if popup.visible then
|
||||
popup.visible = not popup.visible
|
||||
else
|
||||
rebuild_popup()
|
||||
popup:move_next_to(mouse.current_widget_geometry)
|
||||
end
|
||||
end
|
||||
|
||||
function volume:mixer()
|
||||
if mixer_cmd then
|
||||
spawn(mixer_cmd)
|
||||
end
|
||||
end
|
||||
|
||||
volume.widget:buttons(
|
||||
awful.util.table.join(
|
||||
awful.button({}, 1, function() volume:toggle() end),
|
||||
awful.button({}, 2, function() volume:mixer() end),
|
||||
awful.button({}, 3, function() volume:popup() end),
|
||||
awful.button({}, 4, function() volume:inc() end),
|
||||
awful.button({}, 5, function() volume:dec() end)
|
||||
)
|
||||
)
|
||||
|
||||
gears.timer {
|
||||
timeout = refresh_rate,
|
||||
call_now = true,
|
||||
autostart = true,
|
||||
callback = function()
|
||||
update_graphic(volume.widget)
|
||||
end
|
||||
}
|
||||
|
||||
if tooltip then
|
||||
awful.tooltip {
|
||||
objects = { volume.widget },
|
||||
timer_function = function()
|
||||
return pactl.get_volume(device) .. " %"
|
||||
end,
|
||||
}
|
||||
end
|
||||
|
||||
return volume.widget
|
||||
end
|
||||
|
||||
|
||||
return setmetatable(volume, { __call = function(_, ...) return worker(...) end })
|
|
@ -1,41 +0,0 @@
|
|||
# Ram widget
|
||||
|
||||
This widget shows the RAM usage. When clicked another widget appears with more detailed information:
|
||||
|
||||
![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
|
||||
|
||||
It is possible to customize widget by providing a table with all or some of the following config parameters:
|
||||
|
||||
| Name | Default | Description |
|
||||
|---|---|---|
|
||||
| `color_used` | `beautiful.bg_urgent` | Color for used RAM |
|
||||
| `color_free` | `beautiful.fg_normal` | Color for free RAM |
|
||||
| `color_buf` | `beautiful.border_color_active` | Color for buffers/cache |
|
||||
| `widget_height` | `25` | Height of the widget |
|
||||
| `widget_width` | `25` | Width of the widget |
|
||||
| `widget_show_buf` | `false` | Whether to display buffers/cache separately in the tray widget. If `false`, buffers/cache are considered free RAM. |
|
||||
| `timeout` | 1 | How often (in seconds) the widget refreshes |
|
||||
|
||||
## 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 ram_widget = require("awesome-wm-widgets.ram-widget.ram-widget")
|
||||
...
|
||||
s.mytasklist, -- Middle widget
|
||||
{ -- Right widgets
|
||||
layout = wibox.layout.fixed.horizontal,
|
||||
...
|
||||
ram_widget(),
|
||||
...
|
||||
}
|
||||
...
|
||||
```
|
||||
|
Before Width: | Height: | Size: 102 KiB |
|
@ -1,108 +0,0 @@
|
|||
local awful = require("awful")
|
||||
local beautiful = require("beautiful")
|
||||
local gears = require("gears")
|
||||
local watch = require("awful.widget.watch")
|
||||
local wibox = require("wibox")
|
||||
|
||||
|
||||
local ramgraph_widget = {}
|
||||
|
||||
|
||||
local function worker(user_args)
|
||||
local args = user_args or {}
|
||||
local timeout = args.timeout or 1
|
||||
local color_used = args.color_used or beautiful.bg_urgent
|
||||
local color_free = args.color_free or beautiful.fg_normal
|
||||
local color_buf = args.color_buf or beautiful.border_color_active
|
||||
local widget_show_buf = args.widget_show_buf or false
|
||||
local widget_height = args.widget_height or 25
|
||||
local widget_width = args.widget_width or 25
|
||||
|
||||
--- Main ram widget shown on wibar
|
||||
ramgraph_widget = wibox.widget {
|
||||
border_width = 0,
|
||||
colors = {
|
||||
color_used,
|
||||
color_free,
|
||||
color_buf,
|
||||
},
|
||||
display_labels = false,
|
||||
forced_height = widget_height,
|
||||
forced_width = widget_width,
|
||||
widget = wibox.widget.piechart
|
||||
}
|
||||
|
||||
--- Widget which is shown when user clicks on the ram widget
|
||||
local popup = awful.popup{
|
||||
ontop = true,
|
||||
visible = false,
|
||||
widget = {
|
||||
widget = wibox.widget.piechart,
|
||||
forced_height = 200,
|
||||
forced_width = 400,
|
||||
colors = {
|
||||
color_used,
|
||||
color_free,
|
||||
color_buf, -- buf_cache
|
||||
},
|
||||
},
|
||||
shape = gears.shape.rounded_rect,
|
||||
border_color = beautiful.border_color_active,
|
||||
border_width = 1,
|
||||
offset = { y = 5 },
|
||||
}
|
||||
|
||||
--luacheck:ignore 231
|
||||
local total, used, free, shared, buff_cache, available, total_swap, used_swap, free_swap
|
||||
|
||||
local function getPercentage(value)
|
||||
return math.floor(value / (total+total_swap) * 100 + 0.5) .. '%'
|
||||
end
|
||||
|
||||
watch('bash -c "LANGUAGE=en_US.UTF-8 free | grep -z Mem.*Swap.*"', timeout,
|
||||
function(widget, stdout)
|
||||
total, used, free, shared, buff_cache, available, total_swap, used_swap, free_swap =
|
||||
stdout:match('(%d+)%s*(%d+)%s*(%d+)%s*(%d+)%s*(%d+)%s*(%d+)%s*Swap:%s*(%d+)%s*(%d+)%s*(%d+)')
|
||||
|
||||
if widget_show_buf then
|
||||
widget.data = { used, free, buff_cache }
|
||||
else
|
||||
widget.data = { used, total-used }
|
||||
end
|
||||
|
||||
if popup.visible then
|
||||
popup:get_widget().data_list = {
|
||||
{'used ' .. getPercentage(used + used_swap), used + used_swap},
|
||||
{'free ' .. getPercentage(free + free_swap), free + free_swap},
|
||||
{'buff_cache ' .. getPercentage(buff_cache), buff_cache}
|
||||
}
|
||||
end
|
||||
end,
|
||||
ramgraph_widget
|
||||
)
|
||||
|
||||
ramgraph_widget:buttons(
|
||||
awful.util.table.join(
|
||||
awful.button({}, 1, function()
|
||||
popup:get_widget().data_list = {
|
||||
{'used ' .. getPercentage(used + used_swap), used + used_swap},
|
||||
{'free ' .. getPercentage(free + free_swap), free + free_swap},
|
||||
{'buff_cache ' .. getPercentage(buff_cache), buff_cache}
|
||||
}
|
||||
|
||||
if popup.visible then
|
||||
popup.visible = not popup.visible
|
||||
else
|
||||
popup:move_next_to(mouse.current_widget_geometry)
|
||||
end
|
||||
end)
|
||||
)
|
||||
)
|
||||
|
||||
return ramgraph_widget
|
||||
end
|
||||
|
||||
|
||||
return setmetatable(ramgraph_widget, { __call = function(_, ...)
|
||||
return worker(...)
|
||||
end })
|
|
@ -1,28 +0,0 @@
|
|||
# ToDo Widget
|
||||
|
||||
This widget displays a list of todo items and allows marking item as done/undone, delete an item and create new ones:
|
||||
|
||||
![screenshot](./todo.gif)
|
||||
|
||||
# Installation
|
||||
|
||||
Widget persists todo items as a JSON, so in order to simplify JSON serialisation/deserialisation download a **json.lua** from this repository: https://github.com/rxi/json.lua under `~/.config/awesone` folder. And don't forget to star a repo :)
|
||||
|
||||
Then clone this repository under **~/.config/awesome/** and add the widget in **rc.lua**:
|
||||
|
||||
```lua
|
||||
local todo_widget = require("awesome-wm-widgets.todo-widget.todo")
|
||||
...
|
||||
s.mytasklist, -- Middle widget
|
||||
{ -- Right widgets
|
||||
layout = wibox.layout.fixed.horizontal,
|
||||
...
|
||||
-- default
|
||||
todo_widget(),
|
||||
...
|
||||
```
|
||||
Also note that widget uses [Arc Icons](https://github.com/horst3180/arc-icon-theme) and expects them to be installed under `/usr/share/icons/Arc/`.
|
||||
|
||||
# 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 widget parameters.
|
|
@ -1,148 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
sodipodi:docname="checkbox-checked-symbolic.svg"
|
||||
inkscape:export-filename="/home/sam/dev/RESOURCES/gnome-icon-theme-symbolic/src/gnome-stencils.png"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90"
|
||||
height="16"
|
||||
id="svg7384"
|
||||
version="1.1"
|
||||
inkscape:version="0.91 r13725"
|
||||
width="16">
|
||||
<metadata
|
||||
id="metadata90">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title>Gnome Symbolic Icon Theme</dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<sodipodi:namedview
|
||||
inkscape:bbox-nodes="false"
|
||||
inkscape:bbox-paths="true"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
inkscape:current-layer="layer9"
|
||||
inkscape:cx="6.52031"
|
||||
inkscape:cy="7.7686"
|
||||
gridtolerance="10"
|
||||
inkscape:guide-bbox="true"
|
||||
guidetolerance="10"
|
||||
id="namedview88"
|
||||
inkscape:object-nodes="false"
|
||||
inkscape:object-paths="false"
|
||||
objecttolerance="10"
|
||||
pagecolor="#3a3b39"
|
||||
inkscape:pageopacity="1"
|
||||
inkscape:pageshadow="2"
|
||||
showborder="false"
|
||||
showgrid="false"
|
||||
showguides="true"
|
||||
inkscape:snap-bbox="true"
|
||||
inkscape:snap-bbox-midpoints="false"
|
||||
inkscape:snap-global="true"
|
||||
inkscape:snap-grids="true"
|
||||
inkscape:snap-nodes="true"
|
||||
inkscape:snap-others="false"
|
||||
inkscape:snap-to-guides="true"
|
||||
inkscape:window-height="1375"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:window-width="2560"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="27"
|
||||
inkscape:zoom="1">
|
||||
<inkscape:grid
|
||||
dotted="false"
|
||||
empspacing="2"
|
||||
enabled="true"
|
||||
id="grid4866"
|
||||
originx="-159.99995px"
|
||||
originy="120px"
|
||||
snapvisiblegridlinesonly="true"
|
||||
spacingx="1px"
|
||||
spacingy="1px"
|
||||
type="xygrid"
|
||||
visible="true" />
|
||||
</sodipodi:namedview>
|
||||
<title
|
||||
id="title9167">Gnome Symbolic Icon Theme</title>
|
||||
<defs
|
||||
id="defs7386" />
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer9"
|
||||
inkscape:label="status"
|
||||
style="display:inline"
|
||||
transform="translate(-401.00015,-337)">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
d="M 404.46875,338 C 403.10458,338 402,339.10458 402,340.46875 l 0,9.0625 c 0,1.36417 1.10458,2.46875 2.46875,2.46875 l 9.0625,0 C 414.89542,352 416,350.89542 416,349.53125 l 0,-9.0625 C 416,339.10458 414.89542,338 413.53125,338 l -9.0625,0 z m 0,1 9.0625,0 c 0.83222,0 1.46875,0.63653 1.46875,1.46875 l 0,9.0625 C 415,350.36347 414.36347,351 413.53125,351 l -9.0625,0 C 403.63653,351 403,350.36347 403,349.53125 l 0,-9.0625 C 403,339.63653 403.63653,339 404.46875,339 z"
|
||||
id="rect9618-8"
|
||||
style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.99115032;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
d="m 415.17698,339.82322 -5.67683,5.55178 -1.9375,-1.9375 -2.125,2.125 3,3 1.0625,1.0625 1.0625,-1.0625 4.61433,-4.73928 z"
|
||||
id="path8913-6-7-1-5-1"
|
||||
sodipodi:nodetypes="ccccccccc"
|
||||
style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:3;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans" />
|
||||
</g>
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer10"
|
||||
inkscape:label="devices"
|
||||
style="display:inline"
|
||||
transform="translate(-401.00015,-337)" />
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer11"
|
||||
inkscape:label="apps"
|
||||
transform="translate(-401.00015,-337)" />
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer13"
|
||||
inkscape:label="places"
|
||||
style="display:inline"
|
||||
transform="translate(-401.00015,-337)" />
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer14"
|
||||
inkscape:label="mimetypes"
|
||||
transform="translate(-401.00015,-337)" />
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer15"
|
||||
inkscape:label="emblems"
|
||||
style="display:inline"
|
||||
transform="translate(-401.00015,-337)" />
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="g71291"
|
||||
inkscape:label="emotes"
|
||||
style="display:inline"
|
||||
transform="translate(-401.00015,-337)" />
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="g4953"
|
||||
inkscape:label="categories"
|
||||
style="display:inline"
|
||||
transform="translate(-401.00015,-337)" />
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer12"
|
||||
inkscape:label="actions"
|
||||
style="display:inline"
|
||||
transform="translate(-401.00015,-337)" />
|
||||
</svg>
|
Before Width: | Height: | Size: 5.7 KiB |
|
@ -1 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#ECEFF4" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-down"><polyline points="6 9 12 15 18 9"></polyline></svg>
|
Before Width: | Height: | Size: 264 B |
|
@ -1 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#ECEFF4" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-up"><polyline points="18 15 12 9 6 15"></polyline></svg>
|
Before Width: | Height: | Size: 263 B |
|
@ -1,157 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="16"
|
||||
height="16"
|
||||
id="svg2"
|
||||
sodipodi:version="0.32"
|
||||
inkscape:version="0.48.1 r9760"
|
||||
version="1.0"
|
||||
sodipodi:docname="list-add.svg"
|
||||
inkscape:output_extension="org.inkscape.output.svg.inkscape">
|
||||
<defs
|
||||
id="defs4">
|
||||
<inkscape:perspective
|
||||
sodipodi:type="inkscape:persp3d"
|
||||
inkscape:vp_x="0 : 8 : 1"
|
||||
inkscape:vp_y="0 : 1000 : 0"
|
||||
inkscape:vp_z="16 : 8 : 1"
|
||||
inkscape:persp3d-origin="8 : 5.3333333 : 1"
|
||||
id="perspective18" />
|
||||
<linearGradient
|
||||
id="StandardGradient"
|
||||
x1="7.1984468"
|
||||
y1="3"
|
||||
x2="7.1984468"
|
||||
y2="13.008396"
|
||||
gradientUnits="userSpaceOnUse">
|
||||
<stop
|
||||
style="stop-color:#000000;stop-opacity:0.86274511;"
|
||||
offset="0"
|
||||
id="stop3283" />
|
||||
<stop
|
||||
style="stop-color:#000000;stop-opacity:0.47058824;"
|
||||
offset="1"
|
||||
id="stop3285" />
|
||||
</linearGradient>
|
||||
<inkscape:perspective
|
||||
id="perspective3648"
|
||||
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
|
||||
inkscape:vp_z="1 : 0.5 : 1"
|
||||
inkscape:vp_y="0 : 1000 : 0"
|
||||
inkscape:vp_x="0 : 0.5 : 1"
|
||||
sodipodi:type="inkscape:persp3d" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#StandardGradient"
|
||||
id="linearGradient3627"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="7.1984468"
|
||||
y1="3"
|
||||
x2="7.1984468"
|
||||
y2="13.008396"
|
||||
gradientTransform="translate(-20,0)" />
|
||||
<clipPath
|
||||
clipPathUnits="userSpaceOnUse"
|
||||
id="clipPath3649">
|
||||
<path
|
||||
style="fill:#ff00ff;fill-opacity:1;stroke:none;display:inline"
|
||||
d="m -20,0 0,16 16,0 0,-16 -16,0 z m 6.03125,3 4,0 0,3 L -7,6 l 0,4 -2.96875,0 0,3 -4,0 0,-3 -3.03125,0 0,-4 3.03125,0 0,-3 z"
|
||||
id="path3651" />
|
||||
</clipPath>
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#StandardGradient"
|
||||
id="linearGradient3273"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="7.1984468"
|
||||
y1="3"
|
||||
x2="7.1984468"
|
||||
y2="13.008396" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#StandardGradient"
|
||||
id="linearGradient3277"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="7.1984468"
|
||||
y1="3"
|
||||
x2="7.1984468"
|
||||
y2="13.008396" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#9a9a9a"
|
||||
borderopacity="1"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="17.631088"
|
||||
inkscape:cx="-7.1895071"
|
||||
inkscape:cy="5.6066362"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer3"
|
||||
showgrid="true"
|
||||
inkscape:showpageshadow="false"
|
||||
showguides="true"
|
||||
inkscape:guide-bbox="true"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1028"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="25"
|
||||
inkscape:window-maximized="1">
|
||||
<sodipodi:guide
|
||||
orientation="1,0"
|
||||
position="0,112"
|
||||
id="guide2383" />
|
||||
<sodipodi:guide
|
||||
orientation="0,1"
|
||||
position="26.278146,128"
|
||||
id="guide2385" />
|
||||
<sodipodi:guide
|
||||
orientation="1,0"
|
||||
position="128,54.082119"
|
||||
id="guide2387" />
|
||||
<sodipodi:guide
|
||||
orientation="0,1"
|
||||
position="78.156291,0"
|
||||
id="guide2389" />
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid3672"
|
||||
visible="true"
|
||||
enabled="true" />
|
||||
</sodipodi:namedview>
|
||||
<metadata
|
||||
id="metadata7">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer3"
|
||||
inkscape:label="Cross"
|
||||
style="display:inline">
|
||||
<path
|
||||
style="fill:#bebebe;fill-opacity:1;stroke:none"
|
||||
d="m 7.0372441,3 0,4.0117466 -4.0372441,0 0,1.9731062 4.0372441,0 0,4.0151472 1.9884029,0 0,-4.0151472 3.974353,0 0,-1.9731062 -3.974353,0 0,-4.0117466 z"
|
||||
id="Symbol"
|
||||
sodipodi:nodetypes="ccccccccccccc"
|
||||
inkscape:label="#rect2498"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 4.6 KiB |
Before Width: | Height: | Size: 198 KiB |
|
@ -1,340 +0,0 @@
|
|||
-------------------------------------------------
|
||||
-- ToDo Widget for Awesome Window Manager
|
||||
-- More details could be found here:
|
||||
-- https://github.com/streetturtle/awesome-wm-widgets/tree/master/todo-widget
|
||||
|
||||
-- @author Pavel Makhov
|
||||
-- @copyright 2020 Pavel Makhov
|
||||
-------------------------------------------------
|
||||
|
||||
local awful = require("awful")
|
||||
local wibox = require("wibox")
|
||||
local json = require("json")
|
||||
local spawn = require("awful.spawn")
|
||||
local gears = require("gears")
|
||||
local beautiful = require("beautiful")
|
||||
local gfs = require("gears.filesystem")
|
||||
|
||||
local HOME_DIR = os.getenv("HOME")
|
||||
local WIDGET_DIR = HOME_DIR .. '/.config/awesome/awesome-wm-widgets/todo-widget'
|
||||
local STORAGE = HOME_DIR .. '/.cache/awmw/todo-widget/todos.json'
|
||||
|
||||
local GET_TODO_ITEMS = 'bash -c "cat ' .. STORAGE .. '"'
|
||||
|
||||
local rows = { layout = wibox.layout.fixed.vertical }
|
||||
local todo_widget = {}
|
||||
local update_widget
|
||||
todo_widget.widget = wibox.widget {
|
||||
{
|
||||
{
|
||||
{
|
||||
{
|
||||
id = "icon",
|
||||
forced_height = 16,
|
||||
forced_width = 16,
|
||||
widget = wibox.widget.imagebox
|
||||
},
|
||||
valign = 'center',
|
||||
layout = wibox.container.place
|
||||
},
|
||||
{
|
||||
id = "txt",
|
||||
widget = wibox.widget.textbox
|
||||
},
|
||||
spacing = 4,
|
||||
layout = wibox.layout.fixed.horizontal,
|
||||
},
|
||||
margins = 4,
|
||||
layout = wibox.container.margin
|
||||
},
|
||||
shape = function(cr, width, height)
|
||||
gears.shape.rounded_rect(cr, width, height, 4)
|
||||
end,
|
||||
widget = wibox.container.background,
|
||||
set_text = function(self, new_value)
|
||||
self:get_children_by_id("txt")[1].text = new_value
|
||||
end,
|
||||
set_icon = function(self, new_value)
|
||||
self:get_children_by_id("icon")[1].image = new_value
|
||||
end
|
||||
}
|
||||
|
||||
function todo_widget:update_counter(todos)
|
||||
local todo_count = 0
|
||||
for _,p in ipairs(todos) do
|
||||
if not p.status then
|
||||
todo_count = todo_count + 1
|
||||
end
|
||||
end
|
||||
|
||||
todo_widget.widget:set_text(todo_count)
|
||||
end
|
||||
|
||||
local popup = awful.popup{
|
||||
bg = beautiful.bg_normal,
|
||||
ontop = true,
|
||||
visible = false,
|
||||
shape = gears.shape.rounded_rect,
|
||||
border_width = 1,
|
||||
border_color = beautiful.bg_focus,
|
||||
maximum_width = 400,
|
||||
offset = { y = 5 },
|
||||
widget = {}
|
||||
}
|
||||
|
||||
local add_button = wibox.widget {
|
||||
{
|
||||
{
|
||||
image = WIDGET_DIR .. '/list-add-symbolic.svg',
|
||||
resize = false,
|
||||
widget = wibox.widget.imagebox
|
||||
},
|
||||
top = 11,
|
||||
left = 8,
|
||||
right = 8,
|
||||
layout = wibox.container.margin
|
||||
},
|
||||
shape = function(cr, width, height)
|
||||
gears.shape.circle(cr, width, height, 12)
|
||||
end,
|
||||
widget = wibox.container.background
|
||||
}
|
||||
|
||||
add_button:connect_signal("button::press", function()
|
||||
local pr = awful.widget.prompt()
|
||||
|
||||
table.insert(rows, wibox.widget {
|
||||
{
|
||||
{
|
||||
pr.widget,
|
||||
spacing = 8,
|
||||
layout = wibox.layout.align.horizontal
|
||||
},
|
||||
margins = 8,
|
||||
layout = wibox.container.margin
|
||||
},
|
||||
bg = beautiful.bg_normal,
|
||||
widget = wibox.container.background
|
||||
})
|
||||
awful.prompt.run{
|
||||
prompt = "<b>New item</b>: ",
|
||||
bg = beautiful.bg_normal,
|
||||
bg_cursor = beautiful.fg_urgent,
|
||||
textbox = pr.widget,
|
||||
exe_callback = function(input_text)
|
||||
if not input_text or #input_text == 0 then return end
|
||||
spawn.easy_async(GET_TODO_ITEMS, function(stdout)
|
||||
local res = json.decode(stdout)
|
||||
table.insert(res.todo_items, {todo_item = input_text, status = false})
|
||||
spawn.easy_async_with_shell("echo '" .. json.encode(res) .. "' > " .. STORAGE, function()
|
||||
spawn.easy_async(GET_TODO_ITEMS, function(items) update_widget(items) end)
|
||||
end)
|
||||
end)
|
||||
end
|
||||
}
|
||||
popup:setup(rows)
|
||||
end)
|
||||
add_button:connect_signal("mouse::enter", function(c) c:set_bg(beautiful.bg_focus) end)
|
||||
add_button:connect_signal("mouse::leave", function(c) c:set_bg(beautiful.bg_normal) end)
|
||||
|
||||
local function worker(user_args)
|
||||
|
||||
local args = user_args or {}
|
||||
|
||||
local icon = args.icon or WIDGET_DIR .. '/checkbox-checked-symbolic.svg'
|
||||
|
||||
todo_widget.widget:set_icon(icon)
|
||||
|
||||
function update_widget(stdout)
|
||||
local result = json.decode(stdout)
|
||||
if result == nil or result == '' then result = {} end
|
||||
todo_widget:update_counter(result.todo_items)
|
||||
|
||||
for i = 0, #rows do rows[i]=nil end
|
||||
|
||||
local first_row = wibox.widget {
|
||||
{
|
||||
{widget = wibox.widget.textbox},
|
||||
{
|
||||
markup = '<span size="large" font_weight="bold" color="#ffffff">ToDo</span>',
|
||||
align = 'center',
|
||||
forced_width = 350, -- for horizontal alignment
|
||||
forced_height = 40,
|
||||
widget = wibox.widget.textbox
|
||||
},
|
||||
add_button,
|
||||
spacing = 8,
|
||||
layout = wibox.layout.fixed.horizontal
|
||||
},
|
||||
bg = beautiful.bg_normal,
|
||||
widget = wibox.container.background
|
||||
}
|
||||
|
||||
table.insert(rows, first_row)
|
||||
|
||||
for i, todo_item in ipairs(result.todo_items) do
|
||||
|
||||
local checkbox = wibox.widget {
|
||||
checked = todo_item.status,
|
||||
color = beautiful.bg_normal,
|
||||
paddings = 2,
|
||||
shape = gears.shape.circle,
|
||||
forced_width = 20,
|
||||
forced_height = 20,
|
||||
check_color = beautiful.fg_urgent,
|
||||
widget = wibox.widget.checkbox
|
||||
}
|
||||
|
||||
checkbox:connect_signal("button::press", function(c)
|
||||
c:set_checked(not c.checked)
|
||||
todo_item.status = not todo_item.status
|
||||
result.todo_items[i] = todo_item
|
||||
spawn.easy_async_with_shell("echo '" .. json.encode(result) .. "' > " .. STORAGE, function ()
|
||||
todo_widget:update_counter(result.todo_items)
|
||||
end)
|
||||
end)
|
||||
|
||||
|
||||
local trash_button = wibox.widget {
|
||||
{
|
||||
{ image = WIDGET_DIR .. '/window-close-symbolic.svg',
|
||||
resize = false,
|
||||
widget = wibox.widget.imagebox
|
||||
},
|
||||
margins = 5,
|
||||
layout = wibox.container.margin
|
||||
},
|
||||
border_width = 1,
|
||||
shape = function(cr, width, height)
|
||||
gears.shape.circle(cr, width, height, 10)
|
||||
end,
|
||||
widget = wibox.container.background
|
||||
}
|
||||
|
||||
trash_button:connect_signal("button::press", function()
|
||||
table.remove(result.todo_items, i)
|
||||
spawn.easy_async_with_shell("printf '" .. json.encode(result) .. "' > " .. STORAGE, function ()
|
||||
spawn.easy_async(GET_TODO_ITEMS, function(items) update_widget(items) end)
|
||||
end)
|
||||
end)
|
||||
|
||||
|
||||
local move_up = wibox.widget {
|
||||
image = WIDGET_DIR .. '/chevron-up.svg',
|
||||
resize = false,
|
||||
widget = wibox.widget.imagebox
|
||||
}
|
||||
|
||||
move_up:connect_signal("button::press", function()
|
||||
local temp = result.todo_items[i]
|
||||
result.todo_items[i] = result.todo_items[i-1]
|
||||
result.todo_items[i-1] = temp
|
||||
spawn.easy_async_with_shell("printf '" .. json.encode(result) .. "' > " .. STORAGE, function ()
|
||||
spawn.easy_async(GET_TODO_ITEMS, function(items) update_widget(items) end)
|
||||
end)
|
||||
end)
|
||||
|
||||
local move_down = wibox.widget {
|
||||
image = WIDGET_DIR .. '/chevron-down.svg',
|
||||
resize = false,
|
||||
widget = wibox.widget.imagebox
|
||||
}
|
||||
|
||||
move_down:connect_signal("button::press", function()
|
||||
local temp = result.todo_items[i]
|
||||
result.todo_items[i] = result.todo_items[i+1]
|
||||
result.todo_items[i+1] = temp
|
||||
spawn.easy_async_with_shell("printf '" .. json.encode(result) .. "' > " .. STORAGE, function ()
|
||||
spawn.easy_async(GET_TODO_ITEMS, function(items) update_widget(items) end)
|
||||
end)
|
||||
end)
|
||||
|
||||
|
||||
local move_buttons = {
|
||||
layout = wibox.layout.fixed.vertical
|
||||
}
|
||||
|
||||
if i == 1 and #result.todo_items > 1 then
|
||||
table.insert(move_buttons, move_down)
|
||||
elseif i == #result.todo_items and #result.todo_items > 1 then
|
||||
table.insert(move_buttons, move_up)
|
||||
elseif #result.todo_items > 1 then
|
||||
table.insert(move_buttons, move_up)
|
||||
table.insert(move_buttons, move_down)
|
||||
end
|
||||
|
||||
local row = wibox.widget {
|
||||
{
|
||||
{
|
||||
{
|
||||
checkbox,
|
||||
valign = 'center',
|
||||
layout = wibox.container.place,
|
||||
},
|
||||
{
|
||||
{
|
||||
text = todo_item.todo_item,
|
||||
align = 'left',
|
||||
widget = wibox.widget.textbox
|
||||
},
|
||||
left = 10,
|
||||
layout = wibox.container.margin
|
||||
},
|
||||
{
|
||||
{
|
||||
move_buttons,
|
||||
valign = 'center',
|
||||
layout = wibox.container.place,
|
||||
},
|
||||
{
|
||||
trash_button,
|
||||
valign = 'center',
|
||||
layout = wibox.container.place,
|
||||
},
|
||||
spacing = 8,
|
||||
layout = wibox.layout.align.horizontal
|
||||
},
|
||||
spacing = 8,
|
||||
layout = wibox.layout.align.horizontal
|
||||
},
|
||||
margins = 8,
|
||||
layout = wibox.container.margin
|
||||
},
|
||||
bg = beautiful.bg_normal,
|
||||
widget = wibox.container.background
|
||||
}
|
||||
|
||||
row:connect_signal("mouse::enter", function(c) c:set_bg(beautiful.bg_focus) end)
|
||||
row:connect_signal("mouse::leave", function(c) c:set_bg(beautiful.bg_normal) end)
|
||||
|
||||
table.insert(rows, row)
|
||||
end
|
||||
|
||||
popup:setup(rows)
|
||||
end
|
||||
|
||||
todo_widget.widget:buttons(
|
||||
gears.table.join(
|
||||
awful.button({}, 1, function()
|
||||
if popup.visible then
|
||||
todo_widget.widget:set_bg('#00000000')
|
||||
popup.visible = not popup.visible
|
||||
else
|
||||
todo_widget.widget:set_bg(beautiful.bg_focus)
|
||||
popup:move_next_to(mouse.current_widget_geometry)
|
||||
end
|
||||
end)
|
||||
)
|
||||
)
|
||||
|
||||
spawn.easy_async(GET_TODO_ITEMS, function(stdout) update_widget(stdout) end)
|
||||
|
||||
return todo_widget.widget
|
||||
end
|
||||
|
||||
if not gfs.file_readable(STORAGE) then
|
||||
spawn.easy_async(string.format([[bash -c "dirname %s | xargs mkdir -p && echo '{\"todo_items\":{}}' > %s"]],
|
||||
STORAGE, STORAGE))
|
||||
end
|
||||
|
||||
return setmetatable(todo_widget, { __call = function(_, ...) return worker(...) end })
|
|
@ -1,95 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
id="svg7384"
|
||||
version="1.1"
|
||||
height="16"
|
||||
width="16"
|
||||
inkscape:version="0.48.5 r10040"
|
||||
sodipodi:docname="window-close-symbolic.svg">
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1366"
|
||||
inkscape:window-height="723"
|
||||
id="namedview15"
|
||||
showgrid="true"
|
||||
inkscape:zoom="14.75"
|
||||
inkscape:cx="14.600061"
|
||||
inkscape:cy="10.005214"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="23"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg7384">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid2992" />
|
||||
</sodipodi:namedview>
|
||||
<title
|
||||
id="title9167">Gnome Symbolic Icon Theme</title>
|
||||
<metadata
|
||||
id="metadata90">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title>Gnome Symbolic Icon Theme</dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs7386" />
|
||||
<g
|
||||
transform="translate(-60,-518)"
|
||||
id="layer9"
|
||||
style="display:inline" />
|
||||
<g
|
||||
transform="translate(-60,-518)"
|
||||
id="layer10" />
|
||||
<g
|
||||
transform="translate(-60,-518)"
|
||||
id="layer11" />
|
||||
<g
|
||||
id="g2996"
|
||||
transform="matrix(0.75,0,0,0.75,2,2.0546875)">
|
||||
<g
|
||||
id="layer12"
|
||||
transform="translate(-60,-518)">
|
||||
<g
|
||||
style="display:inline"
|
||||
id="layer4-4-1"
|
||||
transform="translate(19,-242)">
|
||||
<path
|
||||
style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;color:#bebebe;fill:#bebebe;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.78124988;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new;font-family:Andale Mono;-inkscape-font-specification:Andale Mono"
|
||||
id="path10839-9"
|
||||
d="m 45,764 1,0 c 0.01037,-1.2e-4 0.02079,-4.6e-4 0.03125,0 0.254951,0.0112 0.50987,0.12858 0.6875,0.3125 L 49,766.59375 51.3125,764.3125 C 51.578125,764.082 51.759172,764.007 52,764 l 1,0 0,1 c 0,0.28647 -0.03434,0.55065 -0.25,0.75 l -2.28125,2.28125 2.25,2.25 C 52.906938,770.46942 52.999992,770.7347 53,771 l 0,1 -1,0 c -0.265301,-10e-6 -0.530586,-0.0931 -0.71875,-0.28125 L 49,769.4375 46.71875,771.71875 C 46.530586,771.90694 46.26529,772 46,772 l -1,0 0,-1 c -3e-6,-0.26529 0.09306,-0.53058 0.28125,-0.71875 l 2.28125,-2.25 L 45.28125,765.75 C 45.070508,765.55537 44.97809,765.28075 45,765 l 0,-1 z"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
transform="translate(-60,-518)"
|
||||
id="layer13" />
|
||||
<g
|
||||
transform="translate(-60,-518)"
|
||||
id="layer14" />
|
||||
<g
|
||||
transform="translate(-60,-518)"
|
||||
id="layer15" />
|
||||
</svg>
|
Before Width: | Height: | Size: 3.6 KiB |
|
@ -1,119 +0,0 @@
|
|||
# Volume widget
|
||||
|
||||
Volume widget based on [amixer](https://linux.die.net/man/1/amixer) (is used for controlling the audio volume) and [pacmd](https://linux.die.net/man/1/pacmd) (is used for selecting a sink/source). Also, the widget provides an easy way to customize how it looks, following types are supported out-of-the-box:
|
||||
|
||||
![types](screenshots/variations.png)
|
||||
|
||||
From left to right: `horizontal_bar`, `vertical_bar`, `icon`, `icon_and_text`, `arc`
|
||||
|
||||
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 click on the widget;
|
||||
- more responsive than previous versions of volume widget, which were refreshed once a second;
|
||||
- 5 predefined customizable looks;
|
||||
|
||||
## Installation
|
||||
|
||||
Clone the repo under **~/.config/awesome/** and add widget in **rc.lua**:
|
||||
|
||||
```lua
|
||||
local volume_widget = require('awesome-wm-widgets.volume-widget.volume')
|
||||
...
|
||||
s.mytasklist, -- Middle widget
|
||||
{ -- Right widgets
|
||||
layout = wibox.layout.fixed.horizontal,
|
||||
...
|
||||
-- default
|
||||
volume_widget(),
|
||||
-- customized
|
||||
volume_widget{
|
||||
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(5) end),
|
||||
awful.key({ modkey }, "[", function() volume_widget:dec(5) end),
|
||||
awful.key({ modkey }, "\\", function() volume_widget:toggle() end),
|
||||
```
|
||||
|
||||
## Customization
|
||||
|
||||
It is possible to customize the widget by providing a table with all or some of the following config parameters:
|
||||
|
||||
### Generic parameter
|
||||
|
||||
| Name | Default | Description |
|
||||
|---|---|---|
|
||||
| `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 |
|
||||
|
||||
Depends on the chosen widget type add parameters from the corresponding section below:
|
||||
|
||||
#### `icon` parameters
|
||||
|
||||
| Name | Default | Description |
|
||||
|---|---|---|
|
||||
| `icon_dir`| `./icons`| Path to the folder with icons |
|
||||
|
||||
_Note:_ if you are changing icons, the folder should contain following .svg images:
|
||||
- audio-volume-high-symbolic
|
||||
- audio-volume-medium-symbolic
|
||||
- audio-volume-low-symbolic
|
||||
- audio-volume-muted-symbolic
|
||||
|
||||
#### `icon_and_text` parameters
|
||||
|
||||
| Name | Default | Description |
|
||||
|---|---|---|
|
||||
| `icon_dir`| `./icons`| Path to the folder with icons |
|
||||
| `font` | `beautiful.font` | Font name and size, like `Play 12` |
|
||||
|
||||
#### `arc` parameters
|
||||
|
||||
| Name | Default | Description |
|
||||
|---|---|---|
|
||||
| `thickness` | 2 | Thickness of the arc |
|
||||
| `main_color` | `beautiful.fg_color` | Color of the arc |
|
||||
| `bg_color` | `#ffffff11` | Color of the arc's background |
|
||||
| `mute_color` | `beautiful.fg_urgent` | Color of the arc when mute |
|
||||
| `size` | 18 | Size of the widget |
|
||||
|
||||
#### `horizontal_bar` parameters
|
||||
|
||||
| Name | Default | Description |
|
||||
|---|---|---|
|
||||
| `main_color` | `beautiful.fg_normal` | Color of the bar |
|
||||
| `mute_color` | `beautiful.fg_urgent` | Color of the bar when mute |
|
||||
| `bg_color` | `'#ffffff11'` | Color of the bar's background |
|
||||
| `width` | `50` | The bar width |
|
||||
| `margins` | `10` | Top and bottom margins (if your wibar is 22 px high, bar will be 2 px = 22 - 2*10) |
|
||||
| `shape` | `'bar'` | [gears.shape](https://awesomewm.org/doc/api/libraries/gears.shape.html), could be `octogon`, `hexagon`, `powerline`, etc |
|
||||
| `with_icon` | `true` | Show volume icon|
|
||||
|
||||
_Note:_ I didn't figure out how does the `forced_height` property of progressbar widget work (maybe it doesn't work at all), thus there is a workaround with margins.
|
||||
|
||||
#### `vertical_bar` parameters
|
||||
|
||||
| Name | Default | Description |
|
||||
|---|---|---|
|
||||
| `main_color` | `beautiful.fg_normal` | Color of the bar |
|
||||
| `mute_color` | `beautiful.fg_urgent` | Color of the bar when mute |
|
||||
| `bg_color` | `'#ffffff11'` | Color of the bar's background |
|
||||
| `width` | `10` | The bar width |
|
||||
| `margins` | `20` | Top and bottom margins (if your wibar is 22 px high, bar will be 2 px = 22 - 2*10) |
|
||||
| `shape` | `'bar'` | [gears.shape](https://awesomewm.org/doc/api/libraries/gears.shape.html), could be `octogon`, `hexagon`, `powerline`, etc |
|
||||
| `with_icon` | `true` | Show volume icon|
|
|
@ -1,88 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="16"
|
||||
viewBox="0 0 16 16"
|
||||
height="16"
|
||||
id="svg2"
|
||||
version="1.1"
|
||||
inkscape:version="0.91 r"
|
||||
sodipodi:docname="audio-volume-high-symbolic.svg">
|
||||
<metadata
|
||||
id="metadata30">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1215"
|
||||
inkscape:window-height="776"
|
||||
id="namedview28"
|
||||
showgrid="true"
|
||||
inkscape:zoom="38.125"
|
||||
inkscape:cx="8"
|
||||
inkscape:cy="8"
|
||||
inkscape:window-x="65"
|
||||
inkscape:window-y="24"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg2"
|
||||
showguides="true"
|
||||
inkscape:snap-intersection-paths="false"
|
||||
inkscape:object-paths="false">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid4158" />
|
||||
</sodipodi:namedview>
|
||||
<defs
|
||||
id="defs4" />
|
||||
<path
|
||||
d="M 6,2 2,6 2,10 6,14 6,9 7,8 6,7 Z"
|
||||
id="path18"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#bebebe"
|
||||
sodipodi:nodetypes="cccccccc" />
|
||||
<path
|
||||
d="M 1.300003,5 C 0.216589,5 0,6.163269 0,7.4 L 0,8.6 C 0,9.836747 0.24312,11 1.300003,11 L 3,11 3,5 Z"
|
||||
id="path20"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#bebebe"
|
||||
sodipodi:nodetypes="ssssccs" />
|
||||
<path
|
||||
style="opacity:1;fill:#bebebe;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 13.140638,1 11.726417,2.413582 C 12.808349,3.4955144 13.990412,5.4467621 14,8 c 0,2.551493 -1.192916,4.505751 -2.273583,5.586418 L 13.140638,15 C 14.595711,13.544927 16.019176,11 16,8 16.035061,5 14.595117,2.4544787 13.140638,1 Z"
|
||||
id="path4508"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccccccc" />
|
||||
<path
|
||||
style="opacity:1;fill:#bebebe;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 11,3.1156678 9.5897193,4.5261118 C 10.372347,5.3087395 11,6.5690611 11,8 11,9.4309388 10.372767,10.690952 9.5897193,11.474 L 11,12.884 C 12.275645,11.608355 13,9.854095 13,8 13,6.1543677 12.273068,4.3887355 11,3.1156678 Z"
|
||||
id="path4529"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccccccc" />
|
||||
<path
|
||||
style="opacity:1;fill:#bebebe;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 8.629,5 7.2094668,6.4096296 C 8,7.05621 8,7.805653 8,8 8,8.1932576 7.982199,8.9408674 7.209,9.59 L 8.6289063,11 C 9.8466375,9.952694 10,8.5984701 10,8 10,7.400497 9.854476,6.062891 8.629,5 Z"
|
||||
id="path4569"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccscccc" />
|
||||
</svg>
|
Before Width: | Height: | Size: 3.4 KiB |
|
@ -1,88 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="16"
|
||||
viewBox="0 0 16 16"
|
||||
height="16"
|
||||
id="svg2"
|
||||
version="1.1"
|
||||
inkscape:version="0.91 r"
|
||||
sodipodi:docname="audio-volume-low-symbolic.svg">
|
||||
<metadata
|
||||
id="metadata30">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1215"
|
||||
inkscape:window-height="776"
|
||||
id="namedview28"
|
||||
showgrid="true"
|
||||
inkscape:zoom="38.125"
|
||||
inkscape:cx="8"
|
||||
inkscape:cy="8"
|
||||
inkscape:window-x="65"
|
||||
inkscape:window-y="24"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg2"
|
||||
showguides="true"
|
||||
inkscape:snap-intersection-paths="false"
|
||||
inkscape:object-paths="false">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid4158" />
|
||||
</sodipodi:namedview>
|
||||
<defs
|
||||
id="defs4" />
|
||||
<path
|
||||
d="M 6,2 2,6 2,10 6,14 6,9 7,8 6,7 Z"
|
||||
id="path18"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#bebebe"
|
||||
sodipodi:nodetypes="cccccccc" />
|
||||
<path
|
||||
d="M 1.300003,5 C 0.216589,5 0,6.163269 0,7.4 L 0,8.6 C 0,9.836747 0.24312,11 1.300003,11 L 3,11 3,5 Z"
|
||||
id="path20"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#bebebe"
|
||||
sodipodi:nodetypes="ssssccs" />
|
||||
<path
|
||||
style="opacity:0.3;fill:#bebebe;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 13.140638,1 11.726417,2.413582 C 12.808349,3.4955144 13.990412,5.4467621 14,8 c 0,2.551493 -1.192916,4.505751 -2.273583,5.586418 L 13.140638,15 C 14.595711,13.544927 16.019176,11 16,8 16.035061,5 14.595117,2.4544787 13.140638,1 Z"
|
||||
id="path4508"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccccccc" />
|
||||
<path
|
||||
style="opacity:0.3;fill:#bebebe;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 11,3.1156678 9.5897193,4.5261118 C 10.372347,5.3087395 11,6.5690611 11,8 11,9.4309388 10.372767,10.690952 9.5897193,11.474 L 11,12.884 C 12.275645,11.608355 13,9.854095 13,8 13,6.1543677 12.273068,4.3887355 11,3.1156678 Z"
|
||||
id="path4529"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccccccc" />
|
||||
<path
|
||||
style="opacity:1;fill:#bebebe;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 8.629,5 7.2094668,6.4096296 C 8,7.05621 8,7.805653 8,8 8,8.1932576 7.982199,8.9408674 7.209,9.59 L 8.6289063,11 C 9.8466375,9.952694 10,8.5984701 10,8 10,7.400497 9.854476,6.062891 8.629,5 Z"
|
||||
id="path4569"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccscccc" />
|
||||
</svg>
|
Before Width: | Height: | Size: 3.4 KiB |
|
@ -1,88 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="16"
|
||||
viewBox="0 0 16 16"
|
||||
height="16"
|
||||
id="svg2"
|
||||
version="1.1"
|
||||
inkscape:version="0.91 r"
|
||||
sodipodi:docname="audio-volume-medium-symbolic.svg">
|
||||
<metadata
|
||||
id="metadata30">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1215"
|
||||
inkscape:window-height="776"
|
||||
id="namedview28"
|
||||
showgrid="true"
|
||||
inkscape:zoom="38.125"
|
||||
inkscape:cx="8"
|
||||
inkscape:cy="8"
|
||||
inkscape:window-x="65"
|
||||
inkscape:window-y="24"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg2"
|
||||
showguides="true"
|
||||
inkscape:snap-intersection-paths="false"
|
||||
inkscape:object-paths="false">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid4158" />
|
||||
</sodipodi:namedview>
|
||||
<defs
|
||||
id="defs4" />
|
||||
<path
|
||||
d="M 6,2 2,6 2,10 6,14 6,9 7,8 6,7 Z"
|
||||
id="path18"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#bebebe"
|
||||
sodipodi:nodetypes="cccccccc" />
|
||||
<path
|
||||
d="M 1.300003,5 C 0.216589,5 0,6.163269 0,7.4 L 0,8.6 C 0,9.836747 0.24312,11 1.300003,11 L 3,11 3,5 Z"
|
||||
id="path20"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#bebebe"
|
||||
sodipodi:nodetypes="ssssccs" />
|
||||
<path
|
||||
style="opacity:0.3;fill:#bebebe;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 13.140638,1 11.726417,2.413582 C 12.808349,3.4955144 13.990412,5.4467621 14,8 c 0,2.551493 -1.192916,4.505751 -2.273583,5.586418 L 13.140638,15 C 14.595711,13.544927 16.019176,11 16,8 16.035061,5 14.595117,2.4544787 13.140638,1 Z"
|
||||
id="path4508"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccccccc" />
|
||||
<path
|
||||
style="opacity:1;fill:#bebebe;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 11,3.1156678 9.5897193,4.5261118 C 10.372347,5.3087395 11,6.5690611 11,8 11,9.4309388 10.372767,10.690952 9.5897193,11.474 L 11,12.884 C 12.275645,11.608355 13,9.854095 13,8 13,6.1543677 12.273068,4.3887355 11,3.1156678 Z"
|
||||
id="path4529"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccccccc" />
|
||||
<path
|
||||
style="opacity:1;fill:#bebebe;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 8.629,5 7.2094668,6.4096296 C 8,7.05621 8,7.805653 8,8 8,8.1932576 7.982199,8.9408674 7.209,9.59 L 8.6289063,11 C 9.8466375,9.952694 10,8.5984701 10,8 10,7.400497 9.854476,6.062891 8.629,5 Z"
|
||||
id="path4569"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccscccc" />
|
||||
</svg>
|
Before Width: | Height: | Size: 3.4 KiB |
|
@ -1,88 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="16"
|
||||
viewBox="0 0 16 16"
|
||||
height="16"
|
||||
id="svg2"
|
||||
version="1.1"
|
||||
inkscape:version="0.91 r13725"
|
||||
sodipodi:docname="audio-volume-muted-symbolic.svg">
|
||||
<metadata
|
||||
id="metadata30">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1215"
|
||||
inkscape:window-height="776"
|
||||
id="namedview28"
|
||||
showgrid="true"
|
||||
inkscape:zoom="38.125"
|
||||
inkscape:cx="3.4229508"
|
||||
inkscape:cy="7.947541"
|
||||
inkscape:window-x="65"
|
||||
inkscape:window-y="24"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg2"
|
||||
showguides="true"
|
||||
inkscape:snap-intersection-paths="false"
|
||||
inkscape:object-paths="false">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid4158" />
|
||||
</sodipodi:namedview>
|
||||
<defs
|
||||
id="defs4" />
|
||||
<path
|
||||
d="M 6,2 2,6 2,10 6,14 6,9 7,8 6,7 Z"
|
||||
id="path18"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#bebebe"
|
||||
sodipodi:nodetypes="cccccccc" />
|
||||
<path
|
||||
d="M 1.300003,5 C 0.216589,5 0,6.163269 0,7.4 L 0,8.6 C 0,9.836747 0.24312,11 1.300003,11 L 3,11 3,5 Z"
|
||||
id="path20"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#bebebe"
|
||||
sodipodi:nodetypes="ssssccs" />
|
||||
<path
|
||||
style="opacity:0.3;fill:#bebebe;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 13.140638,1 11.726417,2.413582 C 12.808349,3.4955144 13.990412,5.4467621 14,8 c 0,2.551493 -1.192916,4.505751 -2.273583,5.586418 L 13.140638,15 C 14.595711,13.544927 16.019176,11 16,8 16.035061,5 14.595117,2.4544787 13.140638,1 Z"
|
||||
id="path4508"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccccccc" />
|
||||
<path
|
||||
style="opacity:0.3;fill:#bebebe;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 11,3.1156678 9.5897193,4.5261118 C 10.372347,5.3087395 11,6.5690611 11,8 11,9.4309388 10.372767,10.690952 9.5897193,11.474 L 11,12.884 C 12.275645,11.608355 13,9.854095 13,8 13,6.1543677 12.273068,4.3887355 11,3.1156678 Z"
|
||||
id="path4529"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccccccc" />
|
||||
<path
|
||||
style="opacity:0.3;fill:#bebebe;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 8.629,5 7.2094668,6.4096296 C 8,7.05621 8,7.805653 8,8 8,8.1932576 7.982199,8.9408674 7.209,9.59 L 8.6289063,11 C 9.8466375,9.952694 10,8.5984701 10,8 10,7.400497 9.854476,6.062891 8.629,5 Z"
|
||||
id="path4569"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccscccc" />
|
||||
</svg>
|
Before Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 8.9 KiB |
Before Width: | Height: | Size: 72 KiB |
|
@ -1,105 +0,0 @@
|
|||
|
||||
|
||||
local utils = {}
|
||||
|
||||
local function split(string_to_split, separator)
|
||||
if separator == nil then separator = "%s" end
|
||||
local t = {}
|
||||
|
||||
for str in string.gmatch(string_to_split, "([^".. separator .."]+)") do
|
||||
table.insert(t, str)
|
||||
end
|
||||
|
||||
return t
|
||||
end
|
||||
|
||||
function utils.extract_sinks_and_sources(pacmd_output)
|
||||
local sinks = {}
|
||||
local sources = {}
|
||||
local device
|
||||
local properties
|
||||
local ports
|
||||
local in_sink = false
|
||||
local in_source = false
|
||||
local in_device = false
|
||||
local in_properties = false
|
||||
local in_ports = false
|
||||
for line in pacmd_output:gmatch("[^\r\n]+") do
|
||||
if string.match(line, 'source%(s%) available.') then
|
||||
in_sink = false
|
||||
in_source = true
|
||||
end
|
||||
if string.match(line, 'sink%(s%) available.') then
|
||||
in_sink = true
|
||||
in_source = false
|
||||
end
|
||||
|
||||
if string.match(line, 'index:') then
|
||||
in_device = true
|
||||
in_properties = false
|
||||
device = {
|
||||
id = line:match(': (%d+)'),
|
||||
is_default = string.match(line, '*') ~= nil
|
||||
}
|
||||
if in_sink then
|
||||
table.insert(sinks, device)
|
||||
elseif in_source then
|
||||
table.insert(sources, device)
|
||||
end
|
||||
end
|
||||
|
||||
if string.match(line, '^\tproperties:') then
|
||||
in_device = false
|
||||
in_properties = true
|
||||
properties = {}
|
||||
device['properties'] = properties
|
||||
end
|
||||
|
||||
if string.match(line, 'ports:') then
|
||||
in_device = false
|
||||
in_properties = false
|
||||
in_ports = true
|
||||
ports = {}
|
||||
device['ports'] = ports
|
||||
end
|
||||
|
||||
if string.match(line, 'active port:') then
|
||||
in_device = false
|
||||
in_properties = false
|
||||
in_ports = false
|
||||
device['active_port'] = line:match(': (.+)'):gsub('<',''):gsub('>','')
|
||||
end
|
||||
|
||||
if in_device then
|
||||
local t = split(line, ': ')
|
||||
local key = t[1]:gsub('\t+', ''):lower()
|
||||
local value = t[2]:gsub('^<', ''):gsub('>$', '')
|
||||
device[key] = value
|
||||
end
|
||||
|
||||
if in_properties then
|
||||
local t = split(line, '=')
|
||||
local key = t[1]:gsub('\t+', ''):gsub('%.', '_'):gsub('-', '_'):gsub(':', ''):gsub("%s+$", "")
|
||||
local value
|
||||
if t[2] == nil then
|
||||
value = t[2]
|
||||
else
|
||||
value = t[2]:gsub('"', ''):gsub("^%s+", ""):gsub(' Analog Stereo', '')
|
||||
end
|
||||
properties[key] = value
|
||||
end
|
||||
|
||||
if in_ports then
|
||||
local t = split(line, ': ')
|
||||
local key = t[1]
|
||||
if key ~= nil then
|
||||
key = key:gsub('\t+', '')
|
||||
end
|
||||
ports[key] = t[2]
|
||||
end
|
||||
end
|
||||
|
||||
return sinks, sources
|
||||
end
|
||||
|
||||
return utils
|
|
@ -1 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#ffffff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-volume-2"><polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"></polygon><path d="M19.07 4.93a10 10 0 0 1 0 14.14M15.54 8.46a5 5 0 0 1 0 7.07"></path></svg>
|
Before Width: | Height: | Size: 354 B |
|
@ -1,228 +0,0 @@
|
|||
-------------------------------------------------
|
||||
-- The Ultimate Volume Widget for Awesome Window Manager
|
||||
-- More details could be found here:
|
||||
-- https://github.com/streetturtle/awesome-wm-widgets/tree/master/volume-widget
|
||||
|
||||
-- @author Pavel Makhov
|
||||
-- @copyright 2020 Pavel Makhov
|
||||
-------------------------------------------------
|
||||
|
||||
local awful = require("awful")
|
||||
local wibox = require("wibox")
|
||||
local spawn = require("awful.spawn")
|
||||
local gears = require("gears")
|
||||
local beautiful = require("beautiful")
|
||||
local watch = require("awful.widget.watch")
|
||||
local utils = require("awesome-wm-widgets.volume-widget.utils")
|
||||
|
||||
|
||||
local LIST_DEVICES_CMD = [[sh -c "pacmd list-sinks; pacmd list-sources"]]
|
||||
local function GET_VOLUME_CMD(device) return 'amixer -D ' .. device .. ' sget Master' end
|
||||
local function INC_VOLUME_CMD(device, step) return 'amixer -D ' .. device .. ' sset Master ' .. step .. '%+' end
|
||||
local function DEC_VOLUME_CMD(device, step) return 'amixer -D ' .. device .. ' sset Master ' .. step .. '%-' end
|
||||
local function TOG_VOLUME_CMD(device) return 'amixer -D ' .. device .. ' sset Master toggle' end
|
||||
|
||||
|
||||
local widget_types = {
|
||||
icon_and_text = require("awesome-wm-widgets.volume-widget.widgets.icon-and-text-widget"),
|
||||
icon = require("awesome-wm-widgets.volume-widget.widgets.icon-widget"),
|
||||
arc = require("awesome-wm-widgets.volume-widget.widgets.arc-widget"),
|
||||
horizontal_bar = require("awesome-wm-widgets.volume-widget.widgets.horizontal-bar-widget"),
|
||||
vertical_bar = require("awesome-wm-widgets.volume-widget.widgets.vertical-bar-widget")
|
||||
}
|
||||
local volume = {}
|
||||
|
||||
local rows = { layout = wibox.layout.fixed.vertical }
|
||||
|
||||
local popup = awful.popup{
|
||||
bg = beautiful.bg_normal,
|
||||
ontop = true,
|
||||
visible = false,
|
||||
shape = gears.shape.rounded_rect,
|
||||
border_width = 1,
|
||||
border_color = beautiful.bg_focus,
|
||||
maximum_width = 400,
|
||||
offset = { y = 5 },
|
||||
widget = {}
|
||||
}
|
||||
|
||||
local function build_main_line(device)
|
||||
if device.active_port ~= nil and device.ports[device.active_port] ~= nil then
|
||||
return device.properties.device_description .. ' · ' .. device.ports[device.active_port]
|
||||
else
|
||||
return device.properties.device_description
|
||||
end
|
||||
end
|
||||
|
||||
local function build_rows(devices, on_checkbox_click, device_type)
|
||||
local device_rows = { layout = wibox.layout.fixed.vertical }
|
||||
for _, device in pairs(devices) do
|
||||
|
||||
local checkbox = wibox.widget {
|
||||
checked = device.is_default,
|
||||
color = beautiful.bg_normal,
|
||||
paddings = 2,
|
||||
shape = gears.shape.circle,
|
||||
forced_width = 20,
|
||||
forced_height = 20,
|
||||
check_color = beautiful.fg_urgent,
|
||||
widget = wibox.widget.checkbox
|
||||
}
|
||||
|
||||
checkbox:connect_signal("button::press", function()
|
||||
spawn.easy_async(string.format([[sh -c 'pacmd set-default-%s "%s"']], device_type, device.name), function()
|
||||
on_checkbox_click()
|
||||
end)
|
||||
end)
|
||||
|
||||
local row = wibox.widget {
|
||||
{
|
||||
{
|
||||
{
|
||||
checkbox,
|
||||
valign = 'center',
|
||||
layout = wibox.container.place,
|
||||
},
|
||||
{
|
||||
{
|
||||
text = build_main_line(device),
|
||||
align = 'left',
|
||||
widget = wibox.widget.textbox
|
||||
},
|
||||
left = 10,
|
||||
layout = wibox.container.margin
|
||||
},
|
||||
spacing = 8,
|
||||
layout = wibox.layout.align.horizontal
|
||||
},
|
||||
margins = 4,
|
||||
layout = wibox.container.margin
|
||||
},
|
||||
bg = beautiful.bg_normal,
|
||||
widget = wibox.container.background
|
||||
}
|
||||
|
||||
row:connect_signal("mouse::enter", function(c) c:set_bg(beautiful.bg_focus) end)
|
||||
row:connect_signal("mouse::leave", function(c) c:set_bg(beautiful.bg_normal) end)
|
||||
|
||||
local old_cursor, old_wibox
|
||||
row:connect_signal("mouse::enter", function()
|
||||
local wb = mouse.current_wibox
|
||||
old_cursor, old_wibox = wb.cursor, wb
|
||||
wb.cursor = "hand1"
|
||||
end)
|
||||
row:connect_signal("mouse::leave", function()
|
||||
if old_wibox then
|
||||
old_wibox.cursor = old_cursor
|
||||
old_wibox = nil
|
||||
end
|
||||
end)
|
||||
|
||||
row:connect_signal("button::press", function()
|
||||
spawn.easy_async(string.format([[sh -c 'pacmd set-default-%s "%s"']], device_type, device.name), function()
|
||||
on_checkbox_click()
|
||||
end)
|
||||
end)
|
||||
|
||||
table.insert(device_rows, row)
|
||||
end
|
||||
|
||||
return device_rows
|
||||
end
|
||||
|
||||
local function build_header_row(text)
|
||||
return wibox.widget{
|
||||
{
|
||||
markup = "<b>" .. text .. "</b>",
|
||||
align = 'center',
|
||||
widget = wibox.widget.textbox
|
||||
},
|
||||
bg = beautiful.bg_normal,
|
||||
widget = wibox.container.background
|
||||
}
|
||||
end
|
||||
|
||||
local function rebuild_popup()
|
||||
spawn.easy_async(LIST_DEVICES_CMD, function(stdout)
|
||||
|
||||
local sinks, sources = utils.extract_sinks_and_sources(stdout)
|
||||
|
||||
for i = 0, #rows do rows[i]=nil end
|
||||
|
||||
table.insert(rows, build_header_row("SINKS"))
|
||||
table.insert(rows, build_rows(sinks, function() rebuild_popup() end, "sink"))
|
||||
table.insert(rows, build_header_row("SOURCES"))
|
||||
table.insert(rows, build_rows(sources, function() rebuild_popup() end, "source"))
|
||||
|
||||
popup:setup(rows)
|
||||
end)
|
||||
end
|
||||
|
||||
|
||||
local function worker(user_args)
|
||||
|
||||
local args = user_args or {}
|
||||
|
||||
local mixer_cmd = args.mixer_cmd or 'pavucontrol'
|
||||
local widget_type = args.widget_type
|
||||
local refresh_rate = args.refresh_rate or 1
|
||||
local step = args.step or 5
|
||||
local device = args.device or 'pulse'
|
||||
|
||||
if widget_types[widget_type] == nil then
|
||||
volume.widget = widget_types['icon_and_text'].get_widget(args.icon_and_text_args)
|
||||
else
|
||||
volume.widget = widget_types[widget_type].get_widget(args)
|
||||
end
|
||||
|
||||
local function update_graphic(widget, stdout)
|
||||
local mute = string.match(stdout, "%[(o%D%D?)%]") -- \[(o\D\D?)\] - [on] or [off]
|
||||
if mute == 'off' then widget:mute()
|
||||
elseif mute == 'on' then widget:unmute()
|
||||
end
|
||||
local volume_level = string.match(stdout, "(%d?%d?%d)%%") -- (\d?\d?\d)\%)
|
||||
volume_level = string.format("% 3d", volume_level)
|
||||
widget:set_volume_level(volume_level)
|
||||
end
|
||||
|
||||
function volume:inc(s)
|
||||
spawn.easy_async(INC_VOLUME_CMD(device, s or step), function(stdout) update_graphic(volume.widget, stdout) end)
|
||||
end
|
||||
|
||||
function volume:dec(s)
|
||||
spawn.easy_async(DEC_VOLUME_CMD(device, s or step), function(stdout) update_graphic(volume.widget, stdout) end)
|
||||
end
|
||||
|
||||
function volume:toggle()
|
||||
spawn.easy_async(TOG_VOLUME_CMD(device), function(stdout) update_graphic(volume.widget, stdout) end)
|
||||
end
|
||||
|
||||
function volume:mixer()
|
||||
if mixer_cmd then
|
||||
spawn.easy_async(mixer_cmd)
|
||||
end
|
||||
end
|
||||
|
||||
volume.widget:buttons(
|
||||
awful.util.table.join(
|
||||
awful.button({}, 3, function()
|
||||
if popup.visible then
|
||||
popup.visible = not popup.visible
|
||||
else
|
||||
rebuild_popup()
|
||||
popup:move_next_to(mouse.current_widget_geometry)
|
||||
end
|
||||
end),
|
||||
awful.button({}, 4, function() volume:inc() end),
|
||||
awful.button({}, 5, function() volume:dec() end),
|
||||
awful.button({}, 2, function() volume:mixer() end),
|
||||
awful.button({}, 1, function() volume:toggle() end)
|
||||
)
|
||||
)
|
||||
|
||||
watch(GET_VOLUME_CMD(device), refresh_rate, update_graphic, volume.widget)
|
||||
|
||||
return volume.widget
|
||||
end
|
||||
|
||||
return setmetatable(volume, { __call = function(_, ...) return worker(...) end })
|
|
@ -1,46 +0,0 @@
|
|||
local wibox = require("wibox")
|
||||
local beautiful = require('beautiful')
|
||||
|
||||
local ICON_DIR = os.getenv("HOME") .. '/.config/awesome/awesome-wm-widgets/volume-widget/icons/'
|
||||
|
||||
local widget = {}
|
||||
|
||||
function widget.get_widget(widgets_args)
|
||||
local args = widgets_args or {}
|
||||
|
||||
local thickness = args.thickness or 2
|
||||
local main_color = args.main_color or beautiful.fg_color
|
||||
local bg_color = args.bg_color or '#ffffff11'
|
||||
local mute_color = args.mute_color or beautiful.fg_urgent
|
||||
local size = args.size or 18
|
||||
|
||||
return wibox.widget {
|
||||
{
|
||||
id = "icon",
|
||||
image = ICON_DIR .. 'audio-volume-high-symbolic.svg',
|
||||
resize = true,
|
||||
widget = wibox.widget.imagebox,
|
||||
},
|
||||
max_value = 100,
|
||||
thickness = thickness,
|
||||
start_angle = 4.71238898, -- 2pi*3/4
|
||||
forced_height = size,
|
||||
forced_width = size,
|
||||
bg = bg_color,
|
||||
paddings = 2,
|
||||
widget = wibox.container.arcchart,
|
||||
set_volume_level = function(self, new_value)
|
||||
self.value = new_value
|
||||
end,
|
||||
mute = function(self)
|
||||
self.colors = { mute_color }
|
||||
end,
|
||||
unmute = function(self)
|
||||
self.colors = { main_color }
|
||||
end
|
||||
}
|
||||
|
||||
end
|
||||
|
||||
|
||||
return widget
|
|
@ -1,58 +0,0 @@
|
|||
local wibox = require("wibox")
|
||||
local beautiful = require('beautiful')
|
||||
local gears = require("gears")
|
||||
|
||||
local ICON_DIR = os.getenv("HOME") .. '/.config/awesome/awesome-wm-widgets/volume-widget/icons/'
|
||||
|
||||
local widget = {}
|
||||
|
||||
function widget.get_widget(widgets_args)
|
||||
local args = widgets_args or {}
|
||||
|
||||
local main_color = args.main_color or beautiful.fg_normal
|
||||
local mute_color = args.mute_color or beautiful.fg_urgent
|
||||
local bg_color = args.bg_color or '#ffffff11'
|
||||
local width = args.width or 50
|
||||
local margins = args.margins or 10
|
||||
local shape = args.shape or 'bar'
|
||||
local with_icon = args.with_icon == true and true or false
|
||||
|
||||
local bar = wibox.widget {
|
||||
{
|
||||
{
|
||||
id = "icon",
|
||||
image = ICON_DIR .. 'audio-volume-high-symbolic.svg',
|
||||
resize = false,
|
||||
widget = wibox.widget.imagebox,
|
||||
},
|
||||
valign = 'center',
|
||||
visible = with_icon,
|
||||
layout = wibox.container.place,
|
||||
},
|
||||
{
|
||||
id = 'bar',
|
||||
max_value = 100,
|
||||
forced_width = width,
|
||||
color = main_color,
|
||||
margins = { top = margins, bottom = margins },
|
||||
background_color = bg_color,
|
||||
shape = gears.shape[shape],
|
||||
widget = wibox.widget.progressbar,
|
||||
},
|
||||
spacing = 4,
|
||||
layout = wibox.layout.fixed.horizontal,
|
||||
set_volume_level = function(self, new_value)
|
||||
self:get_children_by_id('bar')[1]:set_value(tonumber(new_value))
|
||||
end,
|
||||
mute = function(self)
|
||||
self:get_children_by_id('bar')[1]:set_color(mute_color)
|
||||
end,
|
||||
unmute = function(self)
|
||||
self:get_children_by_id('bar')[1]:set_color(main_color)
|
||||
end
|
||||
}
|
||||
|
||||
return bar
|
||||
end
|
||||
|
||||
return widget
|
|
@ -1,59 +0,0 @@
|
|||
local wibox = require("wibox")
|
||||
local beautiful = require('beautiful')
|
||||
|
||||
local widget = {}
|
||||
|
||||
local ICON_DIR = os.getenv("HOME") .. '/.config/awesome/awesome-wm-widgets/volume-widget/icons/'
|
||||
|
||||
function widget.get_widget(widgets_args)
|
||||
local args = widgets_args or {}
|
||||
|
||||
local font = args.font or beautiful.font
|
||||
local icon_dir = args.icon_dir or ICON_DIR
|
||||
|
||||
return wibox.widget {
|
||||
{
|
||||
{
|
||||
id = "icon",
|
||||
resize = false,
|
||||
widget = wibox.widget.imagebox,
|
||||
},
|
||||
valign = 'center',
|
||||
layout = wibox.container.place
|
||||
},
|
||||
{
|
||||
id = 'txt',
|
||||
font = font,
|
||||
widget = wibox.widget.textbox
|
||||
},
|
||||
layout = wibox.layout.fixed.horizontal,
|
||||
set_volume_level = function(self, new_value)
|
||||
self:get_children_by_id('txt')[1]:set_text(new_value)
|
||||
local volume_icon_name
|
||||
if self.is_muted then
|
||||
volume_icon_name = 'audio-volume-muted-symbolic'
|
||||
else
|
||||
local new_value_num = tonumber(new_value)
|
||||
if (new_value_num >= 0 and new_value_num < 33) then
|
||||
volume_icon_name="audio-volume-low-symbolic"
|
||||
elseif (new_value_num < 66) then
|
||||
volume_icon_name="audio-volume-medium-symbolic"
|
||||
else
|
||||
volume_icon_name="audio-volume-high-symbolic"
|
||||
end
|
||||
end
|
||||
self:get_children_by_id('icon')[1]:set_image(icon_dir .. volume_icon_name .. '.svg')
|
||||
end,
|
||||
mute = function(self)
|
||||
self.is_muted = true
|
||||
self:get_children_by_id('icon')[1]:set_image(icon_dir .. 'audio-volume-muted-symbolic.svg')
|
||||
end,
|
||||
unmute = function(self)
|
||||
self.is_muted = false
|
||||
end
|
||||
}
|
||||
|
||||
end
|
||||
|
||||
|
||||
return widget
|
|
@ -1,46 +0,0 @@
|
|||
local wibox = require("wibox")
|
||||
|
||||
local widget = {}
|
||||
|
||||
local ICON_DIR = os.getenv("HOME") .. '/.config/awesome/awesome-wm-widgets/volume-widget/icons/'
|
||||
|
||||
function widget.get_widget(widgets_args)
|
||||
local args = widgets_args or {}
|
||||
|
||||
local icon_dir = args.icon_dir or ICON_DIR
|
||||
|
||||
return wibox.widget {
|
||||
{
|
||||
id = "icon",
|
||||
resize = false,
|
||||
widget = wibox.widget.imagebox,
|
||||
},
|
||||
valign = 'center',
|
||||
layout = wibox.container.place,
|
||||
set_volume_level = function(self, new_value)
|
||||
local volume_icon_name
|
||||
if self.is_muted then
|
||||
volume_icon_name = 'audio-volume-muted-symbolic'
|
||||
else
|
||||
local new_value_num = tonumber(new_value)
|
||||
if (new_value_num >= 0 and new_value_num < 33) then
|
||||
volume_icon_name="audio-volume-low-symbolic"
|
||||
elseif (new_value_num < 66) then
|
||||
volume_icon_name="audio-volume-medium-symbolic"
|
||||
else
|
||||
volume_icon_name="audio-volume-high-symbolic"
|
||||
end
|
||||
end
|
||||
self:get_children_by_id('icon')[1]:set_image(icon_dir .. volume_icon_name .. '.svg')
|
||||
end,
|
||||
mute = function(self)
|
||||
self.is_muted = true
|
||||
self:get_children_by_id('icon')[1]:set_image(icon_dir .. 'audio-volume-muted-symbolic.svg')
|
||||
end,
|
||||
unmute = function(self)
|
||||
self.is_muted = false
|
||||
end
|
||||
}
|
||||
end
|
||||
|
||||
return widget
|
|
@ -1,64 +0,0 @@
|
|||
local wibox = require("wibox")
|
||||
local beautiful = require('beautiful')
|
||||
local gears = require("gears")
|
||||
|
||||
local ICON_DIR = os.getenv("HOME") .. '/.config/awesome/awesome-wm-widgets/volume-widget/icons/'
|
||||
|
||||
local widget = {}
|
||||
|
||||
function widget.get_widget(widgets_args)
|
||||
local args = widgets_args or {}
|
||||
|
||||
local main_color = args.main_color or beautiful.fg_normal
|
||||
local mute_color = args.mute_color or beautiful.fg_urgent
|
||||
local bg_color = args.bg_color or '#ffffff11'
|
||||
local width = args.width or 10
|
||||
local margins = args.height or 2
|
||||
local shape = args.shape or 'bar'
|
||||
local with_icon = args.with_icon == true and true or false
|
||||
|
||||
local bar = wibox.widget {
|
||||
{
|
||||
{
|
||||
id = "icon",
|
||||
image = ICON_DIR .. 'audio-volume-high-symbolic.svg',
|
||||
resize = false,
|
||||
widget = wibox.widget.imagebox,
|
||||
},
|
||||
valign = 'center',
|
||||
visible = with_icon,
|
||||
layout = wibox.container.place,
|
||||
},
|
||||
{
|
||||
{
|
||||
id = 'bar',
|
||||
max_value = 100,
|
||||
forced_width = width,
|
||||
forced_height = 5,
|
||||
margins = { top = margins, bottom = margins },
|
||||
color = main_color,
|
||||
background_color = bg_color,
|
||||
shape = gears.shape[shape],
|
||||
widget = wibox.widget.progressbar,
|
||||
},
|
||||
forced_width = width,
|
||||
direction = 'east',
|
||||
layout = wibox.container.rotate,
|
||||
},
|
||||
spacing = 4,
|
||||
layout = wibox.layout.fixed.horizontal,
|
||||
set_volume_level = function(self, new_value)
|
||||
self:get_children_by_id('bar')[1]:set_value(tonumber(new_value))
|
||||
end,
|
||||
mute = function(self)
|
||||
self:get_children_by_id('bar')[1]:set_color(mute_color)
|
||||
end,
|
||||
unmute = function(self)
|
||||
self:get_children_by_id('bar')[1]:set_color(main_color)
|
||||
end
|
||||
}
|
||||
|
||||
return bar
|
||||
end
|
||||
|
||||
return widget
|
|
@ -1,144 +0,0 @@
|
|||
# Weather widget
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/streetturtle/awesome-wm-widgets/labels/weather" target="_blank"><img alt="GitHub issues by-label" src="https://img.shields.io/github/issues/streetturtle/awesome-wm-widgets/weather"></a>
|
||||
|
||||
<a href="https://twitter.com/intent/tweet?text=Check%20out%20this%20awesome%20weather%20widget%20for%20Awesome%20Window%20Manager%20&url=https://github.com/streetturtle/awesome-wm-widgets/blob/master/weather-widget" target="_blank">
|
||||
<img alt="Twitter URL" src="https://img.shields.io/twitter/url?logo=twitter&style=social&url=https%3A%2F%2Fgithub.com%2Fstreetturtle%2Fawesome-wm-widgets%2Fblob%2Fmaster%2Fweather-widget">
|
||||
</a>
|
||||
</p>
|
||||
|
||||
The widget showing current, hourly and daily weather forecast:
|
||||
|
||||
<p align="center">
|
||||
<img src="https://github.com/streetturtle/awesome-wm-widgets/raw/master/weather-widget/weather-widget.png" alt="screenshot" style="max-width:100%;">
|
||||
</p>
|
||||
|
||||
The widget consists of three sections:
|
||||
- current weather, including humidity, wind speed, UV index
|
||||
- hourly forecast for the next 24 hours
|
||||
- daily forecast for the next five days
|
||||
|
||||
## Customization
|
||||
|
||||
It is possible to customize widget by providing a table with all or some of the following config parameters:
|
||||
|
||||
| Name | Default | Description |
|
||||
|---|---|---|
|
||||
| coordinates | Required | Table with two elements: latitude and longitude, e.g. `{46.204400, 6.143200}` |
|
||||
| api_key | Required | Get it [here](https://openweathermap.org/appid) |
|
||||
| font_name | `beautiful.font:gsub("%s%d+$", "")` | **Name** of the font to use e.g. 'Play' |
|
||||
| both_units_widget | false | Show temperature in both units - '28°C (83°F) |
|
||||
| units | metric | `metric` for celsius, `imperial` for fahrenheit |
|
||||
| show_hourly_forecast | false | Show hourly forecase section |
|
||||
| time_format_12h |false | 12 or 24 hour format (13:00 - default or 1pm) |
|
||||
| show_daily_forecast | false | Show daily forecast section |
|
||||
| icon_pack_name | weather-underground-icons | Name of the icon pack, could be `weather-underground-icon` or `VitalyGorbachev` or create your own, more details below |
|
||||
| icons_extension | `.png` | File extension of icons in the pack |
|
||||
| timeout | 120 | How often in seconds the widget refreshes |
|
||||
|
||||
### Icons:
|
||||
|
||||
The widget comes with two predefined icon packs:
|
||||
|
||||
- weather-underground-icons taken from [here](https://github.com/manifestinteractive/weather-underground-icons)
|
||||
- VitalyGorbachev taken from [here](https://www.flaticon.com/authors/vitaly-gorbachev)
|
||||
|
||||
To add your custom icons, create a folder with the pack name under `/icons` and use the folder name in widget's config. There should be 18 icons, preferably 128x128 minimum. Icons should also respect the naming convention, please check widget's source.
|
||||
|
||||
### Examples:
|
||||
|
||||
#### Custom font, icons
|
||||
|
||||
![example1](./example1.png)
|
||||
|
||||
```lua
|
||||
weather_curl_widget({
|
||||
api_key='<your-key>',
|
||||
coordinates = {45.5017, -73.5673},
|
||||
time_format_12h = true,
|
||||
units = 'imperial',
|
||||
both_units_widget = true,
|
||||
font_name = 'Carter One',
|
||||
icons = 'VitalyGorbachev',
|
||||
icons_extension = '.svg',
|
||||
show_hourly_forecast = true,
|
||||
show_daily_forecast = true,
|
||||
}),
|
||||
```
|
||||
|
||||
#### Only current weather
|
||||
|
||||
![example2](./example2.png)
|
||||
|
||||
```lua
|
||||
weather_curl_widget({
|
||||
api_key='<your-key>',
|
||||
coordinates = {45.5017, -73.5673},
|
||||
}),
|
||||
```
|
||||
|
||||
## Installation
|
||||
|
||||
1. Download json parser for lua from [github.com/rxi/json.lua](https://github.com/rxi/json.lua) and place it under **~/.config/awesome/** (don't forget to star a repo <i class="fa fa-github-alt"></i> ):
|
||||
|
||||
```bash
|
||||
wget -P ~/.config/awesome/ https://raw.githubusercontent.com/rxi/json.lua/master/json.lua
|
||||
```
|
||||
|
||||
1. Clone this repo under **~/.config/awesome/**:
|
||||
|
||||
```bash
|
||||
git clone https://github.com/streetturtle/awesome-wm-widgets.git ~/.config/awesome/
|
||||
```
|
||||
|
||||
1. Get Open Weather Map app id here: [openweathermap.org/appid](https://openweathermap.org/appid).
|
||||
|
||||
1. Require weather widget at the beginning of **rc.lua**:
|
||||
|
||||
```lua
|
||||
local weather_widget = require("awesome-wm-widgets.weather-widget.weather")
|
||||
```
|
||||
|
||||
1. Add widget to the tasklist:
|
||||
|
||||
```lua
|
||||
s.mytasklist, -- Middle widget
|
||||
{ -- Right widgets
|
||||
layout = wibox.layout.fixed.horizontal,
|
||||
...
|
||||
--default
|
||||
weather_widget({
|
||||
api_key='<your-key>',
|
||||
coordinates = {45.5017, -73.5673},
|
||||
}),
|
||||
,
|
||||
--customized
|
||||
weather_curl_widget({
|
||||
api_key='<your-key>',
|
||||
coordinates = {45.5017, -73.5673},
|
||||
time_format_12h = true,
|
||||
units = 'imperial',
|
||||
both_units_widget = true,
|
||||
font_name = 'Carter One',
|
||||
icons = 'VitalyGorbachev',
|
||||
icons_extension = '.svg',
|
||||
show_hourly_forecast = true,
|
||||
show_daily_forecast = true,
|
||||
}),
|
||||
...
|
||||
```
|
||||
|
||||
## More screenshots
|
||||
|
||||
Only negative temperature:
|
||||
|
||||
![negative](./negative.png)
|
||||
|
||||
Both positive and negative tempertature:
|
||||
|
||||
![both](./both.png)
|
||||
|
||||
## How it works
|
||||
|
||||
TBW
|
Before Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 45 KiB |
Before Width: | Height: | Size: 26 KiB |
|
@ -1 +0,0 @@
|
|||
<svg id="Layer_1" enable-background="new 0 0 512.035 512.035" height="512" viewBox="0 0 512.035 512.035" width="512" xmlns="http://www.w3.org/2000/svg"><path d="m160.635 282.678c-.399 3.06-.6 6.17-.6 9.34-35.859 0-62.514 33.291-54.64 68.3-55.9-13.72-97.36-64.17-97.36-124.3 0-70.69 57.31-128 128-128h24c-39.92 8.34-72 45.6-72 88 0 43.35 31.34 79.379 72.6 86.66z" fill="#ffdf81"/><path d="m139.325 276.017h-11.29c-35.859 0-62.514 33.291-54.64 68.3l2.75 4.85c6.486 3.176 14.789 7.592 29.25 11.15-7.864-34.964 18.744-68.3 54.64-68.3 0-3.17.2-6.28.6-9.34-7.348-1.311-14.478-3.509-21.31-6.66z" fill="#ffcd76"/><path d="m160.035 108.017c-14.71 3.07-28.36 10.07-39.72 19.82-90.558 22.603-127.09 132.195-68.42 204.64-26.88-23.46-43.86-57.98-43.86-96.46 0-70.69 57.31-128 128-128z" fill="#f9ecb4"/><path d="m184.045 235.508c.27-26.28 21.65-47.49 47.99-47.49-26.51 0-48-21.49-48-48 0 26.51-21.49 48-48 48 26.34 0 47.73 21.22 47.99 47.5z" fill="#ffcd76"/><path d="m432.035 404.017h-272c-30.93 0-56-25.07-56-56s25.07-56 56-56c0-47.91 45.994-82.413 91.92-69.21 52.411-71.932 165.158-48.807 185.34 37.4 37.31 2.69 66.74 33.82 66.74 71.81 0 39.76-32.24 72-72 72z" fill="#5989b3"/><path d="m417.135 218.908c-46.079-37.029-114.104-28.239-149.18 19.9-46.024-13.231-91.92 21.386-91.92 69.21-45.061 0-70.916 50.225-46.779 86.78-15.201-10.01-25.221-27.22-25.221-46.78 0-30.93 25.07-56 56-56 0-47.91 45.994-82.413 91.92-69.21 40.366-55.402 122.233-57.326 165.18-3.9z" fill="#436786"/><path d="m443.637 252.855c-25.196-86.926-138.057-109.482-194.836-39.078-18.043-3.848-37.109-1.421-53.879 7.401 5.928-14.712 20.371-25.161 37.113-25.161 4.418 0 8-3.581 8-8 0-4.418-3.582-8-8-8-22.056 0-40-17.944-40-40 0-4.418-3.582-8-8-8s-8 3.582-8 8c0 22.056-17.944 40-40 40-4.418 0-8 3.582-8 8 0 4.419 3.582 8 8 8 21.631 0 39.429 17.427 39.969 38.971-10.447 10.267-18.101 23.365-21.688 38.046-54.738-15.31-77.633-82.299-39.099-128.676 12.192-14.674 28.69-24.798 46.453-28.509 4.014-.838 6.743-4.575 6.322-8.653-.422-4.078-3.858-7.178-7.958-7.178h-24c-114.113 0-176.619 132.321-106.547 220.53 17.697 22.277 42.194 38.589 69.381 46.311 8.063 26.122 32.432 45.159 61.166 45.159h88c4.418 0 8-3.581 8-8 0-4.418-3.582-8-8-8h-88c-26.468 0-48-21.533-48-48s21.532-48 48-48c4.418 0 8-3.581 8-8 0-35.26 28.681-64 64-64 35.786 0 64 29.266 64 64 0 4.419 3.582 8 8 8s8-3.581 8-8c0-31.505-18.765-59.95-46.817-72.79 52.765-57.536 146.992-31.064 164.288 42.804.798 3.41 3.721 5.904 7.214 6.156 33.261 2.398 59.315 30.436 59.315 63.831 0 35.29-28.71 64-64 64h-136c-4.418 0-8 3.582-8 8 0 4.419 3.582 8 8 8h136c44.112 0 80-35.888 80-80 .001-39.796-29.603-73.504-68.397-79.164zm-278.818-64.816c7.863-4.731 14.479-11.342 19.216-19.202 4.738 7.861 11.352 14.471 19.218 19.203-7.857 4.745-14.475 11.365-19.216 19.229-4.741-7.865-11.358-14.485-19.218-19.23zm-68.755 161.145c-47.653-16.722-80.029-61.699-80.029-113.167 0-61.104 45.906-111.687 105.041-119.072-64.735 47.467-49.382 143.472 22.144 169.322-27.299 7.442-47.684 32.66-47.156 62.917z"/><path d="m272.035 396.017c-4.417 0-8 3.577-8 8 0 4.415 3.575 8 8 8 4.417 0 8-3.578 8-8 0-4.417-3.577-8-8-8z"/><circle cx="144.035" cy="372.017" fill="#436786" r="8"/><circle cx="132.035" cy="360.017" fill="#436786" r="4"/><g fill="#ffcd76"><circle cx="56.035" cy="300.017" r="8"/><circle cx="44.035" cy="288.017" r="4"/></g></svg>
|
Before Width: | Height: | Size: 3.2 KiB |
|
@ -1 +0,0 @@
|
|||
<svg id="Layer_1" enable-background="new 0 0 512 512" height="512" viewBox="0 0 512 512" width="512" xmlns="http://www.w3.org/2000/svg"><path d="m222.66 220.6c-35.35 4.58-62.66 34.81-62.66 71.4-20.92 0-39.15 11.46-48.76 28.46-36.313-10.61-63.24-44.243-63.24-84.46 0-48.586 39.399-88 88-88 43.692 0 79.442 31.706 86.66 72.6z" fill="#ffdf81"/><path d="m205.71 182.3c-35.032-27.064-84.728-23.74-115.93 7.48-31.241 31.222-34.517 80.933-7.48 115.93-21.095-16.244-34.3-41.635-34.3-69.71 0-48.586 39.399-88 88-88 28.054 0 53.457 13.194 69.71 34.3z" fill="#f9ecb4"/><path d="m222.66 220.6c-35.35 4.58-62.66 34.81-62.66 71.4-20.92 0-39.15 11.46-48.76 28.46-18.921-5.528-35.498-17.355-46.99-33.51 9.31 7.96 20.29 13.99 32.33 17.51 9.61-17 27.84-28.46 48.76-28.46 0-36.59 27.31-66.82 62.66-71.4-2.31-13.08-7.51-25.16-14.91-35.56 15.486 13.209 26.014 31.411 29.57 51.56z" fill="#ffcd76"/><path d="m432 404h-272c-30.93 0-56-25.07-56-56s25.07-56 56-56c0-47.91 45.994-82.413 91.92-69.21 52.411-71.932 165.158-48.807 185.34 37.4 37.31 2.69 66.74 33.82 66.74 71.81 0 39.76-32.24 72-72 72z" fill="#add9ff"/><g fill="#d6ecff"><path d="m417.1 218.89c-46.079-37.029-114.104-28.239-149.18 19.9-46.024-13.231-91.92 21.386-91.92 69.21-45.061 0-70.917 50.224-46.78 86.78-15.2-10.01-25.22-27.22-25.22-46.78 0-30.93 25.07-56 56-56 0-47.91 45.994-82.413 91.92-69.21 40.366-55.401 122.233-57.325 165.18-3.9z"/><circle cx="144" cy="372" r="8"/><circle cx="132" cy="360" r="4"/></g><circle cx="88" cy="276" fill="#ffcd76" r="8"/><circle cx="76" cy="264" fill="#ffcd76" r="4"/><path d="m443.602 252.838c-25.196-86.926-138.057-109.482-194.836-39.078-6.722-1.433-13.209-1.932-19.768-1.689-3.59-14.029-10.297-26.969-19.701-38.055l28.361-28.36c3.125-3.124 3.125-8.189 0-11.313-3.124-3.124-8.189-3.124-11.313 0l-28.359 28.357c-15.281-12.971-34.006-20.729-53.986-22.367v-32.333c0-4.419-3.581-8-8-8s-8 3.581-8 8v32.333c-19.981 1.638-38.707 9.397-53.986 22.367l-28.357-28.357c-3.124-3.124-8.189-3.124-11.313 0-3.125 3.124-3.125 8.189 0 11.313l28.356 28.358c-12.971 15.28-20.729 34.006-22.367 53.986h-32.333c-4.418 0-8 3.581-8 8s3.582 8 8 8h32.333c1.638 19.982 9.396 38.708 22.367 53.986l-28.357 28.357c-3.125 3.124-3.125 8.189 0 11.313 3.124 3.124 8.189 3.124 11.313 0l28.365-28.365c7.846 6.638 16.716 11.991 26.219 15.811-16.034 41.708 14.888 86.898 59.76 86.898h88c4.419 0 8-3.582 8-8s-3.581-8-8-8h-88c-26.467 0-48-21.533-48-48s21.533-48 48-48c4.419 0 8-3.582 8-8 0-35.29 28.71-64 64-64 35.786 0 64 29.266 64 64 0 4.418 3.582 8 8 8s8-3.582 8-8c0-31.505-18.765-59.95-46.817-72.79 52.83-57.606 147.007-31.003 164.288 42.804.798 3.41 3.721 5.904 7.214 6.156 33.26 2.397 59.315 30.435 59.315 63.83 0 35.29-28.71 64-64 64h-136c-4.418 0-8 3.582-8 8s3.582 8 8 8h136c44.112 0 80-35.888 80-80 0-39.794-29.603-73.503-68.398-79.162zm-291.249 31.616c-18.303 2.189-34.246 12.143-44.461 26.453-53.943-20.263-69.902-90.047-28.453-131.472 43.546-43.571 117.258-23.281 133.571 34.845-32.607 7.968-57.443 35.974-60.657 70.174z"/><circle cx="272" cy="404" r="8"/></svg>
|
Before Width: | Height: | Size: 2.9 KiB |
|
@ -1 +0,0 @@
|
|||
<svg id="Layer_1" enable-background="new 0 0 512.058 512.058" height="512" viewBox="0 0 512.058 512.058" width="512" xmlns="http://www.w3.org/2000/svg"><path d="m504.058 208c-16.51 75.45-87.6 136-168 136-92.78 0-168-75.22-168-168 0-80.4 52.561-151.49 128.011-168-16.011 0-25.021 0-40.011 0-136.97 0-248 111.03-248 248s111.03 248 248 248 248-111.03 248-248c0-14.99 0-32 0-48z" fill="#ffdf81"/><path d="m320.058 360c-92.78 0-168-75.22-168-168 0-52.61 22.51-101.24 59.21-133.18-27.14 31.11-43.21 72.72-43.21 117.18 0 143.398 168.991 222.916 280.84 124.12-31.93 36.2-78.56 59.88-128.84 59.88z" fill="#ffcd76"/><path d="m40.058 256c0 131.6 102.49 239.25 232 247.5-144.868 9.04-264-105.835-264-247.5 0-136.97 111.03-248 248-248h32c-136.97 0-248 111.03-248 248z" fill="#f9ecb4"/><path d="m472.058 104s-56 0-56 64c0-64-56-64-56-64s56 0 56-64c0 64 56 64 56 64z" fill="#ffcd76"/><path d="m360.058 216s-56 0-56 64c0-64-56-64-56-64s56 0 56-64c0 64 56 64 56 64z" fill="#ffcd76"/><path d="" fill="#f9ecb4"/><path d="m416.058 176c-4.418 0-8-3.581-8-8 0-23.203-7.893-39.607-23.458-48.758-11.98-7.044-24.396-7.24-24.573-7.242-4.404-.017-7.969-3.592-7.969-8 0-4.803 4.399-8.359 7.923-7.999.107-.019 12.742-.26 24.619-7.243 15.565-9.151 23.458-25.555 23.458-48.758 0-4.418 3.582-8 8-8s8 3.582 8 8c0 23.203 7.893 39.607 23.458 48.758 11.98 7.044 24.396 7.24 24.573 7.242 4.404.017 7.969 3.592 7.969 8 0 4.379-3.52 7.937-7.884 7.999 1.722 0-11.862-.279-24.658 7.243-15.565 9.151-23.458 25.555-23.458 48.758 0 4.419-3.582 8-8 8zm-25.952-72c11.129 5.861 20.085 14.733 25.951 26.376 5.866-11.642 14.822-20.515 25.951-26.376-11.129-5.861-20.085-14.733-25.951-26.376-5.865 11.642-14.821 20.515-25.951 26.376z"/><path d="m304.058 288c-4.418 0-8-3.582-8-8 0-23.203-7.893-39.607-23.458-48.758-11.98-7.044-24.396-7.24-24.573-7.242-4.404-.017-7.969-3.592-7.969-8 0-4.455 3.642-7.999 7.923-7.999.107-.019 12.742-.26 24.619-7.243 15.565-9.151 23.458-25.555 23.458-48.758 0-4.419 3.582-8 8-8s8 3.581 8 8c0 23.203 7.893 39.607 23.458 48.758 11.98 7.044 24.396 7.24 24.573 7.242 4.404.017 7.969 3.592 7.969 8 0 4.379-3.52 7.937-7.884 7.999.842 0-12.06-.163-24.658 7.243-15.565 9.151-23.458 25.555-23.458 48.758 0 4.418-3.582 8-8 8zm-25.952-72c11.129 5.861 20.085 14.733 25.951 26.376 5.866-11.642 14.822-20.515 25.951-26.376-11.129-5.861-20.085-14.733-25.951-26.376-5.865 11.642-14.821 20.515-25.951 26.376z"/><circle cx="248.058" cy="320" r="8"/><path d="m360.026 112c.177.002 12.593.199 24.573 7.242 15.565 9.151 23.458 25.555 23.458 48.758 0 4.419 3.582 8 8 8s8-3.581 8-8c0-23.203 7.893-39.607 23.458-48.758 12.006-7.058 24.45-7.241 24.542-7.242 4.415 0 8-3.579 8-8 0-4.408-3.564-7.983-7.969-8-.177-.002-12.593-.199-24.573-7.242-15.565-9.151-23.457-25.555-23.457-48.758 0-4.418-3.582-8-8-8s-8 3.582-8 8c0 23.203-7.893 39.607-23.458 48.758-12.006 7.058-24.45 7.241-24.542 7.242-4.634.05-8 3.745-8 8 0 4.408 3.564 7.983 7.968 8zm56.032-34.376c5.866 11.642 14.822 20.515 25.951 26.376-11.129 5.861-20.085 14.733-25.951 26.376-5.866-11.642-14.822-20.515-25.951-26.376 11.128-5.861 20.085-14.733 25.951-26.376z"/><path d="m296.058 152c0 23.203-7.893 39.607-23.458 48.758-12.006 7.058-24.45 7.241-24.542 7.242-4.634.05-8 3.745-8 8 0 4.408 3.564 7.983 7.969 8 .177.002 12.593.199 24.573 7.242 15.565 9.151 23.458 25.555 23.458 48.758 0 4.418 3.582 8 8 8s8-3.582 8-8c0-23.203 7.893-39.607 23.458-48.758 6.717-3.949 15.186-6.907 24.658-7.243 4.362-.155 7.884-3.62 7.884-7.999 0-4.408-3.564-7.983-7.969-8-.177-.002-12.593-.199-24.573-7.242-15.565-9.151-23.458-25.555-23.458-48.758 0-4.419-3.582-8-8-8s-8 3.581-8 8zm33.951 64c-11.129 5.861-20.085 14.733-25.951 26.376-5.866-11.642-14.822-20.515-25.951-26.376 11.129-5.861 20.085-14.733 25.951-26.376 5.865 11.642 14.822 20.515 25.951 26.376z"/><path d="m242.397 314.34c-3.114 3.114-3.117 8.203 0 11.32 3.113 3.113 8.201 3.119 11.32 0 3.113-3.115 3.115-8.203 0-11.32-3.113-3.114-8.203-3.117-11.32 0z"/><path d="m504.058 199.99c-3.911 0-7.167 2.807-7.862 6.517-20.257 91.913-123.668 157.679-221.125 117.46-4.084-1.687-8.762.258-10.447 4.343-1.685 4.084.26 8.761 4.344 10.447 87.651 36.17 184.754-4.964 227.091-85.81 0 140.926-111.37 243.053-240 243.053-132.643 0-240-107.337-240-240 0-131.778 105.691-237.786 235.876-239.965-102.292 55.569-127.095 206.855-33.414 290.965 3.288 2.952 8.346 2.678 11.298-.608 2.951-3.288 2.679-8.346-.608-11.297-97.612-87.639-52.252-252.642 68.335-279.23 3.713-.693 6.522-3.95 6.522-7.864 0-4.418-3.582-8-8-8h-40.011c-68.381-.001-132.668 26.627-181.02 74.978-100.042 100.041-100.057 261.985 0 362.041 100.042 100.042 261.984 100.057 362.041 0 48.352-48.351 74.98-112.638 74.98-181.02v-48.01c0-4.418-3.582-8-8-8z"/><circle cx="448.058" cy="344" fill="#ffcd76" r="16"/><circle cx="424.058" cy="368" fill="#ffcd76" r="8"/><g fill="#f9ecb4"><circle cx="160.058" cy="72" r="16"/><circle cx="136.058" cy="96" r="8"/></g></svg>
|
Before Width: | Height: | Size: 4.7 KiB |
|
@ -1 +0,0 @@
|
|||
<svg id="Layer_1" enable-background="new 0 0 512 512" height="512" viewBox="0 0 512 512" width="512" xmlns="http://www.w3.org/2000/svg"><circle cx="255.999" cy="256" fill="#ffcd76" r="192"/><circle cx="255.999" cy="256" fill="#ffb562" r="152"/><path d="m256 80c4.418 0 8-3.581 8-8v-64c0-4.418-3.582-8-8-8s-8 3.582-8 8v64c0 4.419 3.582 8 8 8z"/><path d="m256 432c-4.418 0-8 3.582-8 8v64c0 4.418 3.582 8 8 8s8-3.582 8-8v-64c0-4.418-3.582-8-8-8z"/><path d="m504 248h-64.001c-4.418 0-8 3.581-8 8 0 4.418 3.582 8 8 8h64.001c4.418 0 8-3.582 8-8 0-4.419-3.582-8-8-8z"/><path d="m79.999 256c0-4.419-3.582-8-8-8h-63.999c-4.418 0-8 3.581-8 8 0 4.418 3.582 8 8 8h63.999c4.418 0 8-3.582 8-8z"/><path d="m122.342 133.657c3.125 3.125 8.189 3.124 11.314 0 3.124-3.124 3.124-8.189 0-11.313l-56-56c-3.125-3.124-8.189-3.124-11.314 0-3.124 3.124-3.124 8.189 0 11.313z"/><path d="m383.999 136c2.048 0 4.095-.781 5.657-2.343l56-56c3.124-3.124 3.124-8.189 0-11.313-3.125-3.124-8.189-3.124-11.314 0l-56 56c-5.056 5.055-1.405 13.656 5.657 13.656z"/><path d="m389.656 378.343c-3.125-3.124-8.189-3.124-11.314 0-3.124 3.124-3.124 8.189 0 11.313l56 56c1.563 1.562 3.609 2.343 5.657 2.343 7.061 0 10.714-8.6 5.657-13.657z"/><path d="m122.342 378.343-56 56c-3.124 3.124-3.124 8.189 0 11.313 3.125 3.125 8.189 3.124 11.314 0l56-56c3.124-3.124 3.124-8.189 0-11.313-3.125-3.124-8.189-3.124-11.314 0z"/><path d="m255.999 96c-88.225 0-160 71.776-160 160s71.775 160 160 160 160-71.776 160-160-71.775-160-160-160zm0 304c-79.402 0-144-64.598-144-144s64.598-144 144-144 144 64.598 144 144-64.598 144-144 144z"/><path d="m373.767 280.522c-4.252-1.182-8.666 1.307-9.851 5.563-13.416 48.23-57.793 81.915-107.916 81.915-61.757 0-112-50.243-112-112s50.243-112 112-112c50.314 0 94.736 33.847 108.024 82.309 1.167 4.26 5.564 6.765 9.83 5.6 4.261-1.169 6.768-5.57 5.6-9.831-15.187-55.392-65.954-94.078-123.454-94.078-70.579 0-128 57.42-128 128s57.421 128 128 128c57.281 0 107.996-38.5 123.33-93.626 1.185-4.257-1.307-8.668-5.563-9.852z"/><path d="m381.648 250.34c-3.086-3.108-8.188-3.121-11.31 0-3.114 3.114-3.117 8.203 0 11.32 3.128 3.128 8.229 3.103 11.31 0 3.129-3.128 3.13-8.19 0-11.32z"/></svg>
|
Before Width: | Height: | Size: 2.1 KiB |
|
@ -1 +0,0 @@
|
|||
<svg id="Layer_1" enable-background="new 0 0 512.035 512.035" height="512" viewBox="0 0 512.035 512.035" width="512" xmlns="http://www.w3.org/2000/svg"><path d="m160.635 282.678c-.399 3.06-.6 6.17-.6 9.34-35.859 0-62.514 33.291-54.64 68.3-55.9-13.72-97.36-64.17-97.36-124.3 0-70.69 57.31-128 128-128h24c-39.92 8.34-72 45.6-72 88 0 43.35 31.34 79.379 72.6 86.66z" fill="#ffdf81"/><path d="m139.325 276.017h-11.29c-35.859 0-62.514 33.291-54.64 68.3l2.75 4.85c6.486 3.176 14.789 7.592 29.25 11.15-7.864-34.964 18.744-68.3 54.64-68.3 0-3.17.2-6.28.6-9.34-7.348-1.311-14.478-3.509-21.31-6.66z" fill="#ffcd76"/><path d="m160.035 108.017c-14.71 3.07-28.36 10.07-39.72 19.82-90.558 22.603-127.09 132.195-68.42 204.64-26.88-23.46-43.86-57.98-43.86-96.46 0-70.69 57.31-128 128-128z" fill="#f9ecb4"/><path d="m184.045 235.508c.27-26.28 21.65-47.49 47.99-47.49-26.51 0-48-21.49-48-48 0 26.51-21.49 48-48 48 26.34 0 47.73 21.22 47.99 47.5z" fill="#ffcd76"/><path d="m432.035 404.017h-272c-30.93 0-56-25.07-56-56s25.07-56 56-56c0-47.91 45.994-82.413 91.92-69.21 52.411-71.932 165.158-48.807 185.34 37.4 37.31 2.69 66.74 33.82 66.74 71.81 0 39.76-32.24 72-72 72z" fill="#5989b3"/><path d="m417.135 218.908c-46.079-37.029-114.104-28.239-149.18 19.9-46.024-13.231-91.92 21.386-91.92 69.21-45.061 0-70.916 50.225-46.779 86.78-15.201-10.01-25.221-27.22-25.221-46.78 0-30.93 25.07-56 56-56 0-47.91 45.994-82.413 91.92-69.21 40.366-55.402 122.233-57.326 165.18-3.9z" fill="#436786"/><path d="m443.637 252.855c-25.196-86.926-138.057-109.482-194.836-39.078-18.043-3.848-37.109-1.421-53.879 7.401 5.928-14.712 20.371-25.161 37.113-25.161 4.418 0 8-3.581 8-8 0-4.418-3.582-8-8-8-22.056 0-40-17.944-40-40 0-4.418-3.582-8-8-8s-8 3.582-8 8c0 22.056-17.944 40-40 40-4.418 0-8 3.582-8 8 0 4.419 3.582 8 8 8 21.631 0 39.429 17.427 39.969 38.971-10.447 10.267-18.101 23.365-21.688 38.046-54.738-15.31-77.633-82.299-39.099-128.676 12.192-14.674 28.69-24.798 46.453-28.509 4.014-.838 6.743-4.575 6.322-8.653-.422-4.078-3.858-7.178-7.958-7.178h-24c-114.113 0-176.619 132.321-106.547 220.53 17.697 22.277 42.194 38.589 69.381 46.311 8.063 26.122 32.432 45.159 61.166 45.159h88c4.418 0 8-3.581 8-8 0-4.418-3.582-8-8-8h-88c-26.468 0-48-21.533-48-48s21.532-48 48-48c4.418 0 8-3.581 8-8 0-35.26 28.681-64 64-64 35.786 0 64 29.266 64 64 0 4.419 3.582 8 8 8s8-3.581 8-8c0-31.505-18.765-59.95-46.817-72.79 52.765-57.536 146.992-31.064 164.288 42.804.798 3.41 3.721 5.904 7.214 6.156 33.261 2.398 59.315 30.436 59.315 63.831 0 35.29-28.71 64-64 64h-136c-4.418 0-8 3.582-8 8 0 4.419 3.582 8 8 8h136c44.112 0 80-35.888 80-80 .001-39.796-29.603-73.504-68.397-79.164zm-278.818-64.816c7.863-4.731 14.479-11.342 19.216-19.202 4.738 7.861 11.352 14.471 19.218 19.203-7.857 4.745-14.475 11.365-19.216 19.229-4.741-7.865-11.358-14.485-19.218-19.23zm-68.755 161.145c-47.653-16.722-80.029-61.699-80.029-113.167 0-61.104 45.906-111.687 105.041-119.072-64.735 47.467-49.382 143.472 22.144 169.322-27.299 7.442-47.684 32.66-47.156 62.917z"/><path d="m272.035 396.017c-4.417 0-8 3.577-8 8 0 4.415 3.575 8 8 8 4.417 0 8-3.578 8-8 0-4.417-3.577-8-8-8z"/><circle cx="144.035" cy="372.017" fill="#436786" r="8"/><circle cx="132.035" cy="360.017" fill="#436786" r="4"/><g fill="#ffcd76"><circle cx="56.035" cy="300.017" r="8"/><circle cx="44.035" cy="288.017" r="4"/></g></svg>
|
Before Width: | Height: | Size: 3.2 KiB |
|
@ -1 +0,0 @@
|
|||
<svg id="Layer_1" enable-background="new 0 0 512 512" height="512" viewBox="0 0 512 512" width="512" xmlns="http://www.w3.org/2000/svg"><path d="m222.66 220.6c-35.35 4.58-62.66 34.81-62.66 71.4-20.92 0-39.15 11.46-48.76 28.46-36.313-10.61-63.24-44.243-63.24-84.46 0-48.586 39.399-88 88-88 43.692 0 79.442 31.706 86.66 72.6z" fill="#ffdf81"/><path d="m205.71 182.3c-35.032-27.064-84.728-23.74-115.93 7.48-31.241 31.222-34.517 80.933-7.48 115.93-21.095-16.244-34.3-41.635-34.3-69.71 0-48.586 39.399-88 88-88 28.054 0 53.457 13.194 69.71 34.3z" fill="#f9ecb4"/><path d="m222.66 220.6c-35.35 4.58-62.66 34.81-62.66 71.4-20.92 0-39.15 11.46-48.76 28.46-18.921-5.528-35.498-17.355-46.99-33.51 9.31 7.96 20.29 13.99 32.33 17.51 9.61-17 27.84-28.46 48.76-28.46 0-36.59 27.31-66.82 62.66-71.4-2.31-13.08-7.51-25.16-14.91-35.56 15.486 13.209 26.014 31.411 29.57 51.56z" fill="#ffcd76"/><path d="m432 404h-272c-30.93 0-56-25.07-56-56s25.07-56 56-56c0-47.91 45.994-82.413 91.92-69.21 52.411-71.932 165.158-48.807 185.34 37.4 37.31 2.69 66.74 33.82 66.74 71.81 0 39.76-32.24 72-72 72z" fill="#add9ff"/><g fill="#d6ecff"><path d="m417.1 218.89c-46.079-37.029-114.104-28.239-149.18 19.9-46.024-13.231-91.92 21.386-91.92 69.21-45.061 0-70.917 50.224-46.78 86.78-15.2-10.01-25.22-27.22-25.22-46.78 0-30.93 25.07-56 56-56 0-47.91 45.994-82.413 91.92-69.21 40.366-55.401 122.233-57.325 165.18-3.9z"/><circle cx="144" cy="372" r="8"/><circle cx="132" cy="360" r="4"/></g><circle cx="88" cy="276" fill="#ffcd76" r="8"/><circle cx="76" cy="264" fill="#ffcd76" r="4"/><path d="m443.602 252.838c-25.196-86.926-138.057-109.482-194.836-39.078-6.722-1.433-13.209-1.932-19.768-1.689-3.59-14.029-10.297-26.969-19.701-38.055l28.361-28.36c3.125-3.124 3.125-8.189 0-11.313-3.124-3.124-8.189-3.124-11.313 0l-28.359 28.357c-15.281-12.971-34.006-20.729-53.986-22.367v-32.333c0-4.419-3.581-8-8-8s-8 3.581-8 8v32.333c-19.981 1.638-38.707 9.397-53.986 22.367l-28.357-28.357c-3.124-3.124-8.189-3.124-11.313 0-3.125 3.124-3.125 8.189 0 11.313l28.356 28.358c-12.971 15.28-20.729 34.006-22.367 53.986h-32.333c-4.418 0-8 3.581-8 8s3.582 8 8 8h32.333c1.638 19.982 9.396 38.708 22.367 53.986l-28.357 28.357c-3.125 3.124-3.125 8.189 0 11.313 3.124 3.124 8.189 3.124 11.313 0l28.365-28.365c7.846 6.638 16.716 11.991 26.219 15.811-16.034 41.708 14.888 86.898 59.76 86.898h88c4.419 0 8-3.582 8-8s-3.581-8-8-8h-88c-26.467 0-48-21.533-48-48s21.533-48 48-48c4.419 0 8-3.582 8-8 0-35.29 28.71-64 64-64 35.786 0 64 29.266 64 64 0 4.418 3.582 8 8 8s8-3.582 8-8c0-31.505-18.765-59.95-46.817-72.79 52.83-57.606 147.007-31.003 164.288 42.804.798 3.41 3.721 5.904 7.214 6.156 33.26 2.397 59.315 30.435 59.315 63.83 0 35.29-28.71 64-64 64h-136c-4.418 0-8 3.582-8 8s3.582 8 8 8h136c44.112 0 80-35.888 80-80 0-39.794-29.603-73.503-68.398-79.162zm-291.249 31.616c-18.303 2.189-34.246 12.143-44.461 26.453-53.943-20.263-69.902-90.047-28.453-131.472 43.546-43.571 117.258-23.281 133.571 34.845-32.607 7.968-57.443 35.974-60.657 70.174z"/><circle cx="272" cy="404" r="8"/></svg>
|
Before Width: | Height: | Size: 2.9 KiB |
|
@ -1 +0,0 @@
|
|||
<svg id="Layer_1" enable-background="new 0 0 512 512" height="512" viewBox="0 0 512 512" width="512" xmlns="http://www.w3.org/2000/svg"><path d="m178.55 135.77c-11.53 12.77-18.55 29.68-18.55 48.23-32.644 0-58.973 27.981-55.72 61.65-54.91-11-96.28-59.5-96.28-117.65 0-66.27 53.73-120 120-120h32c-23.71 9.37-40 36.95-40 64 0 33.52 25.75 61.01 58.55 63.77z" fill="#ffdf81"/><path d="m178.55 135.77c-11.53 12.77-18.55 29.68-18.55 48.23-32.644 0-58.973 27.981-55.72 61.65-8.45-1.69-16.58-4.27-24.28-7.65v-11.65c0-30.93 25.07-56 56-56 0-16.41 5.49-31.54 14.75-43.65 8.22 5.01 17.68 8.22 27.8 9.07z" fill="#ffcd76"/><path d="m160 8c-8.47 3.34-16 9.01-22.17 16.16-99.005 4.997-148.56 121.137-86.3 196.32-26.59-22.01-43.53-55.27-43.53-92.48 0-66.27 53.73-120 120-120z" fill="#f9ecb4"/><circle cx="64" cy="200" fill="#ffcd76" r="8"/><circle cx="52" cy="188" fill="#ffcd76" r="4"/><path d="m432 296h-272c-30.93 0-56-25.07-56-56s25.07-56 56-56c0-47.91 45.994-82.413 91.92-69.21 52.411-71.932 165.158-48.807 185.34 37.4 37.31 2.69 66.74 33.82 66.74 71.81 0 39.76-32.24 72-72 72z" fill="#5989b3"/><g fill="#436786"><path d="m417.1 110.89c-46.079-37.029-114.104-28.239-149.18 19.9-46.024-13.231-91.92 21.386-91.92 69.21-45.061 0-70.917 50.224-46.78 86.78-15.2-10.01-25.22-27.22-25.22-46.78 0-30.93 25.07-56 56-56 0-47.91 45.994-82.413 91.92-69.21 40.366-55.401 122.233-57.325 165.18-3.9z"/><circle cx="144" cy="264" r="8"/><circle cx="132" cy="252" r="4"/></g><path d="m352 376c0-22.056-17.944-40-40-40s-40 17.944-40 40c0 4.418 3.581 8 8 8 4.418 0 8-3.582 8-8 0-13.233 10.767-24 24-24s24 10.767 24 24-10.767 24-24 24h-304c-4.418 0-8 3.582-8 8s3.582 8 8 8h304c22.056 0 40-17.944 40-40z"/><path d="m472 432h-304c-4.419 0-8 3.582-8 8s3.581 8 8 8h304c13.233 0 24 10.767 24 24s-10.767 24-24 24-24-10.767-24-24c0-4.418-3.582-8-8-8-4.419 0-8 3.582-8 8 0 22.056 17.944 40 40 40s40-17.944 40-40-17.944-40-40-40z"/><path d="m392 464h-288c-4.419 0-8 3.582-8 8s3.581 8 8 8h288c4.418 0 8-3.582 8-8s-3.582-8-8-8z"/><path d="m72 464c-4.418 0-8 3.577-8 8 0 4.415 3.575 8 8 8 4.417 0 8-3.578 8-8 0-4.417-3.577-8-8-8z"/><path d="m248 368h-176c-4.419 0-8 3.582-8 8s3.581 8 8 8h176c4.418 0 8-3.582 8-8s-3.582-8-8-8z"/><path d="m34.34 370.34c-3.114 3.115-3.116 8.203 0 11.32 3.115 3.115 8.203 3.117 11.32 0 3.115-3.115 3.117-8.203 0-11.32-3.114-3.114-8.203-3.117-11.32 0z"/><path d="m376 368c-4.419 0-8 3.582-8 8s3.581 8 8 8h64c4.418 0 8-3.582 8-8s-3.582-8-8-8z"/><path d="m466.34 370.34c-3.113 3.113-3.117 8.203 0 11.32 3.115 3.115 8.203 3.117 11.32 0 3.115-3.115 3.117-8.203 0-11.32-3.114-3.114-8.203-3.117-11.32 0z"/><path d="m97.191 252.261c5.738 29.443 31.713 51.739 62.809 51.739h88c4.418 0 8-3.582 8-8s-3.582-8-8-8h-88c-26.467 0-48-21.533-48-48s21.533-48 48-48c4.419 0 8-3.581 8-8 0-42.632 40.994-73.223 81.709-61.521 27.255 7.831 46.291 33.129 46.291 61.521 0 4.419 3.581 8 8 8 4.418 0 8-3.581 8-8 0-31.505-18.765-59.95-46.817-72.79 52.104-56.817 146.738-32.164 164.288 42.804.798 3.41 3.722 5.904 7.214 6.156 33.26 2.397 59.315 30.435 59.315 63.83 0 35.29-28.71 64-64 64h-136c-4.419 0-8 3.582-8 8s3.581 8 8 8h136c44.112 0 80-35.888 80-80 0-39.794-29.604-73.503-68.398-79.162-25.026-86.33-137.742-109.872-194.836-39.078-25.67-5.474-53.344 1.815-73.198 21.595-27.143-4.095-47.568-27.473-47.568-55.355 0-24.373 15.021-48.688 34.94-56.56 8.179-3.232 5.844-15.44-2.94-15.44h-32c-70.58 0-128 57.42-128 128 0 58.899 40.544 110.273 97.191 124.261zm30.809-236.261h6.497c-13.771 14.296-22.497 34.91-22.497 56 0 32.394 21.598 60.603 52.391 69.29-6.569 10.361-10.831 22.324-12.038 35.164-30.202 3.611-53.992 28.345-56.172 58.958-47.007-13.889-80.181-57.57-80.181-107.412 0-61.757 50.243-112 112-112z"/><path d="m266.34 290.34c-3.114 3.114-3.117 8.203 0 11.32 3.115 3.115 8.203 3.117 11.32 0 3.115-3.115 3.117-8.203 0-11.32-3.113-3.114-8.203-3.117-11.32 0z"/></svg>
|
Before Width: | Height: | Size: 3.7 KiB |
|
@ -1 +0,0 @@
|
|||
<svg id="Layer_1" enable-background="new 0 0 512 512" height="512" viewBox="0 0 512 512" width="512" xmlns="http://www.w3.org/2000/svg"><path d="m214.9 114.05c-31.51 7.67-54.9 36.08-54.9 69.95-21.63 0-40.39 12.26-49.71 30.21-40.11-8.19-70.29-43.68-70.29-86.21 0-48.6 39.4-88 88-88 43.85 0 80.21 32.08 86.9 74.05z" fill="#ffdf81"/><path d="m197.71 74.3c-57.029-44.085-141.71-3.868-141.71 69.7 0 20.21 6.82 38.84 18.29 53.7-20.86-16.08-34.29-41.33-34.29-69.7 0-48.6 39.4-88 88-88 28.38 0 53.63 13.44 69.71 34.3z" fill="#f9ecb4"/><g fill="#ffcd76"><path d="m214.9 114.05c-31.51 7.67-54.9 36.08-54.9 69.95-21.63 0-40.391 12.26-49.71 30.21-21.04-4.3-39.351-16.11-52-32.51 10.399 8.04 22.649 13.79 36 16.51 9.319-17.95 28.08-30.21 49.71-30.21 0-33.87 23.391-62.28 54.9-69.95-2.36-14.81-8.41-28.38-17.19-39.75 17.37 13.39 29.59 33.14 33.19 55.75z"/><circle cx="88" cy="176" r="8"/><circle cx="76" cy="164" r="4"/></g><path d="m432 296h-272c-30.93 0-56-25.07-56-56s25.07-56 56-56c0-47.91 45.994-82.413 91.92-69.21 52.411-71.932 165.158-48.807 185.34 37.4 37.31 2.69 66.74 33.82 66.74 71.81 0 39.76-32.24 72-72 72z" fill="#add9ff"/><path d="m417.1 110.89c-46.079-37.029-114.104-28.239-149.18 19.9-46.024-13.231-91.92 21.386-91.92 69.21-45.061 0-70.916 50.225-46.779 86.78-15.201-10.01-25.221-27.22-25.221-46.78 0-30.93 25.07-56 56-56 0-47.91 45.994-82.413 91.92-69.21 40.366-55.401 122.233-57.325 165.18-3.9z" fill="#d6ecff"/><circle cx="144" cy="264" fill="#d6ecff" r="8"/><circle cx="132" cy="252" fill="#d6ecff" r="4"/><path d="m8 136h24.344c1.701 20.252 9.803 38.986 22.418 53.925l-20.419 20.419c-3.124 3.124-3.124 8.189 0 11.313 3.125 3.125 8.189 3.124 11.314 0l20.4-20.401c9.603 8.155 20.855 14.477 33.271 18.36-13.906 41.293 16.927 84.384 60.672 84.384h88c4.418 0 8-3.582 8-8s-3.582-8-8-8h-88c-26.468 0-48-21.533-48-48s21.532-48 48-48c4.418 0 8-3.581 8-8 0-35.29 28.71-64 64-64 35.786 0 64 29.266 64 64 0 4.419 3.582 8 8 8s8-3.581 8-8c0-31.505-18.765-59.95-46.817-72.79 52.832-57.61 147.007-31.001 164.288 42.804.798 3.41 3.721 5.904 7.214 6.156 33.26 2.397 59.315 30.435 59.315 63.83 0 35.29-28.71 64-64 64h-136c-4.418 0-8 3.582-8 8s3.582 8 8 8h136c44.112 0 80-35.888 80-80 0-39.794-29.603-73.503-68.398-79.162-25.197-86.926-138.058-109.482-194.836-39.078-8.889-1.896-18.193-2.298-27.612-1.015-3.558-14.252-10.385-27.5-19.869-38.715l20.373-20.374c3.124-3.124 3.124-8.189 0-11.313-3.125-3.124-8.189-3.124-11.314 0l-20.364 20.365c-15.261-12.914-34.153-20.704-53.98-22.363v-24.345c0-4.418-3.582-8-8-8s-8 3.582-8 8v24.336c-20.469 1.697-39.133 9.843-53.955 22.396l-20.388-20.389c-3.124-3.124-8.188-3.125-11.314 0-3.124 3.124-3.124 8.189 0 11.313l20.389 20.389c-12.553 14.823-20.699 33.486-22.396 53.955h-24.336c-4.418 0-8 3.581-8 8s3.582 8 8 8zm120-88c37.101 0 68.781 25.398 77.6 60.485-28.902 10.134-50.281 36.411-53.247 67.969-19.198 2.296-35.8 13.133-45.918 28.581-34.171-9.541-58.435-41.071-58.435-77.035 0-44.112 35.888-80 80-80z"/><path d="m352 376c0-22.056-17.944-40-40-40s-40 17.944-40 40c0 4.418 3.582 8 8 8s8-3.582 8-8c0-13.233 10.767-24 24-24s24 10.767 24 24-10.767 24-24 24h-304c-4.418 0-8 3.582-8 8s3.582 8 8 8h304c22.056 0 40-17.944 40-40z"/><path d="m472 432h-304c-4.418 0-8 3.582-8 8s3.582 8 8 8h304c13.233 0 24 10.767 24 24s-10.767 24-24 24-24-10.767-24-24c0-4.418-3.582-8-8-8s-8 3.582-8 8c0 22.056 17.944 40 40 40s40-17.944 40-40-17.944-40-40-40z"/><path d="m392 464h-288c-4.418 0-8 3.582-8 8s3.582 8 8 8h288c4.418 0 8-3.582 8-8s-3.582-8-8-8z"/><circle cx="72" cy="472" r="8"/><path d="m248 368h-176c-4.418 0-8 3.582-8 8s3.582 8 8 8h176c4.418 0 8-3.582 8-8s-3.582-8-8-8z"/><path d="m34.34 370.34c-3.114 3.114-3.117 8.203 0 11.32 3.113 3.113 8.201 3.119 11.32 0 3.121-3.122 3.109-8.209 0-11.32-3.116-3.115-8.203-3.116-11.32 0z"/><path d="m376 368c-4.418 0-8 3.582-8 8s3.582 8 8 8h64c4.418 0 8-3.582 8-8s-3.582-8-8-8z"/><path d="m466.34 370.34c-3.113 3.134-3.116 8.184 0 11.32 3.113 3.113 8.201 3.119 11.32 0 3.114-3.115 3.115-8.203 0-11.32-3.116-3.115-8.203-3.116-11.32 0z"/><path d="m266.34 290.34c-3.114 3.114-3.117 8.203 0 11.32 3.113 3.113 8.201 3.119 11.32 0 3.116-3.117 3.115-8.203 0-11.32-3.114-3.113-8.203-3.116-11.32 0z"/></svg>
|
Before Width: | Height: | Size: 4.1 KiB |
|
@ -1 +0,0 @@
|
|||
<svg id="Layer_1" enable-background="new 0 0 512.132 512.132" height="512" viewBox="0 0 512.132 512.132" width="512" xmlns="http://www.w3.org/2000/svg"><path d="m376.316 405.45c-5.93-1.391-11.67-3.3-17.17-5.66 27.36-24.98 42.82-59.16 32.92-95.62-6.21-22.88-24.96-58.47-46.62-94.96l10.67-20.53c22.92 39.41 54.75 96.32 59.95 115.49 8.751 32.226-.64 68.869-39.75 101.28z" fill="#5989b3"/><path d="m504.066 304.17c0 75.116-77.051 124.797-144.92 95.62 27.36-24.98 42.82-59.16 32.92-95.62-6.21-22.88-24.96-58.47-46.62-94.96l54.62-105.04z" fill="#99d0ff"/><path d="m376.316 405.45c-5.93-1.391-11.67-3.3-17.17-5.66 27.36-24.98 42.82-59.16 32.92-95.62-6.21-22.88-24.96-58.47-46.62-94.96l10.67-20.53c22.92 39.41 54.75 96.32 59.95 115.49 8.751 32.226-.64 68.869-39.75 101.28z" fill="#5989b3"/><path d="m152.986 399.79c-67.914 29.196-144.92-20.56-144.92-95.62l104-200 54.62 105.04c-21.66 36.49-40.41 72.08-46.62 94.96-9.9 36.46 5.56 70.64 32.92 95.62z" fill="#add9ff"/><path d="m137.196 405.45c5.93-1.391 11.67-3.3 17.17-5.66-27.36-24.98-42.82-59.16-32.92-95.62 6.21-22.88 24.96-58.47 46.62-94.96l-10.67-20.53c-22.92 39.41-54.75 96.32-59.95 115.49-8.751 32.226.64 68.869 39.75 101.28z" fill="#99d0ff"/><path d="m392.066 304.17c-17.615-64.882-136-232-136-232s-118.385 167.118-136 232c-19.68 72.487 60.889 136 136 136 75.11 0 155.68-63.513 136-136z" fill="#c2e3ff"/><path d="m266.566 439.76c-78.855 6.08-166.972-60.185-146.5-135.59 17.62-64.88 136-232 136-232s3.94 5.57 10.5 15.06c-29.36 42.53-111.11 163.9-125.51 216.94-18.77 69.12 53.62 130.08 125.51 135.59z" fill="#d6ecff"/><path d="m407.164 100.48c-2.977-5.726-11.206-5.75-14.195 0l-48.003 92.315c-37.236-61.366-79.457-121.136-82.371-125.248-3.177-4.486-9.861-4.514-13.056 0-2.914 4.112-45.135 63.882-82.372 125.248l-48.003-92.315c-2.977-5.726-11.206-5.75-14.195 0-111.226 213.912-104.903 200.775-104.903 203.69 0 77.983 78.302 132.392 151.33 104.879 62.282 53.104 149.942 50.643 209.34 0 72.953 27.486 151.33-26.829 151.33-104.879 0-2.888 6.316 10.208-104.902-203.69zm-391.079 205.609 95.981-184.578 45.456 87.416c-20.991 35.682-38.973 70.297-45.177 93.148-9.247 34.06 1.774 67.737 26.077 94.433-60.262 17.239-121.099-27.436-122.337-90.419zm239.981 126.081c-69.792 0-146.486-58.847-128.279-125.904 14.689-54.103 103.322-184.169 128.279-220.131 24.957 35.959 113.588 166.018 128.279 220.131 18.208 67.066-58.494 125.904-128.279 125.904zm117.644-35.663c24.391-26.788 35.294-60.483 26.077-94.433-6.204-22.851-24.185-57.466-45.177-93.146l45.456-87.417 95.981 184.578c-1.236 62.889-62.002 107.678-122.337 90.418z"/><path d="m286.976 164.139c-2.227-3.814-7.123-5.105-10.941-2.879-3.816 2.227-5.105 7.125-2.879 10.941l56 96c1.487 2.549 4.165 3.971 6.918 3.971 6.102 0 10.032-6.669 6.902-12.033z"/><path d="m357.726 290.51c-3.114-3.114-8.203-3.117-11.32 0-3.116 3.117-3.114 8.206 0 11.32 3.112 3.11 8.197 3.121 11.32 0 3.165-3.188 3.068-8.25 0-11.32z"/></svg>
|
Before Width: | Height: | Size: 2.8 KiB |
|
@ -1 +0,0 @@
|
|||
<svg id="Layer_1" enable-background="new 0 0 512.132 512.132" height="512" viewBox="0 0 512.132 512.132" width="512" xmlns="http://www.w3.org/2000/svg"><path d="m376.316 405.45c-5.93-1.391-11.67-3.3-17.17-5.66 27.36-24.98 42.82-59.16 32.92-95.62-6.21-22.88-24.96-58.47-46.62-94.96l10.67-20.53c22.92 39.41 54.75 96.32 59.95 115.49 8.751 32.226-.64 68.869-39.75 101.28z" fill="#5989b3"/><path d="m504.066 304.17c0 75.116-77.051 124.797-144.92 95.62 27.36-24.98 42.82-59.16 32.92-95.62-6.21-22.88-24.96-58.47-46.62-94.96l54.62-105.04z" fill="#99d0ff"/><path d="m376.316 405.45c-5.93-1.391-11.67-3.3-17.17-5.66 27.36-24.98 42.82-59.16 32.92-95.62-6.21-22.88-24.96-58.47-46.62-94.96l10.67-20.53c22.92 39.41 54.75 96.32 59.95 115.49 8.751 32.226-.64 68.869-39.75 101.28z" fill="#5989b3"/><path d="m152.986 399.79c-67.914 29.196-144.92-20.56-144.92-95.62l104-200 54.62 105.04c-21.66 36.49-40.41 72.08-46.62 94.96-9.9 36.46 5.56 70.64 32.92 95.62z" fill="#add9ff"/><path d="m137.196 405.45c5.93-1.391 11.67-3.3 17.17-5.66-27.36-24.98-42.82-59.16-32.92-95.62 6.21-22.88 24.96-58.47 46.62-94.96l-10.67-20.53c-22.92 39.41-54.75 96.32-59.95 115.49-8.751 32.226.64 68.869 39.75 101.28z" fill="#99d0ff"/><path d="m392.066 304.17c-17.615-64.882-136-232-136-232s-118.385 167.118-136 232c-19.68 72.487 60.889 136 136 136 75.11 0 155.68-63.513 136-136z" fill="#c2e3ff"/><path d="m266.566 439.76c-78.855 6.08-166.972-60.185-146.5-135.59 17.62-64.88 136-232 136-232s3.94 5.57 10.5 15.06c-29.36 42.53-111.11 163.9-125.51 216.94-18.77 69.12 53.62 130.08 125.51 135.59z" fill="#d6ecff"/><path d="m407.164 100.48c-2.977-5.726-11.206-5.75-14.195 0l-48.003 92.315c-37.236-61.366-79.457-121.136-82.371-125.248-3.177-4.486-9.861-4.514-13.056 0-2.914 4.112-45.135 63.882-82.372 125.248l-48.003-92.315c-2.977-5.726-11.206-5.75-14.195 0-111.226 213.912-104.903 200.775-104.903 203.69 0 77.983 78.302 132.392 151.33 104.879 62.282 53.104 149.942 50.643 209.34 0 72.953 27.486 151.33-26.829 151.33-104.879 0-2.888 6.316 10.208-104.902-203.69zm-391.079 205.609 95.981-184.578 45.456 87.416c-20.991 35.682-38.973 70.297-45.177 93.148-9.247 34.06 1.774 67.737 26.077 94.433-60.262 17.239-121.099-27.436-122.337-90.419zm239.981 126.081c-69.792 0-146.486-58.847-128.279-125.904 14.689-54.103 103.322-184.169 128.279-220.131 24.957 35.959 113.588 166.018 128.279 220.131 18.208 67.066-58.494 125.904-128.279 125.904zm117.644-35.663c24.391-26.788 35.294-60.483 26.077-94.433-6.204-22.851-24.185-57.466-45.177-93.146l45.456-87.417 95.981 184.578c-1.236 62.889-62.002 107.678-122.337 90.418z"/><path d="m286.976 164.139c-2.227-3.814-7.123-5.105-10.941-2.879-3.816 2.227-5.105 7.125-2.879 10.941l56 96c1.487 2.549 4.165 3.971 6.918 3.971 6.102 0 10.032-6.669 6.902-12.033z"/><path d="m357.726 290.51c-3.114-3.114-8.203-3.117-11.32 0-3.116 3.117-3.114 8.206 0 11.32 3.112 3.11 8.197 3.121 11.32 0 3.165-3.188 3.068-8.25 0-11.32z"/></svg>
|
Before Width: | Height: | Size: 2.8 KiB |
|
@ -1 +0,0 @@
|
|||
<svg id="Layer_1" enable-background="new 0 0 512.035 512.035" height="512" viewBox="0 0 512.035 512.035" width="512" xmlns="http://www.w3.org/2000/svg"><path d="m160.635 282.678c-.399 3.06-.6 6.17-.6 9.34-35.859 0-62.514 33.291-54.64 68.3-55.9-13.72-97.36-64.17-97.36-124.3 0-70.69 57.31-128 128-128h24c-39.92 8.34-72 45.6-72 88 0 43.35 31.34 79.379 72.6 86.66z" fill="#ffdf81"/><path d="m139.325 276.017h-11.29c-35.859 0-62.514 33.291-54.64 68.3l2.75 4.85c6.486 3.176 14.789 7.592 29.25 11.15-7.864-34.964 18.744-68.3 54.64-68.3 0-3.17.2-6.28.6-9.34-7.348-1.311-14.478-3.509-21.31-6.66z" fill="#ffcd76"/><path d="m160.035 108.017c-14.71 3.07-28.36 10.07-39.72 19.82-90.558 22.603-127.09 132.195-68.42 204.64-26.88-23.46-43.86-57.98-43.86-96.46 0-70.69 57.31-128 128-128z" fill="#f9ecb4"/><path d="m184.045 235.508c.27-26.28 21.65-47.49 47.99-47.49-26.51 0-48-21.49-48-48 0 26.51-21.49 48-48 48 26.34 0 47.73 21.22 47.99 47.5z" fill="#ffcd76"/><path d="m432.035 404.017h-272c-30.93 0-56-25.07-56-56s25.07-56 56-56c0-47.91 45.994-82.413 91.92-69.21 52.411-71.932 165.158-48.807 185.34 37.4 37.31 2.69 66.74 33.82 66.74 71.81 0 39.76-32.24 72-72 72z" fill="#5989b3"/><path d="m417.135 218.908c-46.079-37.029-114.104-28.239-149.18 19.9-46.024-13.231-91.92 21.386-91.92 69.21-45.061 0-70.916 50.225-46.779 86.78-15.201-10.01-25.221-27.22-25.221-46.78 0-30.93 25.07-56 56-56 0-47.91 45.994-82.413 91.92-69.21 40.366-55.402 122.233-57.326 165.18-3.9z" fill="#436786"/><path d="m443.637 252.855c-25.196-86.926-138.057-109.482-194.836-39.078-18.043-3.848-37.109-1.421-53.879 7.401 5.928-14.712 20.371-25.161 37.113-25.161 4.418 0 8-3.581 8-8 0-4.418-3.582-8-8-8-22.056 0-40-17.944-40-40 0-4.418-3.582-8-8-8s-8 3.582-8 8c0 22.056-17.944 40-40 40-4.418 0-8 3.582-8 8 0 4.419 3.582 8 8 8 21.631 0 39.429 17.427 39.969 38.971-10.447 10.267-18.101 23.365-21.688 38.046-54.738-15.31-77.633-82.299-39.099-128.676 12.192-14.674 28.69-24.798 46.453-28.509 4.014-.838 6.743-4.575 6.322-8.653-.422-4.078-3.858-7.178-7.958-7.178h-24c-114.113 0-176.619 132.321-106.547 220.53 17.697 22.277 42.194 38.589 69.381 46.311 8.063 26.122 32.432 45.159 61.166 45.159h88c4.418 0 8-3.581 8-8 0-4.418-3.582-8-8-8h-88c-26.468 0-48-21.533-48-48s21.532-48 48-48c4.418 0 8-3.581 8-8 0-35.26 28.681-64 64-64 35.786 0 64 29.266 64 64 0 4.419 3.582 8 8 8s8-3.581 8-8c0-31.505-18.765-59.95-46.817-72.79 52.765-57.536 146.992-31.064 164.288 42.804.798 3.41 3.721 5.904 7.214 6.156 33.261 2.398 59.315 30.436 59.315 63.831 0 35.29-28.71 64-64 64h-136c-4.418 0-8 3.582-8 8 0 4.419 3.582 8 8 8h136c44.112 0 80-35.888 80-80 .001-39.796-29.603-73.504-68.397-79.164zm-278.818-64.816c7.863-4.731 14.479-11.342 19.216-19.202 4.738 7.861 11.352 14.471 19.218 19.203-7.857 4.745-14.475 11.365-19.216 19.229-4.741-7.865-11.358-14.485-19.218-19.23zm-68.755 161.145c-47.653-16.722-80.029-61.699-80.029-113.167 0-61.104 45.906-111.687 105.041-119.072-64.735 47.467-49.382 143.472 22.144 169.322-27.299 7.442-47.684 32.66-47.156 62.917z"/><path d="m272.035 396.017c-4.417 0-8 3.577-8 8 0 4.415 3.575 8 8 8 4.417 0 8-3.578 8-8 0-4.417-3.577-8-8-8z"/><circle cx="144.035" cy="372.017" fill="#436786" r="8"/><circle cx="132.035" cy="360.017" fill="#436786" r="4"/><g fill="#ffcd76"><circle cx="56.035" cy="300.017" r="8"/><circle cx="44.035" cy="288.017" r="4"/></g></svg>
|
Before Width: | Height: | Size: 3.2 KiB |
|
@ -1 +0,0 @@
|
|||
<svg id="Layer_1" enable-background="new 0 0 512 512" height="512" viewBox="0 0 512 512" width="512" xmlns="http://www.w3.org/2000/svg"><path d="m222.66 220.6c-35.35 4.58-62.66 34.81-62.66 71.4-20.92 0-39.15 11.46-48.76 28.46-36.313-10.61-63.24-44.243-63.24-84.46 0-48.586 39.399-88 88-88 43.692 0 79.442 31.706 86.66 72.6z" fill="#ffdf81"/><path d="m205.71 182.3c-35.032-27.064-84.728-23.74-115.93 7.48-31.241 31.222-34.517 80.933-7.48 115.93-21.095-16.244-34.3-41.635-34.3-69.71 0-48.586 39.399-88 88-88 28.054 0 53.457 13.194 69.71 34.3z" fill="#f9ecb4"/><path d="m222.66 220.6c-35.35 4.58-62.66 34.81-62.66 71.4-20.92 0-39.15 11.46-48.76 28.46-18.921-5.528-35.498-17.355-46.99-33.51 9.31 7.96 20.29 13.99 32.33 17.51 9.61-17 27.84-28.46 48.76-28.46 0-36.59 27.31-66.82 62.66-71.4-2.31-13.08-7.51-25.16-14.91-35.56 15.486 13.209 26.014 31.411 29.57 51.56z" fill="#ffcd76"/><path d="m432 404h-272c-30.93 0-56-25.07-56-56s25.07-56 56-56c0-47.91 45.994-82.413 91.92-69.21 52.411-71.932 165.158-48.807 185.34 37.4 37.31 2.69 66.74 33.82 66.74 71.81 0 39.76-32.24 72-72 72z" fill="#add9ff"/><g fill="#d6ecff"><path d="m417.1 218.89c-46.079-37.029-114.104-28.239-149.18 19.9-46.024-13.231-91.92 21.386-91.92 69.21-45.061 0-70.917 50.224-46.78 86.78-15.2-10.01-25.22-27.22-25.22-46.78 0-30.93 25.07-56 56-56 0-47.91 45.994-82.413 91.92-69.21 40.366-55.401 122.233-57.325 165.18-3.9z"/><circle cx="144" cy="372" r="8"/><circle cx="132" cy="360" r="4"/></g><circle cx="88" cy="276" fill="#ffcd76" r="8"/><circle cx="76" cy="264" fill="#ffcd76" r="4"/><path d="m443.602 252.838c-25.196-86.926-138.057-109.482-194.836-39.078-6.722-1.433-13.209-1.932-19.768-1.689-3.59-14.029-10.297-26.969-19.701-38.055l28.361-28.36c3.125-3.124 3.125-8.189 0-11.313-3.124-3.124-8.189-3.124-11.313 0l-28.359 28.357c-15.281-12.971-34.006-20.729-53.986-22.367v-32.333c0-4.419-3.581-8-8-8s-8 3.581-8 8v32.333c-19.981 1.638-38.707 9.397-53.986 22.367l-28.357-28.357c-3.124-3.124-8.189-3.124-11.313 0-3.125 3.124-3.125 8.189 0 11.313l28.356 28.358c-12.971 15.28-20.729 34.006-22.367 53.986h-32.333c-4.418 0-8 3.581-8 8s3.582 8 8 8h32.333c1.638 19.982 9.396 38.708 22.367 53.986l-28.357 28.357c-3.125 3.124-3.125 8.189 0 11.313 3.124 3.124 8.189 3.124 11.313 0l28.365-28.365c7.846 6.638 16.716 11.991 26.219 15.811-16.034 41.708 14.888 86.898 59.76 86.898h88c4.419 0 8-3.582 8-8s-3.581-8-8-8h-88c-26.467 0-48-21.533-48-48s21.533-48 48-48c4.419 0 8-3.582 8-8 0-35.29 28.71-64 64-64 35.786 0 64 29.266 64 64 0 4.418 3.582 8 8 8s8-3.582 8-8c0-31.505-18.765-59.95-46.817-72.79 52.83-57.606 147.007-31.003 164.288 42.804.798 3.41 3.721 5.904 7.214 6.156 33.26 2.397 59.315 30.435 59.315 63.83 0 35.29-28.71 64-64 64h-136c-4.418 0-8 3.582-8 8s3.582 8 8 8h136c44.112 0 80-35.888 80-80 0-39.794-29.603-73.503-68.398-79.162zm-291.249 31.616c-18.303 2.189-34.246 12.143-44.461 26.453-53.943-20.263-69.902-90.047-28.453-131.472 43.546-43.571 117.258-23.281 133.571 34.845-32.607 7.968-57.443 35.974-60.657 70.174z"/><circle cx="272" cy="404" r="8"/></svg>
|
Before Width: | Height: | Size: 2.9 KiB |