commit 7442038359cadd11c5f3c5b05de9d0d3ccbee05e
Author: Dimitrije Dobrota <mail@dimitrijedobrota.com>
Date: Thu, 22 Jun 2023 19:46:56 +0200
Initial commit
* Basic setup of bash, vim and Xorg
* Conforming to XDG Base Directory Specification
Diffstat:
5 files changed, 74 insertions(+), 0 deletions(-)
diff --git a/.xdg/config/X11/xinitrc b/.xdg/config/X11/xinitrc
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+userresources=$XDG_CONFIG_HOME/X11/Xresources
+usermodmap=$XDG_CONFIG_HOME/X11/Xmodmap
+sysresources=/etc/X11/xinit/.Xresources
+sysmodmap=/etc/X11/xinit/.Xmodmap
+
+# merge in defaults and keymaps
+
+if [ -f $sysresources ]; then
+ xrdb -merge $sysresources
+fi
+
+if [ -f $sysmodmap ]; then
+ xmodmap $sysmodmap
+fi
+
+if [ -f "$userresources" ]; then
+ xrdb -merge "$userresources"
+fi
+
+if [ -f "$usermodmap" ]; then
+ xmodmap "$usermodmap"
+fi
+
+# start some nice programs
+
+if [ -d /etc/X11/xinit/xinitrc.d ] ; then
+ for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
+ [ -x "$f" ] && . "$f"
+ done
+ unset f
+fi
+
+exec dwm
diff --git a/.xdg/config/bash/bash_logout b/.xdg/config/bash/bash_logout
@@ -0,0 +1,3 @@
+#
+# ${XDG_CONFIG_HOME}/bash/bash_logout
+#
diff --git a/.xdg/config/bash/bash_profile b/.xdg/config/bash/bash_profile
@@ -0,0 +1,9 @@
+#
+# ${XDG_CONFIG_HOME}/bash/bash_profile
+#
+
+export XAUTHORITY="$XDG_RUNTIME_DIR"/Xauthorit
+export XINITRC="$XDG_CONFIG_HOME"/X11/xinitrc
+
+export GVIMINIT='let $MYGVIMRC="$XDG_CONFIG_HOME/vim/gvimrc" | source $MYGVIMRC'
+export VIMINIT='let $MYVIMRC="$XDG_CONFIG_HOME/vim/vimrc" | source $MYVIMRC'
diff --git a/.xdg/config/bash/bashrc b/.xdg/config/bash/bashrc
@@ -0,0 +1,11 @@
+#
+# ${XDG_CONFIG_HOME}/bash/bashrc
+#
+
+# If not running interactively, don't do anything
+[[ $- != *i* ]] && return
+
+# alias ls='ls --color=auto'
+# alias grep='grep --color=auto'
+# PS1='[\u@\h \W]\$ '
+alias dotfiles='/usr/bin/git --git-dir=/home/magaknuto/.dotfiles --work-tree=/home/magaknuto'
diff --git a/.xdg/config/vim/vimrc b/.xdg/config/vim/vimrc
@@ -0,0 +1,16 @@
+set runtimepath^=$XDG_CONFIG_HOME/vim
+set runtimepath+=$XDG_DATA_HOME/vim
+set runtimepath+=$XDG_CONFIG_HOME/vim/after
+
+set packpath^=$XDG_DATA_HOME/vim,$XDG_CONFIG_HOME/vim
+set packpath+=$XDG_CONFIG_HOME/vim/after,$XDG_DATA_HOME/vim/after
+
+let g:netrw_home = $XDG_DATA_HOME."/vim"
+call mkdir($XDG_DATA_HOME."/vim/spell", 'p')
+
+set backupdir=$XDG_STATE_HOME/vim/backup | call mkdir(&backupdir, 'p')
+set directory=$XDG_STATE_HOME/vim/swap | call mkdir(&directory, 'p')
+set undodir=$XDG_STATE_HOME/vim/undo | call mkdir(&undodir, 'p')
+set viewdir=$XDG_STATE_HOME/vim/view | call mkdir(&viewdir, 'p')
+
+if !has('nvim') | set viminfofile=$XDG_STATE_HOME/vim/viminfo | endif