commit c8ee03da92775515daeaa93d0e3078d40a0defb5
parent 75a21ff36f81ab6356f504152714a8783a45658d
Author: Sven Möller <sven@svenmoeller.xyz>
Date: Fri, 25 Feb 2022 17:21:40 +0100
Changes
Diffstat:
4 files changed, 15 insertions(+), 9 deletions(-)
diff --git a/bash/.bashrc b/bash/.bashrc
@@ -22,3 +22,4 @@ alias cgp="git -C ~/.dotfiles push"
alias cgr="git -C ~/.dotfiles restore"
alias cga="git -C ~/.dotfiles add"
alias cs="stow -d ~/.dotfiles"
+alias sf="sfeed_curses .sfeed/feeds/*"
diff --git a/bin/.local/bin/bm b/bin/.local/bin/bm
@@ -24,7 +24,7 @@ add () {
}
random () {
- shuf -n 1 | awk '{print $1}' | xargs "$LINK_HANDLER"
+ shuf -n 1 | awk '{print $1}' | xargs $LINK_HANDLER
}
move () {
@@ -51,11 +51,12 @@ more () {
interactive () {
list="$1"
+ action="$2"
actions="open\narchive\nfavorite\nunread\ndelete\nmore\n"
line="$(awk '{print NR" "$0}' | $menu | awk '{$1 = ""; print $0}' | sed 's/^ //')"
url="$(echo "$line" | awk '{print $1}')"
if [ -z "$line" ]; then exit; fi
- action="$(printf "$actions" | grep -v "$list" | $menu)"
+ [ -z "$action" ] && action="$(printf "$actions" | grep -v "$list" | $menu)"
if [ -z "$action" ]; then exit; fi
case "$action" in
unread|favorite|archive) move "$line" "$action" ;;
@@ -95,12 +96,12 @@ edit () {
}
foo () {
- case "$1" in
+ case "$2" in
-r) random ;;
- -h) to_html $2 ;;
+ -h) to_html $1 ;;
-l) cat ;;
- -e) edit $2 ;;
- *) interactive $2 ;;
+ -e) edit $1 ;;
+ *) interactive $@ ;;
esac
}
@@ -116,9 +117,9 @@ help () {
if [ -z "$1" ]; then "$0" "unread" "-i"; exit; fi
case "$1" in
unread|favorite|archive)
- cat "$BM_DIR/$1" | foo "$2" "$1" ;;
+ cat "$BM_DIR/$1" | foo "$@" ;;
all)
- cat "$BM_DIR"/unread "$BM_DIR"/favorite "$BM_DIR"/archive | foo "$2" "$1" ;;
+ cat "$BM_DIR"/unread "$BM_DIR"/favorite "$BM_DIR"/archive | foo "$@";;
git|sync|html)
"$@"; exit ;;
http://*|https://*|-)
diff --git a/bin/.local/bin/lh b/bin/.local/bin/lh
@@ -8,7 +8,8 @@ open () {
case $url in
*.png|*.jpg|*.jpeg) curl $url | setsid -f $IMAGE_VIEWER -;;
- *.mp3|*.ogg|*youtube.com/watch*) setsid -f mpv --force-window $1 > /dev/null 2>&1 & ;;
+ *.mp3|*.ogg|*youtube.com/watch*|*invidious.snopyta.org/watch*)
+ setsid -f mpv --force-window $1 > /dev/null 2>&1 & ;;
*) $BROWSER $1 ;;
esac
}
diff --git a/sxhkd/.config/sxhkd/sxhkdrc b/sxhkd/.config/sxhkd/sxhkdrc
@@ -37,6 +37,9 @@ super + c
alt + o
passfill
+super + o
+ menu="dmenu -i -l 10" bm all open
+
super + odiaeresis
i3lock -c 000000