rename config folder

This commit is contained in:
Morten Bendtsen
2021-01-19 17:05:45 +01:00
parent a9ac801220
commit fb23f299e7
28 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
#!/usr/bin/bash
if cat /proc/acpi/button/lid/LID/state | grep -q open; then
swaymsg output <eDP-1> enable
else
swaymsg output <eDP-1> disable
fi

View File

@@ -0,0 +1,9 @@
#!/bin/sh
# Times the screen off and puts it to background
swayidle \
timeout 5 'swaymsg "output * dpms off"' \
resume 'swaymsg "output * dpms on"' &
# Locks the screen immediately
swaylock -i ~/.config/sway/i3-lock-screen.png -L -K --font JetBrainsMono -s tile
# Kills last background task so idle timer doesn't keep running
kill %%

View File

@@ -0,0 +1,3 @@
#!/bin/bash
FILENAME="screenshot-`date +%F-%T`"
grim -g "$(slurp)" $HOME/Pictures/FILENAME.png

View File

@@ -0,0 +1,3 @@
#!/bin/bash
FILENAME="screenshot-`date +%F-%T`"
grim $HOME/Pictures/FILENAME.png

View File

@@ -0,0 +1,15 @@
#!/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=NewYork&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' }'