This commit is contained in:
2017-09-01 09:53:09 +02:00
parent 3440d950a7
commit fca243e89b
32 changed files with 245 additions and 133 deletions

View File

@@ -0,0 +1,10 @@
#!/bin/bash
log "Starting firefox"
firefox &
log "Starting KeePassX"
keepassx &
log "Starting first terminal"
urxvt -title "scratch" -e "tmux new-session -A -s scratch"

View File

@@ -1 +0,0 @@
qutebrowser &

View File

@@ -1 +0,0 @@
quasselclient &

View File

@@ -1,3 +1,4 @@
#!/bin/bash
keyboard_layout=de keyboard_layout=de
keyboard_variant=nodeadkeys keyboard_variant=nodeadkeys
keyboard_repeat_delay=150 keyboard_repeat_delay=150

View File

@@ -1 +0,0 @@
evolution &

View File

@@ -1 +0,0 @@
clementine &

View File

@@ -1,2 +0,0 @@
log "starting owncloud client"
owncloud & &>> $LOGFILE

View File

@@ -3,5 +3,5 @@ log "execute xautorandr"
xautorandr xautorandr
log "disable screen blanking" log "disable screen blanking"
xset -dpms & &>> $LOGFILE xset -dpms &>> $LOGFILE
xset s off & &>> $LOGFILE xset s off &>> $LOGFILE

View File

@@ -1,2 +0,0 @@
mumble &
teamspeak3 &

View File

@@ -1,10 +0,0 @@
wallpaper_directory="$LIBDIR/wallpaper/current"
wallchanger_pidfile="$RUNDIR/wallchanger.${XDG_SESSION_ID}.pid"
wallpaper_logfile="$LOGDIR/wallpaper.log"
wallpaper_interval="10800"
log "starting $path_wallchanger"
{
wallchanger "$wallpaper_directory" "$wallpaper_interval" &
echo $! > "$wallchanger_pidfile"
} & &>> $LOGFILE

View File

@@ -0,0 +1,11 @@
# wallpaper_directory="$LIBDIR/wallpaper/current"
# wallchanger_pidfile="$RUNDIR/wallchanger.${XDG_SESSION_ID}.pid"
# wallpaper_logfile="$LOGDIR/wallpaper.log"
# wallpaper_interval="10800"
# log "starting wallchanger"
# {
# wallchanger "$wallpaper_directory" "$wallpaper_interval" &
# echo $! > "$wallchanger_pidfile"
# } & &>> $LOGFILE
xsetroot -solid '#555555'

1
bookmarks/sysop Normal file
View File

@@ -0,0 +1 @@
$HOME/projects/sysop/

View File

