Zeigt uns euere Konfigurationsdateien

mathmos

404
Registriert
14 Juli 2013
Beiträge
4.412
Ab und an finde ich es ganz interessant von anderen Nutzen die Konfigurationsdateien zu diversen Programmen zu sehen um eventuell etwas abkupfern zu können. Von daher fange ich mal mit meiner Konfigurationsdatei des Editors nano an.

nano (~/.nanorc)
Code:
Expand Collapse Copy
## Sample initialization file for GNU nano.
##
## Please note that you must have configured nano with --enable-nanorc
## for this file to be read!  Also note that this file should not be in
## DOS or Mac format, and that characters specially interpreted by the
## shell should not be escaped here.
##
## To make sure a value is disabled, use "unset <option>".
##
## For the options that take parameters, the default value is given.
## Other options are unset by default.
##
## Quotes inside string parameters don't have to be escaped with
## backslashes.  The last double quote in the string will be treated as
## its end.  For example, for the "brackets" option, ""')>]}" will match
## ", ', ), >, ], and }.

## Backup files to filename~.
set backup

## The directory to put unique backup files in.
set backupdir "/hom/mathmos/Dokumente/nanobackup"

## Constantly display the cursor position in the statusbar.  Note that
## this overrides "quickblank".
set const

## Enable ~/.nano_history for saving and reading search/replace strings.
set historylog

## Don't convert files from DOS/Mac format.
set noconvert

## Fix numeric keypad key confusion problem.
set rebindkeypad

## Make the Home key smarter.  When Home is pressed anywhere but at the
## very beginning of non-whitespace characters on a line, the cursor
## will jump to that beginning (either forwards or backwards).  If the
## cursor is already at that position, it will jump to the true
## beginning of the line.
set smarthome

## Use smooth scrolling as the default.
set smooth

## Enable soft line wrapping (AKA full line display).
set softwrap

## Allow nano to be suspended.
set suspend

bind ^S research main

## Syntax-Highlightning
## Nanorc files
include "/usr/share/nano/nanorc.nanorc"

## Makefiles
include "/usr/share/nano/makefile.nanorc"

## Cascading Style Sheets
include "/usr/share/nano/css.nanorc"

## HTML
include "/usr/share/nano/html.nanorc"

## PHP
include "/usr/share/nano/php.nanorc"

## TeX
include "/usr/share/nano/tex.nanorc"

## Patch files
include "/usr/share/nano/patch.nanorc"

## Manpages
include "/usr/share/nano/man.nanorc"

## Perl
include "/usr/share/nano/perl.nanorc"

## Python
include "/usr/share/nano/python.nanorc"

## Ruby
include "/usr/share/nano/ruby.nanorc"

## Java
include "/usr/share/nano/java.nanorc"

## Bourne shell scripts
include "/usr/share/nano/sh.nanorc"

## XML-type files
include "/usr/share/nano/xml.nanorc"

zsh (~/.zshrc) [ACHTUNG KRAUT UND RÜBEN ALARM]
Code:
Expand Collapse Copy
# Neue History-Einträge werden werden sofort nach dem Ausführen des Befehls hinzugefügt. Die History steht allen Anwendern zur Verfügung
setopt INC_APPEND_HISTORY SHARE_HISTORY
# Neue Einträge in der History werden hinzugefügt. Alte werden nicht überschrieben.
setopt APPEND_HISTORY
# Background Jobs bekommen keine niedrigere Priorität
unsetopt BG_NICE		
# Korrektur von Befehlen
setopt CORRECT			
# Einträge der History werden mit einem Timestamp versehen
setopt EXTENDED_HISTORY		
# Erster Treffer der Verzeichnisvervollständigung wird automatisch eingetragen
setopt MENUCOMPLETE
# All parameters subsequently defined are automatically exported
setopt ALL_EXPORT

