diff --git a/autostart/autostart/applications.sh b/autostart/autostart/applications.sh new file mode 100755 index 0000000..ed7b2a5 --- /dev/null +++ b/autostart/autostart/applications.sh @@ -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" diff --git a/autostart/autostart/browser.sh b/autostart/autostart/browser.sh deleted file mode 100755 index 9ef750c..0000000 --- a/autostart/autostart/browser.sh +++ /dev/null @@ -1 +0,0 @@ -qutebrowser & diff --git a/autostart/autostart/irc.sh b/autostart/autostart/irc.sh deleted file mode 100755 index 1bbdf69..0000000 --- a/autostart/autostart/irc.sh +++ /dev/null @@ -1 +0,0 @@ -quasselclient & diff --git a/autostart/autostart/keyboard.sh b/autostart/autostart/keyboard.sh index ba6289a..ab70c4d 100755 --- a/autostart/autostart/keyboard.sh +++ b/autostart/autostart/keyboard.sh @@ -1,3 +1,4 @@ +#!/bin/bash keyboard_layout=de keyboard_variant=nodeadkeys keyboard_repeat_delay=150 diff --git a/autostart/autostart/mail.sh b/autostart/autostart/mail.sh deleted file mode 100755 index 853b4b4..0000000 --- a/autostart/autostart/mail.sh +++ /dev/null @@ -1 +0,0 @@ -evolution & diff --git a/autostart/autostart/music.sh b/autostart/autostart/music.sh deleted file mode 100755 index 0d8e062..0000000 --- a/autostart/autostart/music.sh +++ /dev/null @@ -1 +0,0 @@ -clementine & diff --git a/autostart/autostart/owncloud.sh b/autostart/autostart/owncloud.sh deleted file mode 100755 index c370b5e..0000000 --- a/autostart/autostart/owncloud.sh +++ /dev/null @@ -1,2 +0,0 @@ -log "starting owncloud client" -owncloud & &>> $LOGFILE diff --git a/autostart/autostart/screen.sh b/autostart/autostart/screen.sh index 0a7580a..adaa2d2 100755 --- a/autostart/autostart/screen.sh +++ b/autostart/autostart/screen.sh @@ -3,5 +3,5 @@ log "execute xautorandr" xautorandr log "disable screen blanking" -xset -dpms & &>> $LOGFILE -xset s off & &>> $LOGFILE +xset -dpms &>> $LOGFILE +xset s off &>> $LOGFILE diff --git a/autostart/autostart/voip.sh b/autostart/autostart/voip.sh deleted file mode 100755 index 7bd91e6..0000000 --- a/autostart/autostart/voip.sh +++ /dev/null @@ -1,2 +0,0 @@ -mumble & -teamspeak3 & diff --git a/autostart/autostart/wallchanger.sh b/autostart/autostart/wallchanger.sh deleted file mode 100755 index 22c474a..0000000 --- a/autostart/autostart/wallchanger.sh +++ /dev/null @@ -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 diff --git a/autostart/autostart/wallpaper.sh b/autostart/autostart/wallpaper.sh new file mode 100755 index 0000000..d755523 --- /dev/null +++ b/autostart/autostart/wallpaper.sh @@ -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' diff --git a/bookmarks/sysop b/bookmarks/sysop new file mode 100644 index 0000000..64bf931 --- /dev/null +++ b/bookmarks/sysop @@ -0,0 +1 @@ +$HOME/projects/sysop/ diff --git a/git/gitconfig b/git/gitconfig index 506fcdb..7873ed7 100644 --- a/git/gitconfig +++ b/git/gitconfig @@ -1,7 +1,8 @@ [user] name = Hannes Körber - email = hannes.koerber@haktec.de - signingkey = 0x078A167A8741BD30 + email = hannes.koerber@tradebyte.com +[github] + user = hakoerber [alias] untrack = "rm --cached" unstage = "reset HEAD" @@ -16,7 +17,9 @@ st = "status" br = "branch" rb = "rebase" - rbi = "rebase -i" + rbi = "rebase --interactive" + rbc = "rebase --continue" + rba = "rebase --abort" df = "diff" gr = "! git graph" @@ -30,17 +33,24 @@ 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' - + 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] - whitespace = "" - excludesfile = "~/.gitignore_global" + fileMode = true + whitespace = "blank-at-eol,space-before-tab,blank-at-eof" + ; excludesfile = "~/.gitignore_global" + abbrev = 8 [color] ui = true -[gui] - recentrepo = /home/hannes/programming/git-repositories/autobackup +[column] + ui = auto [push] default = simple [merge] @@ -48,16 +58,29 @@ [gc] auto = 0 [advice] - pushNonFastForward = false + pushUpdateRejected = false statusHints = false commitBeforeMerge = false + detachedHead = false [commit] - gpgSign = true +# gpgSign = true + cleanup = default + status = true [status] relativePaths = false + submoduleSummary = true [pager] - log = diff-so-fancy | less - show = diff-so-fancy | less - diff = diff-so-fancy | less + # log = diff-so-fancy | less + # show = diff-so-fancy | less + # diff = diff-so-fancy | less [interactive] - diffFilter = diff-so-fancy + #diffFilter = diff-so-fancy +[rebase] + autoSquash = true +[diff] + submodule = log + mnemonicPrefix = true +[branch] + autoSetupMerge = true +[clean] + requireForce = true diff --git a/git/gitignore_global b/git/gitignore_global index 5948fb9..8fb0268 100644 --- a/git/gitignore_global +++ b/git/gitignore_global @@ -58,9 +58,9 @@ Icon *.rpm ### logs and databases -*.log -*.sql -*.sqlite +#*.log +# *.sql +# *.sqlite ### eclipse specific *.pydevproject diff --git a/i3/i3.log b/i3/i3.log new file mode 100644 index 0000000..e69de29 diff --git a/i3/i3/config b/i3/i3/config index 3d88e1a..e48a2e1 100644 --- a/i3/i3/config +++ b/i3/i3/config @@ -38,15 +38,15 @@ set $signal_reboot reboot set $signal_shutdown shutdown - set $workspace1 1:web + set $workspace1 1 set $workspace2 2 set $workspace3 3 set $workspace4 4 set $workspace5 5 - set $workspace6 6:voip - set $workspace7 7:music - set $workspace8 8:irc - set $workspace9 9:mail + set $workspace6 6 + set $workspace7 7 + set $workspace8 8 + set $workspace9 9 set $workspace10 10 set $key_workspace1 1 @@ -92,6 +92,24 @@ 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 ################################################################ ##################9############################################################# @@ -238,9 +256,7 @@ floating_minimum_size 0 x 0 floating_maximum_size 0 x 0 - smart_borders on - - font pango:Insonsolata 11 + font pango:Inconsolata 10 ################################################################################ ### COLOR SETTINGS ############################################################# @@ -256,12 +272,6 @@ client.urgent #2f343a #900000 #ffffff #900000 ### 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+F7 exec --no-startup-id clementine @@ -272,23 +282,35 @@ bindsym $mod+F9 exec --no-startup-id evolution ### 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 XF86AudioMute exec --no-startup-id amixer set Master 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 XF86AudioLowerVolume exec --no-startup-id $scriptdir/pa-volume set-vol -5 ; exec --no-startup-id $scriptdir/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 +3 ; 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 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 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+p exec --no-startup-id kill -SIGUSR1 $(cat $RUNDIR/wallchanger.$XDG_SESSION_ID.pid) -################################################################################ + + + +exec --no-startup-id autostart + + + + + + + +############################################################################### ### BARS ####################################################################### ################################################################################ # @@ -296,6 +318,8 @@ bar { mode dock position top + +#tray_output HDMI3 tray_output primary tray_padding 3 @@ -307,7 +331,7 @@ bar { id bar-0 - font pango:DejaVu Sans, Icons 11 + font pango:DejaVu Sans, Icons 10 colors { background #222222 diff --git a/i3/i3/i3blocks.conf b/i3/i3/i3blocks.conf index 8092c6a..ade7120 100644 --- a/i3/i3/i3blocks.conf +++ b/i3/i3/i3blocks.conf @@ -1,28 +1,15 @@ separator_block_width=33 -[vpn-main] -command=$HOME/.i3/scripts/openvpn main -label= -interval=5 +#[spotify] +#command=$HOME/.i3/scripts/spotify-current +#interval=1 -[vpn-mgmt] -command=$HOME/.i3/scripts/openvpn mgmt -label= -interval=5 - -[wifi] -command=$HOME/.i3/scripts/wifi -label= -interval=30 - -[network] -command=BLOCK_INSTANCE=wlp2s0 /usr/lib/i3blocks/iface -label= -interval=5 +# [wifi] +# command=$HOME/.i3/scripts/wifi +# interval=30 [load] command=$HOME/.i3/scripts/load -label= interval=30 [volume] @@ -43,7 +30,7 @@ interval=once [time] label= -command=date "+%a %d.%m %H:%M" +command=date "+[KW%V] %A %d.%m.%Y %H:%M:%S" interval=1 separator=false separator_block_width=12 diff --git a/i3/i3/scripts/appmenu b/i3/i3/scripts/appmenu index 6e5f4ce..aa5744f 100755 --- a/i3/i3/scripts/appmenu +++ b/i3/i3/scripts/appmenu @@ -1,2 +1,3 @@ #!/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'" diff --git a/i3/i3/scripts/i3exit b/i3/i3/scripts/i3exit index 75ade5c..885f0b7 100755 --- a/i3/i3/scripts/i3exit +++ b/i3/i3/scripts/i3exit @@ -4,7 +4,7 @@ _logfile="$LOGDIR/i3/i3exit.log" -_fallback_color=000000 +_fallback_color="000000" touch "$_logfile" @@ -16,14 +16,25 @@ log() lock() { - if [[ "$LOCKSCREEN" ]] ; then - i3lock --show-failed-attempts --image "$LOCKSCREEN" - else - i3lock --show-failed-attempts --color "$_fallback_color" + set -x + playing=0 + 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 + playing=1 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() { + : xset dpms force off } @@ -33,7 +44,7 @@ log "[I] Received signal \"$signal\"." case "$signal" in lock) log "[I] Locking session." - lock && screen_off + lock ;; logout) log "[I] Exiting i3." diff --git a/i3/i3/scripts/pa-volume b/i3/i3/scripts/pa-volume index 413c83e..6a28c0e 100755 --- a/i3/i3/scripts/pa-volume +++ b/i3/i3/scripts/pa-volume @@ -1,11 +1,13 @@ #!/bin/bash # 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 SINK=$(( $(pactl list sinks | grep "Name: " | grep -n "${SINKNAME}"$ | grep -o "^[[:digit:]]*") -1)) + 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) } @@ -49,15 +51,15 @@ ismuted() { } mute() { - pactl set-sink-mute $SINK 1 + pactl set-sink-mute $SINKNAME 1 } unmute() { - pactl set-sink-mute $SINK 0 + pactl set-sink-mute $SINKNAME 0 } mute-toggle() { - pactl set-sink-mute $SINK toggle + pactl set-sink-mute $SINKNAME toggle } status() { @@ -76,6 +78,10 @@ usage() { } case "$1" in + "sink") + echo $SINKNAME + echo $SINK + ;; "get-vol") echo $(getvol) ;; diff --git a/i3/i3/scripts/shutdown-menu b/i3/i3/scripts/shutdown-menu index 57be77f..ac530b5 100755 --- a/i3/i3/scripts/shutdown-menu +++ b/i3/i3/scripts/shutdown-menu @@ -14,6 +14,6 @@ output=$( for option in "${options[@]}"; do echo "($i) $option" (( 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#(*) }" diff --git a/i3/i3/scripts/spotify-current b/i3/i3/scripts/spotify-current new file mode 100755 index 0000000..2a01e6e --- /dev/null +++ b/i3/i3/scripts/spotify-current @@ -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'] +)) + diff --git a/scripts/setup.bash b/scripts/setup.bash index 44a74ee..1c1c14e 100755 --- a/scripts/setup.bash +++ b/scripts/setup.bash @@ -3,7 +3,7 @@ # --dry-run -n : only show what would be done without doing anything # config directory -config_dir="$HOME/projects/dotfiles/" +config_dir="$HOME/dotfiles/" mapping_file="$config_dir/MAPPING" diff --git a/tmux/tmux.conf b/tmux/tmux.conf index 3ff0c31..ea58e49 100644 --- a/tmux/tmux.conf +++ b/tmux/tmux.conf @@ -104,3 +104,8 @@ bind-key -n C-F2 split-window -h "exec htop" bind-key -n C-F3 set-option status 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 diff --git a/vim/vimrc b/vim/vimrc index b1836ec..c153b82 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -28,7 +28,7 @@ Plugin 'sheerun/vim-polyglot' "Plugin 'Lokaltog/vim-easymotion' "Plugin 'PeterRincker/vim-argumentative' -"Plugin 'Valloric/YouCompleteMe' +Plugin 'Valloric/YouCompleteMe' "Plugin 'flazz/vim-colorschemes' "Plugin 'jmcantrell/vim-virtualenv' "Plugin 'kien/ctrlp.vim' @@ -115,7 +115,7 @@ set undodir=~/.vim/undo set undofile " == environment / directories == -set autochdir +set noautochdir set directory=/var/tmp,/tmp set viewdir=~/.vim/view @@ -227,7 +227,7 @@ let g:airline_right_sep = '' let g:airline_left_sep = '' let g:airline#extensions#disable_rtp_load = 1 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:pencil#mode_indicators = {'hard': 'H', 'auto': 'A', 'soft': 'S', 'off': '',} let g:airline#extensions#whitespace#enabled = 1 @@ -250,4 +250,7 @@ function! DeleteTrailingWS() %s/\s\+$//e exe "normal `z" endfunction -autocmd BufWritePre * :call DeleteTrailingWS() +"autocmd BufWritePre * :call DeleteTrailingWS() + +set completeopt-=preview +let g:ycm_add_preview_to_completeopt = 0 diff --git a/x/Xresources b/x/Xresources index 596d35e..f7ba4c8 100644 --- a/x/Xresources +++ b/x/Xresources @@ -2,13 +2,13 @@ Xcursor.theme: Vanilla-DMZ URxvt.scrollBar: false -URxvt.font: xft:Inconsolata:size=12 +URxvt.font: xft:Inconsolata:size=11 URxvt.letterSpace: -1 ! clickable URLs 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.intensityStyles: false @@ -24,6 +24,8 @@ URxvt.cursorBlink: true URxvt.transparent: true URxvt.shading: 0 +! URxvt.internalBorder: 6 + ! Solarized color scheme for the X Window System ! ! http://ethanschoonover.com/solarized diff --git a/x/xinitrc b/x/xinitrc index a746753..1b3d27a 100755 --- a/x/xinitrc +++ b/x/xinitrc @@ -1,12 +1,5 @@ #!/bin/bash -LOGFILE="$LOGDIR/xinitrc.log" - -log() { - echo "[$(date +%FT%T)] $*" >> "$LOGFILE" -} - - if [ -d /etc/X11/xinit/xinitrc.d ]; then for f in /etc/X11/xinit/xinitrc.d/*; do [ -x "$f" ] && . "$f" @@ -22,18 +15,5 @@ start_wm() { 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 diff --git a/xinitrc.log b/xinitrc.log new file mode 100644 index 0000000..6a49533 --- /dev/null +++ b/xinitrc.log @@ -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 diff --git a/zsh/zprofile b/zsh/zprofile index a9af91c..296ef92 100644 --- a/zsh/zprofile +++ b/zsh/zprofile @@ -9,7 +9,7 @@ _path=("$HOME/bin" "/usr/games") PATH="" -for part in ${_path} ; do +for part in ${_path[@]} ; do PATH="$PATH:${part}" done PATH="${PATH#:}" @@ -17,9 +17,10 @@ export PATH export EDITOR="vim" export VISUAL="vim" -export BROWSER="qutebrowser" +export BROWSER="firefox-trunk" export PAGER="less" +export LESS="FRX" export VIMRC="$HOME/.vimrc" @@ -34,6 +35,9 @@ export LANG=en_US.UTF-8 export LC_TIME=de_DE.UTF-8 export LC_COLLATE=C +export DOTFILES=~/dotfiles + + # Start the gpg-agent if not already running if ! pgrep -x --uid "${USER}" gpg-agent >/dev/null 2>&1; then gpg-connect-agent /bye >/dev/null 2>&1 @@ -47,6 +51,3 @@ fi # Set GPG TTY export GPG_TTY=$(tty) - -# exec startx breaks some logind fuckery, without exec it works -[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && startx diff --git a/zsh/zsh/20_aliases.sh b/zsh/zsh/20_aliases.sh index bd16fad..2d669da 100644 --- a/zsh/zsh/20_aliases.sh +++ b/zsh/zsh/20_aliases.sh @@ -1,5 +1,5 @@ ### TRANSLATIONS -alias vim="nvim -u $VIMRC" +#alias vim="nvim -u $VIMRC" ### COMMON OPERATIONS alias ll='ls -AlFh' @@ -7,9 +7,6 @@ alias la='ls -A' 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 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_2='clear && hexdump -C /dev/urandom | pv -qlL 2' -alias b='cd $OLDPWD' - alias root='sudo -sE' ### USEFUL DEFAULT OPTIONS @@ -48,17 +43,15 @@ alias du='du -h' alias df='df -h' # show non-printable characters by default -alias cat="cat -v" +# alias cat="cat -v" ### SHORTENING COMMAND NAMES alias cs="cryptsetup" alias v="vim" alias g="git" -alias t="tmux" alias c="cd" alias l="ls" alias s="sudo" -alias t="tmux" alias cl="clear" alias nocolor="sed -r \"s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g\"" diff --git a/zsh/zsh/40_functions.sh b/zsh/zsh/40_functions.sh index caf3b79..3926039 100644 --- a/zsh/zsh/40_functions.sh +++ b/zsh/zsh/40_functions.sh @@ -130,3 +130,33 @@ man() { embiggen() { 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})" +} diff --git a/zsh/zsh/60_autojump.sh b/zsh/zsh/60_autojump.sh new file mode 100644 index 0000000..39843b2 --- /dev/null +++ b/zsh/zsh/60_autojump.sh @@ -0,0 +1 @@ +. /usr/share/autojump/autojump.sh