This commit is contained in:
Vlad Doster 2020-04-07 15:46:25 -05:00
commit 1f0d0a33ad
15 changed files with 8 additions and 158 deletions

View File

@ -57,6 +57,9 @@ set clipboard+=unnamedplus
map <C-k> <C-w>k
map <C-l> <C-w>l
" Replace ex mode with gq
map Q gq
" Check file in shellcheck:
map <leader>s :!clear && shellcheck %<CR>

View File

@ -1,2 +1,4 @@
XDG_DESKTOP_DIR="$HOME/"
XDG_DOWNLOAD_DIR="$HOME/downloads"
XDG_CONFIG_HOME="$HOME/.config"
XDG_DATA_HOME="$HOME/.local/share"

View File

View File

@ -1,17 +0,0 @@
#!/bin/sh
# Set as a cron job to check for new RSS entries for newsboat.
# If newsboat is open, sends it an "R" key to refresh.
ping -q -c 1 1.1.1.1 > /dev/null || exit
/usr/bin/notify-send "📰 Updating RSS feeds..."
pgrep -x newsboat >/dev/null && /usr/bin/xdotool key --window "$(/usr/bin/xdotool search --name newsboat)" R && exit
echo 🔃 > /tmp/newsupdate
pkill -RTMIN+6 "${STATUSBAR:?}"
/usr/bin/newsboat -x reload
rm -f /tmp/newsupdate
pkill -RTMIN+6 "${STATUSBAR:?}"
/usr/bin/notify-send "📰 RSS feed update complete."

View File

@ -1,27 +0,0 @@
#!/bin/sh
NUM="${2:-5}"
# Uncomment the following line to use Pulseaudio.
# PULSE=true
if [ "$PULSE" ]; then
toggle() { pulsemixer --toggle-mute ;}
mute() { pulsemixer --mute ;}
up() { pulsemixer --change-volume +"$NUM" ;}
down() { pulsemixer --change-volume -"$NUM" ;}
else
toggle() { amixer sset Master toggle ;}
mute() { amixer sset Master mute ;}
up() { amixer sset Master "$NUM"%+ ;}
down() { amixer sset Master "$NUM"%- ;}
fi
case "$1" in
toggle) toggle ;;
mute) mute ;;
up) up ;;
down) down ;;
esac >/dev/null
pkill -RTMIN+10 "${STATUSBAR:?}" &

View File

@ -1,7 +0,0 @@
#!/bin/sh
# entr command to run `queueandnotify` when newsboat queue is changed
[ "$(pgrep -x $(basename $0) | wc -l)" -gt 2 ] && exit
echo ~/.local/share/newsboat/queue | entr -p queueandnotify 2>/dev/null

View File

@ -1,12 +0,0 @@
#!/bin/sh
# $1 is a url; $2 is a command
[ -z "$1" ] && exit
base="$(basename "$1")"
notify-send "⏳ Queuing $base..."
cmd="$2"
[ -z "$cmd" ] && cmd="youtube-dl --add-metadata"
idnum="$(tsp $cmd "$1")"
realname="$(echo "$base" | sed "s/?\(source\|dest\).*//;s/%20/ /g")"
tsp -D "$idnum" mv "$base" "$realname"
tsp -D "$idnum" notify-send "👍 $realname done."

View File

@ -1,14 +0,0 @@
#!/bin/sh
# Podboat sucks. This script replaces it.
# It reads the newsboat queue, queuing downloads with taskspooler.
# It also removes the junk from extentions.
queuefile="$HOME/.local/share/newsboat/queue"
while read -r line; do
[ -z "$line" ] && continue
url="$(echo "$line" | awk '{print $1}')"
qndl "$url" "curl -LO"
done < "$queuefile"
echo > "$queuefile"

View File

