usr

Modulate your userpace into POSIX-compliant shell scripts!
git clone git://clone.theohenson.com/usr.git
Log | Files | Refs | README

commit 4533fa7f5745254950b148244248c72d0759dfb3
parent 801f39725903cf242d91c187f42b014453d3db63
Author: Theo Henson <[email protected]>
Date:   Mon, 16 Nov 2020 11:26:13 -0500

Improve modules, add user-dirs.dirs

Diffstat:
Mhome/.config/user-dirs.dirs | 16++++++++--------
Mmodules/theo_dirs.mod.sh | 13++++++-------
Mmodules/theo_dotfiles.mod.sh | 2+-
3 files changed, 15 insertions(+), 16 deletions(-)

diff --git a/home/.config/user-dirs.dirs b/home/.config/user-dirs.dirs @@ -1,8 +1,8 @@ -XDG_DESKTOP_DIR="$HOME/media/desktop" -XDG_DOCUMENTS_DIR="$HOME/media/documents" -XDG_DOWNLOAD_DIR="$HOME/media/downloads" -XDG_MUSIC_DIR="$HOME/media/audio" -XDG_PICTURES_DIR="$HOME/media/images" -XDG_PUBLICSHARE_DIR="$HOME/media/public" -XDG_TEMPLATES_DIR="$HOME/media/templates" -XDG_VIDEOS_DIR="$HOME/media/videos" +XDG_DESKTOP_DIR="/home/theo" +XDG_DOCUMENTS_DIR="/home/theo/docs" +XDG_DOWNLOAD_DIR="/home/theo" +XDG_MUSIC_DIR="/home/theo/av" +XDG_PICTURES_DIR="/home/theo/av" +XDG_PUBLICSHARE_DIR="/home/theo/docs/pub" +XDG_TEMPLATES_DIR="/home/theo/docs/templates" +XDG_VIDEOS_DIR="/home/theo/av" diff --git a/modules/theo_dirs.mod.sh b/modules/theo_dirs.mod.sh @@ -1,21 +1,19 @@ # theo_dirs module -: "${XDG_CACHE_HOME:=$HOME/.cache}" -: "${XDG_DATA_HOME:=$HOME/.local/share}" - theo_dirs_add() { printf "theo_dirs: creating directories\n" mkdir -p "$HOME"/av/wall mkdir -p "$HOME"/av/scrot + mkdir -p "$HOME"/docs/templates + mkdir -p "$HOME"/docs/pub mkdir -p "$HOME"/docs mkdir -p "$HOME"/src/git/aur mkdir -p "$HOME"/src/git/ghw mkdir -p "$HOME"/src/git/ghf mkdir -p "$HOME"/src/git/ghf - mkdir -p "$XDG_DATA_HOME"/pub printf "theo_dirs: copying some wallpapers\n" - cp "$USR_DIR"/home/av/wall/bg1.jpg "$HOME"/av/wall/bg1.jpg - cp "$USR_DIR"/home/av/wall/bg2.jpg "$HOME"/av/wall/bg2.jpg + cp --remove-destination "$USR_DIR"/home/av/wall/bg1.jpg "$HOME"/av/wall/bg1.jpg + cp --remove-destination "$USR_DIR"/home/av/wall/bg2.jpg "$HOME"/av/wall/bg2.jpg } theo_dirs_remove() { @@ -23,13 +21,14 @@ theo_dirs_remove() { rmdir "$HOME"/av/wall rmdir "$HOME"/av/scrot rmdir "$HOME"/av + rmdir "$HOME"/docs/templates + rmdir "$HOME"/docs/pub rmdir "$HOME"/docs rmdir "$HOME"/src/git/aur rmdir "$HOME"/src/git/ghw rmdir "$HOME"/src/git/ghf rmdir "$HOME"/src/git rmdir "$HOME"/src - rmdir "$XDG_DATA_HOME"/pub } theo_dirs_info() { diff --git a/modules/theo_dotfiles.mod.sh b/modules/theo_dotfiles.mod.sh @@ -52,5 +52,5 @@ theo_dotfiles_files() { $CONFIG_DIR/picom/picom.conf $CONFIG_DIR/fish/config.fish $CONFIG_DIR/gtk-2.0/gtkrc-2.0 $CONFIG_DIR/fish/fish_variables $CONFIG_DIR/gtk-3.0/settings.ini $CONFIG_DIR/spotify-tui/config.yml $CONFIG_DIR/nvim/coc-settings.json - $CONFIG_DIR/discocss/custom.css" + $CONFIG_DIR/discocss/custom.css $CONFIG_DIR/user-dirs.dirs" }