Commit e5e87fc

xxwhirlpool  ·  2026-11-04 12:40:30 -0500 EST
parent 417dac1
misc, headphones battery level
3 files changed,  +22, -5
+5, -4
 1@@ -91,7 +91,7 @@ alias neofetch="hyfetch"
 2 alias fastfetch="hyfetch"
 3 alias bat="batcat"
 4 alias cat="bat --paging=never"
 5-alias rced="$EDITOR ~/.bashrc && source ~/.bashrc"
 6+alias rced="${EDITOR:-/usr/bin/micro} ~/.bashrc && source ~/.bashrc"
 7 alias dd="askdd"
 8 alias copy="xclip -sel clipboard"
 9 alias open="xdg-open"
10@@ -147,7 +147,6 @@ export NVM_DIR="$HOME/.config/nvm"
11 
12 # set truecolor
13 export COLORTERM=truecolor
14-export MICRO_TRUECOLOR=1
15 
16 # catppuccin colors for fzf
17 export FZF_DEFAULT_OPTS=" \
18@@ -165,7 +164,7 @@ export FZF_ALT_C_OPTS="
19   --walker-skip .git,node_modules,target
20   --preview 'tree -C {}'"
21 
22-export LEDGER_FILE=~/.config/hledger/katmoney.journal
23+export LEDGER_FILE="$HOME/.config/hledger/katmoney.journal"
24 
25 # perl shit
26 PATH="/home/kat/.perl5/bin${PATH:+:${PATH}}"; export PATH;
27@@ -183,14 +182,16 @@ export GOPATH="$HOME/.go"
28 # editor
29 export EDITOR="/usr/bin/micro"
30 
31+# addrbook by dave ratfactor
32+# https://ratfactor.com/repos/addrbook/
33 export ADDRBOOK_PATH="$HOME/.local/addrbook"
34 export PATH="$PATH:$HOME/.local/addrbook"
35 
36+# get to my non-bash scripts
37 export PATH="$PATH:$HOME/Scripts/perl"
38 export PATH="$PATH:$HOME/Scripts/python"
39 export PATH="$PATH:$HOME/Scripts/ruby"
40 export PATH="$PATH:$HOME/Scripts/shell"
41-
42 export PATH="$PATH:$HOME/Projects/mine/urlref.pl"
43 
44 ######################################
+16, -0
 1@@ -0,0 +1,16 @@
 2+#!/usr/bin/env bash
 3+#
 4+# check power levels of headphones
 5+
 6+charge_percent="$(upower -i "$(upower -e | grep 'headset')" | awk '/percentage/ {print $NF}' | sed 's/%//g')"
 7+
 8+gum_echo_custom() {
 9+    # $* here to sub in the $charge_percent variable
10+    gum style --foreground "#f4b8e4" --width 50 "current: $*"
11+}
12+
13+# display it
14+gum_echo_custom "$charge_percent%" # show the percentage (prefixed with "current:")
15+
16+# ...and send a notif
17+notify-send "headphones battery level" "current: $charge_percent%"
+1, -1
1@@ -2,7 +2,7 @@
2 
3 # don't take args
4 if [[ "$#" -gt 0 ]]; then
5-	echo "usage: $0 [FOLLOW PROMPTS]"
6+	echo "usage: $(basename "$0") [FOLLOW PROMPTS]"
7 	exit 1
8 fi
9