power menu, redshift, polybar
This commit is contained in:
23
.config/polybar/scripts/notification-chess/README.md
Normal file
23
.config/polybar/scripts/notification-chess/README.md
Normal file
@@ -0,0 +1,23 @@
|
||||
# Script: notification-chess
|
||||
|
||||
A small script that indicates whether you need to move.
|
||||
|
||||

|
||||
|
||||
|
||||
## Dependencies
|
||||
|
||||
* `curl`
|
||||
* `jq`
|
||||
* obviously a chess.com account
|
||||
|
||||
|
||||
## Module
|
||||
|
||||
```ini
|
||||
[module/notification-chess]
|
||||
type = custom/script
|
||||
exec = ~/polybar-scripts/notification-chess.sh
|
||||
interval = 10
|
||||
click-left = xdg-open https://www.chess.com/goto_ready_game & disown
|
||||
```
|
||||
@@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
|
||||
USERNAME=""
|
||||
games=$(curl -sf "https://api.chess.com/pub/player/$USERNAME/games/to-move" | jq ".[] | length")
|
||||
|
||||
if [ "$games" -gt 0 ]; then
|
||||
echo "#1 $games"
|
||||
else
|
||||
echo "#2"
|
||||
fi
|
||||
BIN
.config/polybar/scripts/notification-chess/screenshots/1.png
Normal file
BIN
.config/polybar/scripts/notification-chess/screenshots/1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 661 B |
Reference in New Issue
Block a user