From c9c0490cbf5da7028378e1078d4e1af0cbe0a6c6 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Sat, 17 Apr 2021 09:54:53 +0200 Subject: [PATCH] xdg: Move xdg media directories Moved all directories with media contents (pictures, videos, music) to a single coherent media directory. --- bootstrap/.stow-local-ignore | 1 + i3/.config/i3/config | 2 +- mpv/.config/mpv/mpv.conf | 2 +- qutebrowser/.config/qutebrowser/config.py | 4 ++-- scripts/.local/bin/vidl | 8 ++++++++ sh/.config/sh/xdg | 7 ++++--- vifm/.config/vifm/vifmrc | 4 ++-- 7 files changed, 19 insertions(+), 9 deletions(-) create mode 100755 scripts/.local/bin/vidl diff --git a/bootstrap/.stow-local-ignore b/bootstrap/.stow-local-ignore index 1b5258a..a512395 100644 --- a/bootstrap/.stow-local-ignore +++ b/bootstrap/.stow-local-ignore @@ -2,3 +2,4 @@ ^/install_packages.sh ^/packages.*.txt +^/README.md diff --git a/i3/.config/i3/config b/i3/.config/i3/config index 8c81134..03a778a 100644 --- a/i3/.config/i3/config +++ b/i3/.config/i3/config @@ -181,7 +181,7 @@ bindsym $mod+F12 reload bindsym $mod+Shift+F12 restart # set a pretty wallpaper -exec_always --no-startup-id feh --bg-scale ~/pictures/wall.jpg +exec_always --no-startup-id feh --bg-scale ~/media/pictures/wall.jpg # launch polybar (script ensures only 1 instance existing at a time) exec_always --no-startup-id polybar-launch top diff --git a/mpv/.config/mpv/mpv.conf b/mpv/.config/mpv/mpv.conf index 963da5f..688eb0c 100644 --- a/mpv/.config/mpv/mpv.conf +++ b/mpv/.config/mpv/mpv.conf @@ -21,7 +21,7 @@ msg-module=yes ### screenshots -screenshot-directory=~/pictures/screenshots +screenshot-directory="${XDG_PICTURES_DIR:-~/media/pictures}/screenshots" # filename_HH-MM-SS screenshot-template="screen_%F_%wH-%wM-%wS" screenshot-format=png diff --git a/qutebrowser/.config/qutebrowser/config.py b/qutebrowser/.config/qutebrowser/config.py index 672d580..984a1c0 100644 --- a/qutebrowser/.config/qutebrowser/config.py +++ b/qutebrowser/.config/qutebrowser/config.py @@ -98,10 +98,10 @@ config.bind(leader + "tV", "set tabs.position left") config.bind(leader + "M", "spawn umpv {url}") config.bind(leader + "m", "hint links spawn umpv {hint-url}") # bind youtube-dl to download the current page/links -config.bind(leader + "dM", "spawn youtube-dl -o ~/videos/%(title)s.%(ext)s {url}") +config.bind(leader + "dM", "spawn vidl {url}") config.bind( leader + "dm", - "hint --rapid links spawn youtube-dl -o ~/videos/%(title)s.%(ext)s {hint-url}", + "hint --rapid links spawn vidl {hint-url}", ) # Use q for quitting a tab (mimicks vim buffer) - qa is used for exiting diff --git a/scripts/.local/bin/vidl b/scripts/.local/bin/vidl new file mode 100755 index 0000000..7d5d785 --- /dev/null +++ b/scripts/.local/bin/vidl @@ -0,0 +1,8 @@ +#!/usr/bin/env sh +# +# send video downloads to my raspberry machine +# where they will be automatically queued and +# archived when downloaded. + +# shellcheck disable=SC2029 +ssh dietpi ./vidl "$@" diff --git a/sh/.config/sh/xdg b/sh/.config/sh/xdg index a018ca3..77989d5 100644 --- a/sh/.config/sh/xdg +++ b/sh/.config/sh/xdg @@ -23,10 +23,11 @@ test "$XDG_DATA_HOME" || export XDG_DATA_HOME="$HOME/.local/share" test "$XDG_DESKTOP_DIR" || export XDG_DESKTOP_DIR="$HOME/desktop" test "$XDG_DOCUMENTS_DIR" || export XDG_DOCUMENTS_DIR="$HOME/documents" test "$XDG_DOWNLOAD_DIR" || export XDG_DOWNLOAD_DIR="$HOME/downloads" -test "$XDG_MUSIC_DIR" || export XDG_MUSIC_DIR="$HOME/music" -test "$XDG_PICTURES_DIR" || export XDG_PICTURES_DIR="$HOME/pictures" test "$XDG_PROJECTS_DIR" || export XDG_PROJECTS_DIR="$HOME/projects" -test "$XDG_VIDEOS_DIR" || export XDG_VIDEOS_DIR="$HOME/videos" + +export XDG_MUSIC_DIR="$HOME/media/music" +export XDG_PICTURES_DIR="$HOME/media/pictures" +export XDG_VIDEOS_DIR="$HOME/media/videos" ## Non-Standard additions # non-standard, is added to path to enable execution of any files herein diff --git a/vifm/.config/vifm/vifmrc b/vifm/.config/vifm/vifmrc index 483245b..24c427b 100644 --- a/vifm/.config/vifm/vifmrc +++ b/vifm/.config/vifm/vifmrc @@ -118,8 +118,8 @@ set findprg='fd %A --hidden --exclude .git --exclude node_modules' mark h ~/ mark d ~/downloads/ mark p ~/projects/ -mark i ~/pictures/ -mark v ~/videos/ +mark i ~/media/pictures/ +mark v ~/media/videos/ mark n ~/documents/notes/ mark N ~/Nextcloud/ mark l ~/documents/library/academia/pdf/