Some fundamental configuration files

This commit is contained in:
Daniel - 2018-07-15 09:47:03 +02:00
parent 21f134781f
commit f7f9c1b48b
Signed by: dbo
GPG Key ID: 4F63DB96D45AA9C6
8 changed files with 679 additions and 0 deletions

94
Xdefaults Normal file
View File

@ -0,0 +1,94 @@
!! drop in Solarized colorscheme for Xresources/Xdefaults
!!SOLARIZED HEX 16/8 TERMCOL XTERM/HEX L*A*B RGB HSB
!!--------- ------- ---- ------- ----------- ---------- ----------- -----------
!!base03 #002b36 8/4 brblack 234 #1c1c1c 15 -12 -12 0 43 54 193 100 21
!!base02 #073642 0/4 black 235 #262626 20 -12 -12 7 54 66 192 90 26
!!base01 #586e75 10/7 brgreen 240 #585858 45 -07 -07 88 110 117 194 25 46
!!base00 #657b83 11/7 bryellow 241 #626262 50 -07 -07 101 123 131 195 23 51
!!base0 #839496 12/6 brblue 244 #808080 60 -06 -03 131 148 150 186 13 59
!!base1 #93a1a1 14/4 brcyan 245 #8a8a8a 65 -05 -02 147 161 161 180 9 63
!!base2 #eee8d5 7/7 white 254 #e4e4e4 92 -00 10 238 232 213 44 11 93
!!base3 #fdf6e3 15/7 brwhite 230 #ffffd7 97 00 10 253 246 227 44 10 99
!!yellow #b58900 3/3 yellow 136 #af8700 60 10 65 181 137 0 45 100 71
!!orange #cb4b16 9/3 brred 166 #d75f00 50 50 55 203 75 22 18 89 80
!!red #dc322f 1/1 red 160 #d70000 50 65 45 220 50 47 1 79 86
!!magenta #d33682 5/5 magenta 125 #af005f 50 65 -05 211 54 130 331 74 83
!!violet #6c71c4 13/5 brmagenta 61 #5f5faf 50 15 -45 108 113 196 237 45 77
!!blue #268bd2 4/4 blue 33 #0087ff 55 -10 -45 38 139 210 205 82 82
!!cyan #2aa198 6/6 cyan 37 #00afaf 60 -35 -05 42 161 152 175 74 63
!!green #859900 2/2 green 64 #5f8700 60 -20 65 133 153 0 68 100 60
#define S_base03 #002b36
#define S_base02 #073642
#define S_base01 #586e75
#define S_base00 #657b83
#define S_base0 #839496
#define S_base1 #93a1a1
#define S_base2 #eee8d5
#define S_base3 #fdf6e3
#define S_yellow #b58900
#define S_orange #cb4b16
#define S_red #dc322f
#define S_magenta #d33682
#define S_violet #6c71c4
#define S_blue #268bd2
#define S_cyan #2aa198
#define S_green #859900
!! black dark/light
URxvt*color0: S_base02
URxvt*color8: S_base03
!! red dark/light
URxvt*color1: S_red
URxvt*color9: S_orange
!! green dark/light
URxvt*color2: S_green
URxvt*color10: S_base01
!! yellow dark/light
URxvt*color3: S_yellow
URxvt*color11: S_base00
!! blue dark/light
URxvt*color4: S_blue
URxvt*color12: S_base0
!! magenta dark/light
URxvt*color5: S_magenta
URxvt*color13: S_violet
!! cyan dark/light
URxvt*color6: S_cyan
URxvt*color14: S_base1
!! white dark/light
URxvt*color7: S_base2
URxvt*color15: S_base3
URxvt*background: S_base03
URxvt*foreground: S_base00
URxvt*fadeColor: S_base03
URxvt*cursorColor: S_base1
URxvt*pointerColorBackground:S_base01
URxvt*pointerColorForeground:S_base1
URxvt*scrollBar_right: false
URxvt*scrollBar: false
URxvt*transparent: false
URxvt*geometry: 84x24
URxvt*font: xft:DejaVu Sans Mono:pixelsize=14
URxvt*urgentOnBell: true
URxvt*visualBell: false
URxvt.iso14755: false
URxvt.iso14755_52: false
Xft.dpi: 96
Xft.antialias: 1
Xft.rgba: rgb
Xft.autohint: 0
Xft.lcdfilter: lcddefault
Xft.hinting: 1
Xft.hintstyle: hintfull

