Initial commit

This commit is contained in:
jorraan committed 2021-11-29 19:57:00 +11:00
1 parent ed88af090f
commit 05c9c7fc71
448 files changed
+46802

No files matched your search

+19
View File
@@ -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'),
}
+121
View File
@@ -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
+21
View File
@@ -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
+64
View File
@@ -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
+37
View File
@@ -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
+23
View File
@@ -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