More config cleanup

Signed-off-by: Severin Kaderli <severin.kaderli@gmail.com>
This commit is contained in:
Severin Kaderli 2019-02-13 00:47:10 +01:00
parent 005c4f29b6
commit 8d3f9c8a1d
Signed by: severinkaderli
GPG key ID: F419F8835B72F0C4
22 changed files with 44 additions and 27 deletions

View file

@ -4,10 +4,10 @@ before_script:
- apt-get update && apt-get install -y --no-install-recommends shellcheck - apt-get update && apt-get install -y --no-install-recommends shellcheck
- shopt -s expand_aliases - shopt -s expand_aliases
- alias shellcheck="shellcheck -x --exclude=SC2034,SC1091,SC1090" - alias shellcheck="shellcheck -x --exclude=SC2034,SC1091,SC1090"
Lint: Lint:
script: script:
- shellcheck ./system/bin/* - shellcheck ./system/.local/bin/*
- shellcheck ./system/.aliases - shellcheck ./system/.aliases
- shellcheck ./system/.bash_logout - shellcheck ./system/.bash_logout
- shellcheck ./system/.bash_profile - shellcheck ./system/.bash_profile

View file

@ -98,7 +98,7 @@ This folder contains my configuration for the X-Server.
### `.config/Trolltech.conf` ### `.config/Trolltech.conf`
This file contains my QT4 configuration. This file contains my QT4 configuration.
### `bin` ### `.local/bin`
This folder contains a bunch of scripts that I use. Some of them are used by This folder contains a bunch of scripts that I use. Some of them are used by
Polybar or i3 and others are used directly and some like `utils.sh` contain Polybar or i3 and others are used directly and some like `utils.sh` contain
functions that I use in other scripts. functions that I use in other scripts.

View file

@ -13,7 +13,7 @@
# #
# USAGE: # USAGE:
# ./install.sh # ./install.sh
. ./system/bin/utils.sh . ./system/.local/bin/utils.sh
####################################### #######################################
# Configuration variables # Configuration variables
@ -47,6 +47,7 @@ LINKED_FILES_HOME=(
".config/httpie" ".config/httpie"
".config/i3" ".config/i3"
".config/mpv" ".config/mpv"
".config/npm"
".config/polybar" ".config/polybar"
".config/redshift" ".config/redshift"
".config/streamlink" ".config/streamlink"
@ -57,7 +58,7 @@ LINKED_FILES_HOME=(
".config/wget" ".config/wget"
".config/X11" ".config/X11"
".env" ".env"
"bin" ".local/bin"
) )
# Groups the user should be added to # Groups the user should be added to
@ -102,7 +103,7 @@ do
done done
print_header "Give permissions" print_header "Give permissions"
set_permission severin 744 "${HOME}/bin" set_permission severin 744 "${XDG_BIN_HOME}"
print_header "Add user to groups" print_header "Add user to groups"
for group in "${ADD_GROUPS[@]}" for group in "${ADD_GROUPS[@]}"

View file

@ -13,7 +13,7 @@
# #
# USAGE: # USAGE:
# ./post-install.sh # ./post-install.sh
. ./system/bin/utils.sh . ./system/.local/bin/utils.sh
####################################### #######################################
# Configuration variables # Configuration variables

View file

@ -31,7 +31,10 @@ alias pj="cd ~/Projects"
alias e="code" alias e="code"
# Alias for wget to use XDG directories # Alias for wget to use XDG directories
alias wget="wget --hsts-file=\"${XDG_CACHE_HOME}/wget-hsts\"" alias wget='wget --hsts-file="${XDG_CACHE_HOME}/wget-hsts"'
# Alias for svn to use XDG directories # Alias for svn to use XDG directories
alias svn="svn --config-dir \"${XDG_CONFIG_HOME}/subversion\"" alias svn='svn --config-dir "${XDG_CONFIG_HOME}/subversion"'
# Alias for gpg2 to use XDG directories
alias gpg2='gpg2 --homedir "${XDG_DATA_HOME}/gnupg"'

View file

@ -17,6 +17,12 @@ shopt -s histappend
shopt -s checkwinsize shopt -s checkwinsize
shopt -s globstar shopt -s globstar
# XDG_Base_Directories
export XDG_CONFIG_HOME="${HOME}/.config"
export XDG_CACHE_HOME="${HOME}/.cache"
export XDG_DATA_HOME="${HOME}/.local/share"
export XDG_BIN_HOME="${HOME}/.local/bin"
# Sourcing environment variables # Sourcing environment variables
if [ -f "${HOME}/.env" ]; then if [ -f "${HOME}/.env" ]; then
. "${HOME}/.env" . "${HOME}/.env"

View file

@ -31,4 +31,4 @@ xrdb -merge "${XDG_CONFIG_HOME}/X11/xresources"
# Start ibus # Start ibus
#ibus-daemon -drx #ibus-daemon -drx
. "${HOME}/bin/resolution.sh" . "${XDG_BIN_HOME}/resolution.sh"

View file

@ -0,0 +1,4 @@
prefix=${XDG_DATA_HOME}/npm
cache=${XDG_CACHE_HOME}/npm
tmp=${XDG_RUNTIME_DIR}/npm
init-module=${XDG_CONFIG_HOME}/npm/config/npm-init.js

View file

@ -239,7 +239,7 @@ label = %output%
interval = 5 interval = 5
click-left = $HOME/bin/power.sh click-left = ${XDG_BIN_HOME}/power.sh
####################################### #######################################
@ -247,7 +247,7 @@ click-left = $HOME/bin/power.sh
####################################### #######################################
[module/music] [module/music]
type = custom/script type = custom/script
exec = $HOME/bin/music.sh exec = ${XDG_BIN_HOME}/music.sh
format = <label> format = <label>
label = %output% label = %output%

View file

@ -11,12 +11,7 @@
# #
# USAGE: # USAGE:
# This script is sourced by .bashrc # This script is sourced by .bashrc
. "${HOME}/bin/utils.sh" . "${XDG_BIN_HOME}/utils.sh"
# XDG_Base_Directories
export XDG_CONFIG_HOME="${HOME}/.config"
export XDG_CACHE_HOME="${HOME}/.cache"
export XDG_DATA_HOME="${HOME}/.local/share"
# XDG Overrides for unsupported programs # XDG Overrides for unsupported programs
export HTTPIE_CONFIG_DIR="${XDG_CONFIG_HOME}/httpie" export HTTPIE_CONFIG_DIR="${XDG_CONFIG_HOME}/httpie"
@ -31,6 +26,14 @@ export GTK_RC_FILES="${XDG_CONFIG_HOME}/gtk-1.0/gtkrc"
export GTK2_RC_FILES="${XDG_CONFIG_HOME}/gtk-2.0/gtkrc" export GTK2_RC_FILES="${XDG_CONFIG_HOME}/gtk-2.0/gtkrc"
export XINITRC="${XDG_CONFIG_HOME}/X11/xinitrc" export XINITRC="${XDG_CONFIG_HOME}/X11/xinitrc"
export XSERVERRC="${XDG_CONFIG_HOME}/X11/xserverrc" export XSERVERRC="${XDG_CONFIG_HOME}/X11/xserverrc"
export NPM_CONFIG_USERCONFIG="${XDG_CONFIG_HOME}/npm/config"
export NODE_REPL_HISTORY="${XDG_DATA_HOME}/node/repl_history"
export GOPATH="${XDG_DATA_HOME}/go"
export GNUPGHOME="${XDG_DATA_HOME}/gnupg"
export GEM_HOME="${XDG_DATA_HOME}/gem"
export GEM_SPEC_CACHE="${XDG_CACHE_HOME}/gem/specs"
mkdir -p "${XDG_DATA_HOME}/wine/prefixes"
export WINEPREFIX="${XDG_DATA_HOME}/wine/prefixes/default"
# Bash # Bash
export HISTCONTROL=ignoreboth export HISTCONTROL=ignoreboth
@ -43,7 +46,7 @@ export EDITOR="$VISUAL"
export TERMINAL=termite export TERMINAL=termite
# QT # QT
export T_QPA_PLATFORMTHEME=gtk2 export QT_QPA_PLATFORMTHEME=gtk2
export QT_STYLE_OVERRIDE=gtk2 export QT_STYLE_OVERRIDE=gtk2
# Ibus # Ibus
@ -51,14 +54,14 @@ export GTK_IM_MODULE=xim
export XMODIFIERS=@im=ibus export XMODIFIERS=@im=ibus
export QT_IM_MODULE=xim export QT_IM_MODULE=xim
# Node.js
export npm_config_prefix="$HOME/.node_modules"
# Go
export GOPATH=$HOME/go
# Adding folders to the PATH variable # Adding folders to the PATH variable
export PATH="${PATH}:${CARGO_HOME}/bin:${HOME}/bin:${npm_config_prefix}/bin:${GOPATH/}bin:${HOME}/.config/composer/vendor/bin" export PATH="${PATH}:${HOME}/.local/bin"
export PATH="${PATH}:${CARGO_HOME}/bin"
export PATH="${PATH}:${XDG_DATA_HOME}/npm/bin"
export PATH="${PATH}:${GOPATH}/bin"
export PATH="${PATH}:${GEM_HOME}/bin"
export PATH="${PATH}:${XDG_CONFIG_HOME}/composer/vendor/bin"
# Set bash prompt # Set bash prompt
set_bash_prompt() { set_bash_prompt() {

View file

@ -15,7 +15,7 @@
####################################### #######################################
# Directory variables # Directory variables
####################################### #######################################
DIR="$( cd "$(dirname "${BASH_SOURCE[0]}" )" && cd ../../ && pwd)" DIR="$( cd "$(dirname "${BASH_SOURCE[0]}" )" && cd ../../../ && pwd)"
SYSTEM_DIR="${DIR}/system" SYSTEM_DIR="${DIR}/system"
PACKAGES_DIR="${DIR}/packages" PACKAGES_DIR="${DIR}/packages"
@ -102,4 +102,4 @@ function enable_service() {
function copy_udev_rule() { function copy_udev_rule() {
print_log "Copying ${YELLOW}$(basename "${1}")${RESET} to ${YELLOW}/etc/udev/rules.d/${RESET}" print_log "Copying ${YELLOW}$(basename "${1}")${RESET} to ${YELLOW}/etc/udev/rules.d/${RESET}"
sudo cp "${1}" "/etc/udev/rules.d/" sudo cp "${1}" "/etc/udev/rules.d/"
} }