7
bash_profile Normal file
View File

@ -0,0 +1,7 @@
if [ -n "$PS1" -a "x$TERM" != "xdumb" -a "`zsh -c '[[ "a" =~ "a" ]] && echo 1' 2> /dev/null`" ]
then
exec zsh --login
fi
[[ -r ~/.bashrc ]] && . ~/.bashrc
[[ -r /etc/bashrc ]] && . /etc/bashrc

112
bashrc Normal file
View File

@ -0,0 +1,112 @@
# ~/.bashrc: executed by bash(1) for non-login shells.
# Based on example .bashrc as provided by Debian
# Set correct language environment
export LANG=en_US.UTF-8
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines in the history. See bash(1) for more options
# don't overwrite GNU Midnight Commander's setting of `ignorespace'.
HISTCONTROL=$HISTCONTROL${HISTCONTROL+:}ignoredups
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoreboth
# append to the history file, don't overwrite it
shopt -s histappend
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
# No clobbering
shopt -o -s noclobber
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize
# make less more friendly for non-text input files, see lesspipe(1)
#[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
fi
# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
xterm-color) color_prompt=yes;;
esac
# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
#force_color_prompt=yes
if [ -n "$force_color_prompt" ]; then
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
# We have color support; assume it's compliant with Ecma-48
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
# a case would tend to support setf rather than setaf.)
color_prompt=yes
else
color_prompt=
fi
fi
if [ "$color_prompt" = yes ]; then
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
else
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi
unset color_prompt force_color_prompt
# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
;;
*)
;;
esac
# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto'
#alias dir='dir --color=auto'
#alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
fi
# some more ls aliases
alias ll='ls -l'
alias la='ls -A'
alias l='ls -CF'
alias ..='cd ..'
# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
. /etc/bash_completion
fi
# custom path
export PATH=$HOME/.local/bin/:$PATH
# more keybindings
bind '"\ep": history-search-backward'
bind '"\en": history-search-forward'

53
tmux.conf Normal file
View File

@ -0,0 +1,53 @@
# General
set -g default-terminal screen-256color
set -g history-limit 100000
set -g lock-after-time 1800
set -g default-command "$SHELL"
set -g update-environment ""
setw -g base-index 1
setw -g pane-base-index 1
set -g renumber-windows on
set -g status on
setw -g monitor-activity off
set -g visual-activity off
set -g visual-bell off
setw -g xterm-keys off
setw -g automatic-rename off
set -sg escape-time 0
set -g history-limit 30000
# Key bindings
unbind C-b
set -g prefix C-a
bind a send-prefix
bind '"' split-window -c "#{pane_current_path}"
bind '%' split-window -h -c "#{pane_current_path}"
bind C-a last-window
bind -n C-S-Left previous-window
bind -n C-S-Right next-window
set -g status-keys emacs
bind r source ~/.tmux.conf
# Appearance
set -g status-bg default
set -g status-fg white
set -g status-left "#[fg=green]#H[#S] "
set -g status-left-length 13
set -g status-right " #[fg=yellow]"
setw -g window-status-current-bg default
setw -g window-status-current-fg red

30
vimrc Normal file
View File

@ -0,0 +1,30 @@
if filereadable("/etc/vim/vimrc")
so /etc/vim/vimrc
endif
set modeline
set showcmd
set showmatch
set shiftwidth=2
set nopaste
set expandtab
set autoindent
set number
syntax enable
set background=light
filetype plugin indent on
let g:tex_flavor = "latex"
let b:is_mzscheme = 1
set spellfile="~/.vim/spell"
map Q gq
imap jj <ESC>
let clj_highlight_builtins = 1
let clj_highlight_contrib = 1
let clj_want_gorilla = 1

116
xmonad/xmonad.hs Normal file
View File