@@ -1,7 +1,8 @@
[user] [user]
name = Hannes Körber name = Hannes Körber
email = hannes.koerber@haktec.de email = hannes.koerber@tradebyte.com
signingkey = 0x078A167A8741BD30 [github]
user = hakoerber
[alias] [alias]
untrack = "rm --cached" untrack = "rm --cached"
unstage = "reset HEAD" unstage = "reset HEAD"
@@ -16,7 +17,9 @@
st = "status" st = "status"
br = "branch" br = "branch"
rb = "rebase" rb = "rebase"
rbi = "rebase -i" rbi = "rebase --interactive"
rbc = "rebase --continue"
rba = "rebase --abort"
df = "diff" df = "diff"
gr = "! git graph" gr = "! git graph"
@@ -30,17 +33,24 @@
pushall = "!sh -c 'for r in $(git remote) ; do [[ "$r" != "upstream" ]] && { echo \"--- [$r] ---\" ; git push $r \"$@\" ; } ; done' -" pushall = "!sh -c 'for r in $(git remote) ; do [[ "$r" != "upstream" ]] && { echo \"--- [$r] ---\" ; git push $r \"$@\" ; } ; done' -"
graph = log --graph --pretty=format:'%C(yellow)%h%Creset%C(bold red)% D%Creset %C(green)(%cr) %C(blue)%an<%ae>%Creset%n %C(bold white)%s%Creset' --all graph = log --graph --pretty=format:'%C(yellow)%h%Creset%C(bold red)% D%Creset %C(green)(%cr) %C(blue)%an<%ae>%Creset%n %C(bold white)%s%Creset' # --all
intercommit = !bash -c 'interdiff <(git show $1) <(git show $2) | less -FRS' - intercommit = !bash -c 'interdiff <(git show $1) <(git show $2) | less -FRS' -
drop = !git rebase --onto $1^ --
; drop = !bash -c 'echo $1' -
; subcommit = '!sh -c 'git add $1 && git commit -m "Update submodule $1" -m "$(git diff --staged --submodule=log | tr ">" "*")''
[core] [core]
whitespace = "" fileMode = true
excludesfile = "~/.gitignore_global" whitespace = "blank-at-eol,space-before-tab,blank-at-eof"
; excludesfile = "~/.gitignore_global"
abbrev = 8
[color] [color]
ui = true ui = true
[gui] [column]
recentrepo = /home/hannes/programming/git-repositories/autobackup ui = auto
[push] [push]
default = simple default = simple
[merge] [merge]
@@ -48,16 +58,29 @@
[gc] [gc]
auto = 0 auto = 0
[advice] [advice]
pushNonFastForward = false pushUpdateRejected = false
statusHints = false statusHints = false
commitBeforeMerge = false commitBeforeMerge = false
detachedHead = false
[commit] [commit]
gpgSign = true # gpgSign = true
cleanup = default
status = true
[status] [status]
relativePaths = false relativePaths = false
submoduleSummary = true
[pager] [pager]
log = diff-so-fancy | less # log = diff-so-fancy | less
show = diff-so-fancy | less # show = diff-so-fancy | less
diff = diff-so-fancy | less # diff = diff-so-fancy | less
[interactive] [interactive]
diffFilter = diff-so-fancy #diffFilter = diff-so-fancy
[rebase]
autoSquash = true
[diff]
submodule = log
mnemonicPrefix = true
[branch]
autoSetupMerge = true
[clean]
requireForce = true

View File

@@ -58,9 +58,9 @@ Icon
*.rpm *.rpm
### logs and databases ### logs and databases
*.log #*.log
*.sql # *.sql
*.sqlite # *.sqlite
### eclipse specific ### eclipse specific
*.pydevproject *.pydevproject

0
i3/i3.log Normal file
View File

View File