# Status von Background-Jobs wird sofort angezeigt | Ergebnisse beziehen auch Datein mit einem Punkt am Anfang mit ein |
# Befehle werden korrigiert | mit pushd in Homeverzeichnis | cd in Variablen | Bei Unklarheiten Möglichkeiten auflisten
setopt   notify globdots correct pushdtohome cdablevars autolist
# Alle Argumente korrigieren | Ohne cd Verzeichnis wechseln | ? | Job standardmäßig im langen Format ausgeben
setopt   correctall autocd recexact longlistjobs
# ? | Keine doppelten aufeinander folgenden Einträge in der History | Der Verzeichnis-Stack wird nicht ausgegeben
setopt   autoresume histignoredups pushdsilent
# cd verhält sich wie pushd | ? | Erweiterte Globbing-Funktionen | ? |
setopt   autopushd pushdminus extendedglob rcquotes 
# Background-Jobs bekommen keine niedrige Priorität | Parameter die einem Verzeichnisnamen entsprechen erhalten einen Slash
unsetopt bgnice autoparamslash

# Module werden geladen, wenn sie genötigt werden 
zmodload -a zsh/stat stat
zmodload -a zsh/zpty zpty
zmodload -a zsh/zprof zprof
zmodload -ap zsh/mapfile mapfile

# Zeitzone 
TZ="Europe/Berlin"
# History-Datei
HISTFILE=$HOME/.zhistory
# Maximale Einträge in der History
HISTSIZE=1000
# Anzahl der Einträge die beim Verlassen gespeichert werden
SAVEHIST=1000
# Hostname des Rechners
HOSTNAME="Sanctum"
# Befehl der als interner Pager verwendet wird
PAGER='less'
# Editor in zsh
EDITOR='nano'
# Browser in zsh
BROWSER='opera'
# Interface für terminfo Datenbank wird automatisch geladen
autoload zsh/terminfo
# Farbausgabe in zsh
autoload -U colors && colors
# Aufbau und Ausshen des Prompt in zsh
PS1=$'[%{\e[0;33m%}%n%{\e[0m%}|%{\e[1;30m%}%M%{\e[0m%}|%B%d%b]'
RPROMPT="(%D{%d.%m.%y} | %*)"
# Spracheinstellungen zsh
LC_ALL='de_DE.UTF-8'
LANG='de_DE.UTF-8'
LC_CTYPE='de_DE.UTF-8'
# Umgebungsvariable $Path
export PATH=$PATH:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/root/bin:/home/mathmos/Dokumente/shellscripte:


unsetopt ALL_EXPORT

#if [[ $HOSTNAME == "Sanctum" ]] {
#	alias emacs='emacs -l ~/.emacs.Sanctum'
#}	

# alias	=clear

#chpwd() {
#     [[ -t 1 ]] || return
#     case $TERM in
#     sun-cmd) print -Pn "\e]l%~\e\\"
#     ;;
#    *xterm*|screen|rxvt|(dt|k|E)term) print -Pn "\e]2;%~\a"
#    ;;
#    esac
#}
#chpwd

autoload -U compinit
compinit
bindkey '^[[3~' delete-char
bindkey '^Y'	backward-delete-word
bindkey '^[[8~' end-of-line
bindkey '^[[4~' end-of-line
bindkey '^[[1~' beginning-of-line
bindkey '^[[7~' beginning-of-line
bindkey '^[[5~' backward-word
bindkey '^[[6~' forward-word
bindkey '^[[2~' overwrite-mode
bindkey '^[1'	undo
bindkey '^[2'	redo
bindkey '^[b'	beep
bindkey '^[c'	transpose-words
bindkey '^[y'	transpose-chars
bindkey '^[[a'	up-history
bindkey '^[[b'	down-history
bindkey '^[s'	copy-prev-shell-word
bindkey "^[d" backward-delete-word
zstyle ':completion::complete:*' use-cache on
zstyle ':completion::complete:*' cache-path ~/.zsh/cache/$HOST

zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
zstyle ':completion:*' list-prompt '%SAt %p: Hit TAB for more, or the character to insert%s'
zstyle ':completion:*' menu select=1 _complete _ignored _approximate
zstyle -e ':completion:*:approximate:*' max-errors \
    'reply=( $(( ($#PREFIX+$#SUFFIX)/2 )) numeric )'
zstyle ':completion:*' select-prompt '%SScrolling active: current selection at %p%s'

# Completion Styles

# list of completers to use
zstyle ':completion:*::::' completer _expand _complete _ignored _approximate