@ -1,10 +0,0 @@
#!/bin/sh
! echo "$1" | grep "https*://\S\+\.[A-Za-z]\+\S*" >/dev/null &&
notify-send "That doesn't look like a full URL." && exit
RSSFILE="$HOME/.config/newsboat/urls"
if awk '{print $1}' "$RSSFILE" | grep "^$1$" >/dev/null; then
notify-send "You already have this RSS feed."
else
echo "$1" >> "$RSSFILE" && notify-send "RSS feed added."
fi

View File

@ -1,11 +0,0 @@
#!/bin/sh
# If transmission-daemon is running, will ask to kill, else will ask to start.
if pgrep -x transmission-da >/dev/null ;
then
[ "$(printf "No\\nYes" | dmenu -i -p "Kill transmission-daemon?")" = "Yes" ] && killall transmission-da && notify-send "transmission-daemon killed."
else
ifinstalled transmission-cli || exit
[ "$(printf "No\\nYes" | dmenu -i -p "Start transmission daemon?")" = "Yes" ] && transmission-daemon && notify-send "tranmission-daemon started."
fi
sleep 3 && pkill -RTMIN+7 "${STATUSBAR:?}"

View File

@ -1,7 +0,0 @@
#!/bin/sh
ifinstalled tremc transmission-cli || exit
! pgrep -x transmission-da >/dev/null && transmission-daemon && notify-send "Starting torrent daemon..." && sleep 3 && pkill -RTMIN+7 "${STATUSBAR:?}"
$TERMINAL -e tremc

View File

@ -1,9 +0,0 @@
#!/bin/sh
# Mimeapp script for adding torrent to transmission-daemon, but will also start the daemon first if not running.
# transmission-daemon sometimes fails to take remote requests in its first moments.
pgrep -x transmission-da || (transmission-daemon && notify-send "Starting transmission daemon..." && sleep 3 && pkill -RTMIN+7 "${STATUSBAR:?}")
transmission-remote -a "$@" && notify-send "🔽 Torrent added."

View File

@ -1,21 +0,0 @@
_ __ ___ _ __ ___ _ __ ___ _ __ _ __
| '_ \ / __| '_ ` _ \| '_ \ / __| '_ \| '_ \
| | | | (__| | | | | | |_) | (__| |_) | |_) |
|_| |_|\___|_| |_| |_| .__/ \___| .__/| .__/
|_| |_| |_|
ncmpcpp is the music player.
h/j/k/l - Move left/down/up/right
d/u - Down/up page
a - Add song(s) to playlist
c - Clear playlist
g - Go to top
G - Go to bottom
p - Pause
m - Media library
f - Music sorted by directory structure
t - Tag editor
s - Search
v - Visualizer
P - Playlist

View File

@ -1,22 +0,0 @@
_ _
_ __ _____ _____| |__ ___ __ _| |_
| '_ \ / _ \ \ /\ / / __| '_ \ / _ \ / _` | __|
| | | | __/\ V V /\__ \ |_) | (_) | (_| | |_
|_| |_|\___| \_/\_/ |___/_.__/ \___/ \__,_|\__|
newsboat is the RSS reader.
j/k - Move down/up
l - Open entry
h/q - Back/quit
Q - Quit immediately
J/K - Previous/next feed
n - Next unread
N - Previous unread
a - Toggle article read/unread
A - Mark all as read
U - Show all URLs
,, - Open main link with linkhandler
,p - Pick which program to open link with
,v - Open video link in mpv
,w - Open link in w3m
,c - Copy link to clipboard

View File

@ -11,8 +11,10 @@ export READER="zathura"
export FILE="ranger"
export STATUSBAR="polybar"
# Export XDG environmental variables from '~/.config/user-dirs.dirs'
eval "$(sed 's/^[^#].*/export &/g;t;d' ~/.config/user-dirs.dirs)"
# ~/ Clean-up:
export XAUTHORITY="$XDG_RUNTIME_DIR/Xauthority" # This line will break some DMs.
export NOTMUCH_CONFIG="$HOME/.config/notmuch-config"
export GTK2_RC_FILES="$HOME/.config/gtk-2.0/gtkrc-2.0"
export LESSHISTFILE="-"