EA Origin Float & Polybar Updates Module Changes

- Make EA Origin windows float
- Update polybar updates module to use checkupdates and paru
This commit is contained in:
Sravan Balaji
2021-06-06 10:55:09 -04:00
parent 1acc6a0755
commit 8c5c283da5
3 changed files with 42 additions and 16 deletions

View File

@@ -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_arch=$(checkupdates 2> /dev/null | wc -l ); then
updates_arch=0
fi
# 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
num_updates=0
updates_aur=0
fi
echo "$num_updates"
updates=$((updates_arch + updates_aur))
# if [ "$updates" -gt 0 ]; then
# echo "# $updates"
# else
# echo ""
# fi
echo "$updates"
#+end_src
**** CPU

View File

@@ -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"

View File

@@ -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))