diff options
| author | Danilo M. <danix@danix.xyz> | 2026-09-11 17:20:50 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-09-11 17:20:50 +0200 |
| commit | 7b55910a786c7652ac80a576399ebd9f81a8ac72 (patch) | |
| tree | 4adaedb0f0ac5003ecc0e19093a2cb5871b18deb /templates/conky.conf.in | |
| parent | c7cb9dad4e782ee0ff99773c3607ec3b7792c723 (diff) | |
| download | unified-desktop-theme-7b55910a786c7652ac80a576399ebd9f81a8ac72.tar.gz unified-desktop-theme-7b55910a786c7652ac80a576399ebd9f81a8ac72.zip | |
feat(palette): generate every themed config from one scheme
Colours were written down five times: rofi's palette.rasi, the waybar theme,
the kitty theme, the conky and dunst templates, and a MACCHIATO dict inside
udt-accent. Changing scheme meant finding all five, and they had already
drifted: the active waybar theme was Macchiato while theme.css next to it was
Mocha, and nothing imported the latter.
Now a scheme is two files. palette/<scheme>.conf holds the colours under the
scheme's own names, and palette/roles-<scheme>.conf says what each is for.
palette/roles.conf is one `scheme =` line selecting the pair. bin/udt-palette
renders that into each consumer's syntax and install.sh runs it first.
The role map is per-scheme rather than shared because the palettes are
genuinely different shapes: Nord has no `base`, Dracula no `surface0`, and
forcing Catppuccin's names onto them would have meant either renaming their
colours or inventing values. A role names a palette colour with two optional
modifiers, `name/75` for alpha and `name*50` for brightness. The second exists
because GTK's shade() has no palette name to point at.
Ships macchiato, tokyo-night, nord and dracula. --selftest resolves every role
in every scheme and asserts they define the same set, so a scheme that cannot
satisfy a consumer fails at install rather than when someone switches to it.
Verified against the live configs: all 46 waybar colours resolve identically to
the previously active theme including its alpha() and shade() derivations, the
kitty theme is colour-for-colour identical, and the rofi palette has the same
26 values. Generated files are gitignored; switching scheme and switching back
reproduces the originals.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015gbjA2bmswN8jyPDKzrvqe
Diffstat (limited to 'templates/conky.conf.in')
| -rw-r--r-- | templates/conky.conf.in | 102 |
1 files changed, 102 insertions, 0 deletions
diff --git a/templates/conky.conf.in b/templates/conky.conf.in new file mode 100644 index 0000000..92ad989 --- /dev/null +++ b/templates/conky.conf.in @@ -0,0 +1,102 @@ +conky.config={ + out_to_x = false, + out_to_wayland = true, + alignment='tr', + mpd_host = '172.16.34.5', + mpd_port = 6600, + background=true, + color1='@HEADING@', + color2='@LABEL@', + color3='@RULE@', + color4='@VALUE@', + color5='@HIGHLIGHT@', + color6='@OK@', + pad_percents=0, + cpu_avg_samples=4, + default_color='@BODY@', + default_outline_color='@BODY_OUTLINE@', + default_shade_color='@BODY_SHADE@', + default_bar_height=10, + default_bar_width=500, + double_buffer=true, + draw_borders=false, + draw_graph_borders=false, + draw_outline=false, + draw_shades=false, + font='Inconsolata Nerd Font:style=Regular:size=10', + use_spacer=none, + format_human_readable=true, + short_units=yes, + gap_x=1, + gap_y=0, + minimum_height=1030, + minimum_width=600, + net_avg_samples=2, + no_buffers=true, + override_utf8_locale=true, + own_window=true, + own_window_type='desktop', + own_window_argb_value=225, + own_window_class='Conky', + text_buffer_size=2048, + total_run_times=0, + update_interval=3, + uppercase=false, + use_xft=true, + xftalpha=0, +} + +conky.text=[[ +${color1} ${goto 20}Queen Anne's Revenge ${goto 250}${color5} ${cpugovernor cpu0}${alignr}${color}${cpu cpu0}% +${alignr}${color4}TCTL: ${color}${execi 5 cat $(grep -l '^k10temp$' /sys/class/hwmon/hwmon*/name | head -1 | xargs dirname)/temp1_input | awk '{printf "%.0f", $1/1000}'}°c ${color3}| ${color4}TCCD1: ${color}${execi 5 sensors k10temp-pci-00c3 | grep 'Tccd1' | awk '{print $2}' | tr -d '+°C'}°c +${alignr}${color4}NVME: ${color}${execi 5 cat $(grep -l '^nvme$' /sys/class/hwmon/hwmon*/name | head -1 | xargs dirname)/temp1_input | awk '{printf "%.0f", $1/1000}'}°c +${goto 50}${cpugraph cpu0 74,500 5e7b7b d8deeb -t} +${goto 30}${color}\#1 ${cpubar cpu1 5,100} ${goto 165}\#5 ${cpubar cpu5 5,100} ${goto 300}\#9 ${cpubar cpu9 5,100} ${goto 440}\#13 ${cpubar cpu13 5,100} +${goto 30}\#2 ${cpubar cpu2 5,100} ${goto 165}\#6 ${cpubar cpu6 5,100} ${goto 300}\#10 ${cpubar cpu10 5,100} ${goto 440}\#14 ${cpubar cpu14 5,100} +${goto 30}\#3 ${cpubar cpu3 5,100} ${goto 165}\#7 ${cpubar cpu7 5,100} ${goto 300}\#11 ${cpubar cpu11 5,100} ${goto 440}\#15 ${cpubar cpu15 5,100} +${goto 30}\#4 ${cpubar cpu4 5,100} ${goto 165}\#8 ${cpubar cpu8 5,100} ${goto 300}\#12 ${cpubar cpu12 5,100} ${goto 440}\#16 ${cpubar cpu16 5,100} +${color3}${hr} + +${color1} ${goto 20}GPU ${color4}Arc B580${color}${alignr}${color4}pkg: ${color1}${execi 5 cat $(grep -l xe /sys/class/hwmon/hwmon*/name | head -1 | xargs dirname)/temp2_input | awk '{printf "%.0f", $1/1000}'}°c ${color4}vram: ${color}${execi 5 cat $(grep -l xe /sys/class/hwmon/hwmon*/name | head -1 | xargs dirname)/temp3_input | awk '{printf "%.0f", $1/1000}'}°c +${alignr}${color4}fan: ${color}${execi 5 cat $(grep -l xe /sys/class/hwmon/hwmon*/name | head -1 | xargs dirname)/fan1_input} RPM +${color1} ${goto 20}MoBo ${color4}GigaByte X870 Eagle WiFi 7${color}${alignr}${color}${execi 5 cat $(grep -l '^gigabyte_wmi$' /sys/class/hwmon/hwmon*/name | head -1 | xargs dirname)/temp2_input | awk '{printf "%.0f", $1/1000}'}°c / ${execi 5 cat $(grep -l '^gigabyte_wmi$' /sys/class/hwmon/hwmon*/name | head -1 | xargs dirname)/temp3_input | awk '{printf "%.0f", $1/1000}'}°c +${color3}${hr} + +${color1} ${goto 20}Disk +${color4}${goto 50}FREE% | FREE / TOTAL ${color} +${goto 18}${color5} ${color}${fs_free_perc /}% free ${color4}|${color} ${fs_free /} ${color4}/${color} ${fs_size /}${alignr}${fs_bar 10,250 /} +${goto 18}${color6} ${color}${fs_free_perc /home}% free ${color4}|${color} ${fs_free /home} ${color4}/${color} ${fs_size /home}${alignr}${fs_bar 10,250 /home} +${if_mounted /data}${goto 18}${color1} ${color}${fs_free_perc /data}% free ${color4}|${color} ${fs_free /data} ${color4}/${color} ${fs_size /data}${alignr}${fs_bar 10,250 /data}${endif} +${if_mounted /mnt/nfs/Slackware}${goto 18}${color1} ${color}${fs_free_perc /mnt/nfs/Slackware}% free ${color4}|${color} ${fs_free /mnt/nfs/Slackware} ${color4}/${color} ${fs_size /mnt/nfs/Slackware}${alignr}${fs_bar 10,250 /mnt/nfs/Slackware}${endif} +${diskiograph_read 50,245}${alignr}${diskiograph_write 50,245} +${color1}${goto 120}${diskio_read}/s${goto 360}${diskio_write}/s +${color4}${goto 119}read ${goto 360} write${color} +${color1} ${goto 20}Cache ${color5}${execpi 900 du -sh $HOME/.cache 2>/dev/null | cut -f1}${color} +${color4}${goto 60}Folder Name${alignr 60}Size${color} +${execpi 900 du -sh $HOME/.cache/* 2>/dev/null | sort -hr | head -4 | awk '{n=substr($2, index($2, ".cache/")+7); if (length(n)>26) n=substr(n,1,25) "…"; printf "${color6}${goto 60}%s${color1}${alignr 60}%s\n", n, $1}'} +${color3}${hr} + +${color1}${font Inconsolata Nerd Font:style=Regular:pixelsize=13} ${goto 20}Network + ${goto 20}${addr br0}${alignr} ${color6}${execi 300 curl ipinfo.io/ip}${color} +${downspeedgraph br0 50,245}${alignr}${upspeedgraph br0 50,245} +${if_match "${addr br0}"!="No Address"}${goto 20}${color1} ${downspeed br0}k/s${goto 350} ${upspeed br0}k/s${endif} +${color4}${goto 20} download ${goto 360} upload${color} +${color3}${hr} + +${color4} ${color}${goto 20}${exec cat /etc/slackware-version}${alignr} ${uptime} + ${goto 20}${kernel}${alignr} ${exec ls /var/log/packages|wc -l} + ${memperc}% / ${memmax}${alignr}${membar 10,250}${color} +${color3}${hr} + +${color4}${goto 60}Process${alignr 60}PID %CPU %MEM${color} +${color6}${goto 60}${top name 1}${color1}${alignr 60}${top pid 1} ${top cpu 1} ${top mem 1} +${color6}${goto 60}${top name 2}${color1}${alignr 60}${top pid 2} ${top cpu 2} ${top mem 2} +${color6}${goto 60}${top name 3}${color1}${alignr 60}${top pid 3} ${top cpu 3} ${top mem 3} +${color6}${goto 60}${top name 4}${color1}${alignr 60}${top pid 4} ${top cpu 4} ${top mem 4} +${color6}${goto 60}${top name 5}${color1}${alignr 60}${top pid 5} ${top cpu 5} ${top mem 5} +${color3}${hr} + +${color1} ${goto 20}${execi 2 playerctl status 2>/dev/null} · ${color4}${execi 2 playerctl metadata --format "{{artist}}"}${color} +${goto 20}${execi 2 playerctl metadata --format "{{title}} ({{duration(position)}} / {{duration(mpris:length)}})" 2>/dev/null} +${goto 50}${execibar 2 5,500 bash -c "pos=\$(playerctl position 2>/dev/null); len=\$(playerctl metadata mpris:length 2>/dev/null); echo \"scale=6; (\$pos / (\$len / 1000000)) * 100\" | bc | awk '{print int(\$1)}'"} +]] |
