From df0019ae575c616dafbbfd856bfa63f431d2c63b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hannes=20K=C3=B6rber?= Date: Sat, 23 Apr 2016 20:09:24 +0200 Subject: [PATCH] Many small changes. --- i3/i3/config | 18 ++++++++++-------- i3/i3/i3blocks.conf | 8 ++++---- i3/i3/scripts/appmenu | 2 +- i3/i3/scripts/load | 2 +- scripts/setup.bash | 4 ++-- vim/vimrc | 2 +- x/Xresources | 34 +--------------------------------- zsh/zprofile | 2 +- zsh/zsh/40_functions.sh | 10 +++++++++- zsh/zsh/50_prompt.sh | 2 +- 10 files changed, 31 insertions(+), 53 deletions(-) diff --git a/i3/i3/config b/i3/i3/config index 21725c3..0c87765 100644 --- a/i3/i3/config +++ b/i3/i3/config @@ -178,6 +178,8 @@ bindsym Pause exec --no-startup-id ~/.i3/scripts/shutdown-menu + bindsym $mod+Shift+v exec --no-startup-id redshift-toggle + ################################################################################ ### MODES ###################################################################### ################################################################################ @@ -238,7 +240,7 @@ smart_borders on - font pango:DejaVu Sans Mono 12 + font pango:DejaVu Sans Mono 11 ################################################################################ ### COLOR SETTINGS ############################################################# @@ -305,18 +307,18 @@ bar { id bar-0 - font pango:DejaVu Sans, Icons 12 + font pango:DejaVu Sans, Icons 11 colors { - background #000000 + background #222222 statusline #ffffff separator #e16b40 - focused_workspace #e16b40 #000000 #ffffff - active_workspace #000000 #5f676a #ffffff - inactive_workspace #000000 #000000 #dddddd - urgent_workspace #D00000 #D00000 #000000 - binding_mode #000000 #e16b40 #000000 + focused_workspace #e16b40 #222222 #ffffff + active_workspace #222222 #5f676a #ffffff + inactive_workspace #222222 #222222 #dddddd + urgent_workspace #D00000 #D00000 #222222 + binding_mode #222222 #e16b40 #222222 } i3bar_command i3bar diff --git a/i3/i3/i3blocks.conf b/i3/i3/i3blocks.conf index 90b7b61..8092c6a 100644 --- a/i3/i3/i3blocks.conf +++ b/i3/i3/i3blocks.conf @@ -3,12 +3,12 @@ separator_block_width=33 [vpn-main] command=$HOME/.i3/scripts/openvpn main label= -interval=120 +interval=5 [vpn-mgmt] command=$HOME/.i3/scripts/openvpn mgmt label= -interval=120 +interval=5 [wifi] command=$HOME/.i3/scripts/wifi @@ -18,7 +18,7 @@ interval=30 [network] command=BLOCK_INSTANCE=wlp2s0 /usr/lib/i3blocks/iface label= -interval=120 +interval=5 [load] command=$HOME/.i3/scripts/load @@ -33,7 +33,7 @@ interval=once [battery] command=$HOME/.i3/scripts/battery i3blocks -label= +label= interval=30 [kernel] diff --git a/i3/i3/scripts/appmenu b/i3/i3/scripts/appmenu index b2c05c0..6e5f4ce 100755 --- a/i3/i3/scripts/appmenu +++ b/i3/i3/scripts/appmenu @@ -1,2 +1,2 @@ #!/usr/bin/env bash -j4-dmenu-desktop --dmenu="dmenu -fn 'DejaVu Sans:size=11' -i -p '>' -nb '#000000' -nf '#ffffff' -sb '#e16b40' -sf '#000000'" +j4-dmenu-desktop --dmenu="dmenu -fn 'DejaVu Sans:size=11' -h 24 -i -p '>' -nb '#000000' -nf '#ffffff' -sb '#e16b40' -sf '#000000'" diff --git a/i3/i3/scripts/load b/i3/i3/scripts/load index 4e30678..bf85dca 100755 --- a/i3/i3/scripts/load +++ b/i3/i3/scripts/load @@ -1,6 +1,6 @@ #!/usr/bin/env bash -load="$(cut -d ' ' -f 2 /proc/loadavg)" +load="$(cut -d ' ' -f 1 /proc/loadavg)" cpus="$(nproc --all)" echo $load diff --git a/scripts/setup.bash b/scripts/setup.bash index d9821d3..44a74ee 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/dotfiles/" +config_dir="$HOME/projects/dotfiles/" mapping_file="$config_dir/MAPPING" @@ -75,7 +75,7 @@ while IFS= read -d $'\0' -r folder ; do else destination="$(path_combine "$(path_combine "$HOME" "$mapping")" "$(basename "$file")")" fi - if [[ -L "$destination" ]]; then + if [[ "$(readlink "$destination")" == "$file" ]]; then continue elif [[ -e "$destination" ]]; then backup_destination="$(path_combine "$backup_dir" "$(basename "$destination")")" diff --git a/vim/vimrc b/vim/vimrc index 54c19c3..b1836ec 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -250,4 +250,4 @@ function! DeleteTrailingWS() %s/\s\+$//e exe "normal `z" endfunction -autocmd BufWrite * :call DeleteTrailingWS() +autocmd BufWritePre * :call DeleteTrailingWS() diff --git a/x/Xresources b/x/Xresources index d53a75f..5b314b4 100644 --- a/x/Xresources +++ b/x/Xresources @@ -13,8 +13,6 @@ URxvt.matcher.button: 1 URxvt.intensityStyles: false -!URxvt.scrollTtyKeypress: true - URxvt.saveLines: 10000 URxvt.fading: 20 @@ -24,15 +22,12 @@ URxvt.termName: urxvt URxvt.cursorBlink: true URxvt.transparent: true -URxvt.shading: 10 +URxvt.shading: 0 ! Solarized color scheme for the X Window System ! ! http://ethanschoonover.com/solarized - -! Common - #define S_yellow #b58900 #define S_orange #cb4b16 #define S_red #dc322f @@ -42,9 +37,6 @@ URxvt.shading: 10 #define S_cyan #2aa198 #define S_green #859900 - -! Dark - #define S_base03 #002b36 #define S_base02 #073642 #define S_base01 #586e75 @@ -54,24 +46,6 @@ URxvt.shading: 10 #define S_base2 #eee8d5 #define S_base3 #fdf6e3 - -! Light - -!#define S_base03 #fdf6e3 -!#define S_base02 #eee8d5 -!#define S_base01 #93a1a1 -!#define S_base00 #839496 -!#define S_base0 #657b83 -!#define S_base1 #586e75 -!#define S_base2 #073642 -!#define S_base3 #002b36 - - -! To only apply colors to your terminal, for example, prefix -! the color assignment statement with its name. Example: -! -! URxvt*background: S_base03 - URxvt*background: S_base03 URxvt*foreground: S_base0 URxvt*fading: 40 @@ -97,11 +71,6 @@ URxvt*color13: S_violet URxvt*color14: S_base1 URxvt*color15: S_base3 - - - - - urxvt*foreground: white urxvt*background: black @@ -121,4 +90,3 @@ urxvt*background: black *color13: #AD7FA8 *color14: #fcaf3e *color15: #EEEEEC - diff --git a/zsh/zprofile b/zsh/zprofile index 2a8a9d6..d7fe2c2 100644 --- a/zsh/zprofile +++ b/zsh/zprofile @@ -15,7 +15,7 @@ done PATH="${PATH#:}" export PATH -export EDITOR="nvim" +export EDITOR="vim" export VISUAL="vim" export BROWSER="firefox" diff --git a/zsh/zsh/40_functions.sh b/zsh/zsh/40_functions.sh index a0bc409..caf3b79 100644 --- a/zsh/zsh/40_functions.sh +++ b/zsh/zsh/40_functions.sh @@ -94,7 +94,12 @@ myip6() { diffdir() { [[ "$1" ]] && [[ "$2" ]] || { echo "$0 " ; return 1 ; } - diff <(cd "$1" && find -type f | sort | xargs md5sum) <(cd "$2" && find -type f | sort | xargs md5sum) + diff <(cd "$1" && find -type f -exec md5sum {} \;) <(cd "$2" && find -type f -exec md5sum {} \;) +} + +diffdir2() { + [[ "$1" ]] && [[ "$2" ]] || { echo "$0 " ; return 1 ; } + comm -13 <(cd "$1" && find -type f | sort -g) <(cd "$2" && find -type f | sort -g) } bm() { @@ -122,3 +127,6 @@ man() { man "$@" } +embiggen() { + enscript --no-header --media=A4 --landscape --font="DejaVuSansMono30" -o - | ps2pdf - | zathura - +} diff --git a/zsh/zsh/50_prompt.sh b/zsh/zsh/50_prompt.sh index c20093a..5b96f6e 100644 --- a/zsh/zsh/50_prompt.sh +++ b/zsh/zsh/50_prompt.sh @@ -1,6 +1,6 @@ autoload -Uz vcs_info -_vcsbase="%{$fg[grey]%}[%r] %{$fg[blue]%}[%B%b%{$fg[red]%}%m%{$fg[blue]%}] %{$fg[red]%}%B%c%u%f" +_vcsbase="%{$fg[grey]%}[%r] %{$fg[blue]%}[%{%B%}%b%{$fg[red]%}%m%{$fg[blue]%}] %{$fg[red]%}%{%B%}%c%u" zstyle ':vcs_info:*' stagedstr 'I' zstyle ':vcs_info:*' unstagedstr 'M'