diff --git a/README.org b/README.org index 5109a04..4cb200c 100644 --- a/README.org +++ b/README.org @@ -398,6 +398,7 @@ which denotes layout choice. , resource =? "desktop_window" --> doIgnore , resource =? "kdesktop" --> doIgnore , title =? "Picture in picture" --> doFloat + , title =? "Origin" --> doFloat ] #+end_src @@ -1273,16 +1274,28 @@ Define module update intervals in seconds. ***** Script #+begin_src shell :shebang #!/bin/bash :tangle polybar/scripts/updates-pacman-aurhelper.sh - if ! num_updates=$(paru -Qu 2>/dev/null | wc -l); then - # if ! updates_aur=$(yay -Qum 2>/dev/null | wc -l); then - # if ! updates_aur=$(cower -u 2> /dev/null | wc -l); then - # if ! updates_aur=$(trizen -Su --aur --quiet | wc -l); then - # if ! updates_aur=$(pikaur -Qua 2> /dev/null | wc -l); then - # if ! updates_aur=$(rua upgrade --printonly 2> /dev/null | wc -l); then - num_updates=0 + if ! updates_arch=$(checkupdates 2> /dev/null | wc -l ); then + updates_arch=0 fi - echo "$num_updates" + # if ! updates_aur=$(yay -Qum 2> /dev/null | wc -l); then + if ! updates_aur=$(paru -Qum 2> /dev/null | wc -l); then + # if ! updates_aur=$(cower -u 2> /dev/null | wc -l); then + # if ! updates_aur=$(trizen -Su --aur --quiet | wc -l); then + # if ! updates_aur=$(pikaur -Qua 2> /dev/null | wc -l); then + # if ! updates_aur=$(rua upgrade --printonly 2> /dev/null | wc -l); then + updates_aur=0 + fi + + updates=$((updates_arch + updates_aur)) + + # if [ "$updates" -gt 0 ]; then + # echo "# $updates" + # else + # echo "" + # fi + + echo "$updates" #+end_src **** CPU diff --git a/polybar/scripts/updates-pacman-aurhelper.sh b/polybar/scripts/updates-pacman-aurhelper.sh index 90d96bf..e312ec2 100755 --- a/polybar/scripts/updates-pacman-aurhelper.sh +++ b/polybar/scripts/updates-pacman-aurhelper.sh @@ -1,11 +1,23 @@ #!/bin/bash -if ! num_updates=$(paru -Qu 2>/dev/null | wc -l); then - # if ! updates_aur=$(yay -Qum 2>/dev/null | wc -l); then - # if ! updates_aur=$(cower -u 2> /dev/null | wc -l); then - # if ! updates_aur=$(trizen -Su --aur --quiet | wc -l); then - # if ! updates_aur=$(pikaur -Qua 2> /dev/null | wc -l); then - # if ! updates_aur=$(rua upgrade --printonly 2> /dev/null | wc -l); then - num_updates=0 +if ! updates_arch=$(checkupdates 2> /dev/null | wc -l ); then + updates_arch=0 fi -echo "$num_updates" +# if ! updates_aur=$(yay -Qum 2> /dev/null | wc -l); then +if ! updates_aur=$(paru -Qum 2> /dev/null | wc -l); then +# if ! updates_aur=$(cower -u 2> /dev/null | wc -l); then +# if ! updates_aur=$(trizen -Su --aur --quiet | wc -l); then +# if ! updates_aur=$(pikaur -Qua 2> /dev/null | wc -l); then +# if ! updates_aur=$(rua upgrade --printonly 2> /dev/null | wc -l); then + updates_aur=0 +fi + +updates=$((updates_arch + updates_aur)) + +# if [ "$updates" -gt 0 ]; then +# echo "# $updates" +# else +# echo "" +# fi + +echo "$updates" diff --git a/xmonad.hs b/xmonad.hs index 2431af7..0237ed2 100644 --- a/xmonad.hs +++ b/xmonad.hs @@ -193,6 +193,7 @@ myManageHook = composeAll , resource =? "desktop_window" --> doIgnore , resource =? "kdesktop" --> doIgnore , title =? "Picture in picture" --> doFloat + , title =? "Origin" --> doFloat ] myPlacement = withGaps (16,0,16,0) (smart (0.5,0.5))