@@ -38,15 +38,15 @@
set $signal_reboot reboot set $signal_reboot reboot
set $signal_shutdown shutdown set $signal_shutdown shutdown
set $workspace1 1:web set $workspace1 1
set $workspace2 2 set $workspace2 2
set $workspace3 3 set $workspace3 3
set $workspace4 4 set $workspace4 4
set $workspace5 5 set $workspace5 5
set $workspace6 6:voip set $workspace6 6
set $workspace7 7:music set $workspace7 7
set $workspace8 8:irc set $workspace8 8
set $workspace9 9:mail set $workspace9 9
set $workspace10 10 set $workspace10 10
set $key_workspace1 1 set $key_workspace1 1
@@ -92,6 +92,24 @@
set $kill Shift+Q set $kill Shift+Q
################################################################################
### WORKSPACE ASSIGNMENTS ######################################################
################################################################################
workspace $workspace1 output HDMI3
workspace $workspace2 output HDMI3
workspace $workspace3 output HDMI2
workspace $workspace4 output HDMI2
workspace $workspace5 output HDMI2
workspace $workspace6 output HDMI2
workspace $workspace7 output LVDS1
workspace $workspace8 output LVDS1
workspace $workspace9 output LVDS1
workspace $workspace10 output LVDS1
assign [class="^Keepassx$"] $workspace8
################################################################################ ################################################################################
### KEYBINDINGS ################################################################ ### KEYBINDINGS ################################################################
##################9############################################################# ##################9#############################################################
@@ -238,9 +256,7 @@
floating_minimum_size 0 x 0 floating_minimum_size 0 x 0
floating_maximum_size 0 x 0 floating_maximum_size 0 x 0
smart_borders on font pango:Inconsolata 10
font pango:Insonsolata 11
################################################################################ ################################################################################
### COLOR SETTINGS ############################################################# ### COLOR SETTINGS #############################################################
@@ -256,12 +272,6 @@ client.urgent #2f343a #900000 #ffffff #900000
### APPLICATION SPECIFIC SETTINGS ############################################## ### APPLICATION SPECIFIC SETTINGS ##############################################
################################################################################ ################################################################################
assign [class="^Mumble$"] $workspace6
assign [class="^TeamSpeak 3$"] $workspace6
assign [class="^Clementine$"] $workspace7
assign [class="^quassel$"] $workspace8
assign [class="^Thunderbird$"] $workspace9
assign [class="^Evolution$"] $workspace9
bindsym $mod+F6 exec --no-startup-id mumble bindsym $mod+F6 exec --no-startup-id mumble
bindsym $mod+F7 exec --no-startup-id clementine bindsym $mod+F7 exec --no-startup-id clementine
@@ -272,23 +282,35 @@ bindsym $mod+F9 exec --no-startup-id evolution
### SPECIAL KEYBINDS ########################################################### ### SPECIAL KEYBINDS ###########################################################
################################################################################ ################################################################################
#bindsym XF86Sleep exec --no-stratup-id dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Pause ; exec --no-startup-id $scriptdir/i3exit suspend
bindsym XF86Sleep exec --no-startup-id $scriptdir/i3exit suspend bindsym XF86Sleep exec --no-startup-id $scriptdir/i3exit suspend
bindsym XF86AudioMute exec --no-startup-id amixer set Master toggle ; exec --no-startup-id $update-status bindsym XF86AudioMute exec --no-startup-id $scriptdir/pa-volume mute-toggle ; exec --no-startup-id $update-status
bindsym XF86AudioRaiseVolume exec --no-startup-id $scriptdir/pa-volume set-vol +5 ; exec --no-startup-id $scriptdir/update-status bindsym XF86AudioRaiseVolume exec --no-startup-id $scriptdir/pa-volume set-vol +3 ; exec --no-startup-id $scriptdir/update-status
bindsym XF86AudioLowerVolume exec --no-startup-id $scriptdir/pa-volume set-vol -5 ; exec --no-startup-id $scriptdir/update-status bindsym XF86AudioLowerVolume exec --no-startup-id $scriptdir/pa-volume set-vol -3 ; exec --no-startup-id $scriptdir/update-status
bindsym XF86AudioPlay exec dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause
bindsym XF86AudioNext exec dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next
bindsym XF86AudioPrev exec dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous
# keys seemingly switched # keys seemingly switched
bindsym XF86MonBrightnessUp exec --no-startup-id xbacklight -dec 5 ; exec --no-startup-id $scriptdir/update-status bindsym XF86MonBrightnessUp exec --no-startup-id xbacklight -dec 5 ; exec --no-startup-id $scriptdir/update-status
bindsym XF86MonBrightnessDown exec --no-startup-id xbacklight -inc 5 ; exec --no-startup-id $scriptdir/update-status bindsym XF86MonBrightnessDown exec --no-startup-id xbacklight -inc 5 ; exec --no-startup-id $scriptdir/update-status
bindsym XF86AudioPlay exec --no-startup-id mpc toggle
bindsym XF86AudioPrev exec --no-startup-id mpc prev
bindsym XF86AudioNext exec --no-startup-id mpc next
bindsym $mod+o exec --no-startup-id xautorandr ; exec --no-startup-id kill -SIGUSR2 $(cat $RUNDIR/wallchanger.$XDG_SESSION_ID.pid)'" bindsym $mod+o exec --no-startup-id xautorandr ; exec --no-startup-id kill -SIGUSR2 $(cat $RUNDIR/wallchanger.$XDG_SESSION_ID.pid)'"
bindsym $mod+p exec --no-startup-id kill -SIGUSR1 $(cat $RUNDIR/wallchanger.$XDG_SESSION_ID.pid) bindsym $mod+p exec --no-startup-id kill -SIGUSR1 $(cat $RUNDIR/wallchanger.$XDG_SESSION_ID.pid)
################################################################################
exec --no-startup-id autostart
###############################################################################
### BARS ####################################################################### ### BARS #######################################################################
################################################################################ ################################################################################
# #
@@ -296,6 +318,8 @@ bar {
mode dock mode dock
position top position top
#tray_output HDMI3
tray_output primary tray_output primary
tray_padding 3 tray_padding 3
@@ -307,7 +331,7 @@ bar {
id bar-0 id bar-0
font pango:DejaVu Sans, Icons 11 font pango:DejaVu Sans, Icons 10
colors { colors {
background #222222 background #222222

View File

@@ -1,28 +1,15 @@
separator_block_width=33 separator_block_width=33
[vpn-main] #[spotify]
command=$HOME/.i3/scripts/openvpn main #command=$HOME/.i3/scripts/spotify-current
label= #interval=1
interval=5
[vpn-mgmt] # [wifi]
command=$HOME/.i3/scripts/openvpn mgmt # command=$HOME/.i3/scripts/wifi
label= # interval=30
interval=5
[wifi]
command=$HOME/.i3/scripts/wifi
label=
interval=30
[network]
command=BLOCK_INSTANCE=wlp2s0 /usr/lib/i3blocks/iface
label=
interval=5
[load] [load]
command=$HOME/.i3/scripts/load command=$HOME/.i3/scripts/load
label=
interval=30 interval=30
[volume] [volume]
@@ -43,7 +30,7 @@ interval=once
[time] [time]
label= label=
command=date "+%a %d.%m %H:%M" command=date "+[KW%V] %A %d.%m.%Y %H:%M:%S"
interval=1 interval=1
separator=false separator=false
separator_block_width=12 separator_block_width=12

View File

@@ -1,2 +1,3 @@
#!/usr/bin/env bash #!/usr/bin/env bash
j4-dmenu-desktop --dmenu="dmenu -fn 'DejaVu Sans:size=11' -h 24 -i -p '>' -nb '#000000' -nf '#ffffff' -sb '#e16b40' -sf '#000000'" rofi -show run
#j4-dmenu-desktop --dmenu="dmenu -fn 'DejaVu Sans:size=11' -i -p '>' -nb '#000000' -nf '#ffffff' -sb '#e16b40' -sf '#000000'"

View File

@@ -4,7 +4,7 @@
_logfile="$LOGDIR/i3/i3exit.log" _logfile="$LOGDIR/i3/i3exit.log"
_fallback_color=000000 _fallback_color="000000"
touch "$_logfile" touch "$_logfile"
@@ -16,14 +16,25 @@ log()
lock() lock()
{ {
if [[ "$LOCKSCREEN" ]] ; then set -x
i3lock --show-failed-attempts --image "$LOCKSCREEN" playing=0
else if dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'PlaybackStatus'|grep -q Playing ; then
i3lock --show-failed-attempts --color "$_fallback_color" playing=1
fi fi
echo $playing
(( $playing )) && dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Pause
if [[ "$LOCKSCREEN" ]] ; then
i3lock --nofork --show-failed-attempts --image "$LOCKSCREEN" &
else
i3lock --nofork --show-failed-attempts --color "$_fallback_color" &
fi
screen_off
wait
(( $playing )) && dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Play
} }
screen_off() { screen_off() {
:
xset dpms force off xset dpms force off
} }
@@ -33,7 +44,7 @@ log "[I] Received signal \"$signal\"."
case "$signal" in case "$signal" in
lock) lock)
log "[I] Locking session." log "[I] Locking session."
lock && screen_off lock
;; ;;
logout) logout)
log "[I] Exiting i3." log "[I] Exiting i3."

