aboutsummaryrefslogtreecommitdiffstats
path: root/filesystem
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2021-06-25 12:56:30 +0200
committerMattias Andrée <maandree@kth.se>2021-06-25 12:56:30 +0200
commit5a7db2f34aa6a6787d98a001b6d28be97f36abf4 (patch)
tree52db199005cc5daee35b5c0e9b3d28b534449e1c /filesystem
downloaddotfiles-5a7db2f34aa6a6787d98a001b6d28be97f36abf4.tar.gz
dotfiles-5a7db2f34aa6a6787d98a001b6d28be97f36abf4.tar.bz2
dotfiles-5a7db2f34aa6a6787d98a001b6d28be97f36abf4.tar.xz
First commit
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'filesystem')
-rw-r--r--filesystem/Makefile90
-rw-r--r--filesystem/user-dirs.dirs15
2 files changed, 105 insertions, 0 deletions
diff --git a/filesystem/Makefile b/filesystem/Makefile
new file mode 100644
index 0000000..c46eea2
--- /dev/null
+++ b/filesystem/Makefile
@@ -0,0 +1,90 @@
+.POSIX:
+
+install:
+ mkdir -p -- ~/.config
+ mkdir -p -- ~/.var/cache/.thumbnails
+ rm -rf -- ~/.config/.cache
+ rm -rf -- ~/.cache
+ rm -rf -- ~/.thumbnails
+ ln -sf -- ../.cache ~/.config/.cache
+ ln -sf -- .var/cache ~/.cache
+ ln -sf -- .cache/.thumbnails ~/.thumbnails
+ mkdir -p -- ~/.var/games
+ mkdir -p -- ~/.var/lib
+ mkdir -p -- ~/.var/mail
+ mkdir -p -- ~/.var/spool
+ rm -f -- ~/.spool
+ rm -f -- ~/.local/var
+ ln -sf .var/spool/ ~/.spool
+ ln -sf ../.var ~/.local/var
+ mkdir -p -- ~/.local/bin
+ mkdir -p -- ~/.local/src
+ if test -d ~/.fonts && test ! -L ~/.fonts; then \
+ mkdir -p -- ~/.local/share && \
+ test ! -e ~/.local/share/fonts && \
+ mv ~/.fonts ~/.local/share/fonts; \
+ else \
+ mkdir -p -- ~/.local/share/fonts && \
+ rm -f -- ~/.fonts && \
+ ln -sf -- .local/share/fonts ~/.fonts; \
+ fi
+ if test -d ~/.icons && test ! -L ~/.icons; then \
+ mkdir -p -- ~/.local/share && \
+ test ! -e ~/.local/share/icons && \
+ mv ~/.icons ~/.local/share/icons; \
+ else \
+ mkdir -p -- ~/.local/share/icons && \
+ rm -f -- ~/.icons && \
+ ln -sf -- .local/share/icons ~/.icons; \
+ fi
+ if test -d ~/.themes && test ! -L ~/.themes; then \
+ mkdir -p -- ~/.local/share && \
+ test ! -e ~/.local/share/themes && \
+ mv ~/.themes ~/.local/share/themes; \
+ else \
+ mkdir -p -- ~/.local/share/themes && \
+ rm -f -- ~/.themes && \
+ ln -sf -- .local/share/themes ~/.themes; \
+ fi
+ mkdir -p -- ~/.usr/bin
+ mkdir -p -- ~/.usr/include
+ mkdir -p -- ~/.usr/lib
+ mkdir -p -- ~/.usr/libexec
+ mkdir -p -- ~/.usr/share/man
+ mkdir -p -- ~/.usr/src
+ ln -sf -- ~/.dotfiles/filesystem/user-dirs.dirs ~/.config/
+
+uninstall:
+ -unlink -- ../.cache ~/.config/.cache
+ -unlink -- .var/cache ~/.cache
+ -unlink -- .cache/.thumbnails ~/.thumbnails
+ -unlink -- .var/spool/ ~/.spool
+ -unlink -- ../.var ~/.local/var
+ -unlink -- .local/share/fonts ~/.fonts
+ -unlink -- .local/share/icons ~/.icons
+ -unlink -- .local/share/themes ~/.themes
+ -rmdir -- ~/.config
+ -rmdir -- ~/.var/cache/.thumbnails
+ -rmdir -- ~/.var/cache
+ -rmdir -- ~/.var/games
+ -rmdir -- ~/.var/lib
+ -rmdir -- ~/.var/mail
+ -rmdir -- ~/.var/spool
+ -rmdir -- ~/.var
+ -rmdir -- ~/.local/bin
+ -rmdir -- ~/.local/src
+ -rmdir -- ~/.local/share/fonts
+ -rmdir -- ~/.local/share/icons
+ -rmdir -- ~/.local/share/themes
+ -rmdir -- ~/.local/share
+ -rmdir -- ~/.local
+ -rmdir -- ~/.usr/bin
+ -rmdir -- ~/.usr/include
+ -rmdir -- ~/.usr/lib
+ -rmdir -- ~/.usr/libexec
+ -rmdir -- ~/.usr/share/man
+ -rmdir -- ~/.usr/share
+ -rmdir -- ~/.usr/src
+ -rmdir -- ~/.usr
+
+.PHONY: install uninstall
diff --git a/filesystem/user-dirs.dirs b/filesystem/user-dirs.dirs
new file mode 100644
index 0000000..a6adde0
--- /dev/null
+++ b/filesystem/user-dirs.dirs
@@ -0,0 +1,15 @@
+# This file is written by xdg-user-dirs-update
+# If you want to change or add directories, just edit the line you're
+# interested in. All local changes will be retained on the next run
+# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped
+# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
+# absolute path. No other format is supported.
+#
+XDG_DESKTOP_DIR="/var/empty"
+XDG_DOWNLOAD_DIR="$HOME/"
+XDG_TEMPLATES_DIR="$HOME/Templates"
+XDG_PUBLICSHARE_DIR="$HOME/Public"
+XDG_DOCUMENTS_DIR="$HOME/"
+XDG_MUSIC_DIR="$HOME/"
+XDG_PICTURES_DIR="$HOME/"
+XDG_VIDEOS_DIR="$HOME/"