More config cleanup
Signed-off-by: Severin Kaderli <severin.kaderli@gmail.com>
This commit is contained in:
parent
005c4f29b6
commit
8d3f9c8a1d
22 changed files with 44 additions and 27 deletions
|
@ -7,7 +7,7 @@ before_script:
|
|||
|
||||
Lint:
|
||||
script:
|
||||
- shellcheck ./system/bin/*
|
||||
- shellcheck ./system/.local/bin/*
|
||||
- shellcheck ./system/.aliases
|
||||
- shellcheck ./system/.bash_logout
|
||||
- shellcheck ./system/.bash_profile
|
||||
|
|
|
@ -98,7 +98,7 @@ This folder contains my configuration for the X-Server.
|
|||
### `.config/Trolltech.conf`
|
||||
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
|
||||
Polybar or i3 and others are used directly and some like `utils.sh` contain
|
||||
functions that I use in other scripts.
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#
|
||||
# USAGE:
|
||||
# ./install.sh
|
||||
. ./system/bin/utils.sh
|
||||
. ./system/.local/bin/utils.sh
|
||||
|
||||
#######################################
|
||||
# Configuration variables
|
||||
|
@ -47,6 +47,7 @@ LINKED_FILES_HOME=(
|
|||
".config/httpie"
|
||||
".config/i3"
|
||||
".config/mpv"
|
||||
".config/npm"
|
||||
".config/polybar"
|
||||
".config/redshift"
|
||||
".config/streamlink"
|
||||
|
@ -57,7 +58,7 @@ LINKED_FILES_HOME=(
|
|||
".config/wget"
|
||||
".config/X11"
|
||||
".env"
|
||||
"bin"
|
||||
".local/bin"
|
||||
)
|
||||
|
||||
# Groups the user should be added to
|
||||
|
@ -102,7 +103,7 @@ do
|
|||
done
|
||||
|
||||
print_header "Give permissions"
|
||||
set_permission severin 744 "${HOME}/bin"
|
||||
set_permission severin 744 "${XDG_BIN_HOME}"
|
||||
|
||||
print_header "Add user to groups"
|
||||
for group in "${ADD_GROUPS[@]}"
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#
|
||||
# USAGE:
|
||||
# ./post-install.sh
|
||||
. ./system/bin/utils.sh
|
||||
. ./system/.local/bin/utils.sh
|
||||
|
||||
#######################################
|
||||
# Configuration variables
|
||||
|
|
|
@ -31,7 +31,10 @@ alias pj="cd ~/Projects"
|
|||
alias e="code"
|
||||
|
||||
# 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 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"'
|
|
@ -17,6 +17,12 @@ shopt -s histappend
|
|||
shopt -s checkwinsize
|
||||
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
|
||||
if [ -f "${HOME}/.env" ]; then
|
||||
. "${HOME}/.env"
|
||||
|
|
|
@ -31,4 +31,4 @@ xrdb -merge "${XDG_CONFIG_HOME}/X11/xresources"
|
|||
# Start ibus
|
||||
#ibus-daemon -drx
|
||||
|
||||
. "${HOME}/bin/resolution.sh"
|
||||
. "${XDG_BIN_HOME}/resolution.sh"
|
||||
|
|
4
system/.config/npm/config
Normal file
4
system/.config/npm/config
Normal 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
|
|
@ -239,7 +239,7 @@ label = %output%
|
|||
|
||||
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]
|
||||
type = custom/script
|
||||
exec = $HOME/bin/music.sh
|
||||
exec = ${XDG_BIN_HOME}/music.sh
|
||||
|
||||
format = <label>
|
||||
label = %output%
|
||||
|
|
29
system/.env
29
system/.env
|
@ -11,12 +11,7 @@
|
|||
#
|
||||
# USAGE:
|
||||
# This script is sourced by .bashrc
|
||||
. "${HOME}/bin/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_BIN_HOME}/utils.sh"
|
||||
|
||||
# XDG Overrides for unsupported programs
|
||||
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 XINITRC="${XDG_CONFIG_HOME}/X11/xinitrc"
|
||||
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
|
||||
export HISTCONTROL=ignoreboth
|
||||
|
@ -43,7 +46,7 @@ export EDITOR="$VISUAL"
|
|||
export TERMINAL=termite
|
||||
|
||||
# QT
|
||||
export T_QPA_PLATFORMTHEME=gtk2
|
||||
export QT_QPA_PLATFORMTHEME=gtk2
|
||||
export QT_STYLE_OVERRIDE=gtk2
|
||||
|
||||
# Ibus
|
||||
|
@ -51,14 +54,14 @@ export GTK_IM_MODULE=xim
|
|||
export XMODIFIERS=@im=ibus
|
||||
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
|
||||
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() {
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#######################################
|
||||
# Directory variables
|
||||
#######################################
|
||||
DIR="$( cd "$(dirname "${BASH_SOURCE[0]}" )" && cd ../../ && pwd)"
|
||||
DIR="$( cd "$(dirname "${BASH_SOURCE[0]}" )" && cd ../../../ && pwd)"
|
||||
SYSTEM_DIR="${DIR}/system"
|
||||
PACKAGES_DIR="${DIR}/packages"
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue