logo conky

master 0.2.3
Daniel Napora 2022-05-26 22:39:07 +02:00
parent d4a330020a
commit b13031b9d9
3 changed files with 27 additions and 5 deletions

View File

@ -3,8 +3,13 @@
me="colorizer-conky -s"
CONKYDIR="$HOME/.config/conky"
BASECONKY="$CONKYDIR/sysinfo_mbcolor.conkyrc"
LNG=${LANG:0:2}
if [ ! -f "${BASECONKY}" ]; then
rsync -a /usr/share/mabox-colorizer/conky/* ${CONKYDIR}/
if [ -d "/usr/share/mabox/lang/$LNG/.config/conky" ]; then
rsync -a /usr/share/mabox/lang/$LNG/.config/conky/* ${CONKYDIR}/
else
rsync -a /usr/share/mabox/lang/en/.config/conky/* ${CONKYDIR}/
fi
fi
CNF_DIR="$HOME/.config/colorizer/conky"
CNF_FILE="$CNF_DIR/conky.cfg"

View File

@ -125,6 +125,12 @@ shades () {
;;
esac
}
logosize () {
sd "minimum_height.*$" "minimum_height = ${1}," ${CONKYDIR}/logo_mbcolor.conkyrc
sd "minimum_width.*$" "minimum_width = ${1}," ${CONKYDIR}/logo_mbcolor.conkyrc
sd "\{image ~.*$" "{image ~/.config/conky/images/mabox_3d.png -s ${1}x${1}}" ${CONKYDIR}/logo_mbcolor.conkyrc
}
pos () {
def_x=${conky_gap_x:-30}
def_y=${conky_gap_y:-60}
@ -228,6 +234,17 @@ single () {
out2+=("${i},conkyctl gap_y ${i} ${1};$me")
done
if [[ "$1" =~ "logo_mbcolor" ]]; then
read LSIZE <<< "$(grep minimum_height ${1} | cut -d'=' -f2 | cut -d"," -f1)"
out+=("^sep(Size)")
out+=("Logo size [ $LSIZE ],^checkout(logosize)")
out2+=("^tag(logosize)")
out2+=("^sep(Logo size)")
out2+=("Small 64px,conkyctl logosize 64;$me")
out2+=("Normal 128px,conkyctl logosize 128;$me")
out2+=("Big 256px,conkyctl logosize 256;$me")
fi
out+=("^sep(COLORS)")
[[ "$CLR" != "#" ]] && out+=("<small><span bgcolor='$CLR'> </span><span ${BG} fgcolor='$CLR'> AbCd </span></small> Default color,^pipe(mbclr '$CLR' conkyctl default_color DEFAULT_COLOR '$me' ${1})")
[[ "$CLR0" != "#" ]] && out+=("<small><span bgcolor='$CLR0'> </span><span ${BG} fgcolor='$CLR0'> AbCd </span></small> Color 0,^pipe(mbclr '$CLR0' conkyctl color0 COLOR_0 '$me' ${1})")
@ -310,6 +327,7 @@ case "$1" in
serfont) setfont;;
shades_all) shades_all "$2";;
shades) shades "$2" "$3";;
logosize) logosize "$2";;
single) single "$2";;
pos) pos "$2" "$3";;
gap_x) gap_x "$2" "$3";;

View File

@ -11,8 +11,8 @@ conky.config = {
alignment = 'middle_middle',
gap_x = 0,
gap_y = 0,
minimum_height = 220,
minimum_width = 220,
minimum_height = 128,
minimum_width = 128,
-- FONTS
use_xft = true,
@ -63,8 +63,7 @@ conky.config = {
};
conky.text = [[
${image $HOME/.config/conky/images/mabox_3d.png -s 220x220}
${voffset 200}${color0}${alignc}M A B O X L I N U X
${image ~/.config/conky/images/mabox_3d.png -s 128x128}
]];