dotfiles

My configuration files.
Log | Files | Refs | README

commit 4b1ded20bbc988a6b97abc93e83f59d3379b701e
parent 96af8ff7ec3ea6b56ced3f0d1e48530220118b7a
Author: Sven Möller <sven@svenmoeller.xyz>
Date:   Sat, 26 Feb 2022 23:16:09 +0100

Config changes

Diffstat:
Mbash/.bashrc | 2+-
Mbash/.profile | 5+----
Mbin/.local/bin/lh | 6+++---
Abin/.local/bin/player | 22++++++++++++++++++++++
4 files changed, 27 insertions(+), 8 deletions(-)

diff --git a/bash/.bashrc b/bash/.bashrc @@ -22,4 +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/*" +alias sf="sfeed_curses ~/.sfeed/feeds/*" diff --git a/bash/.profile b/bash/.profile @@ -12,14 +12,11 @@ export IMAGE_VIEWER=imv if [ "$(uname -o)" = "Android" ]; then export BROWSER=termux-open - export LINK_HANDLER=termux-open export NOTIFY=termux-toast -else - export LINK_HANDLER='lh open' fi if [ -z "$DISPLAY" ] && [ -n "$XDG_VTNR" ] && [ "$XDG_VTNR" -eq 1 ]; then - export BROWSER='setsid -f qutebrowser' + export BROWSER='setsid -f qutebrowser &> /dev/null' export NOTIFY=notify-send startx elif [ -z "$STY" ] && [ -z "$TMUX" ] && [ "$(uname -o)" != "Android" ]; then diff --git a/bin/.local/bin/lh b/bin/.local/bin/lh @@ -7,10 +7,10 @@ open () { url="$(echo "$1" | sed 's/?.*$//')" case $url in - *.png|*.jpg|*.jpeg) curl $url | setsid -f $IMAGE_VIEWER -;; + *.png|*.jpg|*.jpeg) curl $url | setsid -f imv -;; *.mp3|*.ogg|*youtube.com/watch*|*invidious.snopyta.org/watch*) - setsid -f mpv --force-window $1 > /dev/null 2>&1 & ;; - *) $BROWSER $1 ;; + mpv --fs --force-window $1 > /dev/null 2>&1 & ;; + *) qutebrowser $1 > /dev/null 2>&1 & ;; esac } diff --git a/bin/.local/bin/player b/bin/.local/bin/player @@ -0,0 +1,22 @@ +#!/bin/sh + +case $1 in + toggle) + pgrep mpv \ + && echo '{ "command": ["cycle", "pause"] }' \ + | socat - "/tmp/mpvsocket" \ + || mpc toggle + ;; + next) + pgrep mpv \ + && echo '{ "command": ["seek", "30"] }' \ + | socat - "/tmp/mpvsocket" \ + || mpc next + ;; + prev) + pgrep mpv \ + && echo '{ "command": ["seek", "-15", "exact"] }' \ + | socat - "/tmp/mpvsocket" \ + || mpc prev + ;; +esac