Initial commit
No files matched your search
@@ -0,0 +1,19 @@
|
||||
local gears = require('gears')
|
||||
local awful = require('awful')
|
||||
local wibox = require('wibox')
|
||||
|
||||
local config_dir = gears.filesystem.get_configuration_dir()
|
||||
local widget_icon_dir = config_dir .. 'widget/mpd/icons/'
|
||||
|
||||
local album_cover_img = wibox.widget {
|
||||
{
|
||||
id = 'cover',
|
||||
image = widget_icon_dir .. 'vinyl.svg',
|
||||
resize = true,
|
||||
clip_shape = gears.shape.rounded_rect,
|
||||
widget = wibox.widget.imagebox,
|
||||
},
|
||||
layout = wibox.layout.fixed.vertical
|
||||
}
|
||||
|
||||
return album_cover_img
|
||||
@@ -0,0 +1,9 @@
|
||||
-- Return UI Table
|
||||
return {
|
||||
album_cover = require('widget.mpd.content.album-cover'),
|
||||
progress_bar = require('widget.mpd.content.progress-bar'),
|
||||
track_time = require('widget.mpd.content.track-time'),
|
||||
song_info = require('widget.mpd.content.song-info'),
|
||||
media_buttons = require('widget.mpd.content.media-buttons'),
|
||||
volume_slider = require('widget.mpd.content.volume-slider'),
|
||||
}
|
||||
@@ -0,0 +1,121 @@
|
||||
local wibox = require('wibox')
|
||||
local awful = require('awful')
|
||||
local gears = require('gears')
|
||||
local beautiful = require('beautiful')
|
||||
local dpi = beautiful.xresources.apply_dpi
|
||||
local clickable_container = require('widget.clickable-container')
|
||||
local config_dir = gears.filesystem.get_configuration_dir()
|
||||
local widget_icon_dir = config_dir .. 'widget/mpd/icons/'
|
||||
local media_buttons = {}
|
||||
|
||||
media_buttons.play_button_image = wibox.widget {
|
||||
{
|
||||
id = 'play',
|
||||
image = widget_icon_dir .. 'play.svg',
|
||||
resize = true,
|
||||
widget = wibox.widget.imagebox
|
||||
},
|
||||
layout = wibox.layout.align.horizontal
|
||||
}
|
||||
|
||||
media_buttons.next_button_image = wibox.widget {
|
||||
{
|
||||
id = 'next',
|
||||
image = widget_icon_dir .. 'next.svg',
|
||||
resize = true,
|
||||
widget = wibox.widget.imagebox
|
||||
},
|
||||
layout = wibox.layout.align.horizontal
|
||||
}
|
||||
|
||||
media_buttons.prev_button_image = wibox.widget {
|
||||
{
|
||||
id = 'prev',
|
||||
image = widget_icon_dir .. 'prev.svg',
|
||||
resize = true,
|
||||
widget = wibox.widget.imagebox
|
||||
},
|
||||
layout = wibox.layout.align.horizontal
|
||||
}
|
||||
|
||||
media_buttons.repeat_button_image = wibox.widget {
|
||||
{
|
||||
id = 'rep',
|
||||
image = widget_icon_dir .. 'repeat-on.svg',
|
||||
resize = true,
|
||||
widget = wibox.widget.imagebox
|
||||
},
|
||||
layout = wibox.layout.align.horizontal
|
||||
}
|
||||
|
||||
media_buttons.random_button_image = wibox.widget {
|
||||
{
|
||||
id = 'rand',
|
||||
image = widget_icon_dir .. 'random-on.svg',
|
||||
resize = true,
|
||||
widget = wibox.widget.imagebox
|
||||
},
|
||||
layout = wibox.layout.align.horizontal
|
||||
}
|
||||
|
||||
media_buttons.play_button = wibox.widget {
|
||||
{
|
||||
media_buttons.play_button_image,
|
||||
margins = dpi(7),
|
||||
widget = wibox.container.margin
|
||||
},
|
||||
widget = clickable_container
|
||||
}
|
||||
|
||||
media_buttons.next_button = wibox.widget {
|
||||
{
|
||||
media_buttons.next_button_image,
|
||||
margins = dpi(10),
|
||||
widget = wibox.container.margin
|
||||
},
|
||||
widget = clickable_container
|
||||
}
|
||||
|
||||
media_buttons.prev_button = wibox.widget {
|
||||
{
|
||||
media_buttons.prev_button_image,
|
||||
margins = dpi(10),
|
||||
widget = wibox.container.margin
|
||||
},
|
||||
widget = clickable_container
|
||||
}
|
||||
|
||||
media_buttons.repeat_button = wibox.widget {
|
||||
{
|
||||
media_buttons.repeat_button_image,
|
||||
margins = dpi(10),
|
||||
widget = wibox.container.margin
|
||||
},
|
||||
widget = clickable_container
|
||||
}
|
||||
|
||||
media_buttons.random_button = wibox.widget {
|
||||
{
|
||||
media_buttons.random_button_image,
|
||||
margins = dpi(10),
|
||||
widget = wibox.container.margin
|
||||
},
|
||||
widget = clickable_container
|
||||
}
|
||||
|
||||
media_buttons.navigate_buttons = wibox.widget {
|
||||
expand = 'none',
|
||||
layout = wibox.layout.align.horizontal,
|
||||
media_buttons.repeat_button,
|
||||
{
|
||||
layout = wibox.layout.fixed.horizontal,
|
||||
media_buttons.prev_button,
|
||||
media_buttons.play_button,
|
||||
media_buttons.next_button,
|
||||
forced_height = dpi(35),
|
||||
},
|
||||
media_buttons.random_button,
|
||||
forced_height = dpi(35),
|
||||
}
|
||||
|
||||
return media_buttons
|
||||
@@ -0,0 +1,21 @@
|
||||
local awful = require('awful')
|
||||
local wibox = require('wibox')
|
||||
local gears = require('gears')
|
||||
local beautiful = require('beautiful')
|
||||
local dpi = beautiful.xresources.apply_dpi
|
||||
|
||||
local progressbar = wibox.widget {
|
||||
{
|
||||
id = 'music_bar',
|
||||
max_value = 100,
|
||||
forced_height = dpi(3),
|
||||
forced_width = dpi(100),
|
||||
color = '#ffffff',
|
||||
background_color = '#ffffff20',
|
||||
shape = gears.shape.rounded_bar,
|
||||
widget = wibox.widget.progressbar
|
||||
},
|
||||
layout = wibox.layout.stack
|
||||
}
|
||||
|
||||
return progressbar
|
||||
@@ -0,0 +1,64 @@
|
||||
local wibox = require('wibox')
|
||||
local dpi = require('beautiful').xresources.apply_dpi
|
||||
local song_info = {}
|
||||
|
||||
song_info.music_title = wibox.widget {
|
||||
layout = wibox.layout.align.horizontal,
|
||||
expand = 'none',
|
||||
nil,
|
||||
{
|
||||
{
|
||||
id = 'title',
|
||||
text = 'The song title is here',
|
||||
font = 'Inter Bold 12',
|
||||
align = 'center',
|
||||
valign = 'center',
|
||||
ellipsize = 'end',
|
||||
widget = wibox.widget.textbox
|
||||
},
|
||||
id = 'scroll_container',
|
||||
max_size = 345,
|
||||
speed = 75,
|
||||
expand = true,
|
||||
direction = 'h',
|
||||
step_function = wibox.container.scroll
|
||||
.step_functions.waiting_nonlinear_back_and_forth,
|
||||
fps = 60,
|
||||
layout = wibox.container.scroll.horizontal
|
||||
},
|
||||
nil
|
||||
}
|
||||
|
||||
song_info.music_artist = wibox.widget {
|
||||
layout = wibox.layout.align.horizontal,
|
||||
expand = 'none',
|
||||
nil,
|
||||
{
|
||||
{
|
||||
id = 'artist',
|
||||
text = 'The artist name is here',
|
||||
font = 'Inter 10',
|
||||
align = 'center',
|
||||
valign = 'center',
|
||||
widget = wibox.widget.textbox
|
||||
},
|
||||
id = 'scroll_container',
|
||||
max_size = 345,
|
||||
speed = 75,
|
||||
expand = true,
|
||||
direction = 'h',
|
||||
step_function = wibox.container.scroll
|
||||
.step_functions.waiting_nonlinear_back_and_forth,
|
||||
layout = wibox.container.scroll.horizontal,
|
||||
fps = 60
|
||||
},
|
||||
nil
|
||||
}
|
||||
|
||||
song_info.music_info = wibox.widget {
|
||||
layout = wibox.layout.fixed.vertical,
|
||||
song_info.music_title,
|
||||
song_info.music_artist
|
||||
}
|
||||
|
||||
return song_info
|
||||
@@ -0,0 +1,37 @@
|
||||
local beautiful = require('beautiful')
|
||||
local gears = require('gears')
|
||||
local awful = require('awful')
|
||||
local wibox = require('wibox')
|
||||
local dpi = beautiful.xresources.apply_dpi
|
||||
|
||||
local time_info = {}
|
||||
|
||||
time_info.time_status = wibox.widget {
|
||||
id = 'statustime',
|
||||
text = '00:00',
|
||||
font = 'Inter 8',
|
||||
align = 'center',
|
||||
valign = 'center',
|
||||
forced_height = dpi(10),
|
||||
widget = wibox.widget.textbox
|
||||
}
|
||||
|
||||
time_info.time_duration = wibox.widget {
|
||||
id = 'durationtime',
|
||||
text = '00:00',
|
||||
font = 'Inter 8',
|
||||
align = 'center',
|
||||
valign = 'center',
|
||||
forced_height = dpi(10),
|
||||
widget = wibox.widget.textbox
|
||||
}
|
||||
|
||||
time_info.time_track = wibox.widget {
|
||||
expand = 'none',
|
||||
layout = wibox.layout.align.horizontal,
|
||||
time_info.time_status,
|
||||
nil,
|
||||
time_info.time_duration
|
||||
}
|
||||
|
||||
return time_info
|
||||
@@ -0,0 +1,23 @@
|
||||
local wibox = require('wibox')
|
||||
local awful = require('awful')
|
||||
local gears = require('gears')
|
||||
local beautiful = require('beautiful')
|
||||
local dpi = beautiful.xresources.apply_dpi
|
||||
|
||||
local slider = {}
|
||||
|
||||
slider.vol_slider = wibox.widget {
|
||||
bar_shape = gears.shape.rounded_rect,
|
||||
bar_height = dpi(5),
|
||||
bar_color = '#ffffff20',
|
||||
bar_active_color = '#f2f2f2EE',
|
||||
handle_color = '#ffffff',
|
||||
handle_shape = gears.shape.circle,
|
||||
handle_width = dpi(15),
|
||||
handle_border_color = '#00000012',
|
||||
handle_border_width = dpi(1),
|
||||
maximum = 100,
|
||||
widget = wibox.widget.slider,
|
||||
}
|
||||
|
||||
return slider
|
||||
@@ -0,0 +1,62 @@
|
||||
<?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"
|
||||
height="240"
|
||||
viewBox="0 0 240 240"
|
||||
width="240"
|
||||
version="1.1"
|
||||
id="svg6"
|
||||
sodipodi:docname="music.svg"
|
||||
inkscape:version="0.92.4 5da689c313, 2019-01-14">
|
||||
<metadata
|
||||
id="metadata12">
|
||||
<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>
|
||||
<defs
|
||||
id="defs10" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#252525"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="1"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1321"
|
||||
inkscape:window-height="740"
|
||||
id="namedview8"
|
||||
showgrid="false"
|
||||
inkscape:zoom="0.61458333"
|
||||
inkscape:cx="-149.03738"
|
||||
inkscape:cy="-9.7452794"
|
||||
inkscape:window-x="45"
|
||||
inkscape:window-y="28"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="svg6"
|
||||
inkscape:pagecheckerboard="true" />
|
||||
<path
|
||||
d="m 0,216 h 24 v 24 H 0 Z"
|
||||
id="path2"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:none" />
|
||||
<path
|
||||
d="m 120,20 v 117.22222 c -6.55555,-3.77778 -14.11111,-6.11111 -22.222221,-6.11111 -24.555555,0 -44.444444,19.88889 -44.444444,44.44445 0,24.55555 19.888889,44.44444 44.444444,44.44444 24.555561,0 44.444441,-19.88889 44.444441,-44.44444 V 64.444444 h 44.44444 V 20 Z"
|
||||
id="path4"
|
||||
style="fill:#ffffff;fill-opacity:0.93333333;stroke-width:11.11111069"
|
||||
inkscape:connector-curvature="0" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.0 KiB |
@@ -0,0 +1,57 @@
|
||||
<?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="240"
|
||||
height="240"
|
||||
viewBox="0 0 240 240"
|
||||
version="1.1"
|
||||
id="svg4"
|
||||
sodipodi:docname="ic_skip_next_48px.svg"
|
||||
inkscape:version="0.92.4 5da689c313, 2019-01-14">
|
||||
<metadata
|
||||
id="metadata10">
|
||||
<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>
|
||||
<defs
|
||||
id="defs8" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1321"
|
||||
inkscape:window-height="740"
|
||||
id="namedview6"
|
||||
showgrid="false"
|
||||
inkscape:pagecheckerboard="true"
|
||||
inkscape:zoom="4.9166667"
|
||||
inkscape:cx="24"
|
||||
inkscape:cy="24"
|
||||
inkscape:window-x="45"
|
||||
inkscape:window-y="28"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="svg4" />
|
||||
<path
|
||||
d="M 20,220 161.66667,120 20,20 Z M 186.66667,20 V 220 H 220 V 20 Z"
|
||||
id="path2"
|
||||
inkscape:connector-curvature="0"
|
||||
style="stroke-width:8.33333302;fill:#ffffff;fill-opacity:1" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.7 KiB |
@@ -0,0 +1,59 @@
|
||||
<?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="240"
|
||||
height="240"
|
||||
viewBox="0 0 240.00001 240"
|
||||
version="1.1"
|
||||
id="svg4"
|
||||
sodipodi:docname="ic_pause_48px.svg"
|
||||
inkscape:version="0.92.4 5da689c313, 2019-01-14">
|
||||
<metadata
|
||||
id="metadata10">
|
||||
<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>
|
||||
<defs
|
||||
id="defs8" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1321"
|
||||
inkscape:window-height="740"
|
||||
id="namedview6"
|
||||
showgrid="false"
|
||||
inkscape:pagecheckerboard="true"
|
||||
units="px"
|
||||
width="240mm"
|
||||
inkscape:zoom="0.30729167"
|
||||
inkscape:cx="-372.98936"
|
||||
inkscape:cy="-268.78861"
|
||||
inkscape:window-x="45"
|
||||
inkscape:window-y="28"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="svg4" />
|
||||
<path
|
||||
d="m 34.285715,220 h 57.14286 V 20 H 34.285715 Z M 148.57142,20 v 200 h 57.14287 V 20 Z"
|
||||
id="path2"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#ffffff;fill-opacity:1;stroke-width:7.1428566" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.8 KiB |
@@ -0,0 +1,57 @@
|
||||
<?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="240"
|
||||
height="240"
|
||||
viewBox="0 0 240 240"
|
||||
version="1.1"
|
||||
id="svg4"
|
||||
sodipodi:docname="ic_play_arrow_48px.svg"
|
||||
inkscape:version="0.92.4 5da689c313, 2019-01-14">
|
||||
<metadata
|
||||
id="metadata10">
|
||||
<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>
|
||||
<defs
|
||||
id="defs8" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1321"
|
||||
inkscape:window-height="740"
|
||||
id="namedview6"
|
||||
showgrid="false"
|
||||
inkscape:pagecheckerboard="true"
|
||||
inkscape:zoom="4.9166667"
|
||||
inkscape:cx="24"
|
||||
inkscape:cy="24"
|
||||
inkscape:window-x="45"
|
||||
inkscape:window-y="28"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="svg4" />
|
||||
<path
|
||||
d="M 41.42857,20 V 220 L 198.57143,120 Z"
|
||||
id="path2"
|
||||
inkscape:connector-curvature="0"
|
||||
style="stroke-width:7.14285707;fill:#ffffff;fill-opacity:1" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.7 KiB |
@@ -0,0 +1,57 @@
|
||||
<?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="240"
|
||||
height="240"
|
||||
viewBox="0 0 240 240"
|
||||
version="1.1"
|
||||
id="svg4"
|
||||
sodipodi:docname="ic_skip_previous_48px.svg"
|
||||
inkscape:version="0.92.4 5da689c313, 2019-01-14">
|
||||
<metadata
|
||||
id="metadata10">
|
||||
<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>
|
||||
<defs
|
||||
id="defs8" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1321"
|
||||
inkscape:window-height="740"
|
||||
id="namedview6"
|
||||
showgrid="false"
|
||||
inkscape:pagecheckerboard="true"
|
||||
inkscape:zoom="0.43457604"
|
||||
inkscape:cx="-405.81548"
|
||||
inkscape:cy="18.788525"
|
||||
inkscape:window-x="45"
|
||||
inkscape:window-y="28"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="svg4" />
|
||||
<path
|
||||
d="M 20,20 H 53.333333 V 220 H 20 Z M 78.333333,120 220,220 V 20 Z"
|
||||
id="path2"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#ffffff;fill-opacity:1;stroke-width:8.33333302" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.7 KiB |
@@ -0,0 +1,64 @@
|
||||
<?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"
|
||||
version="1.1"
|
||||
id="svg917"
|
||||
width="240"
|
||||
height="240"
|
||||
viewBox="0 0 240 240"
|
||||
sodipodi:docname="random-off.svg"
|
||||
inkscape:version="0.92.4 5da689c313, 2019-01-14">
|
||||
<metadata
|
||||
id="metadata923">
|
||||
<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>
|
||||
<defs
|
||||
id="defs921" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1321"
|
||||
inkscape:window-height="740"
|
||||
id="namedview919"
|
||||
showgrid="false"
|
||||
inkscape:zoom="1.066875"
|
||||
inkscape:cx="89.045102"
|
||||
inkscape:cy="266.66666"
|
||||
inkscape:window-x="45"
|
||||
inkscape:window-y="28"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="svg917"
|
||||
inkscape:pagecheckerboard="true" />
|
||||
<image
|
||||
width="200"
|
||||
height="200"
|
||||
preserveAspectRatio="none"
|
||||
style="image-rendering:optimizeQuality"
|
||||
xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAfQAAAH0CAYAAADL1t+KAAABhGlDQ1BJQ0MgcHJvZmlsZQAAKJF9 kT1Iw1AUhU9TpSIVBzuodMhQnSyIijhqFYpQIdQKrTqYvPQPmjQkKS6OgmvBwZ/FqoOLs64OroIg +APi4uqk6CIl3pcUWsR44fE+zrvn8N59gNCoMM3qGgc03TbTyYSYza2KoVeEISCAIURlZhlzkpSC b33dUyfVXZxn+ff9WX1q3mJAQCSeZYZpE28QT2/aBud94ggrySrxOfGYSRckfuS64vEb56LLAs+M mJn0PHGEWCx2sNLBrGRqxFPEMVXTKV/Ieqxy3uKsVWqsdU/+wnBeX1nmOq0okljEEiSIUFBDGRXY iNOuk2IhTecJH/+w65fIpZCrDEaOBVShQXb94H/we7ZWYXLCSwongO4Xx/kYAUK7QLPuON/HjtM8 AYLPwJXe9lcbwMwn6fW2FjsC+reBi+u2puwBlzvA4JMhm7IrBWkJhQLwfkbflAMGboHeNW9urXOc PgAZmlXqBjg4BEaLlL3u8+6ezrn929Oa3w8RbnKABi2j6gAAAAZiS0dEAFEAUQBRjSJ44QAAAAlw SFlzAAAN1wAADdcBQiibeAAAAAd0SU1FB+MMAgEbBnJq4p4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|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 11 KiB |
@@ -0,0 +1,64 @@
|
||||
<?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"
|
||||
version="1.1"
|
||||
id="svg927"
|
||||
width="240"
|
||||
height="240"
|
||||
viewBox="0 0 240 240"
|
||||
sodipodi:docname="random-on.svg"
|
||||
inkscape:version="0.92.4 5da689c313, 2019-01-14">
|
||||
<metadata
|
||||
id="metadata933">
|
||||
<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>
|
||||
<defs
|
||||
id="defs931" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1321"
|
||||
inkscape:window-height="740"
|
||||
id="namedview929"
|
||||
showgrid="false"
|
||||
inkscape:zoom="0.44250002"
|
||||
inkscape:cx="195.09291"
|
||||
inkscape:cy="266.66666"
|
||||
inkscape:window-x="45"
|
||||
inkscape:window-y="28"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="svg927"
|
||||
inkscape:pagecheckerboard="true" />
|
||||
<image
|
||||
width="200"
|
||||
height="200"
|
||||
preserveAspectRatio="none"
|
||||
style="image-rendering:optimizeQuality"
|
||||
xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAfQAAAH0CAYAAADL1t+KAAABhGlDQ1BJQ0MgcHJvZmlsZQAAKJF9 kT1Iw1AUhU9TpSIVBzuodMhQnSyIijhqFYpQIdQKrTqYvPQPmjQkKS6OgmvBwZ/FqoOLs64OroIg +APi4uqk6CIl3pcUWsR44fE+zrvn8N59gNCoMM3qGgc03TbTyYSYza2KoVeEISCAIURlZhlzkpSC b33dUyfVXZxn+ff9WX1q3mJAQCSeZYZpE28QT2/aBud94ggrySrxOfGYSRckfuS64vEb56LLAs+M mJn0PHGEWCx2sNLBrGRqxFPEMVXTKV/Ieqxy3uKsVWqsdU/+wnBeX1nmOq0okljEEiSIUFBDGRXY iNOuk2IhTecJH/+w65fIpZCrDEaOBVShQXb94H/we7ZWYXLCSwongO4Xx/kYAUK7QLPuON/HjtM8 AYLPwJXe9lcbwMwn6fW2FjsC+reBi+u2puwBlzvA4JMhm7IrBWkJhQLwfkbflAMGboHeNW9urXOc PgAZmlXqBjg4BEaLlL3u8+6ezrn929Oa3w8RbnKABi2j6gAAAAZiS0dEAFEAUQBRjSJ44QAAAAlw SFlzAAAN1wAADdcBQiibeAAAAAd0SU1FB+MMAgEaLLDKGgkAACAASURBVHja7d33v2x1fe/x94ci Cmo0MTHGJJrElGtiqrkpKHqkFwHp0kVBuoqiSAsWIIAoovQmCohUlQOIdI0+zI2JqZpmNMVEE8u1 UT2s+8OefRXPnrLP2WWtNc/n48EfwHtm1ut8Z8/MSgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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d+3qq4yReuex48dfLVN 0OEHXhh9/Ju6k/ncj/Uzk9yT5BnWmCjm+1fVFaZA0BF1MW/TY/yMQcyfaY2JYr5fVV1pCgQdURfz Nj22P5vkXjGfOObeZkfQEXUxb2XM70nyc9aYKOb7VNX7TYGgI+pi3raY353k560x1sNJ9qiqG0yB oCPqYt6mx/BnBidzMZ8s5rtX1Y2mYLH5HjpL+y/I7nxPXcyHx9zJfDIPJdlNzHFCx0ldzNv2mP30 4GT+C9aYOOYfMgWCjqiLedtifneSZ1ljopjvWlUfNgWCjqiLeZseo6cOYv6/rCHmtJe/obO8/6Js z9/UxXx4zO8S84k8mGQXMccJHSf15Tupi/nomD/bGhPHfKUpEHQEZHmiLuZzPxY/MYj5r1pjrPuT 7FBVt5sCQYflibqYi/naum8Q8ztMgaDD8kRdzOfe/scHMf81a0wU8+2r6k5TIOiwPFEX8+ExvzPJ c6wxUcxfXFV3mQJBh+WJupiLuZjTS762Rnv/tbnwX2kT87lj/uTBP5zEfLzvJtlOzHFCh+U7qYv5 3Ns+KckdSX7HGhPH/B5T4IQOy3NSF/PhMb9dzMUcJ3TowkldzIfH/KNJftcaE8V826q61xQIOixP 1MV87g1/ZHAyF/Pxvplkq6r6lCloO2+5061/gU7+9ruYD4+5k7mY44QOnTipi/nwmN+W5PesMVHM t6yqPzUFwBJEvWmabzWP9kjTNIdZZ7Wtntg0zacaJvGNpmn+t2cNwPJFXczn3mijpmnu1WkxB+hC 1L8p5mK+ADH32QI6y9/Q6Uu4nlpVX7HELine truncated
|
||||
id="image935"
|
||||
x="20"
|
||||
y="20" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 13 KiB |
@@ -0,0 +1,57 @@
|
||||
<?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="240"
|
||||
height="240"
|
||||
viewBox="0 0 240 240"
|
||||
version="1.1"
|
||||
id="svg4"
|
||||
sodipodi:docname="ic_repeat_48px-off.svg"
|
||||
inkscape:version="0.92.4 5da689c313, 2019-01-14">
|
||||
<metadata
|
||||
id="metadata10">
|
||||
<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>
|
||||
<defs
|
||||
id="defs8" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1321"
|
||||
inkscape:window-height="740"
|
||||
id="namedview6"
|
||||
showgrid="false"
|
||||
inkscape:pagecheckerboard="true"
|
||||
inkscape:zoom="1.2291667"
|
||||
inkscape:cx="-133.946"
|
||||
inkscape:cy="65.022819"
|
||||
inkscape:window-x="45"
|
||||
inkscape:window-y="28"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="svg4" />
|
||||
<path
|
||||
d="m 70,70 h 100 v 30 L 210,60 170,20 V 50 H 50 v 60 H 70 Z M 170,170 H 70 v -30 l -40,40 40,40 v -30 h 120 v -60 h -20 z"
|
||||
id="path2"
|
||||
inkscape:connector-curvature="0"
|
||||
style="stroke-width:5;fill:#ffffff;fill-opacity:0.40000001" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.7 KiB |
@@ -0,0 +1,57 @@
|
||||
<?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="240"
|
||||
height="240"
|
||||
viewBox="0 0 240 240"
|
||||
version="1.1"
|
||||
id="svg4"
|
||||
sodipodi:docname="ic_repeat_48px.svg"
|
||||
inkscape:version="0.92.4 5da689c313, 2019-01-14">
|
||||
<metadata
|
||||
id="metadata10">
|
||||
<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>
|
||||
<defs
|
||||
id="defs8" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1321"
|
||||
inkscape:window-height="740"
|
||||
id="namedview6"
|
||||
showgrid="false"
|
||||
inkscape:pagecheckerboard="true"
|
||||
inkscape:zoom="1.2291667"
|
||||
inkscape:cx="-133.946"
|
||||
inkscape:cy="65.022819"
|
||||
inkscape:window-x="45"
|
||||
inkscape:window-y="28"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="svg4" />
|
||||
<path
|
||||
d="m 70,70 h 100 v 30 L 210,60 170,20 V 50 H 50 v 60 H 70 Z M 170,170 H 70 v -30 l -40,40 40,40 v -30 h 120 v -60 h -20 z"
|
||||
id="path2"
|
||||
inkscape:connector-curvature="0"
|
||||
style="stroke-width:5;fill:#ffffff;fill-opacity:1" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 421 KiB |
@@ -0,0 +1,73 @@
|
||||
local gears = require('gears')
|
||||
local awful = require('awful')
|
||||
local wibox = require('wibox')
|
||||
local dpi = require('beautiful').xresources.apply_dpi
|
||||
local config_dir = gears.filesystem.get_configuration_dir()
|
||||
local widget_icon_dir = config_dir .. 'widget/mpd/icons/'
|
||||
local clickable_container = require('widget.clickable-container')
|
||||
local music_box = require('widget.mpd.music-box')
|
||||
local toggle_music_box = music_box.toggle_music_box
|
||||
|
||||
local return_button = function()
|
||||
local widget = wibox.widget {
|
||||
{
|
||||
id = 'icon',
|
||||
image = widget_icon_dir .. 'music.svg',
|
||||
widget = wibox.widget.imagebox,
|
||||
resize = true
|
||||
},
|
||||
layout = wibox.layout.align.horizontal
|
||||
}
|
||||
|
||||
local widget_button = wibox.widget {
|
||||
{
|
||||
widget,
|
||||
margins = dpi(7),
|
||||
widget = wibox.container.margin
|
||||
},
|
||||
widget = clickable_container
|
||||
}
|
||||
|
||||
local music_tooltip = awful.tooltip
|
||||
{
|
||||
objects = {widget_button},
|
||||
text = 'None',
|
||||
mode = 'outside',
|
||||
margin_leftright = dpi(8),
|
||||
margin_topbottom = dpi(8),
|
||||
align = 'right',
|
||||
preferred_positions = {'right', 'left', 'top', 'bottom'}
|
||||
}
|
||||
|
||||
widget_button:buttons(
|
||||
gears.table.join(
|
||||
awful.button(
|
||||
{},
|
||||
1,
|
||||
nil,
|
||||
function()
|
||||
music_tooltip.visible = false
|
||||
awesome.emit_signal('widget::music', 'mouse')
|
||||
end
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
widget_button:connect_signal(
|
||||
"mouse::enter",
|
||||
function()
|
||||
awful.spawn.easy_async_with_shell(
|
||||
'mpc status',
|
||||
function(stdout)
|
||||
music_tooltip.text = string.gsub(stdout, '\n$', '')
|
||||
end
|
||||
)
|
||||
end
|
||||
)
|
||||
|
||||
|
||||
return widget_button
|
||||
|
||||
end
|
||||
|
||||
return return_button
|
||||
@@ -0,0 +1,460 @@
|
||||
local gears = require('gears')
|
||||
local awful = require('awful')
|
||||
local config_dir = gears.filesystem.get_configuration_dir()
|
||||
local widget_icon_dir = config_dir .. 'widget/mpd/icons/'
|
||||
local ui_content = require('widget.mpd.content')
|
||||
|
||||
local album_cover = ui_content.album_cover
|
||||
local prog_bar = ui_content.progress_bar
|
||||
local track_time = ui_content.track_time
|
||||
local song_info = ui_content.song_info
|
||||
local vol_slider = ui_content.volume_slider
|
||||
local media_buttons = ui_content.media_buttons
|
||||
|
||||
local apps = require('configuration.apps')
|
||||
|
||||
local update_cover = function()
|
||||
|
||||
local extract_script = [=[
|
||||
MUSIC_DIR="$(xdg-user-dir MUSIC)"
|
||||
TMP_DIR="/tmp/awesomewm/${USER}/"
|
||||
TMP_COVER_PATH=${TMP_DIR}"cover.jpg"
|
||||
TMP_SONG="${TMP_DIR}current-song"
|
||||
|
||||
CHECK_EXIFTOOL=$(command -v exiftool)
|
||||
|
||||
if [ ! -d "${TMP_DIR}" ]; then
|
||||
mkdir -p "${TMP_DIR}";
|
||||
fi
|
||||
|
||||
if [ ! -z "$CHECK_EXIFTOOL" ]; then
|
||||
|
||||
SONG="$MUSIC_DIR/$(mpc -p 6600 --format "%file%" current)"
|
||||
PICTURE_TAG="-Picture"
|
||||
|
||||
if [[ "$SONG" == *".m4a" ]]; then
|
||||
PICTURE_TAG="-CoverArt"
|
||||
fi
|
||||
|
||||
# Extract album cover using perl-image-exiftool
|
||||
exiftool -b "$PICTURE_TAG" "$SONG" > "$TMP_COVER_PATH"
|
||||
|
||||
else
|
||||
|
||||
#Extract image using ffmpeg
|
||||
cp "$MUSIC_DIR/$(mpc --format %file% current)" "$TMP_SONG"
|
||||
|
||||
ffmpeg \
|
||||
-hide_banner \
|
||||
-loglevel 0 \
|
||||
-y \
|
||||
-i "$TMP_SONG" \
|
||||
-vf scale=300:-1 \
|
||||
"$TMP_COVER_PATH" > /dev/null 2>&1
|
||||
|
||||
rm "$TMP_SONG"
|
||||
fi
|
||||
|
||||
img_data=$(identify $TMP_COVER_PATH 2>&1)
|
||||
|
||||
# Delete the cover.jpg if it's not a valid image
|
||||
if [[ $img_data == *"insufficient"* ]]; then
|
||||
rm $TMP_COVER_PATH
|
||||
fi
|
||||
|
||||
if [ -f $TMP_COVER_PATH ]; then
|
||||
echo $TMP_COVER_PATH;
|
||||
fi
|
||||
]=]
|
||||
|
||||
awful.spawn.easy_async_with_shell(
|
||||
extract_script,
|
||||
function(stdout)
|
||||
local album_icon = widget_icon_dir .. 'vinyl.svg'
|
||||
|
||||
if not (stdout == nil or stdout == '') then
|
||||
album_icon = stdout:gsub('%\n', '')
|
||||
end
|
||||
|
||||
album_cover.cover:set_image(gears.surface.load_uncached(album_icon))
|
||||
|
||||
album_cover:emit_signal('widget::redraw_needed')
|
||||
album_cover:emit_signal('widget::layout_changed')
|
||||
|
||||
collectgarbage('collect')
|
||||
end
|
||||
)
|
||||
end
|
||||
|
||||
local update_progress_bar = function()
|
||||
awful.spawn.easy_async_with_shell(
|
||||
[[
|
||||
mpc status | awk 'NR==2 { split($4, a); print a[1]}' | tr -d '[\%\(\)]'
|
||||
]],
|
||||
function(stdout)
|
||||
local progress_bar = prog_bar.music_bar
|
||||
if stdout ~= nil then
|
||||
progress_bar:set_value(tonumber(stdout))
|
||||
else
|
||||
progress_bar:set_value(0)
|
||||
end
|
||||
end
|
||||
)
|
||||
end
|
||||
|
||||
local update_time_progress = function()
|
||||
awful.spawn.easy_async_with_shell(
|
||||
[[
|
||||
mpc status | awk 'NR==2 { split($3, a, "/"); print a[1]}' | tr -d '[\%\(\)]'
|
||||
]],
|
||||
function(stdout)
|
||||
local time_status = track_time.time_status
|
||||
if stdout ~= nil then
|
||||
time_status:set_text(tostring(stdout))
|
||||
else
|
||||
time_status:set_text('00:00')
|
||||
end
|
||||
end
|
||||
)
|
||||
|
||||
end
|
||||
|
||||
local update_time_duration = function()
|
||||
awful.spawn.easy_async_with_shell(
|
||||
[[
|
||||
mpc --format %time% current
|
||||
]],
|
||||
function(stdout)
|
||||
local time_duration = track_time.time_duration
|
||||
if stdout ~= nil then
|
||||
time_duration:set_text(tostring(stdout))
|
||||
else
|
||||
time_duration:set_text('99:59')
|
||||
end
|
||||
end
|
||||
)
|
||||
end
|
||||
|
||||
local update_file = function()
|
||||
awful.spawn.easy_async_with_shell(
|
||||
[[
|
||||
mpc -f %file% current
|
||||
]],
|
||||
function(stdout)
|
||||
file_name = stdout:gsub('%\n','')
|
||||
end
|
||||
)
|
||||
return file_name
|
||||
end
|
||||
|
||||
local update_title = function()
|
||||
|
||||
awful.spawn.easy_async_with_shell(
|
||||
[[
|
||||
mpc -f %title% current
|
||||
]],
|
||||
function(stdout)
|
||||
|
||||
-- Remove new lines
|
||||
local title = stdout:gsub('%\n', '')
|
||||
|
||||
local title_widget = song_info.music_title
|
||||
local title_text = song_info.music_title:get_children_by_id('title')[1]
|
||||
|
||||
-- Make sure it's not null
|
||||
if not (title == nil or title == '') then
|
||||
title_text:set_text(title)
|
||||
else
|
||||
|
||||
awful.spawn.easy_async_with_shell(
|
||||
[[
|
||||
mpc -f %file% current
|
||||
]],
|
||||
function(stdout)
|
||||
|
||||
if not (stdout == nil or stdout == '') then
|
||||
|
||||
file_name = stdout:gsub('%\n','')
|
||||
|
||||
file_name = file_name:sub(1, title:len() - 5) .. ''
|
||||
|
||||
title_text:set_text(file_name)
|
||||
|
||||
else
|
||||
-- Set title
|
||||
title_text:set_text('Play some music!')
|
||||
|
||||
end
|
||||
title_widget:emit_signal('widget::redraw_needed')
|
||||
title_widget:emit_signal('widget::layout_changed')
|
||||
end
|
||||
)
|
||||
|
||||
end
|
||||
|
||||
title_widget:emit_signal('widget::redraw_needed')
|
||||
title_widget:emit_signal('widget::layout_changed')
|
||||
|
||||
collectgarbage('collect')
|
||||
end
|
||||
)
|
||||
end
|
||||
|
||||
local update_artist = function()
|
||||
awful.spawn.easy_async_with_shell(
|
||||
[[
|
||||
mpc -f %artist% current
|
||||
]],
|
||||
function(stdout)
|
||||
|
||||
-- Remove new lines
|
||||
local artist = stdout:gsub('%\n', '')
|
||||
|
||||
local artist_widget = song_info.music_artist
|
||||
|
||||
local artist_text = artist_widget:get_children_by_id('artist')[1]
|
||||
|
||||
if not (artist == nil or artist == '') then
|
||||
|
||||
artist_text:set_text(artist)
|
||||
|
||||
else
|
||||
|
||||
|
||||
awful.spawn.easy_async_with_shell(
|
||||
[[
|
||||
mpc -f %file% current
|
||||
]],
|
||||
function(stdout)
|
||||
if not (stdout == nil or stdout == '') then
|
||||
|
||||
artist_text:set_text('unknown artist')
|
||||
|
||||
else
|
||||
artist_text:set_text('or play some porn?')
|
||||
|
||||
end
|
||||
artist_widget:emit_signal('widget::redraw_needed')
|
||||
artist_widget:emit_signal('widget::layout_changed')
|
||||
end
|
||||
)
|
||||
end
|
||||
|
||||
artist_widget:emit_signal('widget::redraw_needed')
|
||||
artist_widget:emit_signal('widget::layout_changed')
|
||||
end
|
||||
)
|
||||
end
|
||||
|
||||
local update_volume_slider = function()
|
||||
awful.spawn.easy_async_with_shell(
|
||||
[[
|
||||
mpc volume
|
||||
]],
|
||||
function(stdout)
|
||||
local volume_slider = vol_slider.vol_slider
|
||||
if stdout:match('n/a') then
|
||||
return
|
||||
end
|
||||
volume_slider:set_value(tonumber(stdout:match('%d+')))
|
||||
end
|
||||
)
|
||||
end
|
||||
|
||||
local check_if_playing = function()
|
||||
awful.spawn.easy_async_with_shell(
|
||||
[[
|
||||
mpc status | awk 'NR==2' | grep -o playing
|
||||
]],
|
||||
function(stdout)
|
||||
local play_button_img = media_buttons.play_button_image.play
|
||||
if not (stdout == nil or stdout == '') then
|
||||
play_button_img:set_image(widget_icon_dir .. 'pause.svg')
|
||||
update_volume_slider()
|
||||
else
|
||||
play_button_img:set_image(widget_icon_dir .. 'play.svg')
|
||||
end
|
||||
end
|
||||
)
|
||||
end
|
||||
|
||||
local check_repeat_status = function()
|
||||
awful.spawn.easy_async_with_shell(
|
||||
[[
|
||||
mpc status | sed -n '/random/p' | cut -c23-24 | sed 's/^[ \t]*//'
|
||||
]],
|
||||
function(stdout)
|
||||
local repeat_button_img = media_buttons.repeat_button_image.rep
|
||||
if stdout:match('on') then
|
||||
repeat_button_img:set_image(widget_icon_dir .. 'repeat-on.svg')
|
||||
else
|
||||
repeat_button_img:set_image(widget_icon_dir .. 'repeat-off.svg')
|
||||
end
|
||||
end
|
||||
)
|
||||
end
|
||||
|
||||
local check_random_status = function()
|
||||
awful.spawn.easy_async_with_shell(
|
||||
[[
|
||||
mpc status | sed -n '/random/p' | cut -c37-38 | sed 's/^[ \t]*//'
|
||||
]],
|
||||
function(stdout)
|
||||
|
||||
local random_button_image = media_buttons.random_button_image.rand
|
||||
|
||||
if stdout:match("on") then
|
||||
random_button_image:set_image(widget_icon_dir .. 'random-on.svg')
|
||||
else
|
||||
random_button_image:set_image(widget_icon_dir .. 'random-off.svg')
|
||||
end
|
||||
end
|
||||
)
|
||||
end
|
||||
|
||||
vol_slider.vol_slider:connect_signal(
|
||||
'property::value',
|
||||
function()
|
||||
awful.spawn.easy_async_with_shell(
|
||||
'mpc volume ' .. vol_slider.vol_slider:get_value(),
|
||||
function() end
|
||||
)
|
||||
end
|
||||
)
|
||||
|
||||
local update_all_content = function()
|
||||
update_progress_bar()
|
||||
update_time_progress()
|
||||
update_time_duration()
|
||||
update_title()
|
||||
update_artist()
|
||||
update_cover()
|
||||
check_if_playing()
|
||||
check_repeat_status()
|
||||
check_random_status()
|
||||
update_volume_slider()
|
||||
end
|
||||
|
||||
-- Update progress bar and time every N seconds
|
||||
gears.timer.start_new(
|
||||
10,
|
||||
function()
|
||||
update_progress_bar()
|
||||
update_time_progress()
|
||||
return true
|
||||
end
|
||||
)
|
||||
|
||||
local mpd_startup = [[
|
||||
# Let's make sure that MPD is running.
|
||||
if [ -z $(pgrep mpd) ]; then mpd; fi
|
||||
]]
|
||||
|
||||
local mpd_change_event_listener = [[
|
||||
sh -c '
|
||||
mpc idleloop player
|
||||
'
|
||||
]]
|
||||
|
||||
local kill_mpd_change_event_listener = [[
|
||||
ps x |
|
||||
grep "mpc idleloop player" |
|
||||
grep -v grep |
|
||||
awk '{print $1}' |
|
||||
xargs kill
|
||||
]]
|
||||
|
||||
awful.spawn.easy_async_with_shell(
|
||||
mpd_startup,
|
||||
function ()
|
||||
awful.spawn.easy_async_with_shell(
|
||||
kill_mpd_change_event_listener,
|
||||
function ()
|
||||
update_all_content()
|
||||
awful.spawn.with_line_callback(
|
||||
mpd_change_event_listener,
|
||||
{
|
||||
stdout = function(line)
|
||||
update_all_content()
|
||||
end
|
||||
}
|
||||
)
|
||||
end
|
||||
)
|
||||
end
|
||||
)
|
||||
|
||||
media_buttons.play_button:buttons(
|
||||
gears.table.join(
|
||||
awful.button(
|
||||
{},
|
||||
1,
|
||||
nil,
|
||||
function()
|
||||
awful.spawn.with_shell('mpc toggle')
|
||||
end
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
media_buttons.next_button:buttons(
|
||||
gears.table.join(
|
||||
awful.button(
|
||||
{},
|
||||
1,
|
||||
nil,
|
||||
function()
|
||||
awful.spawn.with_shell('mpc next')
|
||||
end
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
media_buttons.prev_button:buttons(
|
||||
gears.table.join(
|
||||
awful.button(
|
||||
{},
|
||||
1,
|
||||
nil,
|
||||
function()
|
||||
awful.spawn.with_shell('mpc prev')
|
||||
end
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
media_buttons.repeat_button:buttons(
|
||||
gears.table.join(
|
||||
awful.button(
|
||||
{},
|
||||
1,
|
||||
nil,
|
||||
function()
|
||||
awful.spawn.easy_async_with_shell(
|
||||
'mpc repeat',
|
||||
function ()
|
||||
check_repeat_status()
|
||||
end
|
||||
)
|
||||
end
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
media_buttons.random_button:buttons(
|
||||
gears.table.join(
|
||||
awful.button(
|
||||
{},
|
||||
1,
|
||||
nil,
|
||||
function()
|
||||
awful.spawn.easy_async_with_shell(
|
||||
'mpc random',
|
||||
function ()
|
||||
check_random_status()
|
||||
end
|
||||
)
|
||||
end
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1,158 @@
|
||||
local awful = require('awful')
|
||||
local wibox = require('wibox')
|
||||
local gears = require('gears')
|
||||
local beautiful = require('beautiful')
|
||||
local dpi = beautiful.xresources.apply_dpi
|
||||
local music_func = {}
|
||||
|
||||
screen.connect_signal('request::desktop_decoration', function(s)
|
||||
|
||||
-- Set music box geometry
|
||||
local music_box_margin = dpi(5)
|
||||
local music_box_height = dpi(375)
|
||||
local music_box_width = dpi(260)
|
||||
local music_box_x = nil
|
||||
|
||||
|
||||
s.musicpop = awful.popup {
|
||||
widget = {
|
||||
-- Removing this block will cause an error...
|
||||
},
|
||||
ontop = true,
|
||||
visible = false,
|
||||
type = 'dock',
|
||||
screen = s,
|
||||
width = music_box_width,
|
||||
height = music_box_height,
|
||||
maximum_width = music_box_width,
|
||||
maximum_height = music_box_height,
|
||||
offset = dpi(5),
|
||||
shape = gears.shape.rectangle,
|
||||
bg = beautiful.transparent,
|
||||
preferred_anchors = {'middle', 'back', 'front'},
|
||||
preferred_positions = {'left', 'right', 'top', 'bottom'},
|
||||
|
||||
}
|
||||
|
||||
local ui_content = require('widget.mpd.content')
|
||||
|
||||
s.album = ui_content.album_cover
|
||||
s.progress_bar = ui_content.progress_bar
|
||||
s.time_track = ui_content.track_time.time_track
|
||||
s.song_info = ui_content.song_info.music_info
|
||||
s.media_buttons = ui_content.media_buttons.navigate_buttons
|
||||
s.volume_slider = ui_content.volume_slider.vol_slider
|
||||
|
||||
s.musicpop : setup {
|
||||
{
|
||||
{
|
||||
layout = wibox.layout.fixed.vertical,
|
||||
expand = 'none',
|
||||
spacing = dpi(8),
|
||||
{
|
||||
s.album,
|
||||
bottom = dpi(5),
|
||||
widget = wibox.container.margin,
|
||||
},
|
||||
{
|
||||
layout = wibox.layout.fixed.vertical,
|
||||
{
|
||||
spacing = dpi(4),
|
||||
layout = wibox.layout.fixed.vertical,
|
||||
s.progress_bar,
|
||||
s.time_track,
|
||||
},
|
||||
s.song_info,
|
||||
s.media_buttons,
|
||||
s.volume_slider,
|
||||
},
|
||||
},
|
||||
top = dpi(15),
|
||||
left = dpi(15),
|
||||
right = dpi(15),
|
||||
widget = wibox.container.margin
|
||||
|
||||
},
|
||||
bg = beautiful.background,
|
||||
shape = function(cr, width, height)
|
||||
gears.shape.partially_rounded_rect(
|
||||
cr, width, height, true, true, true, true, beautiful.groups_radius
|
||||
)
|
||||
end,
|
||||
widget = wibox.container.background()
|
||||
}
|
||||
|
||||
s.backdrop_music = wibox {
|
||||
ontop = true,
|
||||
visible = false,
|
||||
screen = s,
|
||||
type = 'utility',
|
||||
input_passthrough = false,
|
||||
bg = beautiful.transparent,
|
||||
x = s.geometry.x,
|
||||
y = s.geometry.y,
|
||||
width = s.geometry.width,
|
||||
height = s.geometry.height
|
||||
}
|
||||
|
||||
local toggle_music_box = function(type)
|
||||
|
||||
local focused = awful.screen.focused()
|
||||
local music_box = focused.musicpop
|
||||
local music_backdrop = focused.backdrop_music
|
||||
|
||||
if music_box.visible then
|
||||
music_backdrop.visible = not music_backdrop.visible
|
||||
music_box.visible = not music_box.visible
|
||||
|
||||
else
|
||||
|
||||
if type == 'keyboard' then
|
||||
music_backdrop.visible = true
|
||||
music_box.visible = true
|
||||
awful.placement.top_right(
|
||||
music_box,
|
||||
{
|
||||
margins = {
|
||||
top = dpi(5),
|
||||
right = dpi(music_box_x or 5)
|
||||
},
|
||||
honor_workarea = true
|
||||
})
|
||||
else
|
||||
local widget_button = mouse.current_widget_geometry
|
||||
|
||||
music_backdrop.visible = true
|
||||
music_box:move_next_to(widget_button)
|
||||
music_box_x = (focused.geometry.width - music_box.x) - music_box_width
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
awesome.connect_signal(
|
||||
'widget::music',
|
||||
function(type)
|
||||
toggle_music_box(type)
|
||||
end
|
||||
)
|
||||
|
||||
s.backdrop_music:buttons(
|
||||
awful.util.table.join(
|
||||
awful.button(
|
||||
{},
|
||||
1,
|
||||
nil,
|
||||
function()
|
||||
toggle_music_box()
|
||||
end
|
||||
)
|
||||
)
|
||||
)
|
||||
end)
|
||||
|
||||
|
||||
music_func.toggle_music_box = toggle_music_box
|
||||
|
||||
local mpd_updater = require('widget.mpd.mpd-music-updater')
|
||||
|
||||
return music_func
|
||||
@@ -0,0 +1,324 @@
|
||||
local gears = require('gears')
|
||||
local awful = require('awful')
|
||||
local naughty = require('naughty')
|
||||
|
||||
local config_dir = gears.filesystem.get_configuration_dir()
|
||||
local widget_icon_dir = config_dir .. 'widget/music/icons/'
|
||||
|
||||
local ui_content = require('widget.music.content')
|
||||
|
||||
local album_cover = ui_content.album_cover
|
||||
local prog_bar = ui_content.progress_bar
|
||||
local track_time = ui_content.track_time
|
||||
local song_info = ui_content.song_info
|
||||
local vol_slider = ui_content.volume_slider
|
||||
local media_buttons = ui_content.media_buttons
|
||||
|
||||
-- We can't set/get the data for these
|
||||
-- So let's hide them
|
||||
|
||||
prog_bar.visible = false
|
||||
track_time.time_status.visible = false
|
||||
track_time.time_duration.visible = false
|
||||
media_buttons.repeat_button.visible = false
|
||||
media_buttons.random_button.visible = false
|
||||
|
||||
|
||||
local update_cover = function()
|
||||
local get_art_url = [[
|
||||
dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get \
|
||||
string:'org.mpris.MediaPlayer2.Player' string:'Metadata' |
|
||||
egrep -A 1 "artUrl"| egrep -v "artUrl" | awk -F '"' '{print $2}' |
|
||||
sed -e 's/open.spotify.com/i.scdn.co/g'
|
||||
]]
|
||||
|
||||
awful.spawn.easy_async_with_shell(
|
||||
get_art_url,
|
||||
function(link)
|
||||
|
||||
local download_art = [[
|
||||
tmp_dir="/tmp/awesomewm/${USER}/"
|
||||
tmp_cover_path=${tmp_dir}"cover.jpg"
|
||||
|
||||
if [ ! -d $tmp_dir ]; then
|
||||
mkdir -p $tmp_dir;
|
||||
fi
|
||||
|
||||
if [ -f $tmp_cover_path]; then
|
||||
rm $tmp_cover_path
|
||||
fi
|
||||
|
||||
wget -O $tmp_cover_path ]] ..link .. [[
|
||||
|
||||
echo $tmp_cover_path
|
||||
]]
|
||||
|
||||
awful.spawn.easy_async_with_shell(
|
||||
download_art,
|
||||
function(stdout)
|
||||
|
||||
local album_icon = stdout:gsub('%\n', '')
|
||||
|
||||
album_cover.cover:set_image(gears.surface.load_uncached(album_icon))
|
||||
|
||||
album_cover:emit_signal("widget::redraw_needed")
|
||||
album_cover:emit_signal("widget::layout_changed")
|
||||
|
||||
collectgarbage('collect')
|
||||
end
|
||||
)
|
||||
end
|
||||
)
|
||||
end
|
||||
|
||||
|
||||
local update_title = function()
|
||||
awful.spawn.easy_async_with_shell(
|
||||
[[
|
||||
dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'Metadata' |
|
||||
egrep -A 1 "title" | egrep -v "title" | awk -F '"' '{print $2}'
|
||||
]],
|
||||
function(stdout)
|
||||
|
||||
local title = stdout:gsub('%\n', '')
|
||||
|
||||
local title_widget = song_info.music_title
|
||||
|
||||
local title_text = song_info.music_title:get_children_by_id('title')[1]
|
||||
|
||||
title_text:set_text(title)
|
||||
|
||||
title_widget:emit_signal("widget::redraw_needed")
|
||||
title_widget:emit_signal("widget::layout_changed")
|
||||
|
||||
collectgarbage('collect')
|
||||
end
|
||||
)
|
||||
end
|
||||
|
||||
|
||||
local update_artist = function()
|
||||
|
||||
|
||||
awful.spawn.easy_async_with_shell(
|
||||
[[
|
||||
dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'Metadata'|
|
||||
egrep -A 2 "artist" | egrep -v "artist" | egrep -v "array" | awk -F '"' '{print $2}'
|
||||
]],
|
||||
function(stdout)
|
||||
|
||||
-- Remove new lines
|
||||
local artist = stdout:gsub('%\n', '')
|
||||
|
||||
if (stdout == nil or stdout == '') then
|
||||
artist = 'Advertisement'
|
||||
end
|
||||
|
||||
local artist_widget = song_info.music_artist
|
||||
|
||||
local artist_text = artist_widget:get_children_by_id('artist')[1]
|
||||
|
||||
artist_text:set_text(artist)
|
||||
|
||||
artist_widget:emit_signal("widget::redraw_needed")
|
||||
artist_widget:emit_signal("widget::layout_changed")
|
||||
|
||||
collectgarbage('collect')
|
||||
end
|
||||
)
|
||||
end
|
||||
|
||||
|
||||
local update_volume_slider = function()
|
||||
|
||||
-- Stop. Don't indent.
|
||||
-- It's python. Nuff said
|
||||
local get_volume = [[
|
||||
python - <<END
|
||||
import subprocess
|
||||
import os
|
||||
x=0
|
||||
y=0
|
||||
env = os.environ
|
||||
env['LANG'] = 'en_US'
|
||||
app = '"Spotify"'
|
||||
pactl = subprocess.check_output(['pactl', 'list', 'sink-inputs'], env=env).decode().strip().split()
|
||||
if app in pactl:
|
||||
for e in pactl:
|
||||
x += 1
|
||||
if e == app:
|
||||
break
|
||||
for i in pactl[0 : x -1 ]:
|
||||
y += 1
|
||||
if i == 'Sink' and pactl[y] == 'Input' and '#' in pactl[y + 1]:
|
||||
sink_id = pactl[y+1]
|
||||
if i == 'Volume:' and '%' in pactl[y + 3]:
|
||||
volume = pactl[y + 3]
|
||||
sink_id = sink_id[1: ]
|
||||
volume = volume[ : -1 ]
|
||||
print(volume)
|
||||
END
|
||||
]]
|
||||
|
||||
awful.spawn.easy_async_with_shell(
|
||||
get_volume,
|
||||
function(stdout)
|
||||
-- naughty.notification({message=stdout})
|
||||
|
||||
local volume_slider = vol_slider.vol_slider
|
||||
|
||||
volume_slider:set_value(tonumber(stdout:match('%d+')))
|
||||
end
|
||||
)
|
||||
end
|
||||
|
||||
|
||||
local check_if_playing = function()
|
||||
awful.spawn.easy_async_with_shell(
|
||||
[[
|
||||
dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'PlaybackStatus' |
|
||||
grep -A 1 "string" | awk -F '"' '{print $2}'
|
||||
]],
|
||||
function(stdout)
|
||||
|
||||
local play_button_img = media_buttons.play_button_image.play
|
||||
|
||||
if stdout:match("Playing") then
|
||||
play_button_img:set_image(widget_icon_dir .. 'pause.svg')
|
||||
update_volume_slider()
|
||||
else
|
||||
play_button_img:set_image(widget_icon_dir .. 'play.svg')
|
||||
end
|
||||
end
|
||||
)
|
||||
end
|
||||
|
||||
|
||||
local set_spotify_volume = function(value)
|
||||
|
||||
local set_volume = [[
|
||||
python - <<END
|
||||
import subprocess
|
||||
import os
|
||||
import sys
|
||||
|
||||
x=0
|
||||
y=0
|
||||
env = os.environ
|
||||
env['LANG'] = 'en_US'
|
||||
app = '"Spotify"'
|
||||
pactl = subprocess.check_output(['pactl', 'list', 'sink-inputs'], env=env).decode().strip().split()
|
||||
if app in pactl:
|
||||
for e in pactl:
|
||||
x += 1
|
||||
if e == app:
|
||||
break
|
||||
for i in pactl[0 : x -1 ]:
|
||||
y += 1
|
||||
if i == 'Sink' and pactl[y] == 'Input' and '#' in pactl[y + 1]:
|
||||
sink_id = pactl[y+1]
|
||||
sink_id = sink_id[1: ]
|
||||
|
||||
arg = int(]] .. value .. [[)
|
||||
if arg < 0:
|
||||
arg = 0
|
||||
if arg > 100:
|
||||
arg = 100
|
||||
subprocess.run(['pactl', 'set-sink-input-volume', sink_id, str(arg) + '%'])
|
||||
|
||||
END
|
||||
]]
|
||||
|
||||
awful.spawn.easy_async_with_shell(
|
||||
set_volume,
|
||||
function(stdout) end
|
||||
)
|
||||
|
||||
end
|
||||
|
||||
|
||||
vol_slider.vol_slider:connect_signal(
|
||||
'property::value',
|
||||
function()
|
||||
local volume_slider = vol_slider.vol_slider
|
||||
set_spotify_volume(tostring(volume_slider:get_value()))
|
||||
end
|
||||
)
|
||||
|
||||
|
||||
local update_all_content = function()
|
||||
-- Add a delay
|
||||
gears.timer.start_new(2, function()
|
||||
update_title()
|
||||
update_artist()
|
||||
update_cover()
|
||||
check_if_playing()
|
||||
update_volume_slider()
|
||||
end)
|
||||
end
|
||||
|
||||
|
||||
update_all_content()
|
||||
|
||||
|
||||
media_buttons.play_button:buttons(
|
||||
gears.table.join(
|
||||
awful.button(
|
||||
{},
|
||||
1,
|
||||
nil,
|
||||
function()
|
||||
awful.spawn.easy_async_with_shell(
|
||||
[[
|
||||
dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause
|
||||
]],
|
||||
function()
|
||||
check_if_playing()
|
||||
end
|
||||
)
|
||||
end
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
media_buttons.next_button:buttons(
|
||||
gears.table.join(
|
||||
awful.button(
|
||||
{},
|
||||
1,
|
||||
nil,
|
||||
function()
|
||||
awful.spawn.easy_async_with_shell(
|
||||
[[
|
||||
dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next
|
||||
]],
|
||||
function()
|
||||
update_all_content()
|
||||
end
|
||||
)
|
||||
end
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
media_buttons.prev_button:buttons(
|
||||
gears.table.join(
|
||||
awful.button(
|
||||
{},
|
||||
1,
|
||||
nil,
|
||||
function()
|
||||
awful.spawn.easy_async_with_shell(
|
||||
[[
|
||||
dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous
|
||||
]],
|
||||
function()
|
||||
update_all_content()
|
||||
end
|
||||
)
|
||||
end
|
||||
)
|
||||
)
|
||||
)
|
||||