# allow one error for every three characters typed in approximate completer
zstyle -e ':completion:*:approximate:*' max-errors \
    'reply=( $(( ($#PREFIX+$#SUFFIX)/2 )) numeric )'

# insert all expansions for expand completer
zstyle ':completion:*:expand:*' tag-order all-expansions

# formatting and messages
zstyle ':completion:*' verbose yes
zstyle ':completion:*:descriptions' format '%B%d%b'
zstyle ':completion:*:messages' format '%d'
zstyle ':completion:*:warnings' format 'No matches for: %d'
zstyle ':completion:*:corrections' format '%B%d (errors: %e)%b'
zstyle ':completion:*' group-name ''

# match uppercase from lowercase
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}' 'm:{a-zA-Z}={A-Za-z}'

# offer indexes before parameters in subscripts
zstyle ':completion:*:*:-subscript-:*' tag-order indexes parameters

# command for process lists, the local web server details and host completion
# on processes completion complete all user processes
# zstyle ':completion:*:processes' command 'ps -au$USER'

## add colors to processes for kill completion
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31'

#zstyle ':completion:*:processes' command 'ps ax -o pid,s,nice,stime,args | sed "/ps/d"'
zstyle ':completion:*:*:kill:*:processes' command 'ps --forest -A -o pid,user,cmd'
zstyle ':completion:*:processes-names' command 'ps axho command'
#zstyle ':completion:*:urls' local 'www' '/var/www/htdocs' 'public_html'
#
#NEW completion:
# 1. All /etc/hosts hostnames are in autocomplete
# 2. If you have a comment in /etc/hosts like #%foobar.domain,
#    then foobar.domain will show up in autocomplete!
zstyle ':completion:*' hosts $(awk '/^[^#]/ {print $2 $3" "$4" "$5}' /etc/hosts | grep -v ip6- && grep "^#%" /etc/hosts | awk -F% '{print $2}') # Filename suffixes to ignore during completion (except after rm command)
zstyle ':completion:*:*:(^rm):*:*files' ignored-patterns '*?.o' '*?.c~' \
    '*?.old' '*?.pro'
# the same for old style completion
#fignore=(.o .c~ .old .pro)

# ignore completion functions (until the _ignored completer)
zstyle ':completion:*:functions' ignored-patterns '_*'
zstyle ':completion:*:*:*:users' ignored-patterns \
        adm apache bin daemon games gdm halt ident junkbust lp mail mailnull \
        named news nfsnobody nobody nscd ntp operator pcap postgres radvd \
        rpc rpcuser rpm shutdown squid sshd sync uucp vcsa xfs avahi-autoipd\
        avahi backup messagebus beagleindex debian-tor dhcp dnsmasq fetchmail\
        firebird gnats haldaemon hplip irc klog list man cupsys postfix\
        proxy syslog www-data mldonkey sys snort
# SSH Completion
zstyle ':completion:*:scp:*' tag-order \
   files users 'hosts:-host hosts:-domain:domain hosts:-ipaddr"IP\ Address *'
zstyle ':completion:*:scp:*' group-order \
   files all-files users hosts-domain hosts-host hosts-ipaddr
zstyle ':completion:*:ssh:*' tag-order \
   users 'hosts:-host hosts:-domain:domain hosts:-ipaddr"IP\ Address *'
zstyle ':completion:*:ssh:*' group-order \
   hosts-domain hosts-host users hosts-ipaddr
zstyle '*' single-ignored show

##Additions to zshrc
if [ -f ~/.zshrc-additions ]; then
    . ~/.zshrc-additions
fi

##THIS MAKES YAOURT WORK, DON'T TAKE IT OUT!
##export color=

export MANWIDTH=${MANWIDTH:-80}

## log out? set timeout in seconds...
## ...and do not log out in some specific terminals:
if [[ "${TERM}" == ([Exa]term*|rxvt|dtterm|screen*) ]] ; then
    unset TMOUT
else
    TMOUT=1800
fi
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh

zsh (~./zsh-additions)
Code:
Expand Collapse Copy
##Helpful Arch Linux Aliases
alias aurup='packer -Syu --auronly'

