Add alt+f4 to sxhkd, update polybar scripts

This commit is contained in:
Smirnov Alexandr 2021-03-25 11:08:58 +02:00
parent 351fd863ac
commit 946566abc6
8 changed files with 27 additions and 22 deletions

View file

@ -1,13 +1,9 @@
#!/bin/sh
#!/usr/bin/env bash
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

View file

@ -1,8 +1,11 @@
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()
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 as e:
print(" err")

View file

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