View File

@@ -1,11 +1,13 @@
#!/bin/bash #!/bin/bash
# name of the sink. execute pactl list sinks to get a list # name of the sink. execute pactl list sinks to get a list
SINKNAME="alsa_output.pci-0000_00_1b.0.analog-stereo" SINKNAME="$(pactl info | grep '^Default Sink:' | cut -d ' ' -f 3-)"
SINKNAME="alsa_output.usb-Logitech_Logitech_Wireless_Headset_88C626354D45-00.analog-stereo"
# this is the worst # this is the worst
SINK=$(( $(pactl list sinks | grep "Name: " | grep -n "${SINKNAME}"$ | grep -o "^[[:digit:]]*") -1)) SINK=$(( $(pactl list sinks | grep "Name: " | grep -n "${SINKNAME}"$ | grep -o "^[[:digit:]]*") -1))
getvol() { getvol() {
echo $(pactl list sinks | grep "^[[:space:]]*Volume" | head -n $(( $SINK + 1 )) | tail -n 1 | grep -o "[[:digit:]]*%" | head -n 1 | cut -d "%" -f 1) echo $(pactl list sinks | grep "^[[:space:]]*Volume" | head -n $(( $SINK + 1 )) | tail -n 1 | grep -o "[[:digit:]]*%" | head -n 1 | cut -d "%" -f 1)
} }
@@ -49,15 +51,15 @@ ismuted() {
} }
mute() { mute() {
pactl set-sink-mute $SINK 1 pactl set-sink-mute $SINKNAME 1
} }
unmute() { unmute() {
pactl set-sink-mute $SINK 0 pactl set-sink-mute $SINKNAME 0
} }
mute-toggle() { mute-toggle() {
pactl set-sink-mute $SINK toggle pactl set-sink-mute $SINKNAME toggle
} }
status() { status() {
@@ -76,6 +78,10 @@ usage() {
} }
case "$1" in case "$1" in
"sink")
echo $SINKNAME
echo $SINK
;;
"get-vol") "get-vol")
echo $(getvol) echo $(getvol)
;; ;;