##Other aliases
alias su='su -'
alias untarbz2='tar -xvjf'
alias untargz='tar -xvzf'
alias listbz2='tar -tjf'
alias listgz='tar -tzf'
alias edit-cli='$CLIEDITOR'
alias suedit-cli='sudo $CLIEDITOR'
alias edit='$GUIEDITOR'
alias suedit='gksu $GUIEDITOR
alias start-timidity='timidity -iA -B2,8 -Oj -s 44100'
#alias upesvn='_CURRENTDIR=`pwd` && cd ~/ecvs/esvn/ && svn update && cd ~/ecvs/esvn-backup/ && svn update && cd $_CURRENTDIR' # Saves your current directory, changes to e17's svn directory, as well as the backup directory, and updates both, then goes back to your current directory
#alias gotoesvn='cd ~/ecvs/esvn/trunk/' # Changes to E17's svn trunk folder
#alias mknewe17theme='_CURRENTDIR=`pwd` && cd ~/ecvs/esvn/trunk/THEMES/b_and_w/ && edje_cc theme.edc new_e17.edj && cp new_e17.edj ~/.e/e/themes && enlightenment_remote -restart && cd $_CURRENTDIR' # Updates the new e17 theme and then changes back to the working directory
# copy with a progress bar.
alias cpv="rsync -poghb --backup-dir=/tmp/rsync -e /dev/null --progress --"
update='pacman -Syu'

##Environment variables
export CLIEDITOR=nano
export GUIEDITOR=gedit

##Commands to run at start
##cowsay `fortune`
 
Zuletzt bearbeitet:
/etc/bash/bashrc (heißt wohl /etc/bashrc.local auf anderen Distris), Sinn ist der zweizeile Prompt in der Konsole außerhalb des X-Servers.
Code:
Expand Collapse Copy
# /etc/bash/bashrc
#
# This file is sourced by all *interactive* bash shells on startup,
# including some apparently interactive shells such as scp and rcp
# that can't tolerate any output.  So make sure this doesn't display
# anything or bad things will happen !

[[ -f /etc/profile.d/bash-completion ]] && source /etc/profile.d/bash-completion

# Test for an interactive shell.  There is no need to set anything
# past this point for scp and rcp, and it's important to refrain from
# outputting anything in those cases.
if [[ $- != *i* ]] ; then
	# Shell is non-interactive.  Be done now!
	return
fi

# Bash won't get SIGWINCH if another process is in the foreground.
# Enable checkwinsize so that bash will check the terminal size when
# it regains control.  #65623
# http://cnswww.cns.cwru.edu/~chet/bash/FAQ (E11)
shopt -s checkwinsize

# Enable history appending instead of overwriting.  #139609
shopt -s histappend

# Change the window title of X terminals 
case ${TERM} in
	rxvt*|*term*|gnome*)
		PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}: ${PWD/$HOME/~}\007"'
		;;
	screen)
		PROMPT_COMMAND='echo -ne "\033_${USER}@${HOSTNAME%%.*}: ${PWD/$HOME/~}\033\\"'
		;;
esac

use_color=false

