Merge branch 'master' of github.com:whatevsz/dotfiles

This commit is contained in:
2013-09-27 05:49:56 +02:00
7 changed files with 272 additions and 202 deletions

View File

@@ -9,7 +9,7 @@ Installation
1. ``git clone git://github.com:whatevsz/dotfiles ~/dotfiles`` 1. ``git clone git://github.com:whatevsz/dotfiles ~/dotfiles``
2. ``bash ~/dotfiles/scripts/setup.bash`` 2. ``bash ~/dotfiles/scripts/setup.bash``
``makesymlinks.bash`` will back up all configuration files that would otherwise ``setup.bash`` will back up all configuration files that would otherwise
be overridden and then symlink the content of all folders specified in $symlink_folders be overridden and then symlink the content of all folders specified in $symlink_folders
into $HOME or the desired destination given in MAPPING, if present. into $HOME or the desired destination given in MAPPING, if present.
@@ -17,7 +17,7 @@ If you want to use a different directory instead of ``~/dotfiles``, just alter t
line and replace ``~/dotfiles`` with the desired destination and change the line line and replace ``~/dotfiles`` with the desired destination and change the line
``config_dir="$HOME/dotfiles/"`` in ``scripts/setup.bash`` accordingly. You can ``config_dir="$HOME/dotfiles/"`` in ``scripts/setup.bash`` accordingly. You can
also choose a different folder for the backup of old files (default being ``~/.dotfiles.bak``) also choose a different folder for the backup of old files (default being ``~/.dotfiles.bak``)
by altering ``backup_dir`` in ``scripts/setup.bash`` to your needs. by altering ``backup_dir`` in ``setup.bash`` to your needs.
Structure Structure
--------- ---------
@@ -25,6 +25,8 @@ Structure
- ``scripts/`` - Scripts, e.g. for setting up the configuration. - ``scripts/`` - Scripts, e.g. for setting up the configuration.
- ``setup/`` - Setup information, e.g. a list of packages. - ``setup/`` - Setup information, e.g. a list of packages.
- ``MAPPING`` - File that contains mapping directives. - ``MAPPING`` - File that contains mapping directives.
- ``TODO`` - Some stuff I am to lazy to do right now ;).
- ``README.rst`` - The stuff you are reading right now.
- All other folders - These are the folders that contain the configuration files. - All other folders - These are the folders that contain the configuration files.
Mapping Mapping
@@ -46,3 +48,12 @@ This will symlink the contents of the folder ``dotfiles/terminator`` into ``~/.c
When you provide multiple lines for the same folder, the first one that matches When you provide multiple lines for the same folder, the first one that matches
will be used. will be used.
Required software
-----------------
- ``git`` to clone the repository (you can alternatively download a tarball at
http://github.com/whatevsz/dotfiles/archive/master.zip)
- ``zsh`` uses the configuration framework "oh-my-zsh" available at
http://github.com/robbyrussell/oh-my-zsh

7
TODO Normal file
View File

@@ -0,0 +1,7 @@
Change zsh prompt.
Vim normal mode status bar broken on virtualarch.
Keepass/lastpass.
Kill running conky on i3 restart.

View File

@@ -1,3 +1,5 @@
# vim:set foldmethod=indent:
# vim:set foldignore="":
# This file has been auto-generated by i3-config-wizard(1). # This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like. # It will not be overwritten, so edit it as you like.
# #
@@ -9,243 +11,247 @@
# #
# Please see http://i3wm.org/docs/userguide.html for a complete reference! # Please see http://i3wm.org/docs/userguide.html for a complete reference!
# Use the win-key as modifier ################################################################################
set $mod Mod4 ### VARIABLES ##################################################################
################################################################################
# The default terminal # Use the win-key as modifier
set $terminal terminator set $mod Mod4
# Path to the exit script # The default terminal
set $path_i3exit ~/.i3/scripts/i3exit.bash set $terminal terminator
# Keys for the exit mode # Path to the exit script
set $key_lock l set $path_i3exit ~/.i3/scripts/i3exit.bash
set $key_logout e
set $key_suspend s
set $key_hibernate h
set $key_reboot r
set $key_shutdown Shift+S
set $signal_lock lock # Keys for the exit mode
set $signal_logout logout set $key_lock l
set $signal_suspend suspend set $key_logout e
set $signal_hibernate hibernate set $key_suspend s
set $signal_reboot reboot set $key_hibernate h
set $signal_shutdown shutdown set $key_reboot r
set $key_shutdown Shift+S
# Path and options for the wallpaper changer script set $signal_lock lock
set $path_wallchanger ~/.i3/scripts/wallchanger.bash set $signal_logout logout
set $wallpaper_directory "$HOME/Bilder/wallpaper/misc" set $signal_suspend suspend
set $wallpaper_logfile "$HOME/.i3/logs/wallpaper.log" set $signal_hibernate hibernate
set $wallpaper_interval 900 set $signal_reboot reboot
set $signal_shutdown shutdown
# font for window titles. ISO 10646 = Unicode # Path and options for the wallpaper changer script
#font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1 set $path_wallchanger ~/.i3/scripts/wallchanger.bash
font pango:DejaVu Sans Mono 10 set $wallpaper_directory "$HOME/Bilder/wallpaper/misc"
set $wallpaper_logfile "$HOME/.i3/logs/wallpaper.log"
set $wallpaper_interval 900
# Use Mouse+$mod to drag floating windows to their wanted position set $workspace1 1:firefox
floating_modifier Mod1 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:skype
# start a terminal ################################################################################
bindsym $mod+Return exec $terminal ### KEYBINDINGS ################################################################
##################9#############################################################
# kill focused window ### MOVING AND WINDOW BEHAVIOUR ############################################
bindsym $mod+Shift+Q kill
# start dmenu (a program launcher) bindsym $mod+Shift+Q kill
bindsym $mod+d exec dmenu_run
# change focus bindsym $mod+h focus left
bindsym $mod+h focus left bindsym $mod+j focus down
bindsym $mod+j focus down bindsym $mod+k focus up
bindsym $mod+k focus up bindsym $mod+l focus right
bindsym $mod+l focus right
# alternatively, you can use the cursor keys: bindsym $mod+Left focus left
bindsym $mod+Left focus left bindsym $mod+Down focus down
bindsym $mod+Down focus down bindsym $mod+Up focus up
bindsym $mod+Up focus up bindsym $mod+Right focus right
bindsym $mod+Right focus right
# move focused window bindsym $mod+Shift+H move left
bindsym $mod+Shift+H move left bindsym $mod+Shift+J move down
bindsym $mod+Shift+J move down bindsym $mod+Shift+K move up
bindsym $mod+Shift+K move up bindsym $mod+Shift+L move right
bindsym $mod+Shift+L move right
# alternatively, you can use the cursor keys: bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Left move left bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Down move down bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Up move up bindsym $mod+Shift+Right move right
bindsym $mod+Shift+Right move right
# split in horizontal orientation bindsym $mod+g split h
bindsym $mod+g split h bindsym $mod+v split v
# split in vertical orientation bindsym $mod+f fullscreen
bindsym $mod+v split v
# enter fullscreen mode for the focused container bindsym $mod+s layout stacking
bindsym $mod+f fullscreen bindsym $mod+w layout tabbed
bindsym $mod+e layout default
# change container layout (stacked, tabbed, default) bindsym $mod+Shift+space floating toggle
bindsym $mod+s layout stacking bindsym $mod+space focus mode_toggle
bindsym $mod+w layout tabbed
bindsym $mod+e layout default
# toggle tiling / floating bindsym $mod+a focus parent
bindsym $mod+Shift+space floating toggle bindcode $mod+d focus child
# change focus between tiling / floating windows bindsym $mod+1 workspace $workspace1
bindsym $mod+space focus mode_toggle bindsym $mod+2 workspace $workspace2
bindsym $mod+3 workspace $workspace3
bindsym $mod+4 workspace $workspace4
bindsym $mod+5 workspace $workspace5
bindsym $mod+6 workspace $workspace6
bindsym $mod+7 workspace $workspace7
bindsym $mod+8 workspace $workspace8
bindsym $mod+9 workspace $workspace9
bindsym $mod+0 workspace $workspace10
# focus the parent container bindsym $mod+Shift+exclam move container to workspace $workspace1
bindsym $mod+a focus parent bindsym $mod+Shift+quotedbl move container to workspace $workspace2
bindsym $mod+Shift+section move container to workspace $workspace3
bindsym $mod+Shift+dollar move container to workspace $workspace4
bindsym $mod+Shift+percent move container to workspace $workspace5
bindsym $mod+Shift+ampersand move container to workspace $workspace6
bindsym $mod+Shift+slash move container to workspace $workspace7
bindsym $mod+Shift+parenleft move container to workspace $workspace8
bindsym $mod+Shift+parenright move container to workspace $workspace9
bindsym $mod+Shift+equal move container to workspace $workspace10
# focus the child container bindsym $mod+u workspace prev_on_output
#bindcode $mod+d focus child bindsym $mod+i workspace next_on_output
# switch to workspace bindsym $mod+Shift+u move container to workspace prev_on_output
bindsym $mod+1 workspace 1 bindsym $mod+Shift+i move container to workspace next_on_output
bindsym $mod+2 workspace 2
bindsym $mod+3 workspace 3
bindsym $mod+4 workspace 4
bindsym $mod+5 workspace 5
bindsym $mod+6 workspace 6
bindsym $mod+7 workspace 7
bindsym $mod+8 workspace 8
bindsym $mod+9 workspace 9
bindsym $mod+0 workspace 10
# move focused container to workspace # regenerate and reload the configuration file
bindsym $mod+Shift+exclam move container to workspace 1 bindsym $mod+Shift+C exec --no-startup-id bash ~/.i3/scripts/genconfig.bash ; reload
bindsym $mod+Shift+quotedbl move container to workspace 2
bindsym $mod+Shift+section move container to workspace 3
bindsym $mod+Shift+dollar move container to workspace 4
bindsym $mod+Shift+percent move container to workspace 5
bindsym $mod+Shift+ampersand move container to workspace 6
bindsym $mod+Shift+slash move container to workspace 7
bindsym $mod+Shift+parenleft move container to workspace 8
bindsym $mod+Shift+parenright move container to workspace 9
bindsym $mod+Shift+equal move container to workspace 10
# reload the configuration file bindsym $mod+Shift+R restart
bindsym $mod+Shift+C exec --no-startup-id bash ~/.i3/scripts/genconfig.bash ; reload bindsym $mod+Shift+E exit
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $mod+Shift+R restart
# exit i3 (logs you out of your X session)
bindsym $mod+Shift+E exit
# resize window (you can also use the mouse for that) ### START APPLICATIONS #####################################################
mode "resize" {
# These bindings trigger as soon as you enter the resize mode
# Pressing left will shrink the windows width. bindsym $mod+d exec dmenu_run -b -l 5 -p "-->"
# Pressing right will grow the windows width. bindsym $mod+Return exec $terminal
# Pressing up will shrink the windows height. bindsym $mod+F1 exec firefox
# Pressing down will grow the windows height.
bindsym h resize shrink width 10 px or 10 ppt
bindsym j resize grow height 10 px or 10 ppt
bindsym k resize shrink height 10 px or 10 ppt
bindsym l resize grow width 10 px or 10 ppt
# same bindings, but for the arrow keys ################################################################################
bindsym 113 resize shrink width 10 px or 10 ppt ### MODES ######################################################################
bindsym 116 resize grow height 10 px or 10 ppt ################################################################################
bindsym 111 resize shrink height 10 px or 10 ppt
bindsym 114 resize grow width 10 px or 10 ppt # resize window (you can also use the mouse for that)
mode "resize" {
# These bindings trigger as soon as you enter the resize mode
# Pressing left will shrink the windows width.
# Pressing right will grow the windows width.
# Pressing up will shrink the windows height.
# Pressing down will grow the windows height.
bindsym h resize shrink width 10 px or 10 ppt
bindsym j resize grow height 10 px or 10 ppt
bindsym k resize shrink height 10 px or 10 ppt
bindsym l resize grow width 10 px or 10 ppt
# same bindings, but for the arrow keys
bindsym 113 resize shrink width 10 px or 10 ppt
bindsym 116 resize grow height 10 px or 10 ppt
bindsym 111 resize shrink height 10 px or 10 ppt
bindsym 114 resize grow width 10 px or 10 ppt
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+r mode "resize"
# Enabling a mode to shutdown, reboot, lock screen and so on
set $mode_system System (l) lock, (e) logout, (s) suspend, (h) hibernate, (r) reboot, (Shift+s) shutdown
mode "$mode_system" {
bindsym $key_lock exec --no-startup-id $path_i3exit $signal_lock, mode "default"
bindsym $key_logout exec --no-startup-id $path_i3exit $signal_logout, mode "default"
bindsym $key_suspend exec --no-startup-id $path_i3exit $signal_suspend, mode "default"
bindsym $key_hibernate exec --no-startup-id $path_i3exit $signal_hibernate, mode "default"
bindsym $key_reboot exec --no-startup-id $path_i3exit $signal_reboot, mode "default"
bindsym $key_shutdown exec --no-startup-id $path_i3exit $signal_shutdown, mode "default"
# back to normal: Enter or Escape # back to normal: Enter or Escape
bindsym Return mode "default" bindsym Return mode "default"
bindsym Escape mode "default" bindsym Escape mode "default"
} }
bindsym $mod+Pause mode "$mode_system"
bindsym Pause exec --no-startup-id $path_i3exit lock
bindsym $mod+r mode "resize" ################################################################################
### GENERAL SETUP ##############################################################
################################################################################
# Default orientation for new workspaces will be derived from aspect ratio #workspace $workspace1 output VBOX0
default_orientation auto #workspace $workspace2 output VBOX0
#workspace $workspace3 output VBOX0
#workspace $workspace4 output VBOX0
#workspace $workspace5 output VBOX0
#workspace $workspace6 output VBOX0
#workspace $workspace7 output VBOX0
#workspace $workspace8 output VBOX0
#workspace $workspace9 output VBOX0
#workspace $workspace10 output VBOX1
# New containers will start in tiling mode # Default orientation for new workspaces will be derived from aspect ratio
workspace_layout default default_orientation auto
# Draw normal borders around all windows # New containers will start in tiling mode
new_window normal workspace_layout default
new_float normal
# Do not show borders at the screen edges # Draw normal borders around all windows with 1-pixel borders
hide_edge_borders both new_window normal 1
new_float normal 1
# Focus follows mouse # Do show borders at the screen edges
focus_follows_mouse yes hide_edge_borders none
# Only map a popup in fullscreen mode if it belongs to the fullscreen window focus_follows_mouse yes
popup_during_fullscreen smart
# Do not always wrap but change to a container on the same level instead # Only map a popup in fullscreen mode if it belongs to the fullscreen window
force_focus_wrapping no popup_during_fullscreen smart
# Do no force xinerama # Do not always wrap but change to a container on the same level instead
force_xinerama no force_focus_wrapping no
# Hit the current workspace button again to return to the previous workspace force_xinerama no
workspace_auto_back_and_forth yes
# Draw a window as urgent when switching to its workspace, even if focused, for # Hit the current workspace button again to return to the previous workspace
# 500 ms workspace_auto_back_and_forth yes
force_display_urgency_hint 500 ms
# Cycle through workspaces # Draw a window as urgent when switching to its workspace, even if focused, for
bindsym $mod+u workspace prev_on_output # 500 ms
bindsym $mod+i workspace next_on_output force_display_urgency_hint 500 ms
bindsym $mod+Shift+u move container to workspace prev_on_output # font for window titles. ISO 10646 = Unicode
bindsym $mod+Shift+i move container to workspace next_on_output font pango:DejaVu Sans Mono 10
# Always let the following applications float: # Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# The wicd client GUI ################################################################################
for_window [class="^Wicd-client.py$"] floating enable ### APPLICATION SPECIFIC SETTINGS ##############################################
################################################################################
# Notifications through xfce4-notifyd, e.g. notifications from wicd for_window [class="^Wicd-client.py$"] floating enable
for_window [class="^Xfce4-notifyd$"] floating enable for_window [class="^Xfce4-notifyd$"] floating enable ; border none
for_window [class="^Conky$"] floating enable
for_window [class="^Terminator$"] border 1pixel
for_window [class="^Firefox$"] border 1pixel
for_window [class="^Conky$"] floating enable ################################################################################
### APPLICATION AUTOSTART ######################################################
################################################################################
for_window [class="^Terminator$"] border 1pixel exec --no-startup-id $path_wallchanger $wallpaper_directory $wallpaper_interval > $wallpaper_logfile &
exec --no-startup-id wicd-gtk --tray &
exec --no-startup-id gtk-redshift -l 49.5:11 -t 6500:4500 &
#exec --no-startup-id conky
for_window [class="^Firefox$"] border none
for_window [class="^Xfce4-notifyd$"] border none
# Start the wallpaper changer.
exec --no-startup-id $path_wallchanger $wallpaper_directory $wallpaper_interval > $wallpaper_logfile &
# Start wicd in tray.
exec --no-startup-id wicd-gtk --tray &
# Start color temperature changer.
exec --no-startup-id gtk-redshift -l 49.5:11 -t 6500:4500 &
# Start pulseaudio control applet.
exec --no-startup-id pa-applet &
# Start conky
#exec --no-startup-id conky
# Enabling a mode to shutdown, reboot, lock screen and so on
set $mode_system System (l) lock, (e) logout, (s) suspend, (h) hibernate, (r) reboot, (Shift+s) shutdown
mode "$mode_system" {
bindsym $key_lock exec --no-startup-id $path_i3exit $signal_lock, mode "default"
bindsym $key_logout exec --no-startup-id $path_i3exit $signal_logout, mode "default"
bindsym $key_suspend exec --no-startup-id $path_i3exit $signal_suspend, mode "default"
bindsym $key_hibernate exec --no-startup-id $path_i3exit $signal_hibernate, mode "default"
bindsym $key_reboot exec --no-startup-id $path_i3exit $signal_reboot, mode "default"
bindsym $key_shutdown exec --no-startup-id $path_i3exit $signal_shutdown, mode "default"
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+Pause mode "$mode_system"
bindsym $mod+Shift+Pause exec --no-startup-id $path_i3exit lock

View File

@@ -21,7 +21,7 @@ bar {
# show workspace buttons # show workspace buttons
workspace_buttons yes workspace_buttons yes
id bar-1 id bar-0
font pango:DejaVu Sans Mono 8 font pango:DejaVu Sans Mono 8

View File

@@ -21,7 +21,7 @@ bar {
# show workspace buttons # show workspace buttons
workspace_buttons yes workspace_buttons yes
id bar-1 id bar-0
font pango:DejaVu Sans Mono 8 font pango:DejaVu Sans Mono 8
@@ -38,5 +38,27 @@ bar {
i3bar_command i3bar i3bar_command i3bar
status_command bash ~/.i3/i3bar_wrapper.bash status_command bash ~/.i3/i3bar_wrapper.bash
#status_command i3status --config ~/.i3/i3status.d/virtualarch.conf }
bar {
mode dock
position top
output VBOX1
tray_output none
workspace_buttons yes
id bar-1
font pango:DejaVu Sans Mono 8
colors {
background #000000
statusline #ffffff
separator #666666
}
i3bar_command i3bar
status_command i3status --config ~/.i3/i3status.d/virtualarch.conf
} }

View File

@@ -16,12 +16,6 @@ update_interval_on_battery 1.0
#pad_percents 2 #pad_percents 2
#use_spacer left #use_spacer left
#TEXT
#
#\
#\
#\
#\
TEXT TEXT
[ [
{ "full_text" : " \ { "full_text" : " \
@@ -100,6 +94,26 @@ ${endif}
\ \
\ \
\ \
${if_existing /sys/class/net/eth0}
{ "full_text" : " \
eth0: \
${if_up eth0}\
${addr eth0}\
${else}\
E: down\
${endif}\
" , "color" : "\
${if_up eth0}\
${if_match "${addr eth0}" != "No Address"}\#00FF00\
${else}\#FFFF00\
${endif}\
${else}\#FF0000\
${endif}\
" },
${endif}
\
\
\
{ "full_text" : " \ { "full_text" : " \
LOAD: ${loadavg 2}\ LOAD: ${loadavg 2}\
" , "color" : "\ " , "color" : "\
@@ -112,6 +126,16 @@ ${endif}\
\ \
\ \
\ \
{ "full_text" : " VOL: \
${if_match ${mixer} == 0}\
mute\
${else}\
${mixer}%\
${endif}\
" , "color" : "\#FFFFFF" },
\
\
\
${if_existing /proc/acpi/battery/BATO}\ ${if_existing /proc/acpi/battery/BATO}\
{ "full_text" : " BAT: ${battery_short} (${battery_time}) " , "color" : "\#FFFFFF" }, { "full_text" : " BAT: ${battery_short} (${battery_time}) " , "color" : "\#FFFFFF" },
${endif}\ ${endif}\

View File

@@ -16,13 +16,13 @@ log()
lock() lock()
{ {
resolution=$(xrandr | grep '*' | awk '{ print $1 }') resolution=$(xrandr | grep '*' | awk '{ print $1 }' | head -n1)
log "[I] Resolution found: \"$resolution\"" log "[I] Resolution found: \"$resolution\""
lockscreen="$HOME/.i3/data/lockscreen_$resolution.png" lockscreen="$HOME/.i3/data/lockscreen_$resolution.png"
log "[I] Looking for lockscreen at \"$lockscreen\"" log "[I] Looking for lockscreen at \"$lockscreen\""
if [[ -f "$lockscreen" ]] ; then if [[ -f "$lockscreen" ]] ; then
log "[I] Lockscreen found, will be used as background image." log "[I] Lockscreen found, will be used as background image."
background_options="--image $lockscreen" background_options="--image $lockscreen -t"
else else
log "[W] Lockscreen not found, using color #$FALLBACK_COLOR as background." log "[W] Lockscreen not found, using color #$FALLBACK_COLOR as background."
background_options="--color $FALLBACK_COLOR" background_options="--color $FALLBACK_COLOR"