@ -0,0 +1,116 @@
-- Based on:
-- xmonad-0.7 config-mmarx
-- (c) 2008 Maximilian Marx
module Main where
import System.Exit (exitSuccess)
import Data.Map (Map)
import XMonad hiding ((|||))
import XMonad.Layout.NoBorders (smartBorders)
import XMonad.Layout.Grid (Grid(..))
import XMonad.Layout.LayoutCombinators (JumpToLayout(..), (|||))
import XMonad.Layout.MultiColumns (multiCol)
import XMonad.Layout.TwoPane (TwoPane(..))
import XMonad.Hooks.EwmhDesktops (ewmh, fullscreenEventHook)
import XMonad.Hooks.ManageDocks (manageDocks, docks, avoidStruts)
import XMonad.Hooks.UrgencyHook (focusUrgent)
import XMonad.Hooks.ManageHelpers (isFullscreen, doFullFloat)
import XMonad.Util.EZConfig (mkKeymap)
import XMonad.Actions.FindEmptyWorkspace (viewEmptyWorkspace, tagToEmptyWorkspace)
import XMonad.Actions.GridSelect (goToSelected)
import XMonad.Actions.PhysicalScreens (viewScreen, sendToScreen)
import System.Taffybar.Hooks.PagerHints (pagerHints)
import qualified XMonad.StackSet as W
main :: IO ()
main = xmonad $
docks $
ewmh $
pagerHints $ -- pass information to taffybar
def {
terminal = "urxvtcd"
, normalBorderColor = "#cccccc"
, focusedBorderColor = "#2342ff"
, keys = keyMap
, manageHook = composeAll [ manageHook def
, manageDocks
, isFullscreen --> doFullFloat
]
, layoutHook = layout
, handleEventHook = handleEventHook def <+> fullscreenEventHook
, modMask = mod4Mask
, workspaces = workSpaces
, focusFollowsMouse = False
, clickJustFocuses = False
}
workSpaces :: [String]
workSpaces = map show ([1 .. 9] :: [Integer])
layout = smartBorders $ avoidStruts (tall ||| Mirror tall ||| Full ||| Grid ||| twoPane ||| twoCols)
where twoPane = TwoPane (3/100) (1/2)
tall = Tall 1 (3/100) (1/2)
twoCols = multiCol [1] 0 (3/100) (1/2)
keyMap :: XConfig l -> Map (KeyMask, KeySym) (X ())
keyMap c = mkKeymap c $
[ ("M-S-<Return>" , spawn $ XMonad.terminal c)
, ("M-c" , kill)
, ("M-<Space>" , sendMessage NextLayout)
, ("M-n" , refresh)
, ("M-p" , spawn "dmenu_run")
, ("M-S-x" , spawn "xtrlock")
, ("M-e" , spawn "emacsclient -a \"\" -c")
, ("M-k" , windows W.focusUp)
, ("M-j" , windows W.focusDown)
, ("M-m" , viewEmptyWorkspace)
, ("M-S-m" , tagToEmptyWorkspace)
, ("M-S-k" , windows W.swapUp)
, ("M-S-j" , windows W.swapDown)
, ("M-<Return>" , windows W.swapMaster)
, ("M-q" , broadcastMessage ReleaseResources >> restart "xmonad" True)
, ("M-S-q" , io exitSuccess)
, ("M-g" , focusUrgent)
, ("M-t" , withFocused $ windows . W.sink)
, ("M-S-g" , goToSelected def)
, ("M-h" , sendMessage Shrink)
, ("M-i" , sendMessage Expand)
, ("M-v" , spawn "xwit -current -warp 10000 10000") -- move cursor away
, ("M-," , viewScreen 0)
, ("M-." , viewScreen 1)
, ("M-S-," , sendToScreen 0)
, ("M-S-." , sendToScreen 1)
, ("<XF86ScreenSaver>" , spawn "xtrlock")
]
++
[ layoutMap k l
| (k, l) <- [ ("f", "Full")
, ("g", "Grid")
, ("d", "Tall")
, ("2", "TwoPane")
, ("c", "MultiCol")
]]
++
[(m ++ k, windows $ f w)
| (w, k) <- zip (XMonad.workspaces c) (map show ([1..9] :: [Integer])),
(m, f) <- [("M-",W.greedyView), ("M-S-",W.shift)]]
++
[ ("<XF86AudioPlay>", spawn "exec emacsclient -n -e '(emms-pause)'")
, ("<XF86AudioNext>", spawn "exec emacsclient -n -e '(emms-next)'")
, ("<XF86AudioPrev>", spawn "exec emacsclient -n -e '(emms-previous)'")
, ("<XF86AudioStop>", spawn "exec emacsclient -n -e '(emms-stop)'")
]
++
[ ("M-a " ++ k, spawn $ "exec emacsclient -ne '(db/emacsclient-key \"" ++ k ++ "\")'")
| k <- ["w", "o", "b", "h", "p", "c", "1", "2", "l", "d"] ]
where
layoutMap k l = ("M-l M-" ++ k, sendMessage $ JumpToLayout (l :: String))

