From fd7e96e5f95927f058c0eecbcc5715e9dc7effe3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hannes=20K=C3=B6rber?= Date: Tue, 29 Jul 2014 02:11:38 +0200 Subject: [PATCH] Changes. --- i3/i3/config.d/notebook.config | 2 +- i3/i3/scripts/pa-volume.bash | 7 +++++-- vim/vimrc | 2 +- zsh/zshrc | 16 ++++++++++++++++ 4 files changed, 23 insertions(+), 4 deletions(-) diff --git a/i3/i3/config.d/notebook.config b/i3/i3/config.d/notebook.config index 14ee9c6..8ddb86f 100644 --- a/i3/i3/config.d/notebook.config +++ b/i3/i3/config.d/notebook.config @@ -15,7 +15,7 @@ bindsym XF86AudioNext exec --no-startup-id mpc next # font for window titles. ISO 10646 = Unicode font pango:DejaVu Sans Mono 11 -bindsym $mod+o exec --no-startup-id ~/.i3/scripts/monitor/monitor.sh +bindsym $mod+o exec --no-startup-id ~/development/projects/xautorandr/xautorandr.sh # start i3bar to display a workspace bar (plus the system information i3status diff --git a/i3/i3/scripts/pa-volume.bash b/i3/i3/scripts/pa-volume.bash index ce31262..3a35e50 100755 --- a/i3/i3/scripts/pa-volume.bash +++ b/i3/i3/scripts/pa-volume.bash @@ -1,7 +1,10 @@ #!/bin/bash -# index of the sink. execute pactl list sinks to get a list -SINK=1 +# name of the sink. execute pactl list sinks to get a list +SINKNAME="alsa_output.pci-0000_00_1b.0.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) diff --git a/vim/vimrc b/vim/vimrc index 5b7bdb6..7fe6fe0 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -146,7 +146,7 @@ let g:ycm_autoclose_preview_window_after_completion = 1 let g:ycm_autoclose_preview_window_after_insertion = 1 set colorcolumn=79 -set clipboard=unnamed " enable copying into the clipboard +"set clipboard=unnamed " enable copying into the clipboard set esckeys " enable cursor keys in insert mode diff --git a/zsh/zshrc b/zsh/zshrc index 5e148b7..c6f04e5 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -112,12 +112,28 @@ alias wow="git status" alias v="vim" alias g="grep" + # rebase the current branch onto WTF ARE YOU DOING YOU ARE DRUNNK TO GO BED ##alias rebase="git rebase -i $(git branch --contains HEAD | grep -v '\*.*' | head -1)" ### FUNCTIONS +slideshow() { + delay=$1 + [[ -z "$delay" ]] && { echo "wrong usage" ; return 1 ; } + shift + [[ -z "$@" ]] && { echo "wrong usage" ; return 1 ; } + feh --auto-zoom \ + --randomize \ + --recursive \ + --scale-down \ + --image-bg black \ + --draw-filename \ + --slideshow-delay=$delay \ + "$@" +} + function cd() { builtin cd $* && ls }