This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# for tmux status bar | |
info = `pmset -g batt`.split("\n") | |
perc = info[1].split(" ")[1].gsub(";","") | |
charging = info[0].include? "AC Power" | |
as_f = perc.to_f | |
if as_f > 75 | |
status = "green" | |
bars = 4 | |
elsif as_f > 50 | |
status = "yellow" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
CACHE_FILE="$HOME/.config/outside.json" | |
CACHE_DIR="$(dirname "$CACHE_FILE")" | |
CACHE_MAX_AGE=600 # 10 minutes in seconds | |
# Create cache directory if it doesn't exist | |
mkdir -p "$CACHE_DIR" | |
current_time=$(date +%s) |
OlderNewer