diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index 8e35448c..a4b6f555 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -57,6 +57,9 @@ set clipboard+=unnamedplus map k map l +" Replace ex mode with gq + map Q gq + " Check file in shellcheck: map s :!clear && shellcheck % diff --git a/.config/user-dirs.dirs b/.config/user-dirs.dirs index 955facd5..6da77515 100644 --- a/.config/user-dirs.dirs +++ b/.config/user-dirs.dirs @@ -1,2 +1,4 @@ XDG_DESKTOP_DIR="$HOME/" XDG_DOWNLOAD_DIR="$HOME/downloads" +XDG_CONFIG_HOME="$HOME/.config" +XDG_DATA_HOME="$HOME/.local/share" diff --git a/.imwheelrc b/.imwheelrc deleted file mode 100644 index e69de29b..00000000 diff --git a/.local/bin/cron/newsup b/.local/bin/cron/newsup deleted file mode 100755 index dd270921..00000000 --- a/.local/bin/cron/newsup +++ /dev/null @@ -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." diff --git a/.local/bin/lmc b/.local/bin/lmc deleted file mode 100755 index bbe99a56..00000000 --- a/.local/bin/lmc +++ /dev/null @@ -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:?}" & diff --git a/.local/bin/podentr b/.local/bin/podentr deleted file mode 100755 index e765c584..00000000 --- a/.local/bin/podentr +++ /dev/null @@ -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 diff --git a/.local/bin/qndl b/.local/bin/qndl deleted file mode 100755 index f5bd14f2..00000000 --- a/.local/bin/qndl +++ /dev/null @@ -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." diff --git a/.local/bin/queueandnotify b/.local/bin/queueandnotify deleted file mode 100755 index 867b15e6..00000000 --- a/.local/bin/queueandnotify +++ /dev/null @@ -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" diff --git a/.local/bin/rssadd b/.local/bin/rssadd deleted file mode 100755 index 4ef31a4c..00000000 --- a/.local/bin/rssadd +++ /dev/null @@ -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 diff --git a/.local/bin/td-toggle b/.local/bin/td-toggle deleted file mode 100755 index dfac906f..00000000 --- a/.local/bin/td-toggle +++ /dev/null @@ -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:?}" diff --git a/.local/bin/torwrap b/.local/bin/torwrap deleted file mode 100755 index 0fbb3a80..00000000 --- a/.local/bin/torwrap +++ /dev/null @@ -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 diff --git a/.local/bin/transadd b/.local/bin/transadd deleted file mode 100755 index 5d8f510d..00000000 --- a/.local/bin/transadd +++ /dev/null @@ -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." diff --git a/.local/share/larbs/getkeys/ncmpcpp b/.local/share/larbs/getkeys/ncmpcpp deleted file mode 100644 index 75cdf261..00000000 --- a/.local/share/larbs/getkeys/ncmpcpp +++ /dev/null @@ -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 diff --git a/.local/share/larbs/getkeys/newsboat b/.local/share/larbs/getkeys/newsboat deleted file mode 100644 index b6953b35..00000000 --- a/.local/share/larbs/getkeys/newsboat +++ /dev/null @@ -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 diff --git a/.profile b/.profile index 87ca0a23..e0a31b58 100644 --- a/.profile +++ b/.profile @@ -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="-"