From 2535bfcd832f4af84e5aa8070dfbfa8a24015192 Mon Sep 17 00:00:00 2001 From: Daniel Napora Date: Fri, 20 May 2022 13:45:52 +0200 Subject: [PATCH] checkupdates script translation, TODO --- TODO.md | 9 ++++++++ bin/checkupdates.sh | 35 +++++++++++++++++++++++++---- share/mabox-colorizer/conky/mbcolor | 7 +++--- 3 files changed, 44 insertions(+), 7 deletions(-) create mode 100644 TODO.md diff --git a/TODO.md b/TODO.md new file mode 100644 index 0000000..ae67109 --- /dev/null +++ b/TODO.md @@ -0,0 +1,9 @@ +### Short term +- color select submenu - configurable exposed palette: wallpaper or palette from Color Menu (built-in or custom) +- documentation (About and help) + +### Later +- autogenerated colorschemes from wallpaper colors (light and dark) for menus and conkies +- scripts to handle tint2 panel +- colorize "folder" icons +- GTK theme (if possible) diff --git a/bin/checkupdates.sh b/bin/checkupdates.sh index f58d109..aba5bfb 100755 --- a/bin/checkupdates.sh +++ b/bin/checkupdates.sh @@ -8,6 +8,33 @@ CNF_DIR="$HOME/.config/colorizer/conky" CNF_FILE="$CNF_DIR/conky.cfg" source <(grep = $CNF_FILE) +case "$LANG" in + pl*) + AVAIL_UPDATES="Dostępne aktualizacje" + UPTODATE="System jest aktualny" + PKGS_TO_UPDATE="Pakiety do aktualizacji:" + YAY_UPD="Użyj yay (cli)" + PAMAC_UPD="Użyj Pamac (GUI)" + DISABLE="Wyłącz powiadomienia" + ;; + es*) + AVAIL_UPDATES="Available updates" + UPTODATE="System is up to date" + PKGS_TO_UPDATE="Packages to update:" + YAY_UPD="Update with yay (cli)" + PAMAC_UPD="Update with Pamac (GUI)" + DISABLE="Disable notifications" + ;; + *) + AVAIL_UPDATES="Available updates" + UPTODATE="System is up to date" + PKGS_TO_UPDATE="Packages to update:" + YAY_UPD="Update with yay (cli)" + PAMAC_UPD="Update with Pamac (GUI)" + DISABLE="Disable notifications" + ;; +esac + case "$1" in -s) CONKYPID=$(pgrep -f sysinfo_mbcolor) @@ -25,13 +52,13 @@ if [ -f /tmp/"$CONKYPID" ]; then PKGS=$(pamac checkupdates -aq| wc -l) if [ "$PKGS" != "0" ]; then if [[ "$update_notifications" == "true" ]];then - notify-send.sh -i mbcc "Updates available" "Packages to update: $PKGS" -o "Update with yay (cli):terminator -T 'Update packages with yay' -e yay" \ - -o "Update with Pamac (GUI):pamac-manager --updates" -o "Disable notifications:mb-setvar update_notifications=false ${CNF_FILE}" + notify-send.sh -t 10000 -i mbcc "$AVAIL_UPDATES" "$PKGS_TO_UPDATE $PKGS" -o "$YAY_UPD:terminator -T '$YAY_UPD' -e yay" \ + -o "$PAMAC_UPD:pamac-manager --updates" -o "$DISABLE:mb-setvar update_notifications=false ${CNF_FILE}" fi - printf "\${font}\${alignr} Available updates: \${color red}" + printf "\${font}\${alignr} $AVAIL_UPDATES: \${color red}" echo "$PKGS" else - printf "\${font}\${color}\${alignr} System is up to date :)" + printf "\${font}\${color}\${alignr} $UPTODATE" fi else echo "$SUM" > /tmp/${CONKYPID} diff --git a/share/mabox-colorizer/conky/mbcolor b/share/mabox-colorizer/conky/mbcolor index 8a9fde8..d96f6d0 100644 --- a/share/mabox-colorizer/conky/mbcolor +++ b/share/mabox-colorizer/conky/mbcolor @@ -1,3 +1,4 @@ -conky -c ~/.config/conky/shortcuts_mbcolor.conkyrc & sleep 1s -conky -c ~/.config/conky/sysinfo_mbcolor.conkyrc & sleep 1s -conky -c ~/.config/conky/logo_mbcolor.conkyrc & sleep 1s +conky -c ~/.config/conky/shortcuts_mbcolor.conkyrc & sleep .5 +conky -c ~/.config/conky/sysinfo_mbcolor.conkyrc & sleep .5 +conky -c ~/.config/conky/logo_mbcolor.conkyrc & sleep .5 +conky -c ~/.config/conky/mabox_tools_mbcolor.conkyrc & sleep .5