initial commit

This commit is contained in:
Felix Buehler 2017-01-26 13:48:55 +01:00
commit 86a1da2632
35 changed files with 1162 additions and 0 deletions

13
.gitmodules vendored Normal file
View file

@ -0,0 +1,13 @@
[submodule "dotbot"]
path = dotbot
url = https://github.com/anishathalye/dotbot
[submodule "vim/wuman-vimrc"]
path = vim/wuman-vimrc
url = https://github.com/wuman/vimrc
ignore = dirty
[submodule "git/diff-so-fancy"]
path = git/diff-so-fancy
url = https://github.com/so-fancy/diff-so-fancy
[submodule "bash/liquidprompt"]
path = bash/liquidprompt
url = https://github.com/nojhan/liquidprompt

21
README.md Normal file
View file

@ -0,0 +1,21 @@
# my personal dotfiles
These are my personal dotfiles. Free for personal use. Thanks to @bebehei
# My configured software
* i3 (window manager)
* lockscreen support and autolock after idle
* multi-monitor-setup via xmon
* vim
* forked off [vimrc](https://github.com/bebehei/vimrc/)
* NerdTree, autocompletion
* colored
* [git diff integration](https://github.com/mhinz/vim-signify)
* bash
* keychain for automatic encryption of SSH-Keys
* [liquidprompt](https://github.com/nojhan/liquidprompt)
* small configuration for programs like:
* wget
* git
* top

25
bash/bashrc Executable file
View file

@ -0,0 +1,25 @@
#!/bin/bash
shopt -s autocd
shopt -s checkwinsize
export HISTFILESIZE=5000
export HISTCONTROL=ignoreboth
#show colored man-pages
export LESS_TERMCAP_mb=$'\E[01;31m'
export LESS_TERMCAP_md=$'\E[01;36m'
export LESS_TERMCAP_me=$'\E[0m'
export LESS_TERMCAP_se=$'\E[0m'
export LESS_TERMCAP_so=$'\E[01;44;33m'
export LESS_TERMCAP_ue=$'\E[0m'
export LESS_TERMCAP_us=$'\E[01;32m'
alias reload=". ~/.bashrc"
# Bind PageUp and PageDown to history search
if [ -n "$BASH_VERSION" -a -n "$PS1" ]; then
bind '"\e[5~": history-search-backward'
bind '"\e[6~": history-search-forward'
fi
source ~/.profile.d/load

1
bash/liquidprompt Submodule

@ -0,0 +1 @@
Subproject commit 5ee3c53cbbc95b5288fe5baf5a3c5b21d2a7212d

21
bin/host-is-on.sh Executable file
View file

@ -0,0 +1,21 @@
#!/bin/sh
if [ $# -eq 0 ]; then
echo "No host given!" >&2
exit 1
fi
# repeat a notification if the host is not online after this amount of seconds yet
waiting=30
count=0
while ! ping -W 1 -w 1 -c 1 $1 2>&1 >/dev/null; do
sleep 1
count=$(( $count + 1))
if [ $count -gt $waiting ]; then
count=0
notify-send -i network-transmit "Host wait" "Still waiting for host '$1'."
fi
done
notify-send -i network-transmit-receive "Host online!" "Host '$1' is now online!!!"

9
bin/mdo.sh Executable file
View file

@ -0,0 +1,9 @@
#!/bin/sh
# open a Markdown document in your browser directly
# mdo => markdown open
# e.g. preview the markdown in vim:
# :!mdo %
$BROWSER "data:text/html;base64,`markdown $* | base64 -w 0`"

1
dotbot Submodule

@ -0,0 +1 @@
Subproject commit 847cb101d486319da882f958b1cb58b515cc6db2

1
git/diff-so-fancy Submodule

@ -0,0 +1 @@
Subproject commit 9d20ab07bf1242d7e1a5d4fcd68bc58e4dcc73ef

45
git/gitconfig Normal file
View file

@ -0,0 +1,45 @@
[color]
diff = auto
status = auto
branch = auto
ui = true
[user]
name = Felix Buehler
email = felix@buehler.rocks
[merge]
defaultToUpstream = true
tool = vimdiff
template = ~/.git/review-template
[core]
editor = vim
eol = native
pager = diff-highlight | diff-so-fancy | less --tabs=1,5 -R
[alias]
ct = log --graph --decorate --pretty=oneline --abbrev-commit
committree = log --graph --decorate --pretty=oneline --abbrev-commit
d = difftool
[rerere]
enabled = true
[branch]
autoSetupMerge = always
[remote "origin"]
fetch = +refs/pull/*/head:refs/remotes/origin/pull/*
fetch = +refs/heads/*:refs/remotes/origin/*
[remote "upstream"]
fetch = +refs/pull/*/head:refs/remotes/upstream/pull/*
fetch = +refs/heads/*:refs/remotes/upstream/*
[diff]
tool = vimdiff
[difftool]
prompt = false
[color "diff-highlight"]
oldNormal = red bold
oldHighlight = red bold 52
newNormal = green bold
newHighlight = green bold 22
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
required = true
[credential]
helper = /usr/lib/git-core/git-credential-gnome-keyring

63
i3/Xresources Normal file
View file

@ -0,0 +1,63 @@
xterm*selectToClipboard: true
xterm*faceName: Source Code Pro:size=10
xterm*font: 8x13
xterm*saveLines: 4096
xterm*locale: true
xterm*termName: xterm-256color
xterm*borderWidth: 0
xterm*scrollTtyOutput: false
xterm*scrollKey: true
XTerm*VT100.AutoWrap: true
xterm*allowWindowOps: true
XTerm*VT100.utf8Title: true
! http://unix.stackexchange.com/questions/227701/how-to-use-ctrl-insert-to-copy-from-xterm
XTerm*VT100.Translations: #override\n\
Shift Ctrl <KeyPress> v: insert-selection(CLIPBOARD)\n\
Shift Ctrl <KeyPress> c: copy-selection(CLIPBOARD)\n
! Color definition
#define COLOR_THEME_FG #E0E0E0
#define COLOR_THEME_BG #080808
! Colours stolen from user 'Barrucadu' in the ArchLinux Thread:
! https://bbs.archlinux.org/viewtopic.php?pid=652678#p652678
#define COLOR_THEME_BLACK #202426
#define COLOR_THEME_DARK_RED #B80000
#define COLOR_THEME_DARK_GREEN #04822A
#define COLOR_THEME_DARK_YELLOW #804400
#define COLOR_THEME_DARK_BLUE #193B6B
#define COLOR_THEME_DARK_MAGENTA #5C3F61
#define COLOR_THEME_DARK_CYAN #036466
#define COLOR_THEME_DARK_GREY #555753
#define COLOR_THEME_LIGHT_GREY #D7D4D7
#define COLOR_THEME_LIGHT_RED #E62727
#define COLOR_THEME_LIGHT_GREEN #23994A
#define COLOR_THEME_LIGHT_YELLOW #D77200
#define COLOR_THEME_LIGHT_BLUE #547599
#define COLOR_THEME_LIGHT_MAGENTA #946D90
#define COLOR_THEME_LIGHT_CYAN #059799
#define COLOR_THEME_WHITE #EBE8EB
*color0: COLOR_THEME_BLACK
*color8: COLOR_THEME_DARK_GREY
*color1: COLOR_THEME_DARK_RED
*color9: COLOR_THEME_LIGHT_RED
*color2: COLOR_THEME_DARK_GREEN
*color10: COLOR_THEME_LIGHT_GREEN
*color3: COLOR_THEME_DARK_YELLOW
*color11: COLOR_THEME_LIGHT_YELLOW
*color4: COLOR_THEME_DARK_BLUE
*color12: COLOR_THEME_LIGHT_BLUE
*color5: COLOR_THEME_DARK_MAGENTA
*color13: COLOR_THEME_LIGHT_MAGENTA
*color6: COLOR_THEME_DARK_CYAN
*color14: COLOR_THEME_LIGHT_CYAN
*color7: COLOR_THEME_LIGHT_GREY
*color15: COLOR_THEME_WHITE
*foreground: COLOR_THEME_FG
*background: COLOR_THEME_BG

7
i3/checknofullscreen.sh Executable file
View file

@ -0,0 +1,7 @@
#! /bin/bash
FOCUSED=$(xprop -root _NET_ACTIVE_WINDOW | awk -F' ' '{print $NF}')
if xprop -id ${FOCUSED} _NET_WM_STATE | grep -q _NET_WM_STATE_FULLSCREEN; then
exit 1
else
exit 0
fi

229
i3/i3config Normal file
View file

@ -0,0 +1,229 @@
set $mod Mod4
floating_modifier $mod
exec setxkbmap de -option ctrl:nocaps
exec --no-startup-id xsetroot -solid "#2F343F"
# startup programs:
#exec --no-startup-id hsetroot -center ~/.wallpaper
exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
exec --no-startup-id nm-applet
exec --no-startup-id gnome-keyring-daemon
exec --no-startup-id /usr/bin/feedreader-daemon
exec --no-startup-id ~/.local/bin/xmon default
exec --no-startup-id ~/.local/bin/lockscreen -d
exec --no-startup-id albert
exec --no-startup-id owncloud
exec --no-startup-id seafile-applet
exec --no-startup-id telegram-desktop -startintray
exec --no-startup-id redshift-gtk
exec --no-startup-id rhythmbox
exec --no-startup-id firefox
font pango:Fira Sans Mono 12
##Various
assign [class="Evolution"] 9
for_window [class="Evolution"] move workspace 9
assign [class="Rhythmbox"] 10
for_window [class="Rhythmbox"] move workspace 10
hide_edge_borders both
focus_follows_mouse no
# to switch workspace-tabs
bindsym $mod+Tab workspace next
bindsym Shift+$mod+Tab workspace prev
bindsym $mod+m exec keepassx2
bindsym $mod+e exec subl3
bindsym $mod+w exec firefox
# ESP8266
bindsym $mod+F1 exec curl http://esp8266/socket0Toggle || curl http://home.stunkymonkey.de:61611/socket0Toggle
bindsym $mod+Shift+F1 exec curl http://esp8266/socket0Off || curl http://home.stunkymonkey.de:61611/socket0Off
# Screenshot
bindsym Print exec "scrot ~/Downloads/Screenshot%Y-%m-%d-%H:%M:%S.png -z"
# forward an backward at arrow-keys
bindsym --release XF86Back exec --no-startup-id xdotool key --clearmodifiers Ctrl+Page_Up
bindsym --release XF86Forward exec --no-startup-id xdotool key --clearmodifiers Ctrl+Page_Down
set $bg-color #2F343F
set $inactive-bg-color #2F343F
set $text-color #F3F4F5
set $inactive-text-color #676E7D
set $urgent-bg-color #E53935
set $indicator-color #00FF00
set $workspace-color #5294E2
set $inactive-workspace #2F343F
set $seperator-color #666666
set $ws-text-color #FFFFFF
set $ws-inactive-text-color #D3DAE3
# window colors
client.focused $bg-color $bg-color $text-color $indicator-color
client.unfocused $inactive-bg-color $inactive-bg-color $inactive-text-color $indicator-color
client.focused_inactive $inactive-bg-color $inactive-bg-color $inactive-text-color $indicator-color
client.urgent $urgent-bg-color $urgent-bg-color $text-color $indicator-color
bar {
status_command i3status
position top
workspace_buttons yes
colors {
background $bg-color
statusline $ws-inactive-text-color
separator $seperator-color
focused_workspace $workspace-color $workspace-color $ws-text-color
active_workspace $inactive-workspace $inactive-workspace $ws-inactive-text-color
inactive_workspace $inactive-workspace $inactive-workspace $ws-inactive-text-color
urgent_workspace $urgent-bg-color $urgent-bg-color $ws-text-color
}
}
# Sreen brightness controls
#increase screen brightness
bindsym XF86MonBrightnessUp exec xbacklight -inc 10
#decrease screen brightness
bindsym XF86MonBrightnessDown exec xbacklight -dec 10
# Touchpad controls
#bindsym XF86TouchpadToggle exec /some/path/toggletouchpad.sh # toggle touchpad
# Pulse Audio controls
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 0 +5% #increase sound volume
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 0 -5% #decrease sound volume
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 0 toggle # mute sound
# Media player controls
bindsym XF86AudioPlay exec dbus-send --type=method_call --dest=org.mpris.MediaPlayer2.rhythmbox /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause
bindsym XF86AudioPause exec dbus-send --type=method_call --dest=org.mpris.MediaPlayer2.rhythmbox /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause
bindsym XF86AudioNext exec dbus-send --type=method_call --dest=org.mpris.MediaPlayer2.rhythmbox /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next
bindsym XF86AudioPrev exec dbus-send --type=method_call --dest=org.mpris.MediaPlayer2.rhythmbox /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous
# Microphone
bindsym XF86AudioMicMute exec pulseaudio-ctl mute-input #toggle
##firefox bughelper
bindsym $mod+^ floating toggle; floating toggle;
# main commands
bindsym $mod+Shift+c reload
bindsym $mod+Shift+r restart
bindsym $mod+Shift+e exit
# start a terminal
bindsym $mod+Return exec i3-sensible-terminal
# screensaver
bindsym $mod+z exec ~/.local/bin/lockscreen -fl
bindsym $mod+y exec ~/.local/bin/lockscreen -fl
# start dmenu (a program launcher)
bindsym $mod+x exec --no-startup-id i3-dmenu-desktop --entry-type=command
bindsym $mod+d exec --no-startup-id albert && albert show
# kill focused window
bindsym $mod+Shift+q kill
# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen toggle
bindsym $mod+g fullscreen global
# change layouts
bindsym $mod+b split h
bindsym $mod+v split v
bindsym $mod+c layout toggle split
#bindsym $mod+z layout stacking
#bindsym $mod+t layout tabbed
# toggle tiling / floating
bindsym $mod+Shift+space floating toggle
#bindsym $mod+space focus mode_toggle
# focus the child container
bindsym $mod+s focus child
# focus the parent container
bindsym $mod+a focus parent
bindsym Mod1+Left move workspace to output left
bindsym Mod1+Right move workspace to output right
bindsym Mod1+Up move workspace to output up
bindsym Mod1+Down move workspace to output down
# switch to workspace
bindsym $mod+1 workspace 1
bindsym $mod+2 workspace 2
bindsym $mod+3 workspace 3
bindsym $mod+4 workspace 4
bindsym $mod+5 workspace 5
bindsym $mod+6 workspace 6
bindsym $mod+7 workspace 7
bindsym $mod+8 workspace 8
bindsym $mod+9 workspace 9
bindsym $mod+0 workspace 10
# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace 1
bindsym $mod+Shift+2 move container to workspace 2
bindsym $mod+Shift+3 move container to workspace 3
bindsym $mod+Shift+4 move container to workspace 4
bindsym $mod+Shift+5 move container to workspace 5
bindsym $mod+Shift+6 move container to workspace 6
bindsym $mod+Shift+7 move container to workspace 7
bindsym $mod+Shift+8 move container to workspace 8
bindsym $mod+Shift+9 move container to workspace 9
bindsym $mod+Shift+0 move container to workspace 10
# move windows to workspace and switch to it
bindsym Ctrl+1 move container to workspace 1; workspace 1
bindsym Ctrl+2 move container to workspace 2; workspace 2
bindsym Ctrl+3 move container to workspace 3; workspace 3
bindsym Ctrl+4 move container to workspace 4; workspace 4
bindsym Ctrl+5 move container to workspace 5; workspace 5
bindsym Ctrl+6 move container to workspace 6; workspace 6
bindsym Ctrl+7 move container to workspace 7; workspace 7
bindsym Ctrl+8 move container to workspace 8; workspace 8
bindsym Ctrl+9 move container to workspace 9; workspace 9
# for settings the zoom-level back to default in firefox
#bindsym Ctrl+0 move container to workspace 10; workspace 10
bindsym $mod+n exec i3-input -F 'rename workspace to "%s"' -P 'New name: '
#FOCUS
bindsym $mod+h focus left
bindsym $mod+j focus down
bindsym $mod+k focus up
bindsym $mod+l focus right
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# move focused window
bindsym $mod+Shift+h move left
bindsym $mod+Shift+j move down
bindsym $mod+Shift+k move up
bindsym $mod+Shift+l move right
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
# resize window (you can also use the mouse for that)
mode "resize" {
bindsym h resize shrink width 10 px or 10 ppt
bindsym j resize shrink height 10 px or 10 ppt
bindsym k resize grow height 10 px or 10 ppt
bindsym l resize grow width 10 px or 10 ppt
bindsym Left resize shrink width 10 px or 10 ppt
bindsym Up resize grow height 10 px or 10 ppt
bindsym Down resize shrink height 10 px or 10 ppt
bindsym Right resize grow width 10 px or 10 ppt
bindsym Return mode "default"
bindsym Escape mode "default"
bindsym $mod+r mode "default"
}
bindsym $mod+r mode "resize"

77
i3/i3status Normal file
View file

@ -0,0 +1,77 @@
general {
output_format = "i3bar"
colors = true
interval = 2
color_good = "#60FF60"
color_degraded = "#FFFF60"
color_bad = "#FF6060"
}
order += "disk /"
order += "disk /home"
order += "ipv6"
order += "wireless wlp3s0"
order += "ethernet enp0s25"
order += "cpu_usage"
order += "volume master"
order += "battery 0"
order += "time"
time {
format = "%a %d.%m.%Y %H:%M:%S"
}
disk "/" {
format = " %avail"
low_threshold = 10
threshold_type = percentage_free
}
disk "/home" {
format = " %avail"
low_threshold = 10
threshold_type = percentage_free
}
volume master {
format = " %volume"
format_muted = ""
device = "default"
mixer = "Master"
}
ipv6 {
format_up = "v6"
#format_up = "%ip"
format_down = "v6"
}
wireless wlp3s0 {
format_up = "( %quality  %essid  %bitrate) %ip"
format_down = ""
}
ethernet enp0s25 {
format_up = "( %speed) %ip"
format_down = ""
}
battery 0 {
format = "%status %percentage %remaining %emptytime"
format_down = "No battery"
status_chr = ""
status_bat = ""
status_full = ""
hide_seconds = true
integer_battery_capacity = true
last_full_capacity = true
path = "/sys/class/power_supply/BAT%d/uevent"
low_threshold = 10
threshold_type = percentage
}
cpu_usage {
format = " %usage"
}

5
i3/locknow.sh Executable file
View file

@ -0,0 +1,5 @@
#!/usr/bin/bash
xautolock -enable
sleep 1
xautolock -locknow

92
i3/lockscreen.sh Executable file
View file

@ -0,0 +1,92 @@
#!/usr/bin/bash
[ -f "~/.lockvars" ] && [ -r "~/.lockvars" ] && . ~/.lockvars
LOCK_TIME=${LOCK_TIME:-3}
LOCK_NOTIFY_TIME=${LOCK_NOTIFY_TIME:-15}
PROGNAME=$(basename $0)
OUTPUT_IMAGE="/tmp/i3lock.png"
error(){
echo -e '\e[01;31m'$*'\e[0m' >&2
}
usage(){
#TODO
cat >&2 <<-FIN
Usage:
-f force lock
-l execute the locker
-n send notification
-d execute the xautolock daemon
-h help
Mind, that the options are order-sensitive. -lf != -fl && -l == -lf
(-fl is probably the thing you want)
FIN
exit 1
}
checkfull(){
[ 1 -eq "$force" ] || ~/.local/bin/checknofullscreen
}
lock(){
scrot -z $OUTPUT_IMAGE
convert $OUTPUT_IMAGE -resize 20% -level 0%,100%,0.9 -blur 0x2 -resize 500% $OUTPUT_IMAGE
i3lock -i $OUTPUT_IMAGE -t
rm $OUTPUT_IMAGE
}
notification(){
notify-send \
-u critical \
-t 5000 \
-i screensaver \
"Locking Screen" \
"Will Lock Screen in 15s"
}
daemon(){
xautolock \
-time $LOCK_TIME \
-locker "$0 -l" \
-nowlocker "$0 -fl" \
-notify $LOCK_NOTIFY_TIME \
-notifier "$0 -n" \
-noclose
}
force=0
while getopts ":hdfln" opt; do
case $opt in
h)
usage
;;
f)
force=1
;;
l)
checkfull && lock
;;
n)
checkfull && notification
;;
d)
daemon
;;
\?)
error "Invalid option: -args"
usage
;;
:)
error "Option -args requires an argument."
usage
;;
esac
done
exit 0

14
install Executable file
View file

@ -0,0 +1,14 @@
#!/usr/bin/env bash
set -e
CONFIG="install.conf.json"
DOTBOT_DIR="dotbot"
DOTBOT_BIN="bin/dotbot"
BASEDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "${BASEDIR}"
git submodule update --init --recursive "${DOTBOT_DIR}"
"${BASEDIR}/${DOTBOT_DIR}/${DOTBOT_BIN}" -d "${BASEDIR}" -c "${CONFIG}" "${@}"

61
install.conf.json Normal file
View file

@ -0,0 +1,61 @@
[
{
"defaults": {
"link": {
"relink": true
}
}
},
{
"clean": ["~"]
},
{
"shell": [
["mkdir -p ~/.local/bin", "Creating local bin dir"],
["mkdir -p ~/.config/i3", "Creating i3-config dir"],
["mkdir -p ~/.config/i3status", "Creating i3-status dir"]
]
},
{
"link": {
"~/.dotfiles": "",
"~/.bashrc": "bash/bashrc",
"~/.bash_profile": "bash/bashrc",
"~/.liquidprompt": "bash/liquidprompt",
"~/.local/bin/host-is-on": "bin/host-is-on.sh",
"~/.local/bin/mdo": "bin/mdo.sh",
"~/.gitconfig": "git/gitconfig",
"~/.local/bin/diff-so-fancy": "git/diff-so-fancy/diff-so-fancy",
"~/.local/bin/diff-highlight": "git/diff-so-fancy/third_party/diff-highlight/diff-highlight",
"~/.config/i3/config": "i3/i3config",
"~/.config/i3status/config": "i3/i3status",
"~/.local/bin/checknofullscreen": "i3/checknofullscreen.sh",
"~/.local/bin/lockscreen": "i3/lockscreen.sh",
"~/.local/bin/locknow": "i3/locknow.sh",
"~/.profile.d/load": "shell/load",
"~/.profile.d/10-vars.sh": "shell/vars.sh",
"~/.profile.d/10-paths.sh": "shell/paths.sh",
"~/.profile.d/10-gitrepo-commited.sh": "shell/gitrepo-commited.sh",
"~/.profile.d/10-liquidprompt.sh": "shell/liquidprompt.sh",
"~/.profile.d/20-aliases.sh": "shell/aliases.sh",
"~/.profile.d/20-cd.sh": "shell/cd.sh",
"~/.profile.d/40-extract.sh": "shell/extract.sh",
"~/.profile.d/40-mysqlpw.sh": "shell/mysqlpw.sh",
"~/.profile.d/90-keychain.sh": "shell/keychain.sh",
"~/.profile.d/80-command-not-found.sh": "shell/command-not-found.sh",
"~/.config/redshift.conf": "redshift/redshift.conf",
"~/.config/redshift/hooks/hook.sh": "redshift/hook.sh",
"~/.config/pacaur/config": "pacaur/config",
"~/.toprc": "top/toprc",
"~/.vimrc": "vim/wuman-vimrc/vimrc",
"~/.vim/bundle": "vim/wuman-vimrc/bundle",
"~/.wgetrc": "wget/wgetrc",
"~/.Xresources": "i3/Xresources"
}
},
{
"shell": [
["git submodule update --init --recursive", "Installing submodules"]
]
}
]

18
pacaur/config Normal file
View file

@ -0,0 +1,18 @@
#!/bin/bash
#
# /etc/xdg/pacaur/config
#
# The following options are commented out with their default values listed.
# If you wish to use different values, uncomment and update the values.
# The Color and VerbosePkgLists options can be enabled in /etc/pacman.conf.
# The clone directory can be changed through the $AURDEST environment variable.
# The makepkg environment variables are also fully honored.
editor="${VISUAL:-${EDITOR:-vim}}" # build files editor
displaybuildfiles=none # display build files (none|diff|full)
#fallback=true # pacman fallback to the AUR
#silent=false # silence output
#sortby=popularity # sort method (name|votes|popularity)
#sortorder=descending # sort order (ascending|descending)
#sudoloop=true # prevent sudo timeout

10
redshift/hook.sh Executable file
View file

@ -0,0 +1,10 @@
#!/bin/sh
case $1 in
period-changed)
exec notify-send "Redshift" "Period changed to $3"
;;
*)
exec notify-send "Redshift" "Redshift just fired an unknown hook with these options: '$*'. Ah, of course, this notification is just here, to troll you! :-P"
;;
esac

11
redshift/redshift.conf Normal file
View file

@ -0,0 +1,11 @@
[redshift]
temp-day=5700
brightness-day=1
temp-night=3000
brightness-night=0.8
transition=1
location-provider=geoclue2
adjustment-method=randr
[randr]
screen=

100
shell/aliases.sh Executable file
View file

@ -0,0 +1,100 @@
#!/bin/sh
#alias definitions
alias chmox="chmod +x"
alias cd..="cd .."
alias gits="git status"
alias gl="git log --oneline --all --abbrev-commit --graph --decorate --color"
alias subl='subl3'
alias ddd="killall -USR1 dd"
alias sddd="sudo killall -USR1 dd"
alias killlall="killall"
alias kilall="killall"
alias kilal="killall"
alias killlal="killall"
alias les="less"
alias quit="exit"
alias :q="exit"
alias :qa="exit"
alias :q!="exit"
alias :qw="exit"
alias vim="vim -p"
alias vi="vim -p"
alias cp='cp -v'
alias mv='mv -v'
alias youtube-dl='youtube-dl -o "%(title)s.%(ext)s"'
alias yta='youtube-dl -o "%(title)s.%(ext)s" --extract-audio'
alias yt3='youtube-dl -o "%(title)s.%(ext)s" --extract-audio --audio-format mp3'
alias grep="grep --color=auto"
alias ls='ls --color=auto'
alias fuck="sudo !!"
alias fu='sudo "$BASH" -c "$(history -p !!)"'
# open any file wihtout the knowledge of what type it is
alias of="xdg-open"
if [ ! -z "$(type sudo 2>/dev/null)" -a "$USER" != 'root' ]; then
#create sudo aliases WITHOUT leading s
for sudo in wifi-menu netctl mount umount pacman shutdown reboot iftop fsadm lvchange lvconvert lvcreate lvdisplay lvextend lvm lvmchange lvmconf lvmconfig lvmdiskscan lvmdump lvmetad lvmsadc lvmsar lvreduce lvremove lvrename lvresize lvs lvscan pvchange pvck pvcreate pvdisplay pvmove pvremove pvresize pvs pvscan vgcfgbackup vgcfgrestore vgchange vgck vgconvert vgcreate vgdisplay vgexport vgextend vgimport vgimportclone vgmerge vgmknodes vgreduce vgremove vgrename vgs vgscan vgsplit;
do
type $sudo > /dev/null 2>&1 && alias $sudo="sudo $sudo";
done
unset sudo
#create sudo aliases WITH leading s
for sudo in ps vim chown chmod;
do
type $sudo > /dev/null 2>&1 && alias s$sudo="sudo $sudo";
done
unset sudo
fi
alias mon-update="xrandr --auto"
alias pwedit="svim -p /etc/{passwd,group,shadow,gshadow}"
alias cmdlist='find $(echo $PATH | tr ":" "\n")'
alias makepasswd='makepasswd --minchars=10 --maxchars=25 --count=10'
alias shuttle='sshuttle --dns -v -r uberspace 0/0'
alias backupnow='sudo borgmatic -v 1 && echo $(date +"%Y%m%d") > ~/.borgbackup.log'
alias syncbackupto='sudo rsync -aPzchv backup:/home/felix/data/ '
alias notify='notify-send Terminal "Process has been finished"'
alias screen-off='xset -display :0.0 dpms force off'
# DEBIAN:
alias sag='sudo apt-get'
alias key-renew='apt-key adv --keyserver keyserver.ubuntu.com --recv-keys'
alias key-repair-all='wget -q http://archive.getdeb.net/getdeb-archive.key -O- | sudo apt-key add - '
# ARCH:
alias pacman-update='sudo pacman -Syu'
alias pacaur-update='pacaur -Syua'
alias pacman-clean='sudo pacman -Sc'
# TEE:
alias ttime_green="sh -c \"sleep 180 && notify-send -u critical 'The tea is ready'\" &"
alias ttime_black="sh -c \"sleep 300 && notify-send -u critical 'The tea is ready'\" &"
# scan your local network with nmap
#
# usage:
# snet <nmap-args>
# example: (scan for every HP printer in the network)
# snet -p jetdirect --open
#
# - get all non-linklocal IP addrs from ip
# - pipe the IPs through ipcalc to get the network ID
# - this is neccessary to prevent scanning the same network twice
# - likely to experience if connected via wifi and ethernet
# - xargs it to nmap at the end
alias snet="ip addr | \\grep -v "inet6" | \\grep inet | cut -d \" \" -f 6 | \\grep -v '127\\.0\\.[0-1]\\.[0-1]' | xargs -n 1 ipcalc | awk '/Network:/{print \$2}' | sort -u | xargs nmap"
#END alias-definitions

13
shell/cd.sh Executable file
View file

@ -0,0 +1,13 @@
#!/bin/sh
#correct some fast tipped cds
function c {
if [ $1 == "d.." ]; then
cd ..;
pwd;
fi
if [ -d $1 ]; then
cd $1;
pwd;
fi
return 0;
}

2
shell/command-not-found.sh Executable file
View file

@ -0,0 +1,2 @@
#!/bin/sh
[ -r /etc/profile.d/cnf.sh ] && . /etc/profile.d/cnf.sh

58
shell/extract.sh Executable file
View file

@ -0,0 +1,58 @@
x() {
for zipfile in $*; do
local extractor
if [ -f "$zipfile" ]; then
case "$zipfile" in
*.tar.lrz)
extractor="lrztar -d" ;;
*.lrz)
extractor="lrunzip" ;;
*.tar.bz2)
extractor="bsdtar xjf" ;;
*.bz2)
extractor="bunzip2" ;;
*.tar.gz)
extractor="bsdtar xzf" ;;
*.gz)
extractor="gunzip" ;;
*.tar.xz)
extractor="bsdtar Jxf" ;;
*.xz)
extractor="xz -d" ;;
*.rar)
extractor="unrar e" ;;
*.tar)
extractor="bsdtar xf" ;;
*.tbz2)
extractor="bsdtar xjf" ;;
*.tgz)
extractor="bsdtar xzf" ;;
*.zip)
extractor="unzip" ;;
*.Z)
extractor="uncompress" ;;
*.7z)
extractor="7z x" ;;
*)
echo "Cannot extract '$zipfile': No extractor for filetype known ..." >&2
return 1
;;
esac
if ! command -v `echo $extractor | awk '{print $1}'` >/dev/null 2>/dev/null; then
echo "Cannot extract '$zipfile': Cannot find extractor '`echo $extractor | awk '{print $1}'`'." >&2
return 1
fi
echo "Extracting '$zipfile'..." >&2
eval $extractor $zipfile
elif [ ! -e "$zipfile" ]; then
echo "Cannot extract '$zipfile': File does not exist!"
return 1
else
echo "Cannot extract '$zipfile': Not a valid file!"
return 1
fi
done
}

19
shell/gitrepo-commited.sh Executable file
View file

@ -0,0 +1,19 @@
#!/bin/sh
case "$-" in
*i*)
# This shell is interactive, if not ignore this part
# If printing this in non-interactive shells, it'll may prevent scp to work
cfgrepo=`readlink ~/.profile.d/10-gitrepo-commited.sh`
repo=`dirname $cfgrepo`
changes=`git -C $repo status --porcelain | wc -l`
if [ $changes -gt 0 ]; then
echo -e '\e[01;31m' >&2
echo -e '####################################' >&2
echo -e '# GIT-config-Repo is not commited! #' >&2
echo -e '####################################' >&2
echo -e '\e[0m' >&2
fi
;;
esac

11
shell/keychain.sh Executable file
View file

@ -0,0 +1,11 @@
#!/bin/sh
# array to process, either folders or directories for recursive processing
KEYPATHS+=("$HOME/.ssh/keys" "$HOME/.ssh/gitlab_rsa" "$HOME/.ssh/id_rsa")
if command -v keychain 2>&1 >/dev/null; then
eval \
`find ${KEYPATHS[@]} -type f -not -name '*.pub' 2>/dev/null \
| xargs keychain -q --nogui --agents ssh --timeout 600 --eval`
fi
unset KEYPATHS

16
shell/liquidprompt.sh Executable file
View file

@ -0,0 +1,16 @@
#LP_ENABLE_RUNTIME=1
LP_ENABLE_TITLE=1
LP_ENABLE_SSH_COLORS=1
LP_ENABLE_VCS_ROOT=1
LP_DISABLED_VCS_PATH=""
LP_ENABLE_TEMP=0
LP_ENABLE_BATT=0
LP_ENABLE_SVN=0
LP_ENABLE_HG=0
LP_ENABLE_BZR=0
LP_ENABLE_FOSSIL=0
LP_ENABLE_SUDO=1
# if in git folder, the prompt takes very long to rebuild
mountpoint $HOME 2> /dev/null > /dev/null && LP_DISABLED_VCS_PATH="$HOME"
source ~/.liquidprompt/liquidprompt

6
shell/load Executable file
View file

@ -0,0 +1,6 @@
#!/bin/sh
for profile in ~/.profile.d/*.sh; do
if [ -x "$profile" ]; then
source $profile
fi
done

39
shell/mysqlpw.sh Executable file
View file

@ -0,0 +1,39 @@
#!/bin/sh
#The function will find the given user and search for a mysql-password
#in the home-directory, which will get printed out!
#arg1: user where to find a config-file
# if not given, it uses the current user in the $HOME and $USER-Variable
function mysqlpw() {
local H=$HOME
local U=$USER
# use different user, if arg1 given
if [ ! -z $1 ]; then
# check if given user is even existing
if ! id $1 >/dev/null 2>/dev/null; then
echo user $1 not existing >&2
return 1
fi
U=$1
H=`grep ^$1: /etc/passwd | cut -d ":" -f 6`
fi;
local mysql_cnf="$H/.my.cnf"
if [ ! -e $mysql_cnf ]; then
echo $mysql_cnf not existing >&2 && return 1
fi
if [ ! -r $mysql_cnf ]; then
echo $mysql_cnf not readable >&2 && return 1
fi
local PW=`(grep "password=" $mysql_cnf || echo undefined) | cut -d "=" -f 2`
echo MySQL-Password for user $U is $PW
}

25
shell/paths.sh Executable file
View file

@ -0,0 +1,25 @@
#!/bin/sh
function set_path(){
if [[ -d "$1" ]]; then
export PATH=$1:$PATH
fi
}
set_path ~/.local/bin/
set_path ~/.bin
if which ruby >/dev/null 2>&1 && which gem >/dev/null 2>&1; then
set_path $(ruby -rubygems -e 'puts Gem.user_dir')/bin
fi
# PERL cpan modules
set_path $HOME/.perl/5/bin
export PERL5LIB="$HOME/.perl/5/lib/perl5:$PERL5LIB"
export PERL_LOCAL_LIB_ROOT="$HOME/.perl/5:$PERL_LOCAL_LIB_ROOT"
export PERL_MB_OPT="--install_base \"$HOME/.perl/5\""
export PERL_MM_OPT="INSTALL_BASE=$HOME/.perl/5"
export GOPATH=$HOME/.go
export GOBIN=$HOME/.gobin
set_path $GOPATH/bin
set_path $GOBIN

4
shell/vars.sh Executable file
View file

@ -0,0 +1,4 @@
#!/bin/sh
export EDITOR=vim
export VISUAL=vim
export BROWSER=firefox

15
top/toprc Normal file
View file

@ -0,0 +1,15 @@
top's Config File (Linux processes with windows)
Id:i, Mode_altscr=0, Mode_irixps=1, Delay_time=1.500, Curwin=0
Def fieldscur=¥&K¨³´»½@·º¹56ÄFÅ')*+,-./0128<>?ABCGHIJLMNOPQRSTUVWXYZ[\]^_`abcdefghij
winflags=192564, sortindx=18, maxtasks=0, graph_cpus=0, graph_mems=0
summclr=1, msgsclr=1, headclr=3, taskclr=1
Job fieldscur=¥¦¹·º(³´Ä»½@<§Å)*+,-./012568>?ABCFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghij
winflags=163124, sortindx=0, maxtasks=0, graph_cpus=2, graph_mems=0
summclr=6, msgsclr=6, headclr=7, taskclr=6
Mem fieldscur=¥º»<½¾¿ÀÁMBNÃD34·Å&'()*+,-./0125689FGHIJKLOPQRSTUVWXYZ[\]^_`abcdefghij
winflags=163124, sortindx=21, maxtasks=0, graph_cpus=2, graph_mems=0
summclr=5, msgsclr=5, headclr=4, taskclr=5
Usr fieldscur=¥¦§¨ª°¹·ºÄÅ)+,-./1234568;<=>?@ABCFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghij
winflags=163124, sortindx=3, maxtasks=0, graph_cpus=2, graph_mems=0
summclr=3, msgsclr=3, headclr=2, taskclr=3
Fixed_widest=0, Summ_mscale=2, Task_mscale=1, Zero_suppress=0

108
vim/vimrc Normal file
View file

@ -0,0 +1,108 @@
"" Syntaxhervorhebung
syntax on
set encoding=utf-8
"" weite Möglichkeiten zur Einstellung des Zeichensatzes
" set termencoding=iso-8859-15
" set fileencodings=ucs-bom,utf-8,latin1
"" immer die Statuszeile mit dem Dateinamen anzeigen
set ls=2
"" automatischer Zeilenumbruch, wenn die Zeile zu lang ist
set wrap
" set nowrap
"" Kompatibilitätsmodus zu vi abschalten
set nocompatible
"" Wieviele Leerzeichen lang ist ein Tabulator?
set ts=2
"" Ersetze Tabulatoren durch Leerzeichen
" set expandtab
"" Einrückungstiefe
set shiftwidth=2
"" Einrückungen im C-Stil
" set cindent
"" alternative Einrückungsstile
" set autoindent
" set smartindent
"" zeigt unten links diverse Positionsinformationen der Schreibmarke
set ruler
"" die Shell, die beim Starten von Programmen aus dem Editor heraus verwendet werden soll
set shell=/bin/bash
"" zeigt in der Statuszeile an, ob man sich im Einfügemodus (INSERT) oder im Ersetzungsmodus (REPLACE) befindet
set showmode
"" Zeilennummern anzeigen
set number
"" Verhalten der Rückschritttaste
set backspace=indent,eol,start
"" F9 wechselt Syntaxhervorhebung
map <F9> :if has("syntax_items")<CR>syntax off<CR>else<CR>syntax on<CR>endif<CR><CR>
"" F8 wechselt Zeilenubruch
map <F8> :if has("nowrap_items")<CR>set nowrap<CR>else<CR>set wrap<CR>endif<CR><CR>
"" nicht an den Zeilenanfang bei Benutzung von Bild auf und Bild ab gehen
set nostartofline
"" Suchergebnisse hervorheben
set hlsearch
set incsearch
set ignorecase
set smartcase
"" Wer die Maus für übliches Copy&Paste verwenden will, der sollte diese Zeile hinzufügen:
set mouse=
nnoremap <C-H> :Hexmode<CR>
inoremap <C-H> <Esc>:Hexmode<CR>
vnoremap <C-H> :<C-U>Hexmode<CR>
" ex command for toggling hex mode - define mapping if desired
command -bar Hexmode call ToggleHex()
" helper function to toggle hex mode
function ToggleHex()
" hex mode should be considered a read-only operation
" save values for modified and read-only for restoration later,
" and clear the read-only flag for now
let l:modified=&mod
let l:oldreadonly=&readonly
let &readonly=0
let l:oldmodifiable=&modifiable
let &modifiable=1
if !exists("b:editHex") || !b:editHex
" save old options
let b:oldft=&ft
let b:oldbin=&bin
" set new options
setlocal binary " make sure it overrides any textwidth, etc.
let &ft="xxd"
" set status
let b:editHex=1
" switch to hex editor
%!xxd
else
" restore old options
let &ft=b:oldft
if !b:oldbin
setlocal nobinary
endif
" set status
let b:editHex=0
" return to normal editing
%!xxd -r
endif
" restore values for modified and read only state
let &mod=l:modified
let &readonly=l:oldreadonly
let &modifiable=l:oldmodifiable
endfunction

1
vim/wuman-vimrc Submodule

@ -0,0 +1 @@
Subproject commit ef411f4efe0371a1cae54a6d46a7b6f0f230d96e

21
wget/wgetrc Normal file
View file

@ -0,0 +1,21 @@
# Use the server-provided last modification date, if available
timestamping = on
# Do not go up in the directory structure when downloading recursively
no_parent = on
# Wait 60 seconds before timing out. This applies to all timeouts: DNS, connect and read. (The default read timeout is 15 minutes!)
timeout = 60
# Retry a few times when a download fails, but dont overdo it. (The default is 20!)
tries = 3
# Retry even when the connection was refused
retry_connrefused = on
# Use the last component of a redirection URL for the local file name
trust_server_names = on
content_disposition = on
# Follow FTP links from HTML documents by default
follow_ftp = on
# Ignore `robots.txt` and `<meta name=robots content=nofollow>`
robots = off
# Print the HTTP and FTP server responses
server_response = on
# Disguise as IE 9 on Windows 7
user_agent = Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)