From f04a4da7148e7adf4edecb1329f807e9019e4852 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hannes=20K=C3=B6rber?= Date: Fri, 7 Nov 2014 17:37:04 +0100 Subject: [PATCH] Changes. --- i3/i3/.gitignore | 3 +- i3/i3/config | 37 ++++--- i3/i3/config.d/netbook.config | 35 ++++--- i3/i3/config.d/notebook.config | 11 +- i3/i3/conky/netbook.conkyrc | 127 ++++++----------------- i3/i3/conky/virtualarch.conkyrc | 104 ++----------------- i3/i3/scripts/genconfig.bash | 12 +-- i3/i3/scripts/pa-volume.bash | 4 + i3/i3/scripts/status.d/conky_pacman.bash | 2 +- i3/i3/scripts/weather.sh | 21 ++++ mpd/mpd/mpd.conf | 2 +- setup/packages-native.list | 18 +++- tmux/tmux.conf | 15 ++- vim/vimrc | 88 ++++++++-------- x/Xresources | 2 +- x/xinitrc | 47 +++++---- x/xinitrc.d/netbook.xinitrc | 2 + zsh/zprofile | 10 +- zsh/zshrc | 66 ++++++------ 19 files changed, 268 insertions(+), 338 deletions(-) create mode 100755 i3/i3/scripts/weather.sh diff --git a/i3/i3/.gitignore b/i3/i3/.gitignore index 6e74f38..35ec622 100644 --- a/i3/i3/.gitignore +++ b/i3/i3/.gitignore @@ -1 +1,2 @@ -session.config +session.*.config +testing/ diff --git a/i3/i3/config b/i3/i3/config index a81c1cb..62d2a0c 100644 --- a/i3/i3/config +++ b/i3/i3/config @@ -19,7 +19,8 @@ set $mod Mod4 # The default terminal - set $terminal urxvtc #-e bash -c "tmux -q has-session && exec tmux attach-session -d || exec tmux new-session -n$USER -s$USER@$HOSTNAME" + set $terminal ~/bin/start-urxvtc.sh + #-e bash -c "tmux -q has-session && exec tmux attach-session -d || exec tmux new-session -n$USER -s$USER@$HOSTNAME" # Path to the exit script set $path_i3exit ~/.i3/scripts/i3exit.bash @@ -39,16 +40,16 @@ set $signal_reboot reboot set $signal_shutdown shutdown - set $workspace1 1 + set $workspace1 1:web set $workspace2 2 set $workspace3 3 set $workspace4 4 set $workspace5 5 - set $workspace6 6 - set $workspace7 7 - set $workspace8 8 - set $workspace9 9 - set $workspace10 10 + set $workspace6 6:irc + set $workspace7 7:music + set $workspace8 8:notes + set $workspace9 9:mail + set $workspace10 10:im set $key_workspace1 1 set $key_workspace2 2 @@ -181,7 +182,7 @@ ### START APPLICATIONS ##################################################### - bindsym $mod+d exec j4-dmenu-desktop --dmenu="dmenu -fn 'DejaVu Sans Mono:size=11' -b -i -l 10 -p '>' -nb '#222222' -nf '#ffffff' -sb '#e16b40' -sf '#000000'" + bindsym $mod+d exec j4-dmenu-desktop --dmenu="dmenu -fn 'DejaVu Sans:size=11' -i -p '>' -nb '#000000' -nf '#ffffff' -sb '#e16b40' -sf '#000000'" bindsym $mod+Return exec $terminal bindsym $mod+F1 exec firefox @@ -291,10 +292,10 @@ client.urgent #2f343a #900000 #ffffff #900000 for_window [class="^URxvt$"] border 1pixel for_window [class="^Cairo-dock$"] floating enable , border none for_window [class="^Pavucontrol$"] floating enable , border normal - for_window [title="^Skype.*for Linux$" ] floating enable , border none for_window [class="^Chromium$" ] border none for_window [class="^yad-status$" ] floating enable , border none for_window [class="^Docky$" ] floating enable , border none + for_window [title="^Skype.*for Linux$" ] floating enable , border none for_window [class="^Skype$" ] border none for_window [class="^Steam$" ] border none for_window [class="^Eclipse$" ] border none @@ -304,9 +305,21 @@ client.urgent #2f343a #900000 #ffffff #900000 for_window [class="^Evince$" ] border none for_window [class="^Designer$" ] border none for_window [class="^main\.py$" ] floating enable - for_window [class="^Xfce4-panel$"] floating enable - for_window [class="^Thunderbird"] border none + #for_window [class="^Xfce4-panel$"] floating enable + for_window [class="^Thunderbird$"] border none for_window [instance="^shutdown-menu$"] border normal + for_window [class="^VirtualBox$" ] border normal - assign [class="^Thunderbird"] $workspace9 + #assign [class="^Thunderbird"] $workspace9 + assign [class="^Firefox$" ] $workspace1 + + assign [title=".*[Ss]team.*" ] $workspace5 + assign [class=".*[Ss]team.*" ] $workspace5 + assign [class="^Quassel$" ] $workspace6 + assign [instance="^ncmpcpp$" ] $workspace7 + assign [class="^Zim$" ] $workspace8 + assign [class="^Thunderbird$" ] $workspace9 assign [class="^Skype$"] $workspace10 + + + diff --git a/i3/i3/config.d/netbook.config b/i3/i3/config.d/netbook.config index d6c7b10..5b58a19 100644 --- a/i3/i3/config.d/netbook.config +++ b/i3/i3/config.d/netbook.config @@ -1,10 +1,23 @@ -exec --no-startup-id dropboxd & - # bind some keys bindsym XF86Sleep exec --no-startup-id $path_i3exit suspend bindsym XF86AudioMute exec --no-startup-id amixer set Master toggle -bindsym XF86AudioRaiseVolume exec --no-startup-id amixer set Master %5+ -bindsym XF86AudioLowerVolume exec --no-startup-id amixer set Master %5- +bindsym XF86AudioRaiseVolume exec --no-startup-id bash $HOME/.i3/scripts/pa-volume.bash set-vol +5 ; exec --no-startup-id "bash $HOME/.i3/scripts/update-status.bash" +bindsym XF86AudioLowerVolume exec --no-startup-id bash $HOME/.i3/scripts/pa-volume.bash set-vol -5 ; exec --no-startup-id "bash $HOME/.i3/scripts/update-status.bash" +# keys seemingly switched +bindsym XF86MonBrightnessUp exec --no-startup-id xbacklight -dec 5 ; exec --no-startup-id "bash $HOME/.i3/scripts/update-status.bash" +bindsym XF86MonBrightnessDown exec --no-startup-id xbacklight -inc 5 ; exec --no-startup-id "bash $HOME/.i3/scripts/update-status.bash" + +bindsym XF86AudioPlay exec --no-startup-id mpc toggle + +bindsym XF86AudioPrev exec --no-startup-id mpc prev +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 "bash -c '~/development/projects/xautorandr/xautorandr ; kill -SIGUSR2 $(cat $HOME/.var/run/wallchanger.pid)'" +bindsym $mod+p exec --no-startup-id "bash -c 'kill -SIGUSR1 $(cat $HOME/.var/run/wallchanger.pid)'" + # start i3bar to display a workspace bar (plus the system information i3status # finds out, if available) @@ -13,7 +26,6 @@ bar { mode dock position top - # show a tray area tray_output primary # show workspace buttons @@ -21,20 +33,19 @@ bar { id bar-0 - font pango:DejaVu Sans Mono 8 + font pango:DejaVu Sans, Icons 9 colors { background #000000 statusline #ffffff - separator #666666 + separator #e16b40 - focused_workspace #4c7899 #285577 #ffffff - active_workspace #333333 #5f676a #ffffff - inactive_workspace #333333 #222222 #888888 - urgent_workspace #2f343a #900000 #ffffff + focused_workspace #e16b40 #000000 #ffffff + active_workspace #000000 #5f676a #ffffff + inactive_workspace #000000 #000000 #dddddd + urgent_workspace #D00000 #D00000 #000000 } i3bar_command i3bar - #status_command i3status -c ~/.i3/i3status.d/netbook.conf status_command bash ~/.i3/i3bar_wrapper.bash ~/.i3/conky/netbook.conkyrc } diff --git a/i3/i3/config.d/notebook.config b/i3/i3/config.d/notebook.config index 0f1c42a..5c0728e 100644 --- a/i3/i3/config.d/notebook.config +++ b/i3/i3/config.d/notebook.config @@ -18,7 +18,6 @@ font pango:DejaVu Sans Mono 11 bindsym $mod+o exec --no-startup-id "bash -c '~/development/projects/xautorandr/xautorandr ; kill -SIGUSR2 $(cat $HOME/.var/run/wallchanger.pid)'" bindsym $mod+p exec --no-startup-id "bash -c 'kill -SIGUSR1 $(cat $HOME/.var/run/wallchanger.pid)'" - # start i3bar to display a workspace bar (plus the system information i3status # finds out, if available) bar { @@ -36,14 +35,14 @@ bar { font pango:DejaVu Sans, Icons 11 colors { - background #222222 + background #000000 statusline #ffffff separator #e16b40 - focused_workspace #e16b40 #222222 #ffffff - active_workspace #222222 #5f676a #ffffff - inactive_workspace #222222 #222222 #bbbbbb - urgent_workspace #000000 #de1e15 #000000 + focused_workspace #e16b40 #000000 #ffffff + active_workspace #000000 #5f676a #ffffff + inactive_workspace #000000 #000000 #dddddd + urgent_workspace #D00000 #D00000 #000000 } i3bar_command i3bar diff --git a/i3/i3/conky/netbook.conkyrc b/i3/i3/conky/netbook.conkyrc index a6260ac..75305ef 100644 --- a/i3/i3/conky/netbook.conkyrc +++ b/i3/i3/conky/netbook.conkyrc @@ -1,5 +1,4 @@ # vim:set filetype=conkyrc: -# TODO: coloring of LOAD should depend on number of cpus, as it scales accordingly out_to_console yes out_to_ncurses no out_to_stderr no @@ -12,127 +11,59 @@ double_buffer yes update_interval 1.0 update_interval_on_battery 1.0 +mpd_host 10.11.11.190 +mpd_port 6600 + + # pad_percents is useless without use_spacer, but the latter leads to some ugly gaps #pad_percents 2 #use_spacer left +#${mpd_artist} - ${mpd_title} ${mpd_elapsed}/${mpd_length}\ TEXT -[ -${if_existing /sys/class/net/wlp2s0}\ -{ "full_text" : " \ -W: \ -${if_up wlp2s0}\ -${if_match "${addr wlp2s0}" != "No Address"}\ -${wireless_essid wlp2s0} (${wireless_link_qual_perc wlp2s0}%)\ +[\ +{ "full_text" : "\ +${if_mpd_playing}\ +${if_match "${mpd_status}" == "Paused"}\ + \ ${else}\ -No Address\ + \ ${endif}\ +${mpd_title} ${mpd_elapsed}/${mpd_length}\ ${else}\ -down\ + stopped\ ${endif}\ - " , "color" : "\ -${if_up wlp2s0}\ -${if_match "${addr wlp2s0}" != "No Address"}\ -${if_match ${wireless_link_qual_perc wlp2s0} <= 25}\ -\#FF0000\ -${else}${if_match ${wireless_link_qual_perc wlp2s0} <= 50}\ -\#FFFF00\ -${else}\ -\#00FF00\ -${endif}\ -${endif}\ -${else}\#FFFF00\ -${endif}\ -${else}\#FF0000\ -${endif}\ -" }, -${endif} + " , "name" : "mpd_toggle" },\ \ \ \ -${if_existing /sys/class/net/enp0s3} -{ "full_text" : " \ -E: \ -${if_up enp0s3}\ -${addr enp0s3}\ -${else}\ -down\ -${endif}\ - " , "color" : "\ -${if_up enp0s3}\ -${if_match "${addr enp0s3}" != "No Address"}\#00FF00\ -${else}\#FFFF00\ -${endif}\ -${else}\#FF0000\ -${endif}\ -" }, -${endif} +{ "full_text" : "  \ +${texeci 5 bash $HOME/.i3/scripts/pa-volume.bash status} " , "color" : "\#FFFFFF" , "name" : "volume" },\ \ \ \ -${if_existing /sys/class/net/enp1s0} -{ "full_text" : " \ -E: \ -${if_up enp1s0}\ -${addr enp1s0}\ -${else}\ -down\ -${endif}\ - " , "color" : "\ -${if_up enp1s0}\ -${if_match "${addr enp1s0}" != "No Address"}\#00FF00\ -${else}\#FFFF00\ -${endif}\ -${else}\#FF0000\ -${endif}\ -" }, -${endif} -\ -\ -\ -${if_existing /sys/class/net/eth0} -{ "full_text" : " \ -E: \ -${if_up eth0}\ -${addr eth0}\ -${else}\ -down\ -${endif}\ - " , "color" : "\ -${if_up eth0}\ -${if_match "${addr eth0}" != "No Address"}\#00FF00\ -${else}\#FFFF00\ -${endif}\ -${else}\#FF0000\ -${endif}\ -" }, +${if_existing /sys/class/power_supply/BAT1}\ +${texeci 10 bash $HOME/.i3/scripts/status.d/battery.bash conky}\ ${endif}\ \ \ \ -${if_existing /sys/class/power_supply/BAT0}\ -{ "full_text" : " BAT: ${battery_short BAT0} "\ -, "color" : "\ -${if_match ${battery_percent BAT0} < 10}\#FF0000\ -${else}${if_match ${battery_percent BAT0} < 30}\#FFFF00\ -${else}\#00FF00\ -${endif}\ -${endif}\ -" }, -${endif}\ +{ "full_text" : "  ${kernel} " , "color" : "\#FFFFFF" , "name" : "sysinfo" },\ \ \ \ -{ "full_text" : " VOL: \ -${if_match ${mixer} == 0}\ -mute\ -${else}\ -${mixer}%\ -${endif}\ - " , "color" : "\#FFFFFF" }, +{ "full_text" : "  ${texeci 60 bash ~/.i3/scripts/status.d/conky_pacman.bash} " , "color" : "\#FFFFFF" , "name" : "pacman" },\ \ \ \ -{ "full_text" : " ${time %a %F %T} " , "short_text" : " ${time %a %T} " , "color" : "\#FFFFFF" , "name" : "time" } +{ "full_text" : "  $uptime_short " , "color" : "\#FFFFFF" , "name" : "sysinfo" },\ +\ +\ +\ +{ "full_text" : "  ${time %a %F %T} " , "color" : "\#FFFFFF" , "name" : "time" },\ +\ +\ +\ +{ "full_text" : "" }\ ], diff --git a/i3/i3/conky/virtualarch.conkyrc b/i3/i3/conky/virtualarch.conkyrc index 5c1d768..ade57cf 100644 --- a/i3/i3/conky/virtualarch.conkyrc +++ b/i3/i3/conky/virtualarch.conkyrc @@ -11,122 +11,32 @@ double_buffer yes update_interval 1.0 update_interval_on_battery 1.0 +mpd_host 10.11.11.190 +mpd_port 6600 + + # pad_percents is useless without use_spacer, but the latter leads to some ugly gaps #pad_percents 2 #use_spacer left +#${mpd_artist} - ${mpd_title} ${mpd_elapsed}/${mpd_length}\ TEXT [\ { "full_text" : "\ -${if_running mpd}\ ${if_mpd_playing}\ ${if_match "${mpd_status}" == "Paused"}\  \ ${else}\  \ ${endif}\ -${mpd_artist} - ${mpd_title} ${mpd_elapsed}/${mpd_length}\ +${mpd_title} ${mpd_elapsed}/${mpd_length}\ ${else}\  stopped\ -${endif}\ -${else}\ - down\ ${endif}\ " , "name" : "mpd_toggle" },\ \ \ \ -${if_existing /sys/class/net/wlp2s0}\ -{ "full_text" : "  \ -${if_up wlp2s0}\ -${if_match "${addr wlp2s0}" != "No Address"}\ -${wireless_essid wlp2s0} (${wireless_link_qual_perc wlp2s0}%)\ -${else}\ -No Address\ -${endif}\ -${else}\ -down\ -${endif}\ - " , "color" : "\ -${if_up wlp2s0}\ -${if_match "${addr wlp2s0}" != "No Address"}\ -${if_match ${wireless_link_qual_perc wlp2s0} <= 25}\ -\#FF0000\ -${else}${if_match ${wireless_link_qual_perc wlp2s0} <= 50}\ -\#FFFF00\ -${else}\ -\#FFFFFF\ -${endif}\ -${endif}\ -${else}\#FFFF00\ -${endif}\ -${else}\#FF0000\ -${endif}\ -" , "name" : "wireless" },\ -${endif}\ -\ -\ -\ -${if_existing /sys/class/net/enp0s3}\ -{ "full_text" : " \ -enp0s3: \ -${if_up enp0s3}\ -${addr enp0s3}\ -${else}\ -down\ -${endif}\ - " , "color" : "\ -${if_up enp0s3}\ -${if_match "${addr enp0s3}" != "No Address"}\#00FF00\ -${else}\#FFFF00\ -${endif}\ -${else}\#FF0000\ -${endif}\ -" },\ -${endif}\ -\ -\ -\ -${if_existing /sys/class/net/enp1s0}\ -{ "full_text" : " \ -enp1s0: \ -${if_up enp1s0}\ -${addr enp1s0}\ -${else}\ -down\ -${endif}\ - " , "color" : "\ -${if_up enp1s0}\ -${if_match "${addr enp1s0}" != "No Address"}\#00FF00\ -${else}\#FFFF00\ -${endif}\ -${else}\#FF0000\ -${endif}\ -" },\ -${endif}\ -\ -\ -\ -${if_existing /sys/class/net/eth0}\ -{ "full_text" : " \ -eth0: \ -${if_up eth0}\ -${addr eth0}\ -${else}\ -down\ -${endif}\ - " , "color" : "\ -${if_up eth0}\ -${if_match "${addr eth0}" != "No Address"}\#00FF00\ -${else}\#FFFF00\ -${endif}\ -${else}\#FF0000\ -${endif}\ -" },\ -${endif}\ -\ -\ -\ { "full_text" : "  \ ${texeci 5 bash $HOME/.i3/scripts/pa-volume.bash status} " , "color" : "\#FFFFFF" , "name" : "volume" },\ \ @@ -142,7 +52,7 @@ ${endif}\ \ \ \ -{ "full_text" : "  ${texeci 60 bash ~/.i3/scripts/status.d/conky_pacman.bash} " , "color" : "\#FFFFFF" , "name" : "pacman" },\ +{ "full_text" : "  ${texeci 60 bash ~/.i3/scripts/status.d/conky_pacman.bash} " , "color" : "\#FFFFFF" , "name" : "pacman" },\ \ \ \ diff --git a/i3/i3/scripts/genconfig.bash b/i3/i3/scripts/genconfig.bash index 211b511..6f5df0d 100755 --- a/i3/i3/scripts/genconfig.bash +++ b/i3/i3/scripts/genconfig.bash @@ -1,9 +1,11 @@ #!/bin/bash +host="$(hostname --short)" + # main configuration file that is always used MAIN_CONF="$HOME/.i3/config" # temporary configuration file used for this session -SESSION_CONF="$HOME/.i3/session.config" +SESSION_CONF="$HOME/.i3/session.${host}.config" # directory that contains host specific configuration CONF_DIR="$HOME/.i3/config.d" # file that should be used when no host specific configuration present @@ -11,21 +13,19 @@ DEFAULT_CONF="$CONF_DIR/default" LOGFILE="$LOGDIR/i3/genconfig.log" +host_specific_conf="$CONF_DIR/$host.config" + log() { echo "[$(date +%FT%T)] $*" >> "$LOGFILE" } -host="$(hostname)" - -host_specific_conf="$CONF_DIR/$host.config" - # if it's a symlink to $MAIN_CONF, cat will fail [[ -f "$SESSION_CONF" ]] && rm "$SESSION_CONF" if [[ ! -f "$host_specific_conf" ]] && [[ ! -f "$DEFAULT_CONF" ]]; then # if there is no host-specific configuration and no default one, just use # the main config - log "neither config for host $host nor default config at $DEFAULT_CONF found, using main only" + log "neither config for host $host at $host_specific_conf nor default config at $DEFAULT_CONF found, using main only" ln -sf "$MAIN_CONF" "$SESSION_CONF" else # either use the host specific config if present, or the default if not diff --git a/i3/i3/scripts/pa-volume.bash b/i3/i3/scripts/pa-volume.bash index 3a35e50..91d724f 100755 --- a/i3/i3/scripts/pa-volume.bash +++ b/i3/i3/scripts/pa-volume.bash @@ -28,6 +28,10 @@ setvol() { echo "capping at 100 percent" newvol=100 fi + if [[ $newvol -lt 0 ]]; then + echo "capping at 0 percent" + newvol=0 + fi echo "newvol $newvol" else newvol="$1" diff --git a/i3/i3/scripts/status.d/conky_pacman.bash b/i3/i3/scripts/status.d/conky_pacman.bash index 97b3ca0..b1027c7 100755 --- a/i3/i3/scripts/status.d/conky_pacman.bash +++ b/i3/i3/scripts/status.d/conky_pacman.bash @@ -2,7 +2,7 @@ updates=$(pacman -Quq | wc -l) if [[ $updates -eq 0 ]] ; then - echo "no updates" + echo "up to date" elif [[ $updates -eq 1 ]] ; then echo "1 update" else diff --git a/i3/i3/scripts/weather.sh b/i3/i3/scripts/weather.sh new file mode 100755 index 0000000..15882be --- /dev/null +++ b/i3/i3/scripts/weather.sh @@ -0,0 +1,21 @@ +#!/bin/sh + +#AccuWeather (r) RSS weather tool for conky +# +#USAGE: weather.sh +# +#(c) Michael Seiler 2007 + +METRIC=1 #Should be 0 or 1; 0 for F, 1 for C + +if [ -z $1 ]; then + echo + echo "USAGE: weather.sh " + echo + exit 0; +fi + +curl -s http://rss.accuweather.com/rss/liveweather_rss.asp\?metric\=${METRIC}\&locCode\=$1 | grep "Currently" | head -1 | grep -o 'Currently:[^<]*' | cut -d ' ' -f 2- | tr ':' ',' +# | perl -ne 'if (/Currently/) {chomp;/\Currently: (.*)?\<\/title\>/; print "$1"; }' |sed s/\:// |tr [A-Z] [a-z] + + diff --git a/mpd/mpd/mpd.conf b/mpd/mpd/mpd.conf index 8b3532d..0e41ea4 100644 --- a/mpd/mpd/mpd.conf +++ b/mpd/mpd/mpd.conf @@ -10,7 +10,7 @@ # be disabled and audio files will only be accepted over ipc socket (using # file:// protocol) or streaming files over an accepted protocol. # -music_directory "~/music/library" +music_directory "/media/shared/music/library" # # This setting sets the MPD internal playlist directory. The purpose of this # directory is storage for playlists created by MPD. The server will use diff --git a/setup/packages-native.list b/setup/packages-native.list index 9abda9e..d7c5acf 100644 --- a/setup/packages-native.list +++ b/setup/packages-native.list @@ -7,15 +7,20 @@ chromium chrony codespell conky +connman cowsay cronie d-feet dd_rescue deluge +dhclient dialog +dnsmasq dnsutils dosfstools easy-rsa +ebtables +ed efibootmgr encfs feh @@ -28,6 +33,7 @@ gcc-multilib gcolor2 ghostscript git +gksu gptfdisk grub gsmartcontrol @@ -62,8 +68,10 @@ lxappearance mousepad mpc mpd +mumble ncmpcpp net-tools +nftables nmap ntfs-3g openbsd-netcat @@ -85,11 +93,11 @@ python-pyqt4 python-pyqt5 python-sphinx python-virtualenv +qemu qtcurve-gtk2 qtcurve-qt4 qtcurve-qt5 -quassel-client -quassel-core +quassel-monolithic ranger redshift reflector @@ -99,10 +107,14 @@ rxvt-unicode-terminfo samba scrot skype +sl +smplayer sshfs steam +strace stress subversion +tcpdump thunderbird tk tmux @@ -131,9 +143,11 @@ wpa_actiond wpa_supplicant xbindkeys xclip +xcompmgr xcursor-vanilla-dmz xf86-input-synaptics xf86-video-intel +xfce4-notifyd xorg-server xorg-sessreg xorg-utils diff --git a/tmux/tmux.conf b/tmux/tmux.conf index b1840b6..b739e64 100644 --- a/tmux/tmux.conf +++ b/tmux/tmux.conf @@ -1,3 +1,5 @@ +new-session -A -s 's-1' + set -g default-terminal 'screen-256color' set -g utf8 on @@ -9,13 +11,16 @@ set -g prefix C-a unbind C-b bind C-a send-prefix +unbind C-j + set -s escape-time 0 set-window-option -g aggressive-resize on + setw -g mode-mouse on -# set -g mouse-select-pane on -# set -g mouse-resize-pane on -# set -g mouse-select-window on +set -g mouse-select-pane on +set -g mouse-resize-pane on +set -g mouse-select-window on set -g mode-keys vi @@ -56,7 +61,7 @@ set-window-option -g window-status-current-attr bold set-window-option -g window-status-current-format ' #I: #W #F ' set-window-option -g monitor-activity on -#set -g visual-activity on +set -g visual-activity on set-window-option -g automatic-rename on set-window-option -g automatic-rename-format '#{pane_current_command}' @@ -74,7 +79,7 @@ set -g pane-active-border-fg red #set -g status-style 'bg=black,fg=white,none' set -g status-left ' #[bg=#E5F200,fg=#000000] #{session_name} #[bg=default] #[bg=#90FF00,fg=#000000] #{host} #[bg=default] ' -set -g status-left-length 20 +set -g status-left-length 100 # vertical = | in this case unbind % diff --git a/vim/vimrc b/vim/vimrc index 8efaf87..5a1f7a9 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -35,9 +35,6 @@ call vundle#begin() Plugin 'gmarik/vundle' -" solarized color theme -Plugin 'altercation/vim-colors-solarized' - " monokai color theme Plugin 'sickill/vim-monokai' @@ -68,42 +65,27 @@ Plugin 'tpope/vim-speeddating' " git integration Plugin 'tpope/vim-fugitive' -" buffer expolorer -"Plugin 'fholgado/minibufexpl.vim' - -" shows a code outline -Plugin 'majutsushi/tagbar' - " python specific stuff Plugin 'klen/python-mode' " incremental visual mode -Plugin 'terryma/vim-expand-region' - -" splitting single line code -Plugin 'AndrewRadev/splitjoin.vim' - -" motion to two characters -Plugin 'justinmk/vim-sneak' - -" alignment operator -Plugin 'tommcdo/vim-lion' - -Plugin 'wincent/Command-T' - -Plugin 'sjl/gundo.vim' - +"Plugin 'terryma/vim-expand-region' +" +"Plugin 'wincent/Command-T' +" +"Plugin 'sjl/gundo.vim' +" Plugin 'kien/ctrlp.vim' - -Plugin 'PeterRincker/vim-argumentative' - -Plugin 'wellle/targets.vim' - -Plugin 'Lokaltog/vim-easymotion' - -Plugin 'terryma/vim-multiple-cursors' - -Plugin 'flazz/vim-colorschemes' +" +"Plugin 'PeterRincker/vim-argumentative' +" +"Plugin 'wellle/targets.vim' +" +"Plugin 'Lokaltog/vim-easymotion' +" +"Plugin 'terryma/vim-multiple-cursors' +" +"Plugin 'flazz/vim-colorschemes' call vundle#end() @@ -195,8 +177,8 @@ set hlsearch " highlight matches in a search set wrapscan " wrap searches at the end of the file set ignorecase " ignore case when only searching for - " lowercase -set smartcase " letters, case sensitive otherwis +set smartcase " lowercase letters, case sensitive + " otherwise set foldenable " auto-fold code @@ -357,19 +339,37 @@ autocmd BufWinEnter *.* silent loadview ":au WinEnter * :setlocal number relativenumber ":au WinLeave * :setlocal nonumber norelativenumber -nnoremap -nnoremap -nnoremap -nnoremap -inoremap -inoremap -inoremap -inoremap +""nnoremap +""nnoremap +""nnoremap +""nnoremap +""inoremap +""inoremap +""inoremap +""inoremap + +nmap :bnext +nmap :bprev + +" default emacs movements for command line +cnoremap +cnoremap +cnoremap +cnoremap +cnoremap +cnoremap +cnoremap +cnoremap b +cnoremap f +cnoremap d +cnoremap inoremap jj nnoremap v vl +nmap ; :CtrlPBuffer + " no more ex mode nnoremap Q diff --git a/x/Xresources b/x/Xresources index 02351f8..846937b 100644 --- a/x/Xresources +++ b/x/Xresources @@ -2,7 +2,7 @@ Xcursor.theme: Vanilla-DMZ URxvt.scrollBar: false -URxvt.font: xft:DejaVu Sans Mono:size=10.5 +URxvt.font: xft:Droid Sans Mono:size=11 URxvt.letterSpace: -1 diff --git a/x/xinitrc b/x/xinitrc index 7361152..89172db 100755 --- a/x/xinitrc +++ b/x/xinitrc @@ -11,7 +11,7 @@ log() { echo "[$(date +%FT%T)] $*" >> "$LOGFILE" } -log "START" +log "xinitrc startup" if [ -d /etc/X11/xinit/xinitrc.d ]; then for f in /etc/X11/xinit/xinitrc.d/*; do @@ -64,24 +64,13 @@ redshift_colortemp="5500:3700" # start mpd if ! pgrep --euid hannes --exact '^mpd$' ; then log "mpd is not running, starting mpd" - mpd "$HOME/.mpd/mpd.conf" & + mpd "$HOME/.mpd/mpd.conf" & &>> $LOGFILE else log "mpd already running, will not start another instance" fi - start the urxvt daemon -if pgrep urxvtd >/dev/null 2>&1; then - log "urxvtd already running" -else - log "starting urxvtd" - urxvtd -q -q -o -fi - log "starting zim in tray" -zim --plugin trayicon - -log "starting conky clock on desktop" -(sleep 3 && conky -c "$HOME/.conky/clock.conkyrc" &>> $LOGFILE) & +zim --plugin trayicon & &>> $LOGFILE # start the pulseaudio volume control tray applet log "starting pasystray" @@ -91,10 +80,19 @@ pasystray & &>> $LOGFILE log "starting dropboxd" nice -n 10 ionice -c 3 dropboxd & &>> $LOGFILE +log "starting conky clock on desktop" +{ + sleep 1 + conky -c "$HOME/.conky/clock.conkyrc" +} & &>> $LOGFILE + # start the wallpaper changer log "starting $path_wallchanger" -$path_wallchanger "$wallpaper_directory" "$wallpaper_interval" "$wallpaper_fallback" & -echo $! > "$wallchanger_pidfile" +{ + sleep 0 + $path_wallchanger "$wallpaper_directory" "$wallpaper_interval" "$wallpaper_fallback" & + echo $! > "$wallchanger_pidfile" +} & &>> $LOGFILE # start redshift log "starting redshift-gtk" @@ -108,12 +106,21 @@ setxkbmap -layout "$keyboard_layout" -variant "$keyboard_variant" & &>> $LOGFILE log "setting key repeat delay" xset r rate "$keyboard_repeat_delay" "$keyboard_repeat_speed" & &>> $LOGFILE +log "starting alarm clock applet" +alarm-clock-applet --hidden & &>> $LOGFILE + +log "starting composite manager" +xcompmgr & &>> $LOGFILE + +log "starting network tray application" +nm-applet & &>> $LOGFILE + # disable auto screen disable -xset -dpms -xset s off +xset -dpms & &>> $LOGFILE +xset s off & &>> $LOGFILE # execute the host-specific .xinitrc-addition -hostfile="$HOME/.xinitrc.d/$(hostname).xinitrc" +hostfile="$HOME/.xinitrc.d/$(hostname --short).xinitrc" log "looking for host specific xinitrc addition at $hostfile" if [[ -f "$hostfile" ]] ; then log "found it. executing" @@ -124,7 +131,7 @@ fi if [[ -f ~/.Xresources ]] ; then log "found ~/.Xresources, merging it into xrdb" - xrdb -merge ~/.Xresources & &>> $LOGFILE + xrdb -merge ~/.Xresources &>> $LOGFILE else log "~/.Xresources not found" fi diff --git a/x/xinitrc.d/netbook.xinitrc b/x/xinitrc.d/netbook.xinitrc index a090196..7d55437 100755 --- a/x/xinitrc.d/netbook.xinitrc +++ b/x/xinitrc.d/netbook.xinitrc @@ -2,3 +2,5 @@ # enable vertical edge scrolling synclient VertEdgeScroll=1 + +xrandr --output LVDS-0 --primary diff --git a/zsh/zprofile b/zsh/zprofile index 3195693..ef3830a 100644 --- a/zsh/zprofile +++ b/zsh/zprofile @@ -1,4 +1,10 @@ # exec startx breaks some logind fuckery, without exec it works -tmux start-server & -(eval $(ssh-agent) ; ssh-add) >/dev/null 2>&1 & +#tmux start-server & +eval $(ssh-agent -s) + +export EDITOR="vim" +export VISUAL="vim" +export PATH="$HOME/bin:$PATH" +export BROWSER="firefox" + [[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && startx diff --git a/zsh/zshrc b/zsh/zshrc index ac223bc..9d82ad1 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -1,3 +1,26 @@ +[[ -z "$PS1" ]] && return + +### SHELL OPTIONS +setopt EXTENDED_HISTORY +setopt HIST_EXPIRE_DUPS_FIRST +setopt HIST_VERIFY +setopt INC_APPEND_HISTORY +setopt SHARE_HISTORY +setopt AUTO_CD +setopt APPEND_HISTORY +setopt HIST_IGNORE_DUPS +setopt NOHIST_IGNORE_ALL_DUPS +setopt HIST_IGNORE_SPACE +setopt CORRECT +setopt RM_STAR_SILENT +setopt BG_NICE +setopt CHECK_JOBS +setopt HUP +setopt LONG_LIST_JOBS + +# emacs-like keybindings +bindkey -e + autoload -U promptinit promptinit @@ -9,6 +32,13 @@ compinit zstyle ':completion:*' menu select setopt completealiases +autoload -U edit-command-line +zle -N edit-command-line +bindkey '^xe' edit-command-line +bindkey '^x^e' edit-command-line + + + #[[ -n "${key[PageUp]}" ]] && bindkey "${key[PageUp]}" history-beginning-search-backward #[[ -n "${key[PageDown]}" ]] && bindkey "${key[PageDown]}" history-beginning-search-forward @@ -49,13 +79,6 @@ man() { man "$@" } -### VARIABLES -export EDITOR="vim" -export VISUAL="vim" -export PATH="$PATH:$HOME/bin" -export BROWSER="firefox" - - ### BOOKMARKS bm() { case "$1" in @@ -72,27 +95,6 @@ bm() { } -### SHELL OPTIONS -setopt EXTENDED_HISTORY -setopt HIST_EXPIRE_DUPS_FIRST -setopt HIST_VERIFY -setopt INC_APPEND_HISTORY -setopt SHARE_HISTORY -setopt AUTO_CD -setopt APPEND_HISTORY -setopt HIST_IGNORE_DUPS -setopt NOHIST_IGNORE_ALL_DUPS -setopt HIST_IGNORE_SPACE -setopt CORRECT -setopt RM_STAR_SILENT -setopt BG_NICE -setopt CHECK_JOBS -setopt HUP -setopt LONG_LIST_JOBS - -bindkey -e - - [[ $TERM == "urxvt" ]] && export TERM="rxvt-unicode" [[ $TERM == "screen" ]] && export TERM="screen-256color" @@ -127,7 +129,7 @@ alias b='cd $OLDPWD' alias cs="cryptsetup" alias le_haxxor_1='clear && dmesg | pv -qL $[10 + (RANDOM % 10)]' -alias le_haxxor_2='clear && hexdump -C /dev/urandom | grep "1e 4c"' +alias le_haxxor_2='clear && hexdump -C /dev/urandom | pv -qlL 2' alias YOLO="pacman -Syu --force" @@ -215,6 +217,10 @@ ruler() { done } +if ! (ssh-add -l | grep -q 'id_rsa') ; then + ssh-add +fi + addext() { [[ -z "$1" ]] || [[ -z "$2" ]] && { echo "Usage: $0 " ; return } mv "$1" "$1$2" @@ -264,7 +270,7 @@ myip4() { } myip6() { - curl "http://ipv6.icanhazip.com" 1>/dev/null 2>&1 || echo "no ip6" + curl "http://ipv6.icanhazip.com" || echo "no ip6" } alias myip="myip4"