Switch to GNU stow

This commit is contained in:
Marty Oehme 2019-12-29 23:12:13 +01:00
parent a2605c4254
commit d34cecb27e
137 changed files with 39244 additions and 141 deletions

12
home/.Xresources Normal file
View file

@ -0,0 +1,12 @@
! ~/.Xresources
! Setting up commonly changed vars
#define myfontsize 11
#define myfont Fira Code
#define myOpacity 90
! Set up URxvt
#include ".config/Xresources/urxvt.Xresources"
! Add Nord theme to every terminal emulator respecting Xresources
#include ".config/Xresources/nord.Xresources"

13
home/.bash_profile Normal file
View file

@ -0,0 +1,13 @@
#
# ~/.bash_profile
#
if [ -d $XDG_CONFIG_HOME/shell/login.d ]; then
for file in $XDG_CONFIG_HOME/shell/login.d/*.sh; do
source $file
done
fi
[[ -f ~/.bashrc ]] && . ~/.bashrc
export PATH="$HOME/.cargo/bin:$PATH"

23
home/.bashrc Normal file
View file

@ -0,0 +1,23 @@
#
# ~/.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
# Load files from rc.d
if [ -d $XDG_CONFIG_HOME/shell/rc.d ]; then
for file in $XDG_CONFIG_HOME/shell/rc.d/*.sh; do
source $file
done
fi
# Load files from bashrc.d
if [ -d $XDG_CONFIG_HOME/shell/bashrc.d ]; then
for file in $XDG_CONFIG_HOME/shell/bashrc.d/*.bash; do
source $file
done
fi
alias ls='ls --color=auto'
PS1='[\u@\h \W]\$ '

36
home/.gitlab-ci.yml Normal file
View file

@ -0,0 +1,36 @@
---
# This file is a template, and might need editing before it works on your project.
# see https://docs.gitlab.com/ce/ci/yaml/README.html for all available options
# you can delete this line if you're not using Docker
image: fnichol/check-shell:latest
analyze:
stage: test
before_script:
- shellcheck --version
script:
- echo "--------- CHECKING POSIX SHELLSCRIPTS -------------"
- find . -type f -name '*.sh' | xargs shellcheck -Calways
- echo "--------- CHECKING ZSH SHELLSCRIPTS -------------"
- find . -type f -name '*.zsh' | xargs shellcheck -Calways -s bash -e SC2034
lint:
stage: test
before_script:
- shfmt -version
script:
- echo "--------- CHECKING POSIX SHELLSCRIPTS -------------"
- find . -type f -name '*.sh' | xargs shfmt -d -i 2
- echo "--------- CHECKING ZSH SHELLSCRIPTS -------------"
- find . -type f -name '*.zsh' | xargs shfmt -d -i 2
test:
stage: test
image: alpine
before_script:
- apk add git bash
- git clone https://github.com/bats-core/bats-core.git /bats
- /bats/bin/bats --version
script:
- /bats/bin/bats -r .

82
home/.xinitrc Normal file
View file

@ -0,0 +1,82 @@
#!/bin/sh
userresources=$HOME/.Xresources
usermodmap=$HOME/.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
# Remaps Capslock key to control.
# (only works for x environment - I haven't needed it for non-x yet)
setxkbmap -option ctrl:nocaps
# sets default to EURkey layout, with possibility to switch to german
# sets german layout to be default for the only pc I have with a german keyboard
if [[ $HOST == "marty-desk" ]] || [[ $HOSTNAME == "marty-desk" ]]; then
setxkbmap -layout de,eu
else
setxkbmap -layout eu,de
fi
# allows switching layouts with alt+space
setxkbmap -option grp:alt_shift_toggle
# Makes Capslock behave as escape - when ONLY capslock is pressed and released
# this only works when we already substitute a ctrl for caps with the lines above,
# otherwise control itself will act as escape.
# Needs xcape package installed. https://github.com/alols/xcape
# set a timeout of 500ms, if pressed longer it will ignore esc
type xcape >/dev/null 2>&1 && xcape -e 'Control_L=Escape' -t 500
# if unclutter exists start it
type unclutter >/dev/null 2>&1 && unclutter &
# if picom exists then we can start it as our compositor
type picom >/dev/null 2>&1 && picom &
# same deal with flashfocus as our active window indicator
type flashfocus >/dev/null 2>&1 && flashfocus -l never &
# if redshift is installed run it
type redshift >/dev/null 2>&1 && redshift &
# if sxhkd - the key-binding daemon is installed, start it up
type sxhkd >/dev/null 2>&1 && sxhkd &
# if greenclip - a clipboard manager, integrated with rofi, is installed, start it up
type greenclip >/dev/null 2>&1 && greenclip daemon &
# if pywal is installed,
# -R restores the last colorscheme that was in use.
type wal >/dev/null 2>&1 && wal -R &
# if nextcloud-client exists, start it up
type nextcloud >/dev/null 2>&1 && nextcloud --background &
# additional config options for Touchpad devices ONLY
if [ $(dmesg | grep -c "Touchpad") -gt 0 ]; then
# enable touch tapping for XPS13 touchpad - for different devices get the touchpad name with xinput list-prop <TAB>
xinput set-prop "DLL075B:01 06CB:76AF Touchpad" "libinput Tapping Enabled" 1
fi
type i3 >/dev/null 2>&1 && exec i3

12
home/.zprofile Normal file
View file

@ -0,0 +1,12 @@
export XDG_CONFIG_HOME="$HOME/.config"
# .zlogin
#
# load all files from .config/shell/login.d
if [ -d $XDG_CONFIG_HOME/shell/login.d ]; then
for file in $XDG_CONFIG_HOME/shell/login.d/*.sh; do
source $file
done
fi
export PATH="$HOME/.cargo/bin:$PATH"

19
home/.zshrc Normal file
View file

@ -0,0 +1,19 @@
#!/bin/zsh
autoload zmv
if [ -d $XDG_CONFIG_HOME/shell/rc.d ]; then
for file in $XDG_CONFIG_HOME/shell/rc.d/*.sh; do
source $file
done
fi
if [ -d $XDG_CONFIG_HOME/shell/zshrc.d ]; then
for file in $XDG_CONFIG_HOME/shell/zshrc.d/*.zsh; do
source $file
done
fi