View File

@@ -14,6 +14,6 @@ output=$(
for option in "${options[@]}"; do for option in "${options[@]}"; do
echo "($i) $option" echo "($i) $option"
(( i++ )) (( i++ ))
done | dmenu -fn 'DejaVu Sans Mono:size=11' -b -i -l 10 -p '>' -nb '#222222' -nf '#ffffff' -sb '#e16b40' -sf '#000000' -w 200 -name 'shutdown-menu') done | dmenu -fn 'DejaVu Sans Mono:size=10' -b -i -l 10 -p '>' -nb '#222222' -nf '#ffffff' -sb '#e16b40' -sf '#000000')
[[ "$output" ]] && "$(dirname "$0")"/i3exit "${output#(*) }" [[ "$output" ]] && "$(dirname "$0")"/i3exit "${output#(*) }"

20
i3/i3/scripts/spotify-current Executable file
View File

@@ -0,0 +1,20 @@
#!/usr/bin/env python3
import dbus
session_bus = dbus.SessionBus()
spotify_bus = session_bus.get_object("org.mpris.MediaPlayer2.spotify",
"/org/mpris/MediaPlayer2")
spotify_properties = dbus.Interface(spotify_bus,
"org.freedesktop.DBus.Properties")
metadata = spotify_properties.Get("org.mpris.MediaPlayer2.Player", "Metadata")
# The property Metadata behaves like a python dict
# for key, value in metadata.items():
# print(key, value)
# To just print the title
print("{}: {} - [{}]".format(
metadata['xesam:artist'][0],
metadata['xesam:title'],
metadata['xesam:album']
))

View File

@@ -3,7 +3,7 @@
# --dry-run -n : only show what would be done without doing anything # --dry-run -n : only show what would be done without doing anything
# config directory # config directory
config_dir="$HOME/projects/dotfiles/" config_dir="$HOME/dotfiles/"
mapping_file="$config_dir/MAPPING" mapping_file="$config_dir/MAPPING"

View File

@@ -104,3 +104,8 @@ bind-key -n C-F2 split-window -h "exec htop"
bind-key -n C-F3 set-option status bind-key -n C-F3 set-option status
bind-key r source-file ~/.tmux.conf \; display-message "~/.tmux.conf sourced" bind-key r source-file ~/.tmux.conf \; display-message "~/.tmux.conf sourced"
bind P paste-buffer
bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'y' copy-selection
bind-key -t vi-copy 'r' rectangle-toggle