79
zprofile Normal file
View File

@ -0,0 +1,79 @@
# General
if [[ -x "/usr/bin/zsh" ]]; then
SHELL=/usr/bin/zsh
elif [[ -x "/bin/zsh" ]]; then
SHELL=/bin/zsh
else
SHELL=/bin/bash
fi
export SHELL
umask 077
export LANG="en_US.utf8"
unset LC_ALL
export TZ=Europe/Berlin
# Environment Variables
export EDITOR="emacsclient -c -a \"\""
export BROWSER="emacsclient -c -a \"\""
export COLORTERM="yes"
export EXTENDED_GLOB=1
# less
LESS=""
# --raw-control-chars
LESS+="r"
# --search-skip-screen
# LESS+="a"
# --CLEAR-SCREEN
LESS+="C"
# --hilite-search
LESS+="g"
# --ignore-case
LESS+="i"
# --status-column
LESS+="J"
# --LONG-PROMPT
LESS+="M"
# --RAW-CONTROL-CHARS
LESS+="R"
# --hilite-search
LESS+="g"
# --shift
LESS+="#5$"
export LESS
eval "$(lesspipe)"
export HISTSIZE=1000
export SAVEHIST=1000
export HIST_IGNORE_ALL_DUPS=1
export HISTFILE=~/.zsh_history
export PYTHONSTARTUP="${HOME}/.pythonrc"
export WORKON_HOME=${HOME}/.local/share/virtualenvs/
export PKG_CONFIG_PATH=$HOME/.local/lib/pkgconfig/
export LD_LIBRARY_PATH=$HOME/.local/lib/
export TEXMFHOME=$HOME/Documents/texmf
export TEXMFOUTPUT=/tmp
export _JAVA_AWT_WM_NONREPARENTING=1
export PERL5LIB="/home/exot/.local/share/perl5/lib/perl5"
export PERL_LOCAL_LIB_ROOT="/home/exot/.local/share/perl5/"
export PERL_MB_OPT="--install_base \"/home/exot/.local/share/perl5/\""
export PERL_MM_OPT="INSTALL_BASE=/home/exot/.local/share/perl5/"
export PATH="/home/exot/.local/share/perl5/bin:${HOME}/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/usr/local/bin:/usr/sbin:/sbin:/usr/local/sbin"
export MANPATH="${PERL_LOCAL_LIB_ROOT}/man:${HOME}/.local/share/man:/usr/share/man"
export INFOPATH="/usr/share/info:${HOME}/.local/share/info/"
export SSH_AGENT_PID=`systemctl show --user ssh-agent.service -p MainPID --value`
export SSH_AUTH_SOCK=/run/user/${UID}/ssh-agent.socket

188
zshrc Normal file
View File

