diff --git a/home/.config/xmobar/xmobarrc.hs b/home/.config/xmobar/xmobarrc.hs
index 5f27462..8fa4d71 100644
--- a/home/.config/xmobar/xmobarrc.hs
+++ b/home/.config/xmobar/xmobarrc.hs
@@ -44,16 +44,16 @@ commands = [
-- Battery information. This is likely to require some customization
-- based upon your specific hardware. Or, for a desktop you may want
-- to just remove this section entirely.
- Run Battery [
- "-t", "\xf240 % - ",
- "--",
- "-i", "AC",
- "-O", "AC",
- "-o", "AUX",
- "-L", "12",
- "-h", "green",
- "-l", "red"
- ] 10,
+ --Run Battery [
+ --"-t", "\xf240 % - ",
+ --"--",
+ --"-i", "AC",
+ --"-O", "AC",
+ --"-o", "AUX",
+ --"-L", "12",
+ --"-h", "green",
+ --"-l", "red"
+ --] 10,
-- Time and date
Run Date "\xf017 %H:%M %b %d %Y" "date" 50,
@@ -68,6 +68,9 @@ commands = [
-- Get kernel version from uname -r
Run Com "uname" ["-r"] "" 3600,
+ -- Get bitcoin price from a custom script
+ Run Com "/home/itsdrike/.local/bin/scripts/bitcoin" [] "bitcoin" 300,
+
-- Add dynamic invisible XPM icon that resizes to accomodate trayer
-- this needs to be an absolute string path, env vars or relpaths aren't accepted
-- this should only be on 1 monitor (single file), so ignore this comment on others
@@ -93,14 +96,18 @@ template = "\
\ \
\| %UnsafeStdinReader% }{ \
\| %uname% \
- \| %battery% \
\| %cpu% \
\| %memory% \
\| %disku% \
+ \| %bitcoin% \
\| %wlp2s0% \
\| %date% \
\| %trayerpad%\
\ "
}
-
+-- Abandoned template strings
+-- Network Ethernet:
+-- \| %enp3s0% \
+-- Battery:
+-- \| %battery% \
diff --git a/home/.config/xmobar/xmobarrc0 b/home/.config/xmobar/xmobarrc0
index a197158..8fa4d71 100644
--- a/home/.config/xmobar/xmobarrc0
+++ b/home/.config/xmobar/xmobarrc0
@@ -44,16 +44,16 @@ commands = [
-- Battery information. This is likely to require some customization
-- based upon your specific hardware. Or, for a desktop you may want
-- to just remove this section entirely.
- Run Battery [
- "-t", "\xf240 % - ",
- "--",
- "-i", "AC",
- "-O", "AC",
- "-o", "AUX",
- "-L", "12",
- "-h", "green",
- "-l", "red"
- ] 10,
+ --Run Battery [
+ --"-t", "\xf240 % - ",
+ --"--",
+ --"-i", "AC",
+ --"-O", "AC",
+ --"-o", "AUX",
+ --"-L", "12",
+ --"-h", "green",
+ --"-l", "red"
+ --] 10,
-- Time and date
Run Date "\xf017 %H:%M %b %d %Y" "date" 50,
@@ -68,6 +68,9 @@ commands = [
-- Get kernel version from uname -r
Run Com "uname" ["-r"] "" 3600,
+ -- Get bitcoin price from a custom script
+ Run Com "/home/itsdrike/.local/bin/scripts/bitcoin" [] "bitcoin" 300,
+
-- Add dynamic invisible XPM icon that resizes to accomodate trayer
-- this needs to be an absolute string path, env vars or relpaths aren't accepted
-- this should only be on 1 monitor (single file), so ignore this comment on others
@@ -93,12 +96,18 @@ template = "\
\ \
\| %UnsafeStdinReader% }{ \
\| %uname% \
- \| %battery% \
\| %cpu% \
\| %memory% \
\| %disku% \
+ \| %bitcoin% \
\| %wlp2s0% \
\| %date% \
\| %trayerpad%\
\ "
}
+
+-- Abandoned template strings
+-- Network Ethernet:
+-- \| %enp3s0% \
+-- Battery:
+-- \| %battery% \
diff --git a/home/.config/xmobar/xmobarrc1 b/home/.config/xmobar/xmobarrc1
index 1928835..d9d7a09 100644
--- a/home/.config/xmobar/xmobarrc1
+++ b/home/.config/xmobar/xmobarrc1
@@ -44,16 +44,16 @@ commands = [
-- Battery information. This is likely to require some customization
-- based upon your specific hardware. Or, for a desktop you may want
-- to just remove this section entirely.
- Run Battery [
- "-t", "\xf240 % - ",
- "--",
- "-i", "AC",
- "-O", "AC",
- "-o", "AUX",
- "-L", "12",
- "-h", "green",
- "-l", "red"
- ] 10,
+ --Run Battery [
+ --"-t", "\xf240 % - ",
+ --"--",
+ --"-i", "AC",
+ --"-O", "AC",
+ --"-o", "AUX",
+ --"-L", "12",
+ --"-h", "green",
+ --"-l", "red"
+ --] 10,
-- Time and date
Run Date "\xf017 %H:%M %b %d %Y" "date" 50,
@@ -68,6 +68,9 @@ commands = [
-- Get kernel version from uname -r
Run Com "uname" ["-r"] "" 3600,
+ -- Get bitcoin price from a custom script
+ Run Com "/home/itsdrike/.local/bin/scripts/bitcoin" [] "bitcoin" 300,
+
-- Add dynamic invisible XPM icon that resizes to accomodate trayer
-- this needs to be an absolute string path, env vars or relpaths aren't accepted
-- this should only be on 1 monitor (single file), so ignore this comment on others
@@ -92,11 +95,17 @@ template = "\
\ \
\| %UnsafeStdinReader% }{ \
\| %uname% \
- \| %battery% \
\| %cpu% \
\| %memory% \
\| %disku% \
+ \| %bitcoin% \
\| %wlp2s0% \
\| %date% \
\ "
}
+
+-- Abandoned template strings
+-- Network Ethernet:
+-- \| %enp3s0% \
+-- Battery:
+-- \| %battery% \
diff --git a/home/.local/bin/scripts/bitcoin b/home/.local/bin/scripts/bitcoin
new file mode 100755
index 0000000..d1ea4ef
--- /dev/null
+++ b/home/.local/bin/scripts/bitcoin
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+BTC_DATA=$(curl https://api.coindesk.com/v1/bpi/currentprice.json 2>/dev/null)
+BTC_PRICE=$(echo $BTC_DATA | jq -r ".bpi.USD.rate_float")
+BTC_PRICE=$(printf "%.2f" "$BTC_PRICE")
+
+echo \$"$BTC_PRICE"