conky-config/mediaplayer.conf

72 lines
2.2 KiB
Plaintext
Raw Normal View History

2024-11-25 16:17:32 -05:00
-- Conky, a system monitor https://github.com/brndnmtthws/conky
--
-- This configuration file is Lua code. You can write code in here, and it will
-- execute when Conky loads. You can use it to generate your own advanced
-- configurations.
--
-- Try this (remove the `--`):
--
-- print("Loading Conky config")
--
-- For more on Lua, see:
-- https://www.lua.org/pil/contents.html
--
-- Conky Lua API: https://conky.cc/lua
-- Configuration settings: https://conky.cc/config_settings
conky.config = {
alignment = 'top_right',
background = true,
border_inner_margin = 10,
border_width = 3,
cpu_avg_samples = 2,
default_color = '#689d6a',
default_outline_color = 'white',
default_shade_color = 'white',
double_buffer = true,
draw_borders = true,
draw_graph_borders = true,
draw_outline = false,
draw_shades = false,
extra_newline = false,
font = 'SourceCodePro-Regular:size=12',
gap_x = 50,
gap_y = 80,
minimum_height = 10,
minimum_width = 200,
net_avg_samples = 2,
no_buffers = true,
out_to_console = false,
out_to_ncurses = false,
out_to_stderr = false,
out_to_wayland = false,
out_to_x = true,
own_window = true,
own_window_class = 'Conky',
own_window_type = 'override',
own_window_hints = 'undecorated,sticky,below,skip_taskbar,skip_pager',
own_window_transparent = false,
own_window_colour = '282828',
show_graph_range = false,
show_graph_scale = false,
stippled_borders = 0,
update_interval = 1.0,
uppercase = false,
use_spacer = 'none',
use_xft = true,
xinerama_head = 2,
}
-- Variables: https://conky.cc/variables
conky.text = [[
${if_match "${execi 1 playerctl metadata title}" != ""}
${color #cc241d}Now Playing
${color #cc241d}${font SourceCodePro-Regular:size=35}${execi 1 playerctl metadata title | awk -v len=56 '{ if (length($0) > len) print substr($0, 1, len-3) "..."; else print; }'}
${color #cc241d}${font SourceCodePro-Regular:size=18}by ${color #ebdbb2} ${execi 1 playerctl metadata artist | awk -v len=56 '{ if (length($0) > len) print substr($0, 1, len-3) "..."; else print; }'}
${color #cc241d}from ${color #ebdbb2} ${execi 1 playerctl metadata album}
${else}
${color #928374}Not Playing
${endif}
]]