summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.config/newsboat/config2
-rw-r--r--.config/sxhkd/sxhkdrc4
-rwxr-xr-x.local/bin/camtoggle2
-rwxr-xr-x.local/bin/statusbar/price18
-rw-r--r--README.md2
5 files changed, 17 insertions, 11 deletions
diff --git a/.config/newsboat/config b/.config/newsboat/config
index 3da9b5e..ba3a057 100644
--- a/.config/newsboat/config
+++ b/.config/newsboat/config
@@ -33,7 +33,7 @@ browser linkhandler
macro , open-in-browser
macro t set browser "qndl"; open-in-browser ; set browser linkhandler
macro a set browser "tsp youtube-dl --add-metadata -xic -f bestaudio/best"; open-in-browser ; set browser linkhandler
-macro v set browser "setsid nohup mpv"; open-in-browser ; set browser linkhandler
+macro v set browser "setsid -f mpv"; open-in-browser ; set browser linkhandler
macro w set browser "lynx"; open-in-browser ; set browser linkhandler
macro p set browser "dmenuhandler"; open-in-browser ; set browser linkhandler
macro c set browser "xsel -b <<<" ; open-in-browser ; set browser linkhandler
diff --git a/.config/sxhkd/sxhkdrc b/.config/sxhkd/sxhkdrc
index 1f37d24..1b89372 100644
--- a/.config/sxhkd/sxhkdrc
+++ b/.config/sxhkd/sxhkdrc
@@ -25,9 +25,9 @@ super + c
super + v
$TERMINAL -e nvim -c VimwikiIndex
super + shift + a
- $TERMINAL -e alsamixer; pkill -RTMIN+10 blocks
+ $TERMINAL -e pulsemixer
super + shift + c
- mpv --no-osc --no-input-default-bindings --input-conf=/dev/null --title='mpvfloat' /dev/video0
+ camtoggle
super + shift + e
tutorialvids
super + w
diff --git a/.local/bin/camtoggle b/.local/bin/camtoggle
new file mode 100755
index 0000000..05679c0
--- /dev/null
+++ b/.local/bin/camtoggle
@@ -0,0 +1,2 @@
+#!/bin/sh
+pkill -f /dev/video || mpv --no-osc --no-input-default-bindings --input-conf=/dev/null --geometry=-0-0 --autofit=30% --title="mpvfloat" /dev/video0
diff --git a/.local/bin/statusbar/price b/.local/bin/statusbar/price
index 953df3b..3f87f7a 100755
--- a/.local/bin/statusbar/price
+++ b/.local/bin/statusbar/price
@@ -6,23 +6,25 @@
# When the name of the currency is multi-word, put it in quotes.
[ -z "$3" ] && exit 1
-interval="@7d" # History contained in chart preceded by '@' (7d = 7 days)
+interval="@14d" # History contained in chart preceded by '@' (7d = 7 days)
dir="${XDG_DATA_HOME:-$HOME/.local/share}/crypto-prices"
pricefile="$dir/$1"
chartfile="$dir/$1-chart"
+updateprice() { ping -q -c 1 1.1.1.1 >/dev/null 2>&1 &&
+ curl -s "rate.sx/1$1" > "$pricefile" &&
+ curl -s "rate.sx/$1$interval" > "$chartfile" ;}
+
[ -d "$dir" ] || mkdir -p "$dir"
[ "$(stat -c %x "$pricefile" 2>/dev/null | cut -d' ' -f1)" != "$(date '+%Y-%m-%d')" ] &&
- { ping -q -c 1 1.1.1.1 >/dev/null 2>&1 && curl -s "rate.sx/1$1" > "$pricefile" || exit ;}
-
-printf "$3$%0.2f" "$(cat "$pricefile")"
-
-[ "$(stat -c %x "$chartfile" 2>/dev/null | cut -d' ' -f1)" != "$(date '+%Y-%m-%d')" ] &&
- { ping -q -c 1 1.1.1.1 >/dev/null 2>&1 && curl -s "rate.sx/$1$interval" > "$chartfile" || exit ;}
+ updateprice
case $BLOCK_BUTTON in
1) setsid "$TERMINAL" -e less -Sf "$chartfile" ;;
+ 2) notify-send -u low "$3 Updating..." "Updating $2 price..." &&
+ updateprice "$1" && notify-send "$3 Update complete." "$2 price is now
+\$$(cat "$pricefile")" ;;
3) uptime="$(date -d "$(stat -c %x "$pricefile")" '+%D at %T' | sed "s|$(date '+%D')|Today|")"
notify-send "$3 $2 module" "\- <b>Exact price: \$$(cat "$pricefile")</b>
- Left click for chart of changes.
@@ -32,3 +34,5 @@ case $BLOCK_BUTTON in
$uptime</b>" ;;
6) "$TERMINAL" -e "$EDITOR" "$0" ;;
esac
+
+printf "$3$%0.2f" "$(cat "$pricefile")"
diff --git a/README.md b/README.md
index 069055d..4b8b713 100644
--- a/README.md
+++ b/README.md
@@ -42,4 +42,4 @@ Use [LARBS](https://larbs.xyz) to autoinstall everything:
curl -LO larbs.xyz/larbs.sh
```
-or clone the repo files directly to your home directory and install [the prerequisite programs](https://github.com/LukeSmithxyz/LARBS/blob/master/progs.csv) or [those required for the i3 setup](https://github.com/LukeSmithxyz/LARBS/blob/master/legacy.csv).
+or clone the repo files directly to your home directory and install [the prerequisite programs](https://github.com/LukeSmithxyz/LARBS/blob/master/progs.csv).