View File

@@ -28,7 +28,7 @@ Plugin 'sheerun/vim-polyglot'
"Plugin 'Lokaltog/vim-easymotion' "Plugin 'Lokaltog/vim-easymotion'
"Plugin 'PeterRincker/vim-argumentative' "Plugin 'PeterRincker/vim-argumentative'
"Plugin 'Valloric/YouCompleteMe' Plugin 'Valloric/YouCompleteMe'
"Plugin 'flazz/vim-colorschemes' "Plugin 'flazz/vim-colorschemes'
"Plugin 'jmcantrell/vim-virtualenv' "Plugin 'jmcantrell/vim-virtualenv'
"Plugin 'kien/ctrlp.vim' "Plugin 'kien/ctrlp.vim'
@@ -115,7 +115,7 @@ set undodir=~/.vim/undo
set undofile set undofile
" == environment / directories == " == environment / directories ==
set autochdir set noautochdir
set directory=/var/tmp,/tmp set directory=/var/tmp,/tmp
set viewdir=~/.vim/view set viewdir=~/.vim/view
@@ -227,7 +227,7 @@ let g:airline_right_sep = ''
let g:airline_left_sep = '' let g:airline_left_sep = ''
let g:airline#extensions#disable_rtp_load = 1 let g:airline#extensions#disable_rtp_load = 1
let g:airline_extensions = ['whitespace'] let g:airline_extensions = ['whitespace']
let g:airline_theme='powerlineish' "let g:airline_theme='powerlineish'
let g:airline_section_x = airline#section#create(['%{tagbar#currenttag("%s", "", "f")}','' , ' %{PencilMode()}', ' [', 'filetype', ']']) let g:airline_section_x = airline#section#create(['%{tagbar#currenttag("%s", "", "f")}','' , ' %{PencilMode()}', ' [', 'filetype', ']'])
let g:pencil#mode_indicators = {'hard': 'H', 'auto': 'A', 'soft': 'S', 'off': '',} let g:pencil#mode_indicators = {'hard': 'H', 'auto': 'A', 'soft': 'S', 'off': '',}
let g:airline#extensions#whitespace#enabled = 1 let g:airline#extensions#whitespace#enabled = 1
@@ -250,4 +250,7 @@ function! DeleteTrailingWS()
%s/\s\+$//e %s/\s\+$//e
exe "normal `z" exe "normal `z"
endfunction endfunction
autocmd BufWritePre * :call DeleteTrailingWS() "autocmd BufWritePre * :call DeleteTrailingWS()
set completeopt-=preview
let g:ycm_add_preview_to_completeopt = 0

View File

@@ -2,13 +2,13 @@
Xcursor.theme: Vanilla-DMZ Xcursor.theme: Vanilla-DMZ
URxvt.scrollBar: false URxvt.scrollBar: false
URxvt.font: xft:Inconsolata:size=12 URxvt.font: xft:Inconsolata:size=11
URxvt.letterSpace: -1 URxvt.letterSpace: -1
! clickable URLs ! clickable URLs
URxvt.perl-ext-common: default,matcher,selection-to-clipboard URxvt.perl-ext-common: default,matcher,selection-to-clipboard
URxvt.url-launcher: /usr/bin/firefox URxvt.url-launcher: /usr/bin/firefox-trunk
URxvt.matcher.button: 1 URxvt.matcher.button: 1
URxvt.intensityStyles: false URxvt.intensityStyles: false
@@ -24,6 +24,8 @@ URxvt.cursorBlink: true
URxvt.transparent: true URxvt.transparent: true
URxvt.shading: 0 URxvt.shading: 0
! URxvt.internalBorder: 6
! Solarized color scheme for the X Window System ! Solarized color scheme for the X Window System
! !
! http://ethanschoonover.com/solarized ! http://ethanschoonover.com/solarized

