update dotfiles

This commit is contained in:
piccihud
2024-12-14 18:24:03 +01:00
parent 68cdfcb6da
commit cc334e92d0
55 changed files with 4801 additions and 9 deletions

21
waybar/scripts/PBPbattery.sh Executable file
View File

@ -0,0 +1,21 @@
#!/bin/bash
#simple Shellscript for waybar/i3blocks/polybar on Pinebook pro
#05012020 geri123@gmx.net Gerhard S.
PERCENT=$(cat /sys/class/power_supply/cw2015-battery/capacity)
STATUS=$(cat /sys/class/power_supply/cw2015-battery/status)
case $((
$PERCENT >= 0 && $PERCENT <= 20 ? 1 :
$PERCENT > 20 && $PERCENT <= 40 ? 2 :
$PERCENT > 40 && $PERCENT <= 60 ? 3 :
$PERCENT > 60 && $PERCENT <= 80 ? 4 : 5)) in
#
(1) echo $STATUS:"":$PERCENT%;;
(2) echo $STATUS:"":$PERCENT%;;
(3) echo $STATUS:"":$PERCENT%;;
(4) echo $STATUS:"":$PERCENT%;;
(5) echo $STATUS:"":$PERCENT%;;
esac

2
waybar/scripts/keyhint.sh Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
yad --title="Sway-WM keybindings:" --no-buttons --geometry=400x345-15-400 --list --column=key: --column=description: --column=command: "ESC" "close this app" "" "=" "modkey" "(set mod Mod4)" "+enter" "Terminal" "(xfce4-terminal)" "+d" "Application Menu" "(wofi)" "+p" "Activities" "(wofi)" "+o" "" "Open Broswer" "+n" "" "Open Files" "+q" "close focused app" "(kill)" "[Shift]+Print-key" "screenshot" "(grim)" "+Shift+e" "power-menu" "(wofi)" "+t" "open keybinding helper" "full list"

16
waybar/scripts/power-menu.sh Executable file
View File

@ -0,0 +1,16 @@
#!/bin/bash
entries="Logout Suspend Reboot Shutdown"
selected=$(printf '%s\n' $entries | wofi --conf=$HOME/.config/wofi/config.power --style=$HOME/.config/wofi/style.widgets.css | awk '{print tolower($1)}')
case $selected in
logout)
swaymsg exit;;
suspend)
exec systemctl suspend;;
reboot)
exec systemctl reboot;;
shutdown)
exec systemctl poweroff -i;;
esac

13
waybar/scripts/weather.sh Executable file
View File

@ -0,0 +1,13 @@
#!/bin/bash
LOC="$1"
# HTML encode string as %20
LOCATION=$(sed -e "s/ /%20/g" <<<"$LOC")
content=$(curl -sS "https://thisdavej.azurewebsites.net/api/weather/current?loc=$LOCATION&deg=C")
ICON=$(curl -s 'https://wttr.in/?format=1' | sed 's/[+0-9a-cA-Z°-]//g' )
# echo $ICON
TEMP=$(echo $content | jq -r '. | "\(.temperature)°\(.degType)"' | sed 's/"//g')
TOOLTIP=$(echo $content | jq -r '. | "\(.temperature)°\(.degType)\n\(.skytext)"' | sed 's/"//g')
CLASS=$(echo $content | jq .skytext)
echo '{"text": "'$TEMP'", "tooltip": "'$ICON $TOOLTIP $LOC'", "class": '$CLASS' }'