@ -0,0 +1,188 @@
# Prompt
enable -r repeat
setopt no_beep
setopt no_clobber
bindkey -e
setopt hash_list_all
setopt extended_glob
setopt autopushd
export DIRSTACKSIZE=30
alias d='dirs -v'
autoload colors ; colors
hostfg=$color[fg-white]
hostbg=$color[bg-black]
setopt prompt_subst
autoload -Uz vcs_info
zstyle ':vcs_info:*' actionformats \
'%F{5}(%f%s%F{5})%F{3}-%F{5}[%F{2}%b%F{3}|%F{1}%a%F{5}]%f '
zstyle ':vcs_info:*' formats \
'%F{5}(%f%s%F{5})%F{3}-%F{5}[%F{2}%b%F{5}]%f '
zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat '%b%F{1}:%F{3}%r'
zstyle ':vcs_info:*' enable git svn hg
autoload -Uz add-zsh-hook
add-zsh-hook precmd vcs_info
VCS='${vcs_info_msg_0_}%f'
RETURN_CODE="%0(?..[%{$fg[red]%}%B%?%b] )"
WHOAMI="%{$fg[$hostfg]$bg[$hostbg]%}[%n@%m]"
DATE="%{$fg[blue]$bg[$hostbg]%}[%D{%Y-%m-%d %H:%M:%S}]"
CWD="%{$fg[red]%}[%3~]"
JOBS="%1(j. %{$fg[green]%}[%j].)"
export PS1="$RETURN_CODE$WHOAMI $CWD $VCS$JOBS%b
└── "
unset hostfg hostbg
# Terminal
case "$TERM" in
"dumb")
unsetopt zle
unsetopt prompt_cr
export PS1="%n@%m:%c\$ "
;;
"rxvt-256color")
export TERM=rxvt-unicode-256color
;;
"screen")
export TERM=screen-256color
;;
esac
# Screen Title
termtitle() {
local title
title="$*"
case "${TERM}" in
screen*)
echo -en "\033k${title}\033\\"
;;
xterm|rxvt*)
echo -en "\033]2;${title}\a"
;;
esac
}
preexec() {
last_command="$1"
if [[ "${TERM}" =~ "screen*" ]] ; then
termtitle "${last_command}"
fi
}
if [[ ! "${TERM}" =~ "screen*" ]] ; then
termtitle "${USER}@${HOST}"
fi
precmd() {
last_ret=$?
if [[ "${TERM}" =~ "screen*" ]] ; then
if [[ ${last_ret} -eq 0 ]] ; then
termtitle "[${last_command}]"
else
termtitle "[${last_ret} ${last_command}]"
fi
fi
}
# if no command is running set screen title to ($PWD)
chpwd() {
if [[ "${TERM}" =~ "screen*" ]] ; then
last_command="${PWD}"
fi
}
last_command=$0
# Completion
fpath=(~/.config/zsh/completion $fpath)
autoload -Uz compinit
compinit
zmodload -i zsh/complist
compctl -g '*(-/)' + -g '.*(/)' cd chdir dirs pushd rmdir dircmp cl
zstyle ':completion:*:correct:*' original true
zstyle ':completion:*:correct:*' insert-unambiguous false
zstyle ':completion:*' completer _complete _correct _approximate
zstyle ':completion:*' glob true
zstyle ':completion:*' verbose yes
zstyle ':completion:*' menu select
zstyle ':completion:*' format 'Completing %d'
zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s%p
zstyle ':completion:*:corrections' format $'%{\e[0;31m%}%d (errors: %e)%{\e[0m%}'
zstyle ':completion:*:descriptions' format $'%{\e[0;31m%}%d%{\e[0m%}'
zstyle ':completion:*:messages' format $'%{\e[0;31m%}%d%{\e[0m%}'
zstyle ':completion:*:warnings' format $'%{\e[0;31m%}No matches for: %d%{\e[0m%}'
zstyle ':completion:*' group-name ''
zstyle -e ':completion:*:approximate:*' max-errors \
'reply=( $(( ($#PREFIX+$#SUFFIX)/3 )) numeric )'
zstyle ':completion:*' list-colors ''
zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
# Convenience
do-startx() {
startx $@ >| ~/.xsession-log 2>&1 &
sleep 1
vlock
}
function new-ssh-key() {
rm -f ~/.ssh/$1 ~/.ssh/$1.pub
ssh-keygen -b 4096 -f ~/.ssh/$1
cat ~/.ssh/$1.pub | ssh $1 'cat > ~/.ssh/authorized_keys'
}
# Aliases
if ls --version | grep -q coreutils ; then
LS_COLORS=`dircolors -b | cut -s -d= -f2- | sed -e "s/'\(.*\)';/\1/"`
LS_OPTIONS+="--color=auto"
LS_OPTIONS+="--file-type"
alias ls='ls --color=auto'
fi
alias ll='ls -l'
alias la='ls -al'
alias l='ls -a'
alias rm="rm -i"
alias mv="mv -i"
alias cp='cp -i'
alias ..='cd ..'
alias vi='vim -X -u ~/.vimrc'
alias vim='vim -X -u ~/.vimrc'
alias ec='emacsclient -c'
alias emacs="emacs --no-site-file"
alias nop="nopaste-it -u http://icore.bomuknu.de/paste/"
alias dquilt="quilt --quiltrc=${HOME}/.quiltrc-dpkg"
alias sbcl="sbcl --noinform"
alias grep="grep --color=auto --binary-files=without-match --exclude=.svn"
# Utility functions
function encode-with-ffmpeg () {
$movie = $1
$output = $2
ffmpeg -y -i $movie -c:v libx264 -preset veryslow -b:v 630k -pass 1 -c:a aac -b:a 128k -f mp4 /dev/null && \
ffmpeg -i $movie -c:v libx264 -preset veryslow -b:v 630k -pass 2 -c:a aac -b:a 128k $output
}