View File

@@ -1,12 +1,5 @@
#!/bin/bash #!/bin/bash
LOGFILE="$LOGDIR/xinitrc.log"
log() {
echo "[$(date +%FT%T)] $*" >> "$LOGFILE"
}
if [ -d /etc/X11/xinit/xinitrc.d ]; then if [ -d /etc/X11/xinit/xinitrc.d ]; then
for f in /etc/X11/xinit/xinitrc.d/*; do for f in /etc/X11/xinit/xinitrc.d/*; do
[ -x "$f" ] && . "$f" [ -x "$f" ] && . "$f"
@@ -22,18 +15,5 @@ start_wm() {
exec i3 -c "$HOME/.i3/config" >> "$LOGDIR/i3/i3.log" exec i3 -c "$HOME/.i3/config" >> "$LOGDIR/i3/i3.log"
} }
autostart() {
if [[ -d "$HOME/.autostart" ]] ; then
log "Looking for autostart files."
for f in "$HOME/.autostart/"*.sh ; do
if [[ -x "$f" ]] ; then
log "Executing autostart file \"$f\""
"$f"
fi
done
fi
}
autostart
start_wm start_wm

20
xinitrc.log Normal file
View File

@@ -0,0 +1,20 @@
[2017-01-04T10:35:52] Looking for autostart files.
[2017-01-04T10:35:52] Executing autostart file "/home/hak/.autostart/keyboard.sh"
[2017-01-04T10:35:52] Executing autostart file "/home/hak/.autostart/network.sh"
[2017-01-04T10:35:52] Executing autostart file "/home/hak/.autostart/pasystray.sh"
[2017-01-04T10:35:52] Executing autostart file "/home/hak/.autostart/redshift.sh"
[2017-01-04T10:35:52] Executing autostart file "/home/hak/.autostart/screen.sh"
[2017-01-04T10:35:52] Executing autostart file "/home/hak/.autostart/synclient.sh"
[2017-01-04T10:35:52] Executing autostart file "/home/hak/.autostart/xbindkeys.sh"
[2017-01-04T10:35:52] Executing autostart file "/home/hak/.autostart/xresources.sh"
[2017-01-04T10:35:52] starting i3
[2017-01-04T10:36:26] Looking for autostart files.
[2017-01-04T10:36:26] Executing autostart file "/home/hak/.autostart/keyboard.sh"
[2017-01-04T10:36:26] Executing autostart file "/home/hak/.autostart/network.sh"
[2017-01-04T10:36:26] Executing autostart file "/home/hak/.autostart/pasystray.sh"
[2017-01-04T10:36:26] Executing autostart file "/home/hak/.autostart/redshift.sh"
[2017-01-04T10:36:26] Executing autostart file "/home/hak/.autostart/screen.sh"
[2017-01-04T10:36:26] Executing autostart file "/home/hak/.autostart/synclient.sh"
[2017-01-04T10:36:26] Executing autostart file "/home/hak/.autostart/xbindkeys.sh"
[2017-01-04T10:36:26] Executing autostart file "/home/hak/.autostart/xresources.sh"
[2017-01-04T10:36:26] starting i3

View File

@@ -9,7 +9,7 @@ _path=("$HOME/bin"
"/usr/games") "/usr/games")
PATH="" PATH=""
for part in ${_path} ; do for part in ${_path[@]} ; do
PATH="$PATH:${part}" PATH="$PATH:${part}"
done done
PATH="${PATH#:}" PATH="${PATH#:}"
@@ -17,9 +17,10 @@ export PATH
export EDITOR="vim" export EDITOR="vim"
export VISUAL="vim" export VISUAL="vim"
export BROWSER="qutebrowser" export BROWSER="firefox-trunk"
export PAGER="less" export PAGER="less"
export LESS="FRX"
export VIMRC="$HOME/.vimrc" export VIMRC="$HOME/.vimrc"
@@ -34,6 +35,9 @@ export LANG=en_US.UTF-8
export LC_TIME=de_DE.UTF-8 export LC_TIME=de_DE.UTF-8
export LC_COLLATE=C export LC_COLLATE=C
export DOTFILES=~/dotfiles
# Start the gpg-agent if not already running # Start the gpg-agent if not already running
if ! pgrep -x --uid "${USER}" gpg-agent >/dev/null 2>&1; then if ! pgrep -x --uid "${USER}" gpg-agent >/dev/null 2>&1; then
gpg-connect-agent /bye >/dev/null 2>&1 gpg-connect-agent /bye >/dev/null 2>&1
@@ -47,6 +51,3 @@ fi
# Set GPG TTY # Set GPG TTY
export GPG_TTY=$(tty) export GPG_TTY=$(tty)
# exec startx breaks some logind fuckery, without exec it works
[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && startx

View File

@@ -1,5 +1,5 @@
### TRANSLATIONS ### TRANSLATIONS
alias vim="nvim -u $VIMRC" #alias vim="nvim -u $VIMRC"
### COMMON OPERATIONS ### COMMON OPERATIONS
alias ll='ls -AlFh' alias ll='ls -AlFh'
@@ -7,9 +7,6 @@ alias la='ls -A'
alias spm="sudo pacman" alias spm="sudo pacman"
alias tml="tmux list-sessions"
alias tma="tmux ls 2>/dev/null && tmux attach-session || tmux"
alias clip="xclip -selection clipboard" alias clip="xclip -selection clipboard"
alias clipo="xclip -out -selection clipboard" alias clipo="xclip -out -selection clipboard"
@@ -23,8 +20,6 @@ alias calc='python3 -ic "from math import *; import cmath"'
alias le_haxxor_1='clear && dmesg | pv -qL 20' alias le_haxxor_1='clear && dmesg | pv -qL 20'
alias le_haxxor_2='clear && hexdump -C /dev/urandom | pv -qlL 2' alias le_haxxor_2='clear && hexdump -C /dev/urandom | pv -qlL 2'
alias b='cd $OLDPWD'
alias root='sudo -sE' alias root='sudo -sE'
### USEFUL DEFAULT OPTIONS ### USEFUL DEFAULT OPTIONS
@@ -48,17 +43,15 @@ alias du='du -h'
alias df='df -h' alias df='df -h'
# show non-printable characters by default # show non-printable characters by default
alias cat="cat -v" # alias cat="cat -v"
### SHORTENING COMMAND NAMES ### SHORTENING COMMAND NAMES
alias cs="cryptsetup" alias cs="cryptsetup"
alias v="vim" alias v="vim"
alias g="git" alias g="git"
alias t="tmux"
alias c="cd" alias c="cd"
alias l="ls" alias l="ls"
alias s="sudo" alias s="sudo"
alias t="tmux"
alias cl="clear" alias cl="clear"
alias nocolor="sed -r \"s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g\"" alias nocolor="sed -r \"s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g\""

View File

@@ -130,3 +130,33 @@ man() {
embiggen() { embiggen() {
enscript --no-header --media=A4 --landscape --font="DejaVuSansMono30" -o - | ps2pdf - | zathura - enscript --no-header --media=A4 --landscape --font="DejaVuSansMono30" -o - | ps2pdf - | zathura -
} }
sshmux () {
ssh -t $@ "tmux a || tmux";
}
t() {
if [[ "$1" ]] ; then
tmux new-session -A -s "$1"
else
tmux attach-session
fi
}
b() {
bookmarks=${DOTFILES}/bookmarks
bookmark="$1"
if ! [[ "${bookmark}" ]] ; then
printf 'Need a bookmark' >&2
return 1
fi
if ! [[ -r "${bookmark}" ]] ; then
printf 'Invalid bookmark %s' "${bookmark}" >&2
return 1
fi
target="$(head -1 ${bookmark})"
if ! [[ -e "${target}" ]] ; then
printf 'Traget not found: %s' "${target}" >&2
fi
cd "$(eval ${target})"
}

1
zsh/zsh/60_autojump.sh Normal file
View File

@@ -0,0 +1 @@
. /usr/share/autojump/autojump.sh