Clean dotfiles

This commit is contained in:
Smirnov Alexandr 2021-03-03 18:37:06 +02:00
parent 5c2b55f13c
commit 197750ffa3
32 changed files with 123 additions and 579 deletions

4
config/bspwm/polybar/bar.sh Executable file
View file

@ -0,0 +1,4 @@
#!/bin/bash
killall -q polybar
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
polybar -c ~/.config/bspwm/polybar/polybar bar&

View file

@ -57,18 +57,18 @@ ramp-volume-0 = 
[module/weather]
type = custom/script
exec = python3 ~/.config/polybar/scripts/weather.py
exec = python3 ~/.config/bspwm/polybar/scripts/weather.py
interval = 60
[module/archupd]
type = custom/script
exec = ~/.config/polybar/scripts/updates-pacman-aur.sh
exec = ~/.config/bspwm/polybar/scripts/updates-pacman-aur.sh
interval = 60
[module/wifi-signal]
type = custom/script
label =  %output:%%
exec = ~/.config/polybar/scripts/wifi-signal.sh
exec = ~/.config/bspwm/polybar/scripts/wifi-signal.sh
interval = 3
[module/keyboard]

View file

@ -0,0 +1,19 @@
#!/bin/sh
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=$(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

View file

@ -0,0 +1,15 @@
"""For working this script set in ~/.profile 2 variable:
OWM_POLYBAR: API key
OWM_CITY: Your city
"""
import requests, os
API_KEY = os.getenv("OWM_POLYBAR")
CITY = os.getenv("OWM_CITY")
try:
JSON = requests.get(f"http://api.openweathermap.org/data/2.5/weather?q={CITY}&lang=EN&&units=metric&appid={API_KEY}").json()
print("", int(JSON["main"]["temp"]), "°С")
except Exception:
print(" err °С")

View file

@ -0,0 +1,2 @@
#!/bin/sh
cat /proc/net/wireless | grep "wlp3s0" | awk '{print $4}' | grep -o '[0-9]*'