# Set colorful PS1 only on colorful terminals.
# dircolors --print-database uses its own built-in database
# instead of using /etc/DIR_COLORS.  Try to use the external file
# first to take advantage of user additions.  Use internal bash
# globbing instead of external grep binary.
safe_term=${TERM//[^[:alnum:]]/?}   # sanitize TERM
match_lhs=""
[[ -f ~/.dir_colors   ]] && match_lhs="${match_lhs}$(<~/.dir_colors)"
[[ -f /etc/DIR_COLORS ]] && match_lhs="${match_lhs}$(</etc/DIR_COLORS)"
[[ -z ${match_lhs}    ]] \
	&& match_lhs=$(dircolors --print-database)
[[ $'\n'${match_lhs} == *$'\n'"TERM "${safe_term}* ]] && use_color=true

if ${use_color} ; then
	# Enable colors for ls, etc.  Prefer ~/.dir_colors #64489
		if [[ -f ~/.dir_colors ]] ; then
			eval $(dircolors -b ~/.dir_colors)
		elif [[ -f /etc/DIR_COLORS ]] ; then
			eval $(dircolors -b /etc/DIR_COLORS)
		fi

######################### eigener Hack ############################
if [ $TERM == "linux" ]; then
	if [[ ${EUID} == 0 ]] ; then
		PS1="\[\033[01;31m\]\u@\h \[\033[00;36m\]\w \[\033[0;32m\]<\t>\[\033[0;37m\]\n > "
	else
		PS1="\[\033[01;36m\]\u@\h \[\033[00;36m\]\w \[\033[0;32m\]<\t>\[\033[0;37m\]\n > "
	fi
else
	if [[ ${EUID} == 0 ]] ; then
		PS1='\[\033[00;37m\]\u \[\033[00;31m\]\W>\[\033[00m\] '
	else
		PS1='\[\033[00;37m\]\u \[\033[00;33m\]\W>\[\033[00m\] '
	fi
fi

######################### Originalprompt ##########################
#	if [[ ${EUID} == 0 ]] ; then
#		PS1='\[\033[01;31m\]\h\[\033[01;34m\] \W \$\[\033[00m\] '
#	else
#		PS1='\[\033[01;32m\]\u@\h\[\033[01;34m\] \w \$\[\033[00m\] '
#	fi

	alias ll="ls -l --color=auto"
	alias l="ls -a --color=auto"
	alias la="ls -la --color=auto"
	alias ls='ls --color=auto'
	alias grep='grep --colour=auto'
else
	if [[ ${EUID} == 0 ]] ; then
		# show root@ when we don't have colors
		PS1='\u@\h \W \$ '
	else
		PS1='\u@\h \w \$ '
	fi
fi

# Try to keep environment pollution down, EPA loves us.
unset use_color safe_term match_lhs


# Aliase definieren
alias which="type -path"
alias where="type -all"
alias m="mplayer"
alias d="display"
alias startx='startx -- :$(ps ax | grep -v grep | grep -c X)'
alias nano="nano -w"

/etc/vimrc.local (fehlt aber noch viel Optimierung)
Code:
Expand Collapse Copy
" Einrücken + Tabs
set autoindent		"Voraussetzung für Smartindent
set smartindent		"Einrückung nach { # // usw.
set shiftwidth=4	"Anzahl Spaces bei autoindent
set tabstop=4		"Tabweite in Spaces
" set expandtab		"Spaces einfügen wenn Tab gedrückt wird

" Farben
set background=dark	"immer dunkler Hintergrund -> ssh

" Mousescrolling
set mouse=a			"im Visual- und Normalmodus
set selectmode=mouse "Markieren und Einfügen ohne Visual-Mode

" Plugins
filetype plugin on	" Plugins aktivieren

let g:tex_flavor='latex'
set grepprg=grep\ -nH\ $*

" Wordwrap
set wrap			"Zeilenumbruch auch in Wortmitte
set linebreak		"Zeilenumbruch nur nach ganzen Wörtern ohne EOL
set nolist 			"Notwendig, damit linebreak funktioniert
set textwidth=0		"Zeilenumbruch nach x Zeichen mit EOL
set wrapmargin=0	"Zeilenumbruch bei x Zeichen vom rechten Rand mit EOL

" Sonstige Einstellungen
set nobackup		"Backup~ vor Überschreiben deaktivieren
set nocp			"VI-Kompatbilität deaktivieren
set number			"Zeilennummern anzeigen
syntax on			"Syntax-Highlighting Defaultfarben

" --- OmniCppComplete ---
" auto close options when exiting insert mode
" au CursorMovedI,InsertLeave * if pumvisible() == 0|silent! pclose|endif
" set completeopt=menu,menuone,longest,preview
" let OmniCpp_NamespaceSearch = 2 " search namespaces in this and included files
" let OmniCpp_GlobalScopeSearch = 1
" let OmniCpp_ShowAccess = 1
" let OmniCpp_ShowPrototypeInAbbr = 1 "Funktionsparameter anzeigen
" let OmniCpp_MayCompleteDot = 1 " autocomplete with .
" let OmniCpp_MayCompleteArrow = 1 " autocomplete with ->
" let OmniCpp_MayCompleteScope = 1 " autocomplete with ::
" let OmniCpp_SelectFirstItem = 2 " select first item (but don't insert)

" Tags einbinden
" set tags+=/usr/share/vim/tags/cpp
" set tags+=/usr/share/vim/tags/inc

let g:clang_use_library =1
let g:clang_library_path='/usr/lib64/llvm/'
let g:clang_complete_copen=1

" Mappings
" --- Taglist ---
nnoremap <silent> <F4> :TlistToggle<CR>
" --- Definition in horizontalem Window öffnen ---
nnoremap <silent> <F12> :sp <CR>:exec("tag ".expand("<cword>"))<CR>

" Farbeinstellungen                                                                               
hi cursorline cterm=none term=none ctermbg=8 
set cursorline
 
/etc/bash.bashrc
Code:
Expand Collapse Copy
export HISTCONTROL=ignoreboth  #primaer um Duplikate zu vermeiden
export HISTSIZE=10000  #default HISTSIZE war mir irgendwann zu klein
export HISTTIMEFORMAT="%F %T"  #Timestamp in History

PS1='C:${PWD//\//\\\} >'  #DOS Prompt

#Lustige Bildchen mit Quotes
alias cowsay=/usr/games/cowsay
alias fortune=/usr/games/fortune
fortune -a | fmt -80 -s | cowsay -$(shuf -n 1 -e b d g p s t w y) -f $(shuf -n 1 -e $(cowsay -l | tail -n +2)) -n

~/.vimrc
Code:
Expand Collapse Copy
set nu  #Zeilennummer anzeigen; dient der Navigation
set hlsearch  #Suchergebnisse highlighten
syntax on  #Syntax Highlighting aktivieren
hi Comment ctermfg=grey  #Setzen der Kommentarfarbe (mein best practice bei diversen, verschiedenfarbigen Terminalfenstern)

Mehr habe ich bislang nicht gebraucht, wobei die Beispiele meiner Vorredner teilweise recht inspirativ sind.
 
/etc/X11/xorg.conf

Code:
Expand Collapse Copy
Section "ServerLayout"
	Identifier     "aticonfig Layout"
	Screen      0  "aticonfig-Screen[1]-1" 0 0
EndSection

Section "Module"
EndSection

Section "Monitor"
	Identifier   "aticonfig-Monitor[1]-1"
	Option	    "DPMS" "true"
EndSection

Section "Device"
	Identifier  "aticonfig-Device[1]-1"
	Driver      "fglrx"
	BusID       "PCI:1:0:0"
EndSection

Section "Screen"
	Identifier "aticonfig-Screen[1]-1"
	Device     "aticonfig-Device[1]-1"
	Monitor    "aticonfig-Monitor[1]-1"
	DefaultDepth     24
	SubSection "Display"
		Depth     24
		Virtual	 3360 1050
	EndSubSection
EndSection

Hat mich etwas Zeit gekostet zwei Bildschirme ordentlich zum Laufen zu kriegen. Hoffe das hilft irgendwann irgendwem :)
 
Additiv dazu eine xorg.conf fuer 4 Monitore an zwei ATI Grafikkarten.

Mit dem offiziellen Treiber funktioniert das unter Ubuntu 13.04 recht gut.

Code:
Expand Collapse Copy
Section "ServerLayout"
        Identifier     "aticonfig Layout"
        Screen      0  "aticonfig-Screen[0]-0" 1280 0
        Screen         "aticonfig-Screen[0]-1" 3200 0
        Screen         "aticonfig-Screen[1]-0" 0 0
        Screen         "aticonfig-Screen[1]-1" 5120 0
EndSection

Section "Module"
EndSection

Section "ServerFlags"
        Option      "Xinerama" "on"
EndSection

Section "Monitor"
        Identifier   "aticonfig-Monitor[0]-0"
        Option      "VendorName" "ATI Proprietary Driver"
        Option      "ModelName" "Generic Autodetecting Monitor"
        Option      "DPMS" "true"
EndSection

Section "Monitor"
        Identifier   "aticonfig-Monitor[0]-1"
        Option      "VendorName" "ATI Proprietary Driver"
        Option      "ModelName" "Generic Autodetecting Monitor"
        Option      "DPMS" "true"
EndSection

Section "Monitor"
        Identifier   "aticonfig-Monitor[0]-2"
        Option      "VendorName" "ATI Proprietary Driver"
        Option      "ModelName" "Generic Autodetecting Monitor"
        Option      "DPMS" "true"
EndSection

Section "Monitor"
        Identifier   "aticonfig-Monitor[0]-3"
        Option      "VendorName" "ATI Proprietary Driver"
        Option      "ModelName" "Generic Autodetecting Monitor"
        Option      "DPMS" "true"
EndSection

Section "Monitor"
        Identifier   "aticonfig-Monitor[1]-0"
        Option      "VendorName" "ATI Proprietary Driver"
        Option      "ModelName" "Generic Autodetecting Monitor"
        Option      "DPMS" "true"
EndSection

Section "Monitor"
        Identifier   "aticonfig-Monitor[1]-1"
        Option      "VendorName" "ATI Proprietary Driver"
        Option      "ModelName" "Generic Autodetecting Monitor"
        Option      "DPMS" "true"
EndSection

Section "Monitor"
        Identifier   "aticonfig-Monitor[1]-2"
        Option      "VendorName" "ATI Proprietary Driver"
        Option      "ModelName" "Generic Autodetecting Monitor"
        Option      "DPMS" "true"
EndSection

Section "Monitor"
        Identifier   "aticonfig-Monitor[1]-3"
        Option      "VendorName" "ATI Proprietary Driver"
        Option      "ModelName" "Generic Autodetecting Monitor"
        Option      "DPMS" "true"
EndSection

Section "Monitor"
        Identifier   "0-DFP5"
        Option      "VendorName" "ATI Proprietary Driver"
        Option      "ModelName" "Generic Autodetecting Monitor"
        Option      "DPMS" "true"
        Option      "PreferredMode" "1920x1080"
        Option      "TargetRefresh" "60"
        Option      "Position" "0 0"
        Option      "Rotate" "normal"
        Option      "Disable" "false"
EndSection

Section "Monitor"
        Identifier   "0-DFP1"
        Option      "VendorName" "ATI Proprietary Driver"
        Option      "ModelName" "Generic Autodetecting Monitor"
        Option      "DPMS" "true"
        Option      "PreferredMode" "1920x1080"
        Option      "TargetRefresh" "60"
        Option      "Position" "0 0"
        Option      "Rotate" "normal"
        Option      "Disable" "false"
EndSection

Section "Monitor"
        Identifier   "1-DFP1"
        Option      "VendorName" "ATI Proprietary Driver"
        Option      "ModelName" "Generic Autodetecting Monitor"
        Option      "DPMS" "true"
        Option      "PreferredMode" "1280x1024"
        Option      "TargetRefresh" "75"
        Option      "Position" "0 0"
        Option      "Rotate" "normal"
        Option      "Disable" "false"
EndSection

Section "Monitor"
        Identifier   "1-CRT1"
        Option      "VendorName" "ATI Proprietary Driver"
        Option      "ModelName" "Generic Autodetecting Monitor"
        Option      "DPMS" "true"
        Option      "PreferredMode" "1280x1024"
        Option      "TargetRefresh" "60"
        Option      "Position" "0 0"
        Option      "Rotate" "normal"
        Option      "Disable" "false"
EndSection
Section "Device"
        Identifier  "aticonfig-Device[0]-0"
        Driver      "fglrx"
        Option      "Monitor-DFP5" "0-DFP5"
        BusID       "PCI:1:0:0"
EndSection

Section "Device"
        Identifier  "aticonfig-Device[0]-1"
        Driver      "fglrx"
        Option      "Monitor-DFP1" "0-DFP1"
        BusID       "PCI:1:0:0"
        Screen      1
EndSection

Section "Device"
        Identifier  "aticonfig-Device[0]-2"
        Driver      "fglrx"
        BusID       "PCI:1:0:0"
        Screen      2
EndSection

Section "Device"
        Identifier  "aticonfig-Device[0]-3"
        Driver      "fglrx"
        BusID       "PCI:1:0:0"
        Screen      3
EndSection

Section "Device"
        Identifier  "aticonfig-Device[1]-0"
        Driver      "fglrx"
        Option      "Monitor-DFP1" "1-DFP1"
        BusID       "PCI:3:0:0"
EndSection

Section "Device"
        Identifier  "aticonfig-Device[1]-1"
        Driver      "fglrx"
        Option      "Monitor-CRT1" "1-CRT1"
        BusID       "PCI:3:0:0"
        Screen      1
EndSection

Section "Device"
        Identifier  "aticonfig-Device[1]-2"
        Driver      "fglrx"
        BusID       "PCI:3:0:0"
        Screen      2
EndSection

Section "Device"
        Identifier  "aticonfig-Device[1]-3"
        Driver      "fglrx"
        BusID       "PCI:3:0:0"
        Screen      3
EndSection

Section "Screen"
        Identifier "aticonfig-Screen[0]-0"
        Device     "aticonfig-Device[0]-0"
        DefaultDepth     24
        SubSection "Display"
                Viewport   0 0
                Depth     24
        EndSubSection
EndSection

Section "Screen"
        Identifier "aticonfig-Screen[0]-1"
        Device     "aticonfig-Device[0]-1"
        DefaultDepth     24
        SubSection "Display"
                Viewport   0 0
                Depth     24
        EndSubSection
EndSection

Section "Screen"
        Identifier "aticonfig-Screen[0]-2"
        Device     "aticonfig-Device[0]-2"
        Monitor    "aticonfig-Monitor[0]-2"
        DefaultDepth     24
        SubSection "Display"
                Viewport   0 0
                Depth     24
        EndSubSection
EndSection

Section "Screen"
        Identifier "aticonfig-Screen[0]-3"
        Device     "aticonfig-Device[0]-3"
        Monitor    "aticonfig-Monitor[0]-3"
        DefaultDepth     24
        SubSection "Display"
                Viewport   0 0
                Depth     24
        EndSubSection
EndSection

Section "Screen"
        Identifier "aticonfig-Screen[1]-0"
        Device     "aticonfig-Device[1]-0"
        DefaultDepth     24
        SubSection "Display"
                Viewport   0 0
                Depth     24
        EndSubSection
EndSection
Section "Screen"
        Identifier "aticonfig-Screen[1]-1"
        Device     "aticonfig-Device[1]-1"
        DefaultDepth     24
        SubSection "Display"
                Viewport   0 0
                Depth     24
        EndSubSection
EndSection

Section "Screen"
        Identifier "aticonfig-Screen[1]-2"
        Device     "aticonfig-Device[1]-2"
        Monitor    "aticonfig-Monitor[1]-2"
        DefaultDepth     24
        SubSection "Display"
                Viewport   0 0
                Depth     24
        EndSubSection
EndSection

Section "Screen"
        Identifier "aticonfig-Screen[1]-3"
        Device     "aticonfig-Device[1]-3"
        Monitor    "aticonfig-Monitor[1]-3"
        DefaultDepth     24
        SubSection "Display"
                Viewport   0 0
                Depth     24
        EndSubSection
EndSection

Code:
Expand Collapse Copy
C:\home\redbeard >lspci |grep -i vga
01:00.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI Caicos XT [Radeon HD 7470]
03:00.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI Caicos [Radeon HD 6450]
 
  • Thread Starter Thread Starter
  • #6
Schraube aktuell mal wieder an der .zshrc herum. Für eigene Funktionen habe ich mir erst einmal unter ~/.zsh das Verzeichnis .zfunc angelegt. In diesem Verzeichnis habe ich dann die Datei cd mit folgendem Inhalt erstellt.

Code:
Expand Collapse Copy
function cd () {
if [[ -z $2 ]]; then
  if [[ -f $1 ]]; then
    builtin cd $1:h
  else
    builtin cd $1
  fi
else
  builtin cd $*
fi
}

In die ~/.zshrc habe ich dann abschließend noch folgenden Inhalt eingetragen

Code:
Expand Collapse Copy
fpath=( ~/.zsh/.zfunc "${fpath[@]}" )
autoload cd

Der erste Code bewirkt, dass wenn man zum Beispiel cd /etc/fstab eingibt (was ja nicht möglich ist, da fstab eine Datei ist) man automatisch im betreffenden Verzeichnis, also /etc/ landet.

Mit dem zweiten Code teilt man der ZSH mit, dass im Verzeichnis ~/.zsh/.zfunc Funktionen liegen, welche vor allen anderen Funktionenverzeichnissen berücksichtigt werden. Weiterhin teilt man der ZSH mit, dass die Funktion cd automtisch geladen werden soll.
 
Zurück
Oben