Мои конфиги
Просто что бы был "Backup"
~/.fonts.conf:
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<match target="font" >
<edit mode="assign" name="rgba" >
<const>rgb</const>
</edit>
</match>
<match target="font" >
<edit mode="assign" name="hinting" >
<bool>true</bool>
</edit>
</match>
<match target="font" >
<edit mode="assign" name="hintstyle" >
<const>hintslight</const>
</edit>
</match>
<match target="font" >
<edit mode="assign" name="antialias" >
<bool>true</bool>
</edit>
</match>
</fontconfig>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<match target="font" >
<edit mode="assign" name="rgba" >
<const>rgb</const>
</edit>
</match>
<match target="font" >
<edit mode="assign" name="hinting" >
<bool>true</bool>
</edit>
</match>
<match target="font" >
<edit mode="assign" name="hintstyle" >
<const>hintslight</const>
</edit>
</match>
<match target="font" >
<edit mode="assign" name="antialias" >
<bool>true</bool>
</edit>
</match>
</fontconfig>
~/.mplayer/config:
# Write your default config options here!
subcp=utf8
subfont-text-scale=6
ass=true
#subcp=enca:ru:utf8
~/.qt/qtrc:
[3.3]
libraryPath=/usr/lib/kde3/plugins/:/home/imp/.kde/lib/kde3/plugins/:/usr/lib/qt3/plugins:/usr/bin
[Font Substitutions]
arial=helvetica^e
helv=helvetica^e
tms rmn=times^e
[General]
GUIEffects=none^e
XIMInputStyle=On The Spot
cursorFlashTime=1000
doubleClickInterval=400
embedFonts=true
enableXft=true
font=Liberation Sans,10,-1,5,50,0,0,0,0,0
fontPath=\0
globalStrut=0^e0^e
resolveSymlinks=false
style=Keramik
useRtlExtensions=false
useXft=true
wheelScrollLines=3
[KDE]
contrast=7
kdeAddedLibraryPaths=/home/imp/.kde/lib/kde3/plugins/^e/usr/lib/kde3/plugins/^e
[KWinPalette]
activeBackground=#382f3f
activeBlend=#eeeff2
activeForeground=#ffffff
activeTitleBtnBg=#dcdcdc
frame=#efefef
inactiveBackground=#21593d
inactiveBlend=#41b179
inactiveForeground=#000000
inactiveFrame=#efefef
inactiveTitleBtnBg=#a7b5c7
[Palette]
active=#000000^e#75cdcd^e#c6ffff^e#9de6e6^e#3a6666^e#4e8888^e#000000^e#ffffff^e#000000^e#a2a2a2^e#8074b0^e#000000^e#41b179^e#ffffff^e#0000ee^e#52188b^e
disabled=#808080^e#75cdcd^e#c6ffff^e#87ebeb^e#3a6666^e#4e8888^e#808080^e#ffffff^e#808080^e#a2a2a2^e#8074b0^e#000000^e#41b179^e#808080^e#0000ee^e#52188b^e
inactive=#000000^e#75cdcd^e#c6ffff^e#87ebeb^e#3a6666^e#4e8888^e#000000^e#ffffff^e#000000^e#a2a2a2^e#8074b0^e#000000^e#41b179^e#ffffff^e#0000ee^e#52188b^e
[customColors]
0=-16777216
1=-1
10=-1
11=-1
12=-1
13=-1
14=-1
15=-1
2=-1
3=-1
4=-1
5=-1
6=-1
7=-1
8=-1
9=-1
~/.telak/telacrc:
[test]
url = /home/imp/.telak/1.png
x = 240
y = 240
reverse = 0
refresh = 10
~/.xmonad/xmonad.hs:
{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses, TypeSynonymInstances, FlexibleContexts, NoMonomorphismRestriction #-}
import XMonad hiding ( (|||) )
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Hooks.ManageHelpers
import XMonad.Hooks.XPropManage
import XMonad.Layout.Combo
import XMonad.Layout.IM
import XMonad.Layout.Grid
import XMonad.Layout.LayoutModifier
import XMonad.Layout.LayoutCombinators
import XMonad.Layout.NoBorders
import XMonad.Layout.PerWorkspace
import XMonad.Layout.ResizableTile
import XMonad.Layout.Tabbed
import XMonad.Layout.ToggleLayouts
import XMonad.Layout.WindowNavigation
import XMonad.Util.Run(spawnPipe)
import XMonad.Util.EZConfig(additionalKeys)
import XMonad.Util.Dmenu
import XMonad.Util.WindowProperties
import System.IO
import XMonad.Actions.CopyWindow
import XMonad.Actions.TagWindows
import XMonad.Prompt
import XMonad.Prompt.Window
import qualified XMonad.StackSet as W
import qualified Data.Map as M
import Data.Ratio ((%))
import Control.Monad
import Graphics.X11.Xlib.Extras
import Foreign.C.Types (CLong)
main = do
xmproc <- spawnPipe "/usr/bin/xmobar ~/.xmonad/xmobar.conf"
xmonad $ defaultConfig {
modMask = mod4Mask,
-- hooks, layouts
layoutHook = myLayouts,
manageHook = myManageHook,
logHook = dynamicLogWithPP $ xmobarPP {
ppOutput = hPutStrLn xmproc,
ppTitle = xmobarColor "green" "" . shorten 80
}
} `additionalKeys`
[ ((0, xK_Print), spawn "ksnapshot")
, ((mod1Mask, xK_F4), kill)
, ((mod1Mask, xK_F2), spawn "exe=`dmenu_path | dmenu -fn '-*-liberation sans-medium-r-normal-*-*-120-*-*-*-*-iso10646-1'`&& eval \"exec $exe\"")
-- Move focus to the next window
, ((mod1Mask, xK_Tab ), windows W.focusDown)
]
genericLayouts = avoidStruts $
smartBorders $
toggleLayouts (noBorders Full) $
tiled ||| Mirror tiled ||| (noBorders Full)
where
tiled = Tall 1 (3 / 100) (1 / 2)
myLayouts = onWorkspaces ["1","8","9"] imLayout $
genericLayouts
myManageHook = ignoresome <+> mymyManageHook <+> manageMenus <+> manageDialogs
-- Float all menus and dialogs
manageMenus = checkMenu --> doFloat
manageDialogs = checkDialog --> doFloat
-- Check if window is a menu
checkMenu = checkAtom "_NET_WM_WINDOW_TYPE" "_NET_WM_WINDOW_TYPE_MENU"
-- Check if window is a dialog
checkDialog = checkAtom "_NET_WM_WINDOW_TYPE" "_NET_WM_WINDOW_TYPE_DIALOG"
ignoresome = composeAll
[ className =? "stalonetray" --> doIgnore]
first = ["psi"]
second = ["Krusader"]
third = ["Firefox", "Opera"]
fourth = ["Qmpdclient"]
ninth = ["Ktorrent"]
toAll = ["stalonetray","Kkbswitch"]
myFloats = ["Mplayer", "Yakuake", "Kmix"]
myCntrFloats = ["Smplayer", "dmenu", "glxgears", "Toplevel"]
kkb = ["Kkbswitch"]
kvpn = ["kvpnc","Kvpnc"]
kkbpos = W.RationalRect 0.9 0.002 0.015 0.015
kvpnpos = W.RationalRect 0.915 0.002 0.015 0.015
mymyManageHook = composeAll . concat $
[ [ className =? c --> doF (W.shift "1") | c <- first]
, [ className =? c --> doF (W.shift "2") | c <- second]
, [ className =? c --> doF (W.shift "3") | c <- third]
, [ className =? c --> doF (W.shift "4") | c <- fourth]
, [ className =? c --> doF (W.shift "9") | c <- ninth]
, [ className =? c --> doF (copyToAll) | c <- toAll]
, [ className =? c --> doFloat | c <- myFloats]
, [ className =? c --> doCenterFloat | c <- myCntrFloats]
, [ className =? c --> doRectFloat kkbpos| c <- kkb]
, [ title =? t --> doRectFloat kvpnpos|t <- kvpn]
, [ composeOne [ isFullscreen -?> doFullFloat
, transience]
]
]
imLayout = avoidStruts $ withIMs ratio rosters chatLayout where
chatLayout = Grid
ratio = 1%7
rosters = [skypeRoster, pidginRoster, psiRoaster]
pidginRoster = And (ClassName "Pidgin") (Title "Buddy List")
skypeRoster = (ClassName "Skype") `And` (Not (Title "Options")) `And` (Not (Role "Chats")) `And` (Not (Role "CallWindowForm"))
psiRoaster = And (Resource "main") (ClassName "psi")
-- CODE, CODE, CODE --
-- Check if window has named atom with given value
checkAtom name value = ask >>= \w -> liftX $ do
a <- getAtom name
val <- getAtom value
mbr <- getProp a w
case mbr of
Just [r] -> return $ elem (fromIntegral r) [val]
_ -> return False
-- | Helper to read a property
getProp :: Atom -> Window -> X (Maybe [CLong])
getProp a w = withDisplay $ \dpy -> io $ getWindowProperty32 dpy a w
-- modified version of XMonad.Layout.IM --
-- | Data type for LayoutModifier which converts given layout to IM-layout
-- (with dedicated space for the roster and original layout for chat windows)
data AddRosters a = AddRosters Rational [Property] deriving (Read, Show)
instance LayoutModifier AddRosters Window where
modifyLayout (AddRosters ratio props) = applyIMs ratio props
modifierDescription _ = "IMs"
-- | Modifier which converts given layout to IMs-layout (with dedicated
-- space for rosters and original layout for chat windows)
withIMs :: LayoutClass l a => Rational -> [Property] -> l a -> ModifiedLayout AddRosters l a
withIMs ratio props = ModifiedLayout $ AddRosters ratio props
-- | IM layout modifier applied to the Grid layout
gridIMs :: Rational -> [Property] -> ModifiedLayout AddRosters Grid a
gridIMs ratio props = withIMs ratio props Grid
hasAnyProperty :: [Property] -> Window -> X Bool
hasAnyProperty [] _ = return False
hasAnyProperty (p:ps) w = do
b <- hasProperty p w
if b then return True else hasAnyProperty ps w
-- | Internal function for placing the rosters specified by
-- the properties and running original layout for all chat windows
applyIMs :: (LayoutClass l Window) =>
Rational
-> [Property]
-> W.Workspace WorkspaceId (l Window) Window
-> Rectangle
-> X ([(Window, Rectangle)], Maybe (l Window))
applyIMs ratio props wksp rect = do
let stack = W.stack wksp
let ws = W.integrate' $ stack
rosters <- filterM (hasAnyProperty props) ws
let n = fromIntegral $ length rosters
let (rostersRect, chatsRect) = splitHorizontallyBy (n * ratio) rect
let rosterRects = splitHorizontally n rostersRect
let filteredStack = stack >>= W.filter (`notElem` rosters)
wrs <- runLayout (wksp {W.stack = filteredStack}) chatsRect
return ((zip rosters rosterRects) ++ fst wrs, snd wrs)~/.xmonad/xmobar.conf:
Config { font = "xft:liberation sans-10"
, bgColor = "black"
, fgColor = "grey"
, position = TopW L 90
, commands = [ Run Weather "UKKK" ["-t"," ˚C","-L","7","-H","35","--normal","green","--high","red","--low","lightblue"] 36000
, Run Cpu ["-L","3","-H","50","--normal","green","--high","red"] 10
, Run Memory ["-t","Mem: %"] 10
, Run Swap [] 10
, Run Date "%a %b %_d %H:%M" "date" 10
, Run StdinReader
]
, sepChar = "%"
, alignSep = "}{"
, template = "%StdinReader% }{ %cpu% | %memory% * %swap% %date% | %UKKK%"
}
~/.kderc:
[General]
activeFont=Liberation Sans,10,-1,5,75,0,0,0,0,0
desktopFont=Liberation Sans,10,-1,5,50,0,0,0,0,0
fixed=Terminus,12,-1,5,75,0,0,0,0,0
font=Liberation Sans,10,-1,5,50,0,0,0,0,0
menuFont=Liberation Sans,10,-1,5,50,0,0,0,0,0
smallestReadableFont=Liberation Sans,9,-1,5,50,0,0,0,0,0
taskbarFont=Liberation Sans,10,-1,5,50,0,0,0,0,0
toolBarFont=Liberation Sans,9,-1,5,50,0,0,0,0,0
~/.lftprc:
set ftp:charset cp1251
~/.msmtprc:
account gmail
host smtp.gmail.com
port 587
user login@gmail.com
password password
auth on
tls on
tls_starttls on
tls_trust_file /home/redmine/.certs/ThawtePremiumServerCA.crt
from imposeren@gmail.com
maildomain gmail.com
account default : gmail
logfile /home/imp/.msmtp.log
syslog on
~/.vimrc
set encoding=utf-8
let python_highlight_all=1
syntax on
filetype plugin on
filetype indent on
set autoindent
set pastetoggle=
set foldmethod=indent
au BufRead,BufNewFile *.py,*pyw set shiftwidth=4
au BufRead *.c,*.h set shiftwidth=8
au BufNewFile *.c,*.h set shiftwidth=4
au BufRead,BufNewFile *py,*pyw,*.c,*.h set tabstop=8
au BufRead,BufNewFile *.py,*.pyw set expandtab
au BufRead,BufNewFile *.c,*.h set noexpandtab
au BufRead,BufNewFile Makefile* set noexpandtab
highlight BadWhitespace ctermbg=red guibg=red
au BufRead,BufNewFile *.py,*.pyw match BadWhitespace /^\t\+/
au BufRead,BufNewFile *.py,*.pyw,*.c,*.h match BadWhitespace /\s\+$/
au BufRead,BufNewFile *.py,*.pyw,*.c,*.h set textwidth=79
au BufRead,BufNewFile *.c,*.h set formatoptions-=c formatoptions-=o formatoptions-=r
au BufNewFile *.py,*.pyw,*.c,*.h set fileformat=unix
autocmd BufRead *.py set makeprg=python\ -c\ \"import\ py_compile,sys;\ sys.stderr=sys.stdout;\ py_compile.compile(r'%')\"
autocmd BufRead *.py set efm=%C\ %.%#,%A\ \ File\ \"%f\"\\,\ line\ %l%.%#,%Z%[%^\ ]%\\@=%m
autocmd BufRead *.py nmap :!python %
~/.xbindkeysrc
# Release, Control, Shift, Mod1 (Alt), Mod2 (NumLock),
# Mod3 (CapsLock), Mod4, Mod5 (Scroll).
#keystate_numlock = enable
#keystate_capslock = enable
#keystate_scrolllock= enable
"mpc stop"
Control+Alt + Delete
"mpc toggle"
Control+Alt + Insert
"mpc pause"
Control+Alt + End
"mpc toggle"
Control+Alt + Home
"mpc next"
Control+Alt + Next
"mpc prev"
Control+Alt + Prior
"qmpdclient"
Control+Alt + P
"mpc seek +00:00:02"
Control+Alt + Right
"mpc seek -00:00:02"
Control+Alt + Left
~/.XCompose
# ~/.XCompose
# This file defines custom Compose sequences for Unicode characters
# Import default rules from the system Compose file:
include "/usr/share/X11/locale/en_US.UTF-8/Compose"
#
# Quotation marks
#
<Multi_key> <Cyrillic_be> : "«" guillemotleft # LEFT DOUBLE ANGLE QUOTATION
<Multi_key> <comma> : "«" guillemotleft # LEFT DOUBLE ANGLE QUOTATION
<Multi_key> <Cyrillic_yu> : "»" guillemotright # RIGHT DOUBLE ANGLE QUOTATION
<Multi_key> <period> : "»" guillemotright # RIGHT DOUBLE ANGLE QUOTATION
<Multi_key> <Cyrillic_BE> : "„" U201e # DOUBLE LOW-9 QUOTATION MARK
<Multi_key> <less> : "„" U201e # DOUBLE LOW-9 QUOTATION MARK
<Multi_key> <Cyrillic_YU> : "“" U201c # LEFT DOUBLE QUOTATION MARK
<Multi_key> <greater> : "“" U201c # LEFT DOUBLE QUOTATION MARK
#
# Math
#
<Multi_key> <Cyrillic_ef> : "≈" approximate # ALMOST EQUAL TO
<Multi_key> <a> : "≈" approximate # ALMOST EQUAL TO
<Multi_key> <5> : "‰" U2030 # PER MILLE SIGN
<Multi_key> <equal> : "≠" U2260 # NOT EQUAL TO
<Multi_key> <plus> : "±" plusminus # PLUS-MINUS SIGN
#
# Misc. typographics
#
<Multi_key> <Cyrillic_shcha> : "°" degree # DEGREE SIGN
<Multi_key> <o> : "°" degree # DEGREE SIGN
<Multi_key> <space> : " " nobreakspace # NO-BREAK SPACE
#
# Missing keys in Russian layout
#
<Multi_key> <3> : "#" numbersign # NUMBER SIGN
<Multi_key> <4> : "$" dollar # DOLLAR SIGN
<Multi_key> <Cyrillic_ha> : "[" bracketleft # LEFT SQUARE BRACKET
<Multi_key> <Cyrillic_hardsign> : "]" bracketright # RIGHT SQUARE BRACKET
<Multi_key> <colon> : "^" U005E # CIRCUM
~/.Xdefaults
xvt.depth: 32
URxvt*background: rgba:0000/0000/0000/cccc
Xft.dpi: 120
Xft.antialias: true
Xft.hinting:true
Xft.hintstyle: hintslight
xft.rgba: rgb
~/.xinitrc
#xrdb -merge .Xresources
# Set up an icon tray
stalonetray &
# Set the background color
xsetroot -solid midnightblue &
# xcompmgr -c &
# Fire up apps
setxkbmap -layout "us,ru(winkeys),ua(winkeys)" -option compose:ralt &
psi &
krusader &
firefox &
yakuake &
sleep 1
kkbswitch &
qmpdclient &
klipper &
ktorrent &
xscreensaver -no-splash &
xbindkeys
xmonad
~/.stalonetrayrc
geometry 168x24+1512-1026
no_shrink true
background black
~/.zshrc
# It should contain commands to set up aliases, functions, options, key bindings, etc.
################################### locale ######################################
source /etc/zsh/zprofile
#################################### aliases ####################################
alias kgamma="kcmshell4 kgamma"
alias x="startx"
alias mc="mc -as"
alias ls='ls --color=auto'
alias grep='egrep --colour=auto'
alias df='df -h'
alias la='ls -la'
alias timidity='nice -15 timidity -a'
alias nmapa='nmap -P0 -sT -O -A'
alias nmapf='nmap -F'
alias df='df -H'
alias mkdir="nocorrect mkdir"
alias -s exe=wine
alias -s {jpg,png,bmp,svg,gif}=gwenview
alias -s {avi,mpeg,mpg,mov,m2v,flv}=mplayer
alias -s {odt,doc,sxw,rtf}=ooffice2
alias -s {ogg,mp3,wav,wma}=mpg123
alias -s pdf=kpdf
alias -s {html,htm}=pick-web-browser
#################################### load modules ####################################
autoload -U compinit
compinit
autoload -U promptinit
promptinit
autoload -U zfinit
zfinit
autoload -U incremental-complete-word
zle -N incremental-complete-word
autoload -U predict-on
zle -N predict-on
#zle -N predict-off
autoload -U zcalc
autoload -U colors
colors
# Autoload zsh modules when they are referenced
zmodload -a zsh/stat stat
zmodload -a zsh/zpty zpty
zmodload -a zsh/zprof zprof
zmodload -ap zsh/mapfile mapfile
autoload -U insert-files
zle -N insert-files
autoload -U pick-web-browser
#################################### history ####################################
setopt APPEND_HISTORY
setopt INC_APPEND_HISTORY
setopt SHARE_HISTORY
setopt HIST_IGNORE_ALL_DUPS
setopt HIST_IGNORE_SPACE
setopt HIST_REDUCE_BLANKS
setopt HIST_VERIFY
setopt HIST_EXPIRE_DUPS_FIRST
HISTFILE=~/.zhistory
HISTSIZE=1000000
SAVEHIST=1000000
#################################### colors ####################################
# 0-black, 1-red, 2-green, 3-yellow, 4-blue, 5-magenta 6-cyan, 7-white
C() { echo '%{\033[3'$1'm%}'; }
black=`C 0`; red=`C 1`; green=`C 2`; yellow=`C 3`; blue=`C 4`; magenta=`C 5`; cyan=`C 6`; white=`C 7`;default=`C 9`;
#export LS_COLORS="no=00:fi=00:di=01;32:ln=01;31:pi=40;33:so=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.deb=01;31:*.rpm=01;31:*.jpg=01;35:*.png=01;35:*.gif=01;35:*.bmp=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.png=01;35:*.mpg=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:"
#################################### prompt ####################################
PROMPT="%B%(!.$red.$green)%n@%m $blue%~ $red%(!.#.$)%b "
RPROMPT="$red< $cyan%B%*%b" # "$yellow%y%b$white"
#################################### watch for login/logout events ################
watch=(all)
LOGCHECK=180
WATCHFMT='%n %a %l from %M at %T.'
#################################### env ####################################
# Some environment variables
#export MAIL=/var/spool/mail/$USERNAME
#export LESS=-cex3M
#export manpath=($X11HOME/man /usr/man /usr/lang/man /usr/local/man /usr/share/man)
export HELPDIR=/usr/local/lib/zsh/help # directory for run-help function to find docs
export EDITOR="vim"
export PAGER="less"
# automatically remove duplicates from these arrays
typeset -U path cdpath fpath manpath
# Hosts to use for completion (see later zstyle)
hosts=(`hostname` tohiba chipa asher komintern hosting5 mrsaint noc f ya.ru google.com ftp.ntu-kpi.kiev.ua vortex acts)
# Autoload all shell functions from all directories in $fpath (following symlinks) that have the executable bit on (the executable bit is not
# necessary, but gives you an easy way to stop the autoloading of a particular shell function). $fpath should not be empty for this to work.
for func in $^fpath/*(N-.x:t); autoload $func
#################################### options ####################################
setopt EXTENDEDGLOB # file globbing is awesome
setopt AUTOCD # jump to the directory.
setopt NO_BEEP # self explanatory
setopt COMPLETE_IN_WORD #allow tab completion in the middle of a word
setopt ALWAYS_TO_END # Push that cursor on completions.
setopt AUTOMENU # Tab-completion should cycle.
setopt AUTOLIST # ... and list the possibilities.
setopt AUTO_PARAM_SLASH # Make directories pretty.
setopt AUTO_NAME_DIRS # change directories to variable names
setopt GLOB_DOTS # . not required for correction/completion
setopt CLOBBER # Allows `>' redirection to truncate existing files, and `>>' to create files
setopt LONG_LIST_JOBS AUTO_RESUME AUTO_CONTINUE NOTIFY #jobs
#setopt nocorrect nocorrectall correct correctall
setopt REC_EXACT RC_QUOTES CDABLE_VARS
setopt AUTO_PUSHD PUSHD_MINUS PUSHD_TO_HOME
#################################### limits ####################################
unlimit
limit stack 8192
limit core 0
limit -s
umask 022
#################################### kbd ####################################
#x-xterm, s-screen, l-linux
#^A, ^E +xsl
bindkey "^A" beginning-of-line
bindkey "^E" end-of-line
#Home, End +x
bindkey "^[[H" beginning-of-line
bindkey "^[[F" end-of-line
#Home, End, +s
bindkey "^[[1~" beginning-of-line
bindkey "^[[4~" end-of-line
#Home, End -
bindkey "^[OH" beginning-of-line
bindkey "^[OF" end-of-line
#^B, Delete +xsl
bindkey "^B" delete-char
bindkey "^[[3~" delete-char
#ctrl+<- +x
bindkey "^[[1;5D" backward-word
#bindkey "^[[C" forward-word
bindkey "^o" beep
# Some nice key bindings
#bindkey '^X^Z' universal-argument ' ' magic-space
#bindkey '^X^A' vi-find-prev-char-skip
#bindkey '^Xa' _expand_alias
#bindkey '^Z' accept-and-hold
#bindkey -s '\M-/' \\\\
#bindkey -s '\M-=' \|
#bindkey -v # vi key bindings
#bindkey -e # emacs key bindings
#bindkey ' ' magic-space # also do history expansion on space
#bindkey '^I' complete-word # complete on tab, leave expansion to _expand
## Shell functions
#setenv() { typeset -x "${1}${1:+=}${(@)argv[2,$#]}" } # csh compatibility
#freload() { while (( $# )); do; unfunction $1; autoload -U $1; shift; done }
# history search
bindkey "^R" history-incremental-search-backward
bindkey "^S" history-incremental-search-forward
#################################### 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)/5 )) 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}'
# 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
zstyle ':completion:*:processes' command 'ps -o pid,s,nice,stime,args'
zstyle ':completion:*:urls' local 'www' '/var/www/htdocs' 'public_html'
zstyle '*' hosts $hosts
# 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:*::::' completer _expand _complete _ignored _approximate
zstyle -e ':completion:*:approximate:*' max-errors 'reply=( $(( ($#PREFIX+$#SUFFIX)/3 )) numeric )'
zstyle ':completion:*:expand:*' tag-order all-expansions
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 ''
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}'
zstyle ':completion:*:*:-subscript-:*' tag-order indexes parameters
zstyle '*' hosts $hosts
zstyle ':completion:*:*:(^rm):*:*files' ignored-patterns '*?.o' '*?.c~' '*?.old' '*?.pro'
zstyle ':completion:*:functions' ignored-patterns '_*'
zstyle ':completion:*' max-errors 2
zstyle :compinstall filename '.zshrc'
zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
#zstyle ':completion:*' completer _expand _complete _correct _approximate
#zstyle ':completion:*:urls' local 'www' '/var/www/htdocs' 'public_html'
#zstyle ':completion:*' menu yes select
zstyle ':completion:*' completer _complete _list _oldlist _expand _ignored _match _correct _approximate _prefix
zstyle ':completion:*' insert-unambiguous true
zstyle ':completion:*' add-space true
#zstyle ':completion:*:processes' command 'ps -au$USER'
#zstyle ':completion:*:processes' command 'ps -o pid,s,nice,stime,args'
zstyle ':completion:*:processes' command 'ps -xuf'
zstyle ':completion:*:processes' sort false
zstyle ':completion:*:processes-names' command 'ps xho command'
zstyle ':completion:*:cd:*' ignore-parents parent pwd
zstyle -e ':completion:*:approximate:*' max-errors 'reply=( $((($#PREFIX+$#SUFFIX)/3 )) numeric )'
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}'
zstyle ':completion:*' menu select=long-list select=0
zstyle ':completion:*' old-menu false
zstyle ':completion:*' original true
zstyle ':completion:*' substitute 1
zstyle ':completion:*' use-compctl true
zstyle ':completion:*' verbose true
zstyle ':completion:*' word true
runXapp
#!/bin/zsh
ST=2
USR=imp
CMND=$argv[$argc-1]
case $CMND in
star)
SCREEN_RES="640x480"
MSENS=1.35
BPP=16
;;
d2)
SCREEN_RES="Default Screen"
MSENS=1.15
BPP=16
;;
*)
SCREEN_RES="Default Screen"
MSENS=1.35
BPP=24
;;
esac
case "$argv[$argc-2]" in
"")
case "$argv[$argc-1]" in
("")
echo "Usage: runXapp DISP_NUMBER \"application\""
echo "\tif applicattion is shell command with spaces it must be given between duble quotes as in example"
echo "\tif no DISP_NUMBER is given then it is set to 1"
echo "\tif no application is given then only thing done is X started"
echo "Predefined apps:"
echo "\t\"star\" - StarCraft (you must modify script to correct path to game)"
echo "\t\"d2\" - Diablo2 (you must modify script to correct path to game)"
exit
;;
*)
DISP=1
if ! cat /tmp/.X1-lock >/dev/null 2>/dev/null;
then
echo "Starting X on DISPLAY :1"
X -ac :$DISP -screen $SCREEN_RES -depth $BPP &
;
else
echo "Server already started"
;
fi
;;
esac
;;
*)
DISP=$argv[$argc-2]
if ! cat /tmp/.X$DISP-lock >/dev/null 2>/dev/null;
then
echo "Starting X on DISPLAY :" $DISP
X -ac :$DISP -screen $SCREEN_RES -depth $BPP &
;
else
echo "Server already started"
;
fi
;;
esac
if ! cat /tmp/.X$DISP-lock >/dev/null 2>/dev/null;
then
sleep $ST
DISPLAY=:$DISP xset m $MSENS
;
fi
if [ -e ~/.runXapp/$CMND ];
then
sleep $ST
sudo -u $USR ~/.runXapp/$CMND $DISP
;
else
sleep $ST
echo "running apps on display" $DISP
DISPLAY=:$DISP sudo -u $USR $CMND
;
fi
~/.runXapp/star
#!/bin/sh
PTH='/home/files/games/Starcraft'
EXEC='loader.exe'
MSENS=1.35
cd $PTH
DISPLAY=:$1 xset m $MSENS
DISPLAY=:$1 wine $EXEC

0 коммент.:
Отправить комментарий