pbincli etc.

This commit is contained in:
Harri Lahtinen 2020-04-19 15:26:23 +03:00
parent 746c885893
commit bc35b57da4
7 changed files with 26 additions and 33 deletions

View File

@ -1,9 +0,0 @@
--flag-switches-begin
--enable-smooth-scrolling
--disable-font-subpixel-positioning
--ignore-gpu-blacklist
-enable-zero-copy
-enable-gpu-rasterization
--enable-native-gpu-memory-buffers
--high-dpi-support=1
--flag-switches-end

View File

@ -0,0 +1 @@
server=https://privatebin.hartzan.com

View File

@ -223,8 +223,8 @@ label-background = ${colors.color9}
[module/temperature]
type = internal/temperature
thermal-zone = 11
#hwmon-path = /sys/devices/platform/coretemp.0/hwmon/hwmon6/temp1_input
thermal-zone = 7
hwmon-path = /sys/devices/platform/coretemp.0/hwmon/hwmon7/temp1_input
warn-temperature = 65
format = <ramp> <label>
format-underline = ${colors.foreground}
@ -249,7 +249,7 @@ format-prefix = "  "
format-prefix-foreground = ${colors.color0}
format-foreground = ${colors.color0}
format-background = ${colors.color9}
click-left = st -e yay --noconfirm -Syu
click-left = kitty -e yay --noconfirm -Syu
click-right = "~/.config/polybar/scripts/arch/arch-updates.sh -c&"
click-middle = "~/.config/polybar/scripts/arch/arch-updates.sh -n"

View File

@ -7,7 +7,7 @@ killall -q polybar
while pgrep -x polybar >/dev/null; do sleep 1; done
# Launch arch_updates script
~/.config/Scripts/arch-updates.sh & echo $! > ~/.config/Scripts/arch_updates.pid
~/.config/polybar/scripts/arch/arch-updates.sh & echo $! > ~/.config/polybar/scripts/arch/arch_updates.pid
# Launch
polybar top &

View File

@ -1,54 +1,54 @@
#!/usr/bin/env bash
path=${HOME}/.config/polybar/scripts/arch/
archpath=/home/hate/.config/polybar/scripts/arch/
#trap 'exit' SIGINT
function main_loop {
while true; do
echo '' > ${path}status
echo '' > ${archpath}status
check_for_updates
sleep 600
done
}
function status {
echo $$ > ${path}polybar_updates.pid
echo $$ > ${archpath}polybar_updates.pid
while true; do
cat ${path}status
cat ${archpath}status
sleep 1
done
}
function check_for_updates {
checkupdates | nl -w2 -s '. ' >| ${path}repo.pkgs
yay -Qu --aur | nl -w2 -s '. ' >| ${path}aur.pkgs
updates=$(cat ${path}*.pkgs | wc -l)
checkupdates | nl -w2 -s '. ' >| ${archpath}repo.pkgs
yay -Qu --aur | nl -w2 -s '. ' >| ${archpath}aur.pkgs
updates=$(cat ${archpath}*.pkgs | wc -l)
echo "0" >| ${path}status
[ $updates -gt 0 ] && echo "%{F#e60053}$updates" >| ${path}status
echo "0" >| ${archpath}status
[ $updates -gt 0 ] && echo "%{F#e60053}$updates" >| ${archpath}status
>| ${path}packages
[ -s ${path}repo.pkgs ] && cat ${path}repo.pkgs >> ${path}packages
[ -s ${path}repo.pkgs ] && [ -s ${path}aur.pkgs ] && printf "\n" >> ${path}packages
[ -s ${path}aur.pkgs ] && sed '1iAUR Updates' ${path}aur.pkgs >> ${path}packages
>| ${archpath}packages
[ -s ${archpath}repo.pkgs ] && cat ${archpath}repo.pkgs >> ${archpath}packages
[ -s ${archpath}repo.pkgs ] && [ -s ${archpath}aur.pkgs ] && printf "\n" >> ${archpath}packages
[ -s ${archpath}aur.pkgs ] && sed '1iAUR Updates' ${archpath}aur.pkgs >> ${archpath}packages
}
function notify {
if [[ $(cat ${path}status) -eq 0 ]]
if [[ $(${archpath}status) -eq 0 ]]
then
twmnc "Updates 0"
notify-send 0
else
twmnc Updates "$(cat ${path}packages)"
notify-send "$(cat ${archpath}packages)"
fi
}
function upgrade {
kitty -e yay --noconfirm -Syu
echo "0" > ${path}status
urxvt -e yay --noconfirm -Syu
echo "0" > ${archpath}status
}
[[ $# -eq 0 ]] && main_loop
[[ $1 == "-s" ]] && status
[[ $1 == "-c" ]] && echo '' > ${path}status && check_for_updates
[[ $1 == "-c" ]] && echo '' > ${archpath}status && check_for_updates
[[ $1 == "-n" ]] && notify

View File

@ -157,7 +157,6 @@ terminus-font
texinfo
the_silver_searcher
tk
tlpui-git
tmux
ttf-liberation
udiskie

View File

@ -21,12 +21,14 @@ networkmanager-dispatcher-chrony
networkmanager-dmenu-git
otf-powerline-symbols-git
pacback
pbincli
picom-tryone-git
polybar-git
powerline-fonts-git
python-ueberzug
ranger-git
redshift-minimal
riot-desktop-git
tlp-git
tlp-rdw-git
ttf-weather-icons