From de80cbf3f4639ec35b29db97c2b01ac30bb0494a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hannes=20K=C3=B6rber?= Date: Mon, 16 Sep 2013 21:36:02 +0200 Subject: [PATCH 01/10] Minor changes. --- i3/i3/config | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/i3/i3/config b/i3/i3/config index 5bb4bde..67fc479 100644 --- a/i3/i3/config +++ b/i3/i3/config @@ -224,13 +224,22 @@ for_window [class="^Conky$" ] floating enable # Start i3bar to display a workspace bar (plus the system information i3status # finds out, if available) -bar { +bar +{ + # always show at the bottom of the screen mode dock position bottom + + # show a tray area tray_output primary - font pango:DejaVu Sans Mono 8 + + # show workspace buttons workspace_buttons yes + id bar-1 + + font pango:DejaVu Sans Mono 8 + colors { background #000000 statusline #ffffff @@ -242,6 +251,7 @@ bar { urgent_workspace #2f343a #900000 #ffffff } + i3bar_command i3bar status_command i3status --config $path_i3status_config } From c22266048289c15f3a0cfcc7568e794b137603bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hannes=20K=C3=B6rber?= Date: Mon, 16 Sep 2013 21:36:23 +0200 Subject: [PATCH 02/10] Moved backup folder in makesymlinks.bash. --- scripts/makesymlinks.bash | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/makesymlinks.bash b/scripts/makesymlinks.bash index 269cc2e..726119c 100755 --- a/scripts/makesymlinks.bash +++ b/scripts/makesymlinks.bash @@ -6,12 +6,13 @@ config_dir="$HOME/dotfiles/" mapping_file="$config_dir/MAPPING" # backup directory, files that would otherwise be overwritten go there -backup_dir="$HOME/dotfiles.bak/" +backup_dir="$HOME/.dotfiles.bak/" # the following folders inside $config_dir will be inspected and the # contents symlinked: -symlink_folders="bash git i3 vim zsh conky terminator" +symlink_folders='bash git i3 vim zsh conky terminator' +MAPPING_SEPARATOR='::' path_combine() { @@ -24,7 +25,7 @@ DEFAULT_ROOT="$HOME" # folder::root get_mapping() { - entry="$(grep -E "^$1::.+$" "$mapping_file" | head -n1 | grep -Eo "::.+$" | cut -c 3-)" + entry="$(grep -E "^$1$MAPPING_SEPARATOR.+$" "$mapping_file" | head -n1 | grep -Eo "$MAPPING_SEPARATOR.+$" | cut -c 3-)" echo "$entry" } From e1f1209d8be3ac9992ce6c75d95342f1a323e837 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hannes=20K=C3=B6rber?= Date: Mon, 16 Sep 2013 22:33:10 +0200 Subject: [PATCH 03/10] Moved README and wrote a bit of stuff. --- README.md | 4 ---- README.rst | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 4 deletions(-) delete mode 100644 README.md create mode 100644 README.rst diff --git a/README.md b/README.md deleted file mode 100644 index 32b940c..0000000 --- a/README.md +++ /dev/null @@ -1,4 +0,0 @@ -dotfiles -======== - -My configuration files. diff --git a/README.rst b/README.rst new file mode 100644 index 0000000..c6c9d84 --- /dev/null +++ b/README.rst @@ -0,0 +1,47 @@ +dotfiles +======== + +My configuration files. + +Installation +------------ + +1. ``git clone git://github.com:whatevsz/dotfiles ~/dotfiles`` +2. ``bash ~/dotfiles/scripts/makesymlinks.bash`` + +``makesymlinks,bash`` will back up all configuration files that would otherwise +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. + +If you want to use a different directory instead of ``~/dotfiles``, just alter the first +line and replace ``~/dotfiles`` with the desired destination, and change the line +``config_dir="$HOME/dotfiles/"`` in ``scripts/makesymlinks.bash`` accordingly. You can +also choose a different folder for the backup of old files (default being ``~/.dotfiles,bak`` +by altering ``backup_dir`` in ``scripts/makesymlinks.bash`` to your needs. + +Structure +--------- + +- ``scripts/`` - Scripts for setting up the configuration. +- ``MAPPING`` - File that contains mapping directives. +- All other folders - These are the folders that contain the configuration files. + +Mapping +------- + +If you have configuration folder that is not located directly in $HOME, +but some subfolder (~/.config being a popular example), you +can tell the setup script to place the contents of that folder into an +arbitrary subfolder of $HOME. To do so, place an entry into ``MAPPING``. It has +the following format:: + + :: + +Example:: + + terminator::.config/ + +This will place the contents of the folder ``dotfiles/terminator`` into ``~/.config/`` + +When you provide multiple lines for the same folder, the first one that will match +will be used. From 7c7a0469f55de0ec6181808aab98cc77c876ff21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hannes=20K=C3=B6rber?= Date: Mon, 16 Sep 2013 22:33:10 +0200 Subject: [PATCH 04/10] Moved README and wrote a bit of stuff. --- README.md | 4 ---- README.rst | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 4 deletions(-) delete mode 100644 README.md create mode 100644 README.rst diff --git a/README.md b/README.md deleted file mode 100644 index 32b940c..0000000 --- a/README.md +++ /dev/null @@ -1,4 +0,0 @@ -dotfiles -======== - -My configuration files. diff --git a/README.rst b/README.rst new file mode 100644 index 0000000..1bb8f22 --- /dev/null +++ b/README.rst @@ -0,0 +1,47 @@ +dotfiles +======== + +My configuration files. + +Installation +------------ + +1. ``git clone git://github.com:whatevsz/dotfiles ~/dotfiles`` +2. ``bash ~/dotfiles/scripts/makesymlinks.bash`` + +``makesymlinks,bash`` will back up all configuration files that would otherwise +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. + +If you want to use a different directory instead of ``~/dotfiles``, just alter the first +line and replace ``~/dotfiles`` with the desired destination, and change the line +``config_dir="$HOME/dotfiles/"`` in ``scripts/makesymlinks.bash`` accordingly. You can +also choose a different folder for the backup of old files (default being ``~/.dotfiles,bak`` +by altering ``backup_dir`` in ``scripts/makesymlinks.bash`` to your needs. + +Structure +--------- + +- ``scripts/`` - Scripts for setting up the configuration. +- ``MAPPING`` - File that contains mapping directives. +- All other folders - These are the folders that contain the configuration files. + +Mapping +------- + +If you have configuration folder that is not located directly in $HOME, +but some subfolder (~/.config being a popular example), you +can tell the setup script to place the contents of that folder into an +arbitrary subfolder of $HOME. To do so, place an entry into ``MAPPING``. It has +the following format:: + + :: + +Example:: + + terminator::.config/ + +This will place the contents of the folder ``dotfiles/terminator`` into ``~/.config/`` + +When you provide multiple lines for the same folder, the first one that matches +will be used. From 2f362892d218b8e2e27a68f88cb4573cbb2c37f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hannes=20K=C3=B6rber?= Date: Tue, 17 Sep 2013 01:22:39 +0200 Subject: [PATCH 05/10] Added folder "logs/" in i3. Otherwise wallchanger will fail because it cannot log. --- i3/i3/logs/.gitignore | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 i3/i3/logs/.gitignore diff --git a/i3/i3/logs/.gitignore b/i3/i3/logs/.gitignore new file mode 100644 index 0000000..e69de29 From 0abe84bc4a33991bb218557fd61d8fbfb90ba283 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hannes=20K=C3=B6rber?= Date: Wed, 18 Sep 2013 15:04:39 +0200 Subject: [PATCH 06/10] Changed font and color scheme of terminator. New font: Deja Vu Sans Mono 10 New color scheme: Solarized --- terminator/terminator/config | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/terminator/terminator/config b/terminator/terminator/config index fc3bcae..91cb39a 100644 --- a/terminator/terminator/config +++ b/terminator/terminator/config @@ -1,13 +1,24 @@ [global_config] + enabled_plugins = , [keybindings] [profiles] [[default]] + palette = "#073642:#dc322f:#859900:#b58900:#268bd2:#d33682:#2aa198:#eee8d5:#002b36:#cb4b16:#586e75:#657b83:#839496:#6c71c4:#93a1a1:#fdf6e3" + font = Deja Vu Sans Mono 10 + background_image = None + urgent_bell = True + use_system_font = False + foreground_color = "#839496" show_titlebar = False + antialias = True + copy_on_selection = True + background_color = "#002b36" [layouts] [[default]] [[[child1]]] type = Terminal parent = window0 + profile = default [[[window0]]] type = Window parent = "" From 601989d8b686ad04283301839edc4ae5d0fe3185 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hannes=20K=C3=B6rber?= Date: Wed, 18 Sep 2013 15:07:35 +0200 Subject: [PATCH 07/10] Started rewriting .vimrc. --- vim/vimrc | 209 +++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 143 insertions(+), 66 deletions(-) diff --git a/vim/vimrc b/vim/vimrc index 5435c9d..4f5d884 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -1,81 +1,158 @@ -"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -" Filename: .vimrc " -" Maintainer: Michael J. Smalley " -" URL: http://github.com/michaeljsmalley/dotfiles " -" " -" " -" Sections: " -" 01. General ................. General Vim behavior " -" 02. Events .................. General autocmd events " -" 03. Theme/Colors ............ Colors, fonts, etc. " -" 04. Vim UI .................. User interface behavior " -" 05. Text Formatting/Layout .. Text, tab, indentation related " -"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" 01 important +" 02 moving around, searching and patterns +" 03 tags +" 04 displaying text +" 05 syntax, highlighting and spelling +" 06 multiple windows +" 07 multiple tab pages +" 08 terminal +" 09 using the mouse +" 10 printing +" 11 messages and info +" 12 selecting text +" 13 editing text +" 14 tabs and indenting +" 15 folding +" 16 diff mode +" 17 mapping +" 18 reading and writing files +" 19 the swap file +" 20 command line editing +" 21 executing external commands +" 22 running make and jumping to errors +" 23 language specific +" 24 multi-byte characters +" 25 various -"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -" 01. General " -"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -set nocompatible " get rid of Vi compatibility mode. SET FIRST! +set nocompatible -"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -" 02. Events " -"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -filetype plugin indent on " filetype detection[ON] plugin[ON] indent[ON] +" setup of vundle +filetype off +set rtp+=~/.vim/bundle/vundle/ +call vundle#rc() +Bundle 'gmarik/vundle' -" In Makefiles DO NOT use spaces instead of tabs -autocmd FileType make setlocal noexpandtab -" In Ruby files, use 2 spaces instead of 4 for tabs -autocmd FileType ruby setlocal sw=2 ts=2 sts=2 +filetype plugin indent on -" Enable omnicompletion (to use, hold Ctrl+X then Ctrl+O while in Insert mode. -set ofu=syntaxcomplete#Complete +" solarized color theme +Bundle 'altercation/vim-colors-solarized' -"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -" 03. Theme/Colors " -"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -set t_Co=256 " enable 256-color mode. -syntax enable " enable syntax highlighting (previously syntax on). -"colorscheme molokai " set colorscheme +" setup for the solarized color theme +set background=dark +let g:solarized_termcolors=16 +let g:solarized_termtrans=1 +let g:solarized_contrase="normal" +let g:solarized_visibility="normal" +syntax enable +colorscheme solarized -" Prettify JSON files -autocmd BufRead,BufNewFile *.json set filetype=json -autocmd Syntax json sou ~/.vim/syntax/json.vim +set mouse=a " enable mouse support +set mousehide " hide the mouse when typing -" Prettify Vagrantfile -autocmd BufRead,BufNewFile Vagrantfile set filetype=ruby +set history=1000 " history length for commands, defaults to + " 20 -" Highlight characters that go over 80 columns -highlight OverLength ctermbg=red ctermfg=white guibg=#592929 -match OverLength /\%81v.\+/ +set nobackup " do not create a backup +set nowritebackup -"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -" 04. Vim UI " -"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -set number " show line numbers -set cul " highlight current line -set laststatus=2 " last window always has a statusline -set nohlsearch " Don't continue to highlight searched phrases. -set incsearch " But do highlight as you type your search. -set ignorecase " Make searches case-insensitive. -set ruler " Always show info along bottom. -set showmatch -set statusline=%<%f\%h%m%r%=%-20.(line=%l\ \ col=%c%V\ \ totlin=%L%)\ \ \%h%m%r%=%-40(bytval=0x%B,%n%Y%)\%P -"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -" 05. Text Formatting/Layout " -"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -set autoindent " auto-indent -set tabstop=4 " tab spacing -set softtabstop=4 " unify -set shiftwidth=4 " indent/outdent by 4 columns -set shiftround " always indent/outdent to the nearest tabstop -set expandtab " use spaces instead of tabs -set smarttab " use tabs at the start of a line, spaces elsewhere -set nowrap " don't wrap text +set showmode " show the current mode +set cursorline " highlight the current line +set number " enable linenumbers +set numberwidth=2 " only use as many columns for the line + " numbers as necessary +set relativenumber " show file numbers relative to the current + " line instead of absolute ones, but still + " the absolute linenumber on the current + " line due to 'number' being set +set showmatch " show matching brackets/parentheses +set incsearch " show matches while typing in a search +set hlsearch " highlight matches in a search -match ErrorMsg '\s\+$' " mark trailing whitespace +set ignorecase " ignore case when only searching for + " lowercase +set smartcase " letters, case sensitive otherwis + +set foldenable " auto-fold code + +set wrap " wrap text +set linebreak + +set backspace=indent,eol,start " allowing backspacing over autoindent, + " line breaks and start of insert + +set encoding=utf-8 " set the encoding + + +set showmode " show current mode in the status line + +set swapfile " use a swapfile +set updatecount=200 " default, number of characters that have + " to be typed before the swapfile is + " written to disk +set updatetime=10000 " time in milliseconds after the swapfile + " is written to disk + +set title " let vim set the title of the window +set titlestring="" " use default titlestring + + + +set autoread " automatically reload a file when it was + " changed outside of vim + +set gdefault " apply replace patterns to the whole line + " by default + +set tabstop=4 " one tab equals 4 spaces +set softtabstop=4 " makes the spaces feel like real tabs +set shiftwidth=4 " one indent level equals 4 spaces +set expandtab " expand tabs to spaces +set autoindent " copy indent from current line when + " starting a new one +set smartindent " smart indenting for C-like languages +set smarttab " use shiftwidth when tabbing in front of + " a line instead of tabsstop/softtabstop + +set undofile " use an undo file +set undodir=~/.vim/backups " store undo files in a fixed directory + " instead of the current directory +set undolevels=1000 " undo a maximum of 1000 changes +set undoreload=10000 " save the whole buffer for undo when + " reloading it + + +set foldmethod=indent " fold according to indet +set foldnestmax=2 " fold a maximum of 2 levels +set nofoldenable " unfold everything by default + +set scrolloff=5 " show context at the screen edges + + +set showcmd " show (partial) command in the command line +set hidden " buffers can exist without a window + +set ttyfast " enhance smoothness +set ruler " show position in status line + +set wildmenu " show a menu when autocompleting +set wildmode=list:longest " automatically complete up to the level + " of ambiguity + +set autochdir " automatically change to the directory that + " contains the file that is edited + +let mapleader = "," + +nnoremap / /\v +vnoremap / /\v +nnoremap :noh +nnoremap % +vnoremap % + +nnoremap j gj +nnoremap k gk -" Removes trailing spaces function! TrimWhiteSpace() %s/\s\+$//e endfunction From fc48cb71a25671ced78b1f6c6bc6d9b2a17e398c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hannes=20K=C3=B6rber?= Date: Wed, 18 Sep 2013 15:09:13 +0200 Subject: [PATCH 08/10] Enabled vertical edge scroll in .i3/config and disabled conky. --- i3/i3/config | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/i3/i3/config b/i3/i3/config index 67fc479..c7d3500 100644 --- a/i3/i3/config +++ b/i3/i3/config @@ -21,7 +21,7 @@ set $keyboard_options nodeadkeys # Mouse options set $mouse_repeat_delay 150 -set $mouse_repeat_speed 25 +set $mouse_repeat_speed 30 # Path to the exit script set $path_i3exit ~/.i3/scripts/i3exit.bash @@ -266,11 +266,14 @@ exec --no-startup-id setxkbmap $keyboard_layout $keyboard_options # Set key repeat delay exec --no-startup-id xset r rate $mouse_repeat_delay $mouse_repeat_speed +# Enable vertical edge scroll for the touchpad +exec --no-startup-id synclient VertEdgeScroll=1 + # Start wicd in tray exec --no-startup-id wicd-gtk --tray # Start conky -exec --no-startup-id 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 From 31ed7c962034c46c09556e4d1d7a1acbdc3808e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hannes=20K=C3=B6rber?= Date: Wed, 18 Sep 2013 18:01:16 +0200 Subject: [PATCH 09/10] Added ~/.xinitrc to the repository. In addition, a host-specific file that will be executed by .xinitrc was added in ~/.xinitrc.d/. --- i3/i3/config | 17 ----------------- scripts/makesymlinks.bash | 2 +- x/xinitrc | 28 ++++++++++++++++++++++++++++ x/xinitrc.d/netbook.xinitrc | 4 ++++ 4 files changed, 33 insertions(+), 18 deletions(-) create mode 100755 x/xinitrc create mode 100755 x/xinitrc.d/netbook.xinitrc diff --git a/i3/i3/config b/i3/i3/config index c7d3500..e5cbfd1 100644 --- a/i3/i3/config +++ b/i3/i3/config @@ -15,14 +15,6 @@ set $mod Mod4 # The default terminal set $terminal terminator -# Keyboard options -set $keyboard_layout de -set $keyboard_options nodeadkeys - -# Mouse options -set $mouse_repeat_delay 150 -set $mouse_repeat_speed 30 - # Path to the exit script set $path_i3exit ~/.i3/scripts/i3exit.bash @@ -260,15 +252,6 @@ bar # Start the wallpaper changer. exec --no-startup-id $path_wallchanger $wallpaper_directory $wallpaper_interval > $wallpaper_logfile -# Set keyboard layout -exec --no-startup-id setxkbmap $keyboard_layout $keyboard_options - -# Set key repeat delay -exec --no-startup-id xset r rate $mouse_repeat_delay $mouse_repeat_speed - -# Enable vertical edge scroll for the touchpad -exec --no-startup-id synclient VertEdgeScroll=1 - # Start wicd in tray exec --no-startup-id wicd-gtk --tray diff --git a/scripts/makesymlinks.bash b/scripts/makesymlinks.bash index 726119c..52690de 100755 --- a/scripts/makesymlinks.bash +++ b/scripts/makesymlinks.bash @@ -10,7 +10,7 @@ backup_dir="$HOME/.dotfiles.bak/" # the following folders inside $config_dir will be inspected and the # contents symlinked: -symlink_folders='bash git i3 vim zsh conky terminator' +symlink_folders='bash git i3 vim zsh conky terminator x' MAPPING_SEPARATOR='::' diff --git a/x/xinitrc b/x/xinitrc new file mode 100755 index 0000000..cc654e1 --- /dev/null +++ b/x/xinitrc @@ -0,0 +1,28 @@ +#!/bin/bash + +if [ -d /etc/X11/xinit/xinitrc.d ]; then + for f in /etc/X11/xinit/xinitrc.d/*; do + [ -x "$f" ] && . "$f" + done + unset f +fi + +[ -f /etc/xprofile ] && source /etc/xprofile +[ -f ~/.xprofile ] && source ~/.xprofile + +# execute the host-specific .xinitrc-addition +hostfile="$HOME/.xinitrc.d/$(hostname).xinitrc" +[[ -f "$hostfile" ]] && bash "$hostfile" & + +case $1 in +e17) + exec enlightenment_start + ;; +i3) + exec i3 + ;; +xfce4) ;; +*) + exec i3 + ;; +esac diff --git a/x/xinitrc.d/netbook.xinitrc b/x/xinitrc.d/netbook.xinitrc new file mode 100755 index 0000000..a090196 --- /dev/null +++ b/x/xinitrc.d/netbook.xinitrc @@ -0,0 +1,4 @@ +#!/bin/bash + +# enable vertical edge scrolling +synclient VertEdgeScroll=1 From 263efe3000f59daefbea21026ca43459fc026ee6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hannes=20K=C3=B6rber?= Date: Wed, 18 Sep 2013 19:27:36 +0200 Subject: [PATCH 10/10] Added dynamic config generation for i3. The script genconfig.bash concatenates the main configuration file with a host specific one to create a session-specific configration file that is then passed to i3. It therefore has to be called in .xinitrc or something comparable before starting i3. If no host specific configuration is found, a default file will be used instead. This is useful for providing default that should not go into the main configuration file, maybe because they are incompatible with some host specific settings. For example a default bar{} block goes there, as if this was in the main config, two i3bar instances would be started when a host specific config specifies its own. --- i3/i3/.gitignore | 1 + i3/i3/config | 39 --------------------------------------- i3/i3/config.d/default | 3 +++ i3/i3/config.d/netbook | 38 ++++++++++++++++++++++++++++++++++++++ i3/i3/genconfig.bash | 31 +++++++++++++++++++++++++++++++ i3/i3/i3status.conf | 2 +- vim/vimrc | 2 +- x/xinitrc | 24 ++++++++++++++++-------- 8 files changed, 91 insertions(+), 49 deletions(-) create mode 100644 i3/i3/.gitignore create mode 100644 i3/i3/config.d/default create mode 100644 i3/i3/config.d/netbook create mode 100644 i3/i3/genconfig.bash diff --git a/i3/i3/.gitignore b/i3/i3/.gitignore new file mode 100644 index 0000000..6e74f38 --- /dev/null +++ b/i3/i3/.gitignore @@ -0,0 +1 @@ +session.config diff --git a/i3/i3/config b/i3/i3/config index e5cbfd1..6cb223e 100644 --- a/i3/i3/config +++ b/i3/i3/config @@ -214,38 +214,6 @@ for_window [class="^Xfce4-notifyd$"] floating enable for_window [class="^Conky$" ] floating enable -# Start i3bar to display a workspace bar (plus the system information i3status -# finds out, if available) -bar -{ - # always show at the bottom of the screen - mode dock - position bottom - - # show a tray area - tray_output primary - - # show workspace buttons - workspace_buttons yes - - id bar-1 - - font pango:DejaVu Sans Mono 8 - - colors { - background #000000 - statusline #ffffff - separator #666666 - - focused_workspace #4c7899 #285577 #ffffff - active_workspace #333333 #5f676a #ffffff - inactive_workspace #333333 #222222 #888888 - urgent_workspace #2f343a #900000 #ffffff - } - - i3bar_command i3bar - status_command i3status --config $path_i3status_config -} @@ -274,10 +242,3 @@ mode "$mode_system" { } bindsym $mod+Pause mode "$mode_system" bindsym $mod+Shift+Pause exec --no-startup-id $path_i3exit lock - - -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- diff --git a/i3/i3/config.d/default b/i3/i3/config.d/default new file mode 100644 index 0000000..b3c19a2 --- /dev/null +++ b/i3/i3/config.d/default @@ -0,0 +1,3 @@ +bar { + status_command i3status +} diff --git a/i3/i3/config.d/netbook b/i3/i3/config.d/netbook new file mode 100644 index 0000000..5197a9f --- /dev/null +++ b/i3/i3/config.d/netbook @@ -0,0 +1,38 @@ + +# 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- + +# start i3bar to display a workspace bar (plus the system information i3status +# finds out, if available) +bar { + # always show at the bottom of the screen + mode dock + position bottom + + # show a tray area + tray_output primary + + # show workspace buttons + workspace_buttons yes + + id bar-1 + + font pango:DejaVu Sans Mono 8 + + colors { + background #000000 + statusline #ffffff + separator #666666 + + focused_workspace #4c7899 #285577 #ffffff + active_workspace #333333 #5f676a #ffffff + inactive_workspace #333333 #222222 #888888 + urgent_workspace #2f343a #900000 #ffffff + } + + i3bar_command i3bar + status_command i3status --config $path_i3status_config +} diff --git a/i3/i3/genconfig.bash b/i3/i3/genconfig.bash new file mode 100644 index 0000000..c0a6115 --- /dev/null +++ b/i3/i3/genconfig.bash @@ -0,0 +1,31 @@ +#!/bin/bash + +# 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" +# directory that contains host specific configuration +CONF_DIR="$HOME/.i3/config.d" +# file that should be used when no host specific configuration present +DEFAULT_CONF="$CONF_DIR/default" + +host_specific_conf="$CONF_DIR/$(hostname).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 + ln -sf "$MAIN_CONF" "$SESSION_CONF" +else + # either use the host specific config if present, or the default if not + if [[ -f "$host_specific_conf" ]]; then + conf_to_use="$host_specific_conf" + else + conf_to_use="$DEFAULT_CONF" + fi + cat "$MAIN_CONF" "$conf_to_use" > "$SESSION_CONF" +fi + +echo "$SESSION_CONF" diff --git a/i3/i3/i3status.conf b/i3/i3/i3status.conf index 6021e11..cda31b7 100644 --- a/i3/i3/i3status.conf +++ b/i3/i3/i3status.conf @@ -54,7 +54,7 @@ run_watch VPN { } tztime local { - format = "%Y-%m-%d %H:%M:%S" + format = "%a %Y-%m-%d %H:%M:%S" } load { diff --git a/vim/vimrc b/vim/vimrc index 4f5d884..0d8a4e6 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -126,7 +126,7 @@ set foldmethod=indent " fold according to indet set foldnestmax=2 " fold a maximum of 2 levels set nofoldenable " unfold everything by default -set scrolloff=5 " show context at the screen edges +set scrolloff=4 " show context at the screen edges set showcmd " show (partial) command in the command line diff --git a/x/xinitrc b/x/xinitrc index cc654e1..d06049a 100755 --- a/x/xinitrc +++ b/x/xinitrc @@ -10,19 +10,27 @@ fi [ -f /etc/xprofile ] && source /etc/xprofile [ -f ~/.xprofile ] && source ~/.xprofile + +# keyboard options +keyboard_layout=de +keyboard_options= nodeadkeys +keyboard_repeat_delay=150 +keyboard_repeat_speed=30 + # execute the host-specific .xinitrc-addition hostfile="$HOME/.xinitrc.d/$(hostname).xinitrc" [[ -f "$hostfile" ]] && bash "$hostfile" & +# set keyboard layout +setxkbmap $keyboard_layout $keyboard_options + +# set key repeat delay +xset r rate $keyboard_repeat_delay $keyboard_repeat_speed + + case $1 in -e17) - exec enlightenment_start - ;; -i3) - exec i3 - ;; -xfce4) ;; *) - exec i3 + SESSION_CONF=$( bash "$HOME/.i3/genconfig.bash") + exec i3 -c "$SESSION_CONF" ;; esac