Add feature for TeXLive Manager and outdated packages #525
Unanswered
LukasCBossert
asked this question in
Q&A
Replies: 1 comment 2 replies
-
Not sure if you figured out the issue with the numbers showing up incorrectly (maybe check if sketchybar can run # item.sh #
tlmgr=(
# item configuration
# see documentation for more info
popup.[topmost | blur_radius | background.* | ...]=value
)
sketchybar --add item tlmgr \
... \
--subscribe tlmgr mouse.entered mouse.exited # plugin.sh #
update() {
# assuming this includes each package on its own line a la brew list -1
PACKAGES=$(tlmgr get outdated packages)
# counts number of lines in PACKAGES via here-string
# (see: https://askubuntu.com/questions/678915/whats-the-difference-between-and-in-bash)
COUNT=$(wc -l <<< $PACKAGES)
for (( i = 0; i < COUNT; i++ )); do
details=(
# gets ith row in PACKAGES
label="$(sed "${i}q;d" <<< $PACKAGES)" # from
# https://stackoverflow.com/questions/6022384/bash-tool-to-get-nth-line-from-a-file
# other item configuration
)
# see documentation for more info
sketchybar --add item "tlmgr.outdatedpack.${i}" popup.tlmgr
done
}
# I've found that I typically get better reliability when using one function
# for both mouse events and checking the event within the function instead
# of having one function for each event (especially when flicking over it).
# Experiment with it and see which works better for you.
mouse() {
if [[ "$SENDER" == "mouse.entered" ]]; then
sketchybar --set tlmgr popup.drawing=on
else
sketchybar --set tlmgr popup.drawing=off
fi
}
# Example for one function per event
# mouse_enter() {
# sketchybar --set tlmgr popup.drawing=on
# }
case "$SENDER" in
"mouse.entered" | "mouse.exited") mouse ;;
*) update ;;
esac |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Very similar to the
homebrew
-module I like to have an overview of outdated TeXLive packages.I added two files in
items
andplugins
folder and made them executable. But the number is always0
and therefore it says, no outdated package:The
tlmgr.sh
in theplugins
-folderand the file
tlmgr.sh
in the folderitems
:Bonus points: I also like to get the list of outdated packages when I mouse over the TeX icon. Same goes for the outdated packages of homebrew. But I couldnt figure that out.
Beta Was this translation helpful? Give feedback.
All reactions