inital commit of clone of old repo

This commit is contained in:
Contegix Support
2015-04-12 18:06:28 -05:00
parent 5529249e29
commit 77e1a1340d
3071 changed files with 157540 additions and 4 deletions

25
NOVA/README Normal file
View File

@ -0,0 +1,25 @@
NOVA - Main Desktop
Screenfetch:
-`
.o+` burchettm@NOVA
`ooo/ OS: Arch Linux
`+oooo: Kernel: x86_64 Linux 3.11.4-1-ARCH
`+oooooo: Uptime: 2d 16h 41m
-+oooooo+: Packages: 1015
`/:-:++oooo+: Shell: zsh 5.0.2
`/++++/+++++++: Resolution: 3840x1080
`/++++++++++++++: WM: gnome shell
`/+++ooooooooooooo/` WM Theme: Not Found
./ooosssso++osssssso+` GTK2 Theme: Zukitwo
.oossssso-````/ossssss+` GTK3 Theme: Zukitwo
-osssssso. :ssssssso. Icon Theme: Faience
:osssssss/ osssso+++. Font: Cantarell 11
/ossssssss/ +ssssooo/- Disk: 3.2T / 9.0T (36%)
`/ossssso+/:- -:/+osssso+- CPU: AMD Phenom II X6 1090T Processor @ 3.4GHz
`+sso+:-` `.-/+oso: RAM: 3612MB / 7989MB
`++:. `-/+/
.` `/

View File

@ -0,0 +1,79 @@
# Config file for Syslinux -
# /boot/syslinux/syslinux.cfg
#
# Comboot modules:
# * menu.c32 - provides a text menu
# * vesamenu.c32 - provides a graphical menu
# * chain.c32 - chainload MBRs, partition boot sectors, Windows bootloaders
# * hdt.c32 - hardware detection tool
# * reboot.c32 - reboots the system
# * poweroff.com - shutdown the system
#
# To Use: Copy the respective files from /usr/lib/syslinux to /boot/syslinux.
# If /usr and /boot are on the same file system, symlink the files instead
# of copying them.
#
# If you do not use a menu, a 'boot:' prompt will be shown and the system
# will boot automatically after 5 seconds.
#
# Please review the wiki: https://wiki.archlinux.org/index.php/Syslinux
# The wiki provides further configuration examples
DEFAULT arch
PROMPT 0 # Set to 1 if you always want to display the boot: prompt
TIMEOUT 50
# You can create syslinux keymaps with the keytab-lilo tool
#KBDMAP de.ktl
# Menu Configuration
# Either menu.c32 or vesamenu32.c32 must be copied to /boot/syslinux
UI menu.c32
#UI vesamenu.c32
# Refer to http://syslinux.zytor.com/wiki/index.php/Doc/menu
MENU TITLE Arch Linux
#MENU BACKGROUND splash.png
MENU COLOR border 30;44 #40ffffff #a0000000 std
MENU COLOR title 1;36;44 #9033ccff #a0000000 std
MENU COLOR sel 7;37;40 #e0ffffff #20ffffff all
MENU COLOR unsel 37;44 #50ffffff #a0000000 std
MENU COLOR help 37;40 #c0ffffff #a0000000 std
MENU COLOR timeout_msg 37;40 #80ffffff #00000000 std
MENU COLOR timeout 1;37;40 #c0ffffff #00000000 std
MENU COLOR msg07 37;40 #90ffffff #a0000000 std
MENU COLOR tabmsg 31;40 #30ffffff #00000000 std
# boot sections follow
#
# TIP: If you want a 1024x768 framebuffer, add "vga=773" to your kernel line.
#
#-*
LABEL arch
MENU LABEL Arch Linux
LINUX ../vmlinuz-linux
APPEND root=/dev/sda2 rw vga=0x037b noapic pci=assign-busses apicmaintimer idle=poll reboot=cold,hard ipv6.disable=1
INITRD ../initramfs-linux.img
LABEL archfallback
MENU LABEL Arch Linux Fallback
LINUX ../vmlinuz-linux
APPEND root=/dev/sda2 rw
INITRD ../initramfs-linux-fallback.img
#LABEL windows
# MENU LABEL Windows
# COM32 chain.c32
# APPEND hd0 1
LABEL hdt
MENU LABEL HDT (Hardware Detection Tool)
COM32 hdt.c32
LABEL reboot
MENU LABEL Reboot
COM32 reboot.c32
LABEL off
MENU LABEL Power Off
COMBOOT poweroff.com

3
NOVA/home/.vimrc Executable file
View File

@ -0,0 +1,3 @@
syntax on
set background=dark
colors tango

8
NOVA/home/.zsh/.zshrc Executable file
View File

@ -0,0 +1,8 @@
source /home/.zsh/history
source /home/.zsh/alias
source /home/.zsh/exports
source /home/.zsh/bindkeys
source /home/.zsh/completion
source /home/.zsh/setopt
source /home/.zsh/zsh-syntax-highlight/zsh-syntax-highlighting.zsh
source /home/.zsh/prompt

9
NOVA/home/.zsh/.zshroot Normal file
View File

@ -0,0 +1,9 @@
source /home/.zsh/historyroot
source /home/.zsh/alias
source /home/.zsh/exports
source /home/.zsh/bindkeys
source /home/.zsh/completion
source /home/.zsh/setopt
source /home/.zsh/interactive
source /home/.zsh/zsh-syntax-highlight/zsh-syntax-highlighting.zsh
source /home/.zsh/promptroot

29
NOVA/home/.zsh/alias Normal file
View File

@ -0,0 +1,29 @@
alias ls='ls --color=auto'
alias upgrade='sudo yaourt --aur -Syyu'
alias pacman='sudo pacman'
alias ll='ls -al'
alias fmenu='fluxbox-generate_menu'
alias cpdir='cp -rv'
alias terabyte='cd /media/Terabyte'
alias windoze='cd /media/Windoze'
alias opmenu='mmaker -vf OpenBox3 && openbox --reconfigure'
alias vi='vim'
alias vbox='sudo modprobe vboxdrv && sudo modprobe vboxnetflt && sudo modprobe vboxnetadp'
alias dellserver='ssh -X -p 66 root@beast'
alias router='ssh -X -p 65 root@router'
alias mangos='ssh -X -p 66 mangos@beast'
alias beast='ssh -X -p 66 root@beast'
alias cyberproxy='ssh -D 5150 -p 22 root@cyberjohnson.com'
alias minecraft='ssh -X -p 66 minecraft@beast'
alias rmdir='rm -rv'
alias saint='ssh -X -p 22 root@SAINT'
alias teamspeak='ssh -X -p 66 teamspeak@BEAST'
alias amiga='ssh -X -p 22 root@amiga'
alias unamedate='echo "Issuing uname -a:" && uname -a && echo "Current Date and Time:" && date'
alias ASS='sudo shutdown -hP 1 "ASS - Awesome Shutdown Sequence"'
alias ASSQ='sudo shutdown -hP now "ASS - Awesome Shutdown Sequence"'
alias ASSN='sudo shutdown -hP'
alias ARSE='sudo shutdown -r 1 "ARSE - Awesome Reboot Sequence... Executed."'
alias ARSEQ='sudo shutdown -r now "ARSE - Awesome Reboot Sequence... Executed."'
alias photoshop='env WINEPREFIX="/home/burchettm/.wineprefix/Adobe" wine "/home/burchettm/.wineprefix/Adobe/drive_c/Program Files/Adobe/Photoshop 7.0/Photoshop.exe"'
alias skynet='ssh -p89 burchettm@skynet5.doesntexist.com'

22
NOVA/home/.zsh/bindkeys Normal file
View File

@ -0,0 +1,22 @@
bindkey "\e[1~" beginning-of-line # Home
bindkey "\e[4~" end-of-line # End
bindkey "\e[5~" beginning-of-history # PageUp
bindkey "\e[6~" end-of-history # PageDown
bindkey "\e[2~" quoted-insert # Ins
bindkey "\e[3~" delete-char # Del
bindkey "\e[5C" forward-word
bindkey "\eOc" emacs-forward-word
bindkey "\e[5D" backward-word
bindkey "\eOd" emacs-backward-word
bindkey "\e\e[C" forward-word
bindkey "\e\e[D" backward-word
bindkey "\e[Z" reverse-menu-complete # Shift+Tab
# for rxvt
bindkey "\e[7~" beginning-of-line # Home
bindkey "\e[8~" end-of-line # End
# for non RH/Debian xterm, can't hurt for RH/Debian xterm
bindkey "\eOH" beginning-of-line
bindkey "\eOF" end-of-line
# for freebsd console
bindkey "\e[H" beginning-of-line
bindkey "\e[F" end-of-line

View File

31
NOVA/home/.zsh/exports Normal file
View File

@ -0,0 +1,31 @@
#Default Editor is VIM
export EDITOR="vim"
#Set GIT Directory Variable
export GITDIR="/home/burchettm/.git/computers"
export GIT="/home/burchettm/.git"
#Set ScreenShots Directory Variable
export SCREENSHOTS="/home/burchettm/Desktop/Screenshots"
#Enable LIBETC (dotfiles mover)
#export LD_PRELOAD=libetc.so
#Default Browser is Opera, unless in TTY then it's links
# Browser
if [ -n "$DISPLAY" ]; then
export BROWSER=opera
else
export BROWSER=links
fi
#Set 256-color terminal
#if [ -n "$DISPLAY" ];
# then export TERM="xterm-256color"
# else export TERM="linux"
#fi
# GTK2
export GTK2_RC_FILES="/etc/gtk-2.0/gtkrc:$HOME/.gtkrc-2.0"

1004
NOVA/home/.zsh/histfile Normal file

File diff suppressed because it is too large Load Diff

3
NOVA/home/.zsh/history Normal file
View File

@ -0,0 +1,3 @@
HISTFILE=/home/.zsh/histfile
HISTSIZE=1000
SAVEHIST=1000

View File

@ -0,0 +1,3 @@
HISTFILE=/home/.zsh/histfileroot
HISTSIZE=1000
SAVEHIST=1000

View File

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

1
NOVA/home/.zsh/prompt Normal file
View File

@ -0,0 +1 @@
PROMPT="[%T]%B%{$fg[cyan]%}[%n@%M]%b%{$fg[cyan]%}[%~]%#%{$reset_color%} "

View File

@ -0,0 +1 @@
PROMPT="[%T]%B%{$fg[red]%}[%n@%M]%b%{$fg[green]%}[%~]%#%{$reset_color%} "

7
NOVA/home/.zsh/setopt Normal file
View File

@ -0,0 +1,7 @@
# Created by newuser for 4.3.12
autoload -U compinit promptinit
autoload -U colors && colors
compinit
promptinit
PROMPT="[%T][%B%{$fg[cyan]%}%n@%M]%b%{$fg[cyan]%}[%~]%#%{$reset_color%} "

View File

@ -0,0 +1 @@
*.zwc*

View File

@ -0,0 +1,23 @@
Copyright (c) 2010-2011 zsh-syntax-highlighting contributors
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted
provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of conditions
and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list of
conditions and the following disclaimer in the documentation and/or other materials provided
with the distribution.
* Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
may be used to endorse or promote products derived from this software without specific prior
written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@ -0,0 +1,52 @@
zsh-syntax-highlighting
=======================
**[Fish shell](http://www.fishshell.com) like syntax highlighting for [Zsh](http://www.zsh.org).**
*Requirements: zsh 4.3.9+.*
How to install
--------------
### Using packages
* Arch Linux: [AUR/zsh-syntax-highlighting](https://aur.archlinux.org/packages.php?ID=54171) / [AUR/zsh-syntax-highlighting-git](https://aur.archlinux.org/packages.php?ID=50867)
* Gentoo: [mv overlay](http://gpo.zugaina.org/app-shells/zsh-syntax-highlighting)
### In your ~/.zshrc
* Download the script or clone this repository:
git clone git://github.com/zsh-users/zsh-syntax-highlighting.git
* Source the script **at the end** of `~/.zshrc`:
source /path/to/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
* Source `~/.zshrc` to take changes into account:
source ~/.zshrc
### With oh-my-zsh
* Download the script or clone this repository in [oh-my-zsh](http://github.com/robbyrussell/oh-my-zsh) plugins directory:
cd ~/.oh-my-zsh/custom/plugins
git clone git://github.com/zsh-users/zsh-syntax-highlighting.git
* Activate the plugin in `~/.zshrc` (in **last** position):
plugins=( [plugins...] zsh-syntax-highlighting)
* Source `~/.zshrc` to take changes into account:
source ~/.zshrc
How to tweak
------------
Syntax highlighting is done by pluggable highlighter scripts, see the [highlighters directory](zsh-syntax-highlighting/tree/master/highlighters)
for documentation and configuration settings.

View File

@ -0,0 +1,49 @@
zsh-syntax-highlighting / highlighters
======================================
Syntax highlighting is done by pluggable highlighters:
* [***main***](highlighters/main) - the base highlighter, and the only one active by default.
* [***brackets***](highlighters/brackets) - matches brackets and parenthesis.
* [***pattern***](highlighters/pattern) - matches user-defined patterns.
* [***cursor***](highlighters/cursor) - matches the cursor position.
* [***root***](highlighters/root) - triggered if the current user is root.
How to activate highlighters
----------------------------
To activate an highlighter, add it to the `ZSH_HIGHLIGHT_HIGHLIGHTERS` array in `~/.zshrc`, for example:
ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets pattern cursor)
How to tweak highlighters
-------------------------
Highlighters look up styles from the `ZSH_HIGHLIGHT_STYLES` array. Navigate into each highlighter directory to see what styles it defines and how to configure it.
How to implement a new highlighter
----------------------------------
To create your own ***myhighlighter*** highlighter:
* Create your script at **highlighters/*myhighlighter*/*myhighlighter*-highlighter.zsh**.
* Implement the `_zsh_highlight_myhighlighter_highlighter_predicate` function. This function must return 0 when the highlighter needs to be called, for example:
_zsh_highlight_myhighlighter_highlighter_predicate() {
# Call this highlighter in SVN repositories
[[ -d .svn ]]
}
* Implement the `_zsh_highlight_myhighlighter_highlighter` function. This function does the actual syntax highlighting, by modifying `region_highlight`, for example:
_zsh_highlight_myhighlighter_highlighter() {
# Colorize the whole buffer with blue background
region_highlight+=(0 $#BUFFER bg=blue)
}
* Activate your highlighter in `~/.zshrc`:
ZSH_HIGHLIGHT_HIGHLIGHTERS+=(myhighlighter)

View File

@ -0,0 +1,30 @@
zsh-syntax-highlighting / highlighters / brackets
=================================================
This is the ***brackets*** highlighter, that highlights brackets, parenthesis and matches them.
How to activate it
------------------
To activate it, add it to `ZSH_HIGHLIGHT_HIGHLIGHTERS`:
ZSH_HIGHLIGHT_HIGHLIGHTERS=( [...] brackets)
How to tweak it
---------------
This highlighter defines the following styles:
* `bracket-error` - unmatched brackets
* `bracket-level-N` - brackets with nest level N
* `cursor-matchingbracket` - the matching bracket, if cursor is on a bracket
To override one of those styles, change its entry in `ZSH_HIGHLIGHT_STYLES`, for example in `~/.zshrc`:
# To define styles for nested brackets up to level 4
ZSH_HIGHLIGHT_STYLES[bracket-level-1]='fg=blue,bold'
ZSH_HIGHLIGHT_STYLES[bracket-level-2]='fg=red,bold'
ZSH_HIGHLIGHT_STYLES[bracket-level-3]='fg=yellow,bold'
ZSH_HIGHLIGHT_STYLES[bracket-level-4]='fg=magenta,bold'
The syntax for declaring styles is [documented here](http://zsh.sourceforge.net/Doc/Release/Zsh-Line-Editor.html#SEC135).

View File

@ -0,0 +1,110 @@
#!/usr/bin/env zsh
# -------------------------------------------------------------------------------------------------
# Copyright (c) 2010-2011 zsh-syntax-highlighting contributors
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted
# provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this list of conditions
# and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice, this list of
# conditions and the following disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
# may be used to endorse or promote products derived from this software without specific prior
# written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# -------------------------------------------------------------------------------------------------
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
# vim: ft=zsh sw=2 ts=2 et
# -------------------------------------------------------------------------------------------------
# Define default styles.
: ${ZSH_HIGHLIGHT_STYLES[bracket-error]:=fg=red,bold}
: ${ZSH_HIGHLIGHT_STYLES[bracket-level-1]:=fg=blue,bold}
: ${ZSH_HIGHLIGHT_STYLES[bracket-level-2]:=fg=green,bold}
: ${ZSH_HIGHLIGHT_STYLES[bracket-level-3]:=fg=magenta,bold}
: ${ZSH_HIGHLIGHT_STYLES[bracket-level-4]:=fg=yellow,bold}
: ${ZSH_HIGHLIGHT_STYLES[bracket-level-5]:=fg=cyan,bold}
: ${ZSH_HIGHLIGHT_STYLES[cursor-matchingbracket]:=standout}
# Whether the brackets highlighter should be called or not.
_zsh_highlight_brackets_highlighter_predicate()
{
_zsh_highlight_cursor_moved || _zsh_highlight_buffer_modified
}
# Brackets highlighting function.
_zsh_highlight_brackets_highlighter()
{
local level=0 pos
local -A levelpos lastoflevel matching typepos
# Find all brackets and remember which one is matching
for (( pos = 0; $pos < ${#BUFFER}; pos++ )) ; do
local char="$BUFFER[pos+1]"
case $char in
["([{"])
levelpos[$pos]=$((++level))
lastoflevel[$level]=$pos
_zsh_highlight_brackets_highlighter_brackettype "$char"
;;
[")]}"])
matching[$lastoflevel[$level]]=$pos
matching[$pos]=$lastoflevel[$level]
levelpos[$pos]=$((level--))
_zsh_highlight_brackets_highlighter_brackettype "$char"
;;
['"'\'])
# Skip everything inside quotes
local quotetype=$char
while (( $pos < ${#BUFFER} )) ; do
(( pos++ ))
[[ $BUFFER[$pos+1] == $quotetype ]] && break
done
;;
esac
done
# Now highlight all found brackets
for pos in ${(k)levelpos}; do
if [[ -n $matching[$pos] ]] && [[ $typepos[$pos] == $typepos[$matching[$pos]] ]]; then
local bracket_color_size=${#ZSH_HIGHLIGHT_STYLES[(I)bracket-level-*]}
local bracket_color_level=bracket-level-$(( (levelpos[$pos] - 1) % bracket_color_size + 1 ))
local style=$ZSH_HIGHLIGHT_STYLES[$bracket_color_level]
region_highlight+=("$pos $((pos + 1)) $style")
else
local style=$ZSH_HIGHLIGHT_STYLES[bracket-error]
region_highlight+=("$pos $((pos + 1)) $style")
fi
done
# If cursor is on a bracket, then highlight corresponding bracket, if any
pos=$CURSOR
if [[ -n $levelpos[$pos] ]] && [[ -n $matching[$pos] ]]; then
local otherpos=$matching[$pos]
local style=$ZSH_HIGHLIGHT_STYLES[cursor-matchingbracket]
region_highlight+=("$otherpos $((otherpos + 1)) $style")
fi
}
# Helper function to differentiate type
_zsh_highlight_brackets_highlighter_brackettype()
{
case $1 in
["()"]) typepos[$pos]=round;;
["[]"]) typepos[$pos]=bracket;;
["{}"]) typepos[$pos]=curly;;
*) ;;
esac
}

View File

@ -0,0 +1,38 @@
#!/usr/bin/env zsh
# -------------------------------------------------------------------------------------------------
# Copyright (c) 2010-2011 zsh-syntax-highlighting contributors
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted
# provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this list of conditions
# and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice, this list of
# conditions and the following disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
# may be used to endorse or promote products derived from this software without specific prior
# written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# -------------------------------------------------------------------------------------------------
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
# vim: ft=zsh sw=2 ts=2 et
# -------------------------------------------------------------------------------------------------
BUFFER='echo ({x}]'
expected_region_highlight=(
"5 5 $ZSH_HIGHLIGHT_STYLES[bracket-error]" # (
"6 6 $ZSH_HIGHLIGHT_STYLES[bracket-level-2]" # {
"8 8 $ZSH_HIGHLIGHT_STYLES[bracket-level-2]" # }
"9 9 $ZSH_HIGHLIGHT_STYLES[bracket-error]" # )
)

View File

@ -0,0 +1,40 @@
#!/usr/bin/env zsh
# -------------------------------------------------------------------------------------------------
# Copyright (c) 2010-2011 zsh-syntax-highlighting contributors
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted
# provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this list of conditions
# and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice, this list of
# conditions and the following disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
# may be used to endorse or promote products derived from this software without specific prior
# written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# -------------------------------------------------------------------------------------------------
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
# vim: ft=zsh sw=2 ts=2 et
# -------------------------------------------------------------------------------------------------
BUFFER='echo $(echo ${(z)array})'
expected_region_highlight=(
"6 6 $ZSH_HIGHLIGHT_STYLES[bracket-level-1]" # (
"13 13 $ZSH_HIGHLIGHT_STYLES[bracket-level-2]" # {
"14 14 $ZSH_HIGHLIGHT_STYLES[bracket-level-3]" # (
"16 16 $ZSH_HIGHLIGHT_STYLES[bracket-level-3]" # )
"22 22 $ZSH_HIGHLIGHT_STYLES[bracket-level-2]" # }
"23 23 $ZSH_HIGHLIGHT_STYLES[bracket-level-1]" # )
)

View File

@ -0,0 +1,35 @@
#!/usr/bin/env zsh
# -------------------------------------------------------------------------------------------------
# Copyright (c) 2010-2011 zsh-syntax-highlighting contributors
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted
# provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this list of conditions
# and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice, this list of
# conditions and the following disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
# may be used to endorse or promote products derived from this software without specific prior
# written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# -------------------------------------------------------------------------------------------------
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
# vim: ft=zsh sw=2 ts=2 et
# -------------------------------------------------------------------------------------------------
BUFFER='echo "foo ( bar"'
expected_region_highlight=(
"1 15 $ZSH_HIGHLIGHT_STYLES[none]" # We expect the brackets highlighter to do nothing
)

View File

@ -0,0 +1,38 @@
#!/usr/bin/env zsh
# -------------------------------------------------------------------------------------------------
# Copyright (c) 2010-2011 zsh-syntax-highlighting contributors
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted
# provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this list of conditions
# and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice, this list of
# conditions and the following disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
# may be used to endorse or promote products derived from this software without specific prior
# written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# -------------------------------------------------------------------------------------------------
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
# vim: ft=zsh sw=2 ts=2 et
# -------------------------------------------------------------------------------------------------
BUFFER='echo ({x})'
expected_region_highlight=(
"5 5 $ZSH_HIGHLIGHT_STYLES[bracket-level-1]" # (
"6 6 $ZSH_HIGHLIGHT_STYLES[bracket-level-2]" # {
"8 8 $ZSH_HIGHLIGHT_STYLES[bracket-level-2]" # }
"9 9 $ZSH_HIGHLIGHT_STYLES[bracket-level-1]" # )
)

View File

@ -0,0 +1,37 @@
#!/usr/bin/env zsh
# -------------------------------------------------------------------------------------------------
# Copyright (c) 2010-2011 zsh-syntax-highlighting contributors
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted
# provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this list of conditions
# and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice, this list of
# conditions and the following disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
# may be used to endorse or promote products derived from this software without specific prior
# written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# -------------------------------------------------------------------------------------------------
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
# vim: ft=zsh sw=2 ts=2 et
# -------------------------------------------------------------------------------------------------
BUFFER='echo ({x}'
expected_region_highlight=(
"5 5 $ZSH_HIGHLIGHT_STYLES[bracket-error]" # (
"6 6 $ZSH_HIGHLIGHT_STYLES[bracket-level-2]" # {
"8 8 $ZSH_HIGHLIGHT_STYLES[bracket-level-2]" # }
)

View File

@ -0,0 +1,37 @@
#!/usr/bin/env zsh
# -------------------------------------------------------------------------------------------------
# Copyright (c) 2010-2011 zsh-syntax-highlighting contributors
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted
# provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this list of conditions
# and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice, this list of
# conditions and the following disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
# may be used to endorse or promote products derived from this software without specific prior
# written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# -------------------------------------------------------------------------------------------------
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
# vim: ft=zsh sw=2 ts=2 et
# -------------------------------------------------------------------------------------------------
BUFFER='echo {x})'
expected_region_highlight=(
"5 5 $ZSH_HIGHLIGHT_STYLES[bracket-level-1]" # {
"7 7 $ZSH_HIGHLIGHT_STYLES[bracket-level-1]" # }
"8 8 $ZSH_HIGHLIGHT_STYLES[bracket-error]" # )
)

View File

@ -0,0 +1,24 @@
zsh-syntax-highlighting / highlighters / cursor
=================================================
This is the ***cursor*** highlighter, that highlights the cursor.
How to activate it
------------------
To activate it, add it to `ZSH_HIGHLIGHT_HIGHLIGHTERS`:
ZSH_HIGHLIGHT_HIGHLIGHTERS=( [...] cursor)
How to tweak it
---------------
This highlighter defines the following styles:
* `cursor` - the style for the current cursor position
To override one of those styles, change its entry in `ZSH_HIGHLIGHT_STYLES`, for example in `~/.zshrc`:
ZSH_HIGHLIGHT_STYLES[cursor]='bg=blue'
The syntax for declaring styles is [documented here](http://zsh.sourceforge.net/Doc/Release/Zsh-Line-Editor.html#SEC135).

View File

@ -0,0 +1,45 @@
#!/usr/bin/env zsh
# -------------------------------------------------------------------------------------------------
# Copyright (c) 2010-2011 zsh-syntax-highlighting contributors
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted
# provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this list of conditions
# and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice, this list of
# conditions and the following disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
# may be used to endorse or promote products derived from this software without specific prior
# written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# -------------------------------------------------------------------------------------------------
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
# vim: ft=zsh sw=2 ts=2 et
# -------------------------------------------------------------------------------------------------
# Define default styles.
: ${ZSH_HIGHLIGHT_STYLES[cursor]:=standout}
# Whether the cursor highlighter should be called or not.
_zsh_highlight_cursor_highlighter_predicate()
{
_zsh_highlight_cursor_moved
}
# Cursor highlighting function.
_zsh_highlight_cursor_highlighter()
{
region_highlight+=("$CURSOR $(( $CURSOR + 1 )) $ZSH_HIGHLIGHT_STYLES[cursor]")
}

View File

@ -0,0 +1,58 @@
zsh-syntax-highlighting / highlighters / main
=============================================
This is the ***main*** highlighter, that highlights:
* Commands
* Options
* Arguments
* Paths
* Strings
How to activate it
------------------
To activate it, add it to `ZSH_HIGHLIGHT_HIGHLIGHTERS`:
ZSH_HIGHLIGHT_HIGHLIGHTERS=( [...] main)
This highlighter is active by default.
How to tweak it
---------------
This highlighter defines the following styles:
* `unknown-token` - unknown tokens / errors
* `reserved-word` - shell reserved words
* `alias` - aliases
* `builtin` - shell builtin commands
* `function` - functions
* `command` - commands
* `precommand` - precommands (i.e. exec, builtin, ...)
* `commandseparator` - command separation tokens
* `hashed-command` - hashed commands
* `path` - paths
* `globbing` - globbing expressions
* `history-expansion` - history expansion expressions
* `single-hyphen-option` - single hyphen options
* `double-hyphen-option` - double hyphen options
* `back-quoted-argument` - backquoted expressions
* `single-quoted-argument` - single quoted arguments
* `double-quoted-argument` - double quoted arguments
* `dollar-double-quoted-argument` - dollar double quoted arguments
* `back-double-quoted-argument` - back double quoted arguments
* `assign` - variable assignments
* `default` - parts of the buffer that do not match anything
To override one of those styles, change its entry in `ZSH_HIGHLIGHT_STYLES`, for example in `~/.zshrc`:
# To differentiate aliases from other command types
ZSH_HIGHLIGHT_STYLES[alias]='fg=magenta,bold'
# To have paths colored instead of underlined
ZSH_HIGHLIGHT_STYLES[path]='fg=cyan'
# To disable highlighting of globbing expressions
ZSH_HIGHLIGHT_STYLES[globbing]='none'
The syntax for declaring styles is [documented here](http://zsh.sourceforge.net/Doc/Release/Zsh-Line-Editor.html#SEC135).

View File

@ -0,0 +1,185 @@
#!/usr/bin/env zsh
# -------------------------------------------------------------------------------------------------
# Copyright (c) 2010-2011 zsh-syntax-highlighting contributors
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted
# provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this list of conditions
# and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice, this list of
# conditions and the following disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
# may be used to endorse or promote products derived from this software without specific prior
# written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# -------------------------------------------------------------------------------------------------
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
# vim: ft=zsh sw=2 ts=2 et
# -------------------------------------------------------------------------------------------------
# Define default styles.
: ${ZSH_HIGHLIGHT_STYLES[default]:=none}
: ${ZSH_HIGHLIGHT_STYLES[unknown-token]:=fg=red,bold}
: ${ZSH_HIGHLIGHT_STYLES[reserved-word]:=fg=yellow}
: ${ZSH_HIGHLIGHT_STYLES[alias]:=fg=green}
: ${ZSH_HIGHLIGHT_STYLES[builtin]:=fg=green}
: ${ZSH_HIGHLIGHT_STYLES[function]:=fg=green}
: ${ZSH_HIGHLIGHT_STYLES[command]:=fg=green}
: ${ZSH_HIGHLIGHT_STYLES[precommand]:=fg=green,}
: ${ZSH_HIGHLIGHT_STYLES[commandseparator]:=none}
: ${ZSH_HIGHLIGHT_STYLES[hashed-command]:=fg=green}
: ${ZSH_HIGHLIGHT_STYLES[path]:=fg=blue,bold}
: ${ZSH_HIGHLIGHT_STYLES[globbing]:=fg=blue}
: ${ZSH_HIGHLIGHT_STYLES[history-expansion]:=fg=blue}
: ${ZSH_HIGHLIGHT_STYLES[single-hyphen-option]:=fg=magenta,bold}
: ${ZSH_HIGHLIGHT_STYLES[double-hyphen-option]:=fg=magenta,bold}
: ${ZSH_HIGHLIGHT_STYLES[back-quoted-argument]:=none}
: ${ZSH_HIGHLIGHT_STYLES[single-quoted-argument]:=fg=yellow}
: ${ZSH_HIGHLIGHT_STYLES[double-quoted-argument]:=fg=yellow}
: ${ZSH_HIGHLIGHT_STYLES[dollar-double-quoted-argument]:=fg=cyan}
: ${ZSH_HIGHLIGHT_STYLES[back-double-quoted-argument]:=fg=cyan}
: ${ZSH_HIGHLIGHT_STYLES[assign]:=none}
# Whether the highlighter should be called or not.
_zsh_highlight_main_highlighter_predicate()
{
_zsh_highlight_buffer_modified
}
# Main syntax highlighting function.
_zsh_highlight_main_highlighter()
{
emulate -L zsh
setopt localoptions extendedglob bareglobqual
local start_pos=0 end_pos highlight_glob=true new_expression=true arg style
typeset -a ZSH_HIGHLIGHT_TOKENS_COMMANDSEPARATOR
typeset -a ZSH_HIGHLIGHT_TOKENS_PRECOMMANDS
typeset -a ZSH_HIGHLIGHT_TOKENS_FOLLOWED_BY_COMMANDS
region_highlight=()
ZSH_HIGHLIGHT_TOKENS_COMMANDSEPARATOR=(
'|' '||' ';' '&' '&&'
)
ZSH_HIGHLIGHT_TOKENS_PRECOMMANDS=(
'builtin' 'command' 'exec' 'nocorrect' 'noglob' 'sudo'
)
# Tokens that are always immediately followed by a command.
ZSH_HIGHLIGHT_TOKENS_FOLLOWED_BY_COMMANDS=(
$ZSH_HIGHLIGHT_TOKENS_COMMANDSEPARATOR $ZSH_HIGHLIGHT_TOKENS_PRECOMMANDS
)
for arg in ${(z)BUFFER}; do
local substr_color=0
[[ $start_pos -eq 0 && $arg = 'noglob' ]] && highlight_glob=false
((start_pos+=${#BUFFER[$start_pos+1,-1]}-${#${BUFFER[$start_pos+1,-1]##[[:space:]]#}}))
((end_pos=$start_pos+${#arg}))
if $new_expression; then
new_expression=false
if [[ -n ${(M)ZSH_HIGHLIGHT_TOKENS_PRECOMMANDS:#"$arg"} ]]; then
style=$ZSH_HIGHLIGHT_STYLES[precommand]
else
res=$(LC_ALL=C builtin type -w $arg 2>/dev/null)
case $res in
*': reserved') style=$ZSH_HIGHLIGHT_STYLES[reserved-word];;
*': alias') style=$ZSH_HIGHLIGHT_STYLES[alias]
local aliased_command="${"$(alias $arg)"#*=}"
[[ -n ${(M)ZSH_HIGHLIGHT_TOKENS_FOLLOWED_BY_COMMANDS:#"$aliased_command"} && -z ${(M)ZSH_HIGHLIGHT_TOKENS_FOLLOWED_BY_COMMANDS:#"$arg"} ]] && ZSH_HIGHLIGHT_TOKENS_FOLLOWED_BY_COMMANDS+=($arg)
;;
*': builtin') style=$ZSH_HIGHLIGHT_STYLES[builtin];;
*': function') style=$ZSH_HIGHLIGHT_STYLES[function];;
*': command') style=$ZSH_HIGHLIGHT_STYLES[command];;
*': hashed') style=$ZSH_HIGHLIGHT_STYLES[hashed-command];;
*) if _zsh_highlight_main_highlighter_check_assign; then
style=$ZSH_HIGHLIGHT_STYLES[assign]
new_expression=true
elif _zsh_highlight_main_highlighter_check_path; then
style=$ZSH_HIGHLIGHT_STYLES[path]
elif [[ $arg[0,1] = $histchars[0,1] ]]; then
style=$ZSH_HIGHLIGHT_STYLES[history-expansion]
else
style=$ZSH_HIGHLIGHT_STYLES[unknown-token]
fi
;;
esac
fi
else
case $arg in
'--'*) style=$ZSH_HIGHLIGHT_STYLES[double-hyphen-option];;
'-'*) style=$ZSH_HIGHLIGHT_STYLES[single-hyphen-option];;
"'"*"'") style=$ZSH_HIGHLIGHT_STYLES[single-quoted-argument];;
'"'*'"') style=$ZSH_HIGHLIGHT_STYLES[double-quoted-argument]
region_highlight+=("$start_pos $end_pos $style")
_zsh_highlight_main_highlighter_highlight_string
substr_color=1
;;
'`'*'`') style=$ZSH_HIGHLIGHT_STYLES[back-quoted-argument];;
*"*"*) $highlight_glob && style=$ZSH_HIGHLIGHT_STYLES[globbing] || style=$ZSH_HIGHLIGHT_STYLES[default];;
*) if _zsh_highlight_main_highlighter_check_path; then
style=$ZSH_HIGHLIGHT_STYLES[path]
elif [[ $arg[0,1] = $histchars[0,1] ]]; then
style=$ZSH_HIGHLIGHT_STYLES[history-expansion]
elif [[ -n ${(M)ZSH_HIGHLIGHT_TOKENS_COMMANDSEPARATOR:#"$arg"} ]]; then
style=$ZSH_HIGHLIGHT_STYLES[commandseparator]
else
style=$ZSH_HIGHLIGHT_STYLES[default]
fi
;;
esac
fi
[[ $substr_color = 0 ]] && region_highlight+=("$start_pos $end_pos $style")
[[ -n ${(M)ZSH_HIGHLIGHT_TOKENS_FOLLOWED_BY_COMMANDS:#"$arg"} ]] && new_expression=true
start_pos=$end_pos
done
}
# Check if the argument is variable assignment
_zsh_highlight_main_highlighter_check_assign()
{
setopt localoptions extended_glob
[[ ${(Q)arg} == [[:alpha:]_]([[:alnum:]_])#=* ]]
}
# Check if the argument is a path.
_zsh_highlight_main_highlighter_check_path()
{
setopt localoptions nonomatch
local expanded_path; : ${expanded_path:=${(Q)~arg}}
[[ -z $expanded_path ]] && return 1
[[ -e $expanded_path ]] && return 0
[[ ! -e ${expanded_path:h} ]] && return 1
[[ ${BUFFER[1]} != "-" && ${#BUFFER} == $end_pos && -n $(print ${expanded_path}*(N)) ]] && return 0
return 1
}
# Highlight special chars inside double-quoted strings
_zsh_highlight_main_highlighter_highlight_string()
{
setopt localoptions noksharrays
local i j k style
# Starting quote is at 1, so start parsing at offset 2 in the string.
for (( i = 2 ; i < end_pos - start_pos ; i += 1 )) ; do
(( j = i + start_pos - 1 ))
(( k = j + 1 ))
case "$arg[$i]" in
'$') style=$ZSH_HIGHLIGHT_STYLES[dollar-double-quoted-argument];;
"\\") style=$ZSH_HIGHLIGHT_STYLES[back-double-quoted-argument]
(( k += 1 )) # Color following char too.
(( i += 1 )) # Skip parsing the escaped char.
;;
*) continue;;
esac
region_highlight+=("$j $k $style")
done
}

View File

@ -0,0 +1,35 @@
#!/usr/bin/env zsh
# -------------------------------------------------------------------------------------------------
# Copyright (c) 2010-2011 zsh-syntax-highlighting contributors
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted
# provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this list of conditions
# and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice, this list of
# conditions and the following disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
# may be used to endorse or promote products derived from this software without specific prior
# written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# -------------------------------------------------------------------------------------------------
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
# vim: ft=zsh sw=2 ts=2 et
# -------------------------------------------------------------------------------------------------
BUFFER='A=1'
expected_region_highlight=(
"1 3 $ZSH_HIGHLIGHT_STYLES[assign]" # A=1
)

View File

@ -0,0 +1,47 @@
#!/usr/bin/env zsh
# -------------------------------------------------------------------------------------------------
# Copyright (c) 2010-2011 zsh-syntax-highlighting contributors
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted
# provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this list of conditions
# and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice, this list of
# conditions and the following disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
# may be used to endorse or promote products derived from this software without specific prior
# written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# -------------------------------------------------------------------------------------------------
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
# vim: ft=zsh sw=2 ts=2 et
# -------------------------------------------------------------------------------------------------
BUFFER='ps aux | grep java | sort | uniq | tail | head'
expected_region_highlight=(
"1 2 $ZSH_HIGHLIGHT_STYLES[command]" # ps
"4 6 $ZSH_HIGHLIGHT_STYLES[default]" # aux
"8 8 $ZSH_HIGHLIGHT_STYLES[default]" # |
"10 13 $ZSH_HIGHLIGHT_STYLES[command]" # grep
"15 18 $ZSH_HIGHLIGHT_STYLES[default]" # java
"20 20 $ZSH_HIGHLIGHT_STYLES[default]" # |
"22 25 $ZSH_HIGHLIGHT_STYLES[command]" # sort
"27 27 $ZSH_HIGHLIGHT_STYLES[default]" # |
"29 32 $ZSH_HIGHLIGHT_STYLES[command]" # uniq
"34 34 $ZSH_HIGHLIGHT_STYLES[default]" # |
"36 39 $ZSH_HIGHLIGHT_STYLES[command]" # tail
"41 41 $ZSH_HIGHLIGHT_STYLES[default]" # |
"43 46 $ZSH_HIGHLIGHT_STYLES[command]" # head
)

View File

@ -0,0 +1,36 @@
#!/usr/bin/env zsh
# -------------------------------------------------------------------------------------------------
# Copyright (c) 2010-2011 zsh-syntax-highlighting contributors
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted
# provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this list of conditions
# and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice, this list of
# conditions and the following disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
# may be used to endorse or promote products derived from this software without specific prior
# written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# -------------------------------------------------------------------------------------------------
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
# vim: ft=zsh sw=2 ts=2 et
# -------------------------------------------------------------------------------------------------
BUFFER='ls highlighters/main/test-data/path-space-\ .zsh'
expected_region_highlight=(
"1 2 $ZSH_HIGHLIGHT_STYLES[command]" # ls
"4 48 $ZSH_HIGHLIGHT_STYLES[path]" # highlighters/main/test-data/path-space-\ .zsh
)

View File

@ -0,0 +1,36 @@
#!/usr/bin/env zsh
# -------------------------------------------------------------------------------------------------
# Copyright (c) 2010-2011 zsh-syntax-highlighting contributors
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted
# provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this list of conditions
# and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice, this list of
# conditions and the following disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
# may be used to endorse or promote products derived from this software without specific prior
# written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# -------------------------------------------------------------------------------------------------
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
# vim: ft=zsh sw=2 ts=2 et
# -------------------------------------------------------------------------------------------------
BUFFER='ls ~'
expected_region_highlight=(
"1 2 $ZSH_HIGHLIGHT_STYLES[command]" # ls
"4 4 $ZSH_HIGHLIGHT_STYLES[path]" # ~
)

View File

@ -0,0 +1,38 @@
#!/usr/bin/env zsh
# -------------------------------------------------------------------------------------------------
# Copyright (c) 2010-2011 zsh-syntax-highlighting contributors
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted
# provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this list of conditions
# and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice, this list of
# conditions and the following disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
# may be used to endorse or promote products derived from this software without specific prior
# written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# -------------------------------------------------------------------------------------------------
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
# vim: ft=zsh sw=2 ts=2 et
# -------------------------------------------------------------------------------------------------
hash -d D=highlighters/main/test-data
BUFFER='ls ~D/path-tilde-named.zsh'
expected_region_highlight=(
"1 2 $ZSH_HIGHLIGHT_STYLES[command]" # ls
"4 23 $ZSH_HIGHLIGHT_STYLES[path]" # ~D/path-tilde-named.zsh
)

View File

@ -0,0 +1,36 @@
#!/usr/bin/env zsh
# -------------------------------------------------------------------------------------------------
# Copyright (c) 2010-2011 zsh-syntax-highlighting contributors
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted
# provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this list of conditions
# and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice, this list of
# conditions and the following disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
# may be used to endorse or promote products derived from this software without specific prior
# written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# -------------------------------------------------------------------------------------------------
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
# vim: ft=zsh sw=2 ts=2 et
# -------------------------------------------------------------------------------------------------
BUFFER='ls highlighters/main/test-data/path.zsh'
expected_region_highlight=(
"1 2 $ZSH_HIGHLIGHT_STYLES[command]" # ls
"4 39 $ZSH_HIGHLIGHT_STYLES[path]" # highlighters/main/test-data/path.zsh
)

View File

@ -0,0 +1,35 @@
#!/usr/bin/env zsh
# -------------------------------------------------------------------------------------------------
# Copyright (c) 2010-2011 zsh-syntax-highlighting contributors
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted
# provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this list of conditions
# and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice, this list of
# conditions and the following disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
# may be used to endorse or promote products derived from this software without specific prior
# written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# -------------------------------------------------------------------------------------------------
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
# vim: ft=zsh sw=2 ts=2 et
# -------------------------------------------------------------------------------------------------
BUFFER='ls'
expected_region_highlight=(
"1 2 $ZSH_HIGHLIGHT_STYLES[command]" # ls
)

View File

@ -0,0 +1,39 @@
#!/usr/bin/env zsh
# -------------------------------------------------------------------------------------------------
# Copyright (c) 2010-2011 zsh-syntax-highlighting contributors
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted
# provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this list of conditions
# and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice, this list of
# conditions and the following disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
# may be used to endorse or promote products derived from this software without specific prior
# written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# -------------------------------------------------------------------------------------------------
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
# vim: ft=zsh sw=2 ts=2 et
# -------------------------------------------------------------------------------------------------
BUFFER='ps aux | grep java'
expected_region_highlight=(
"1 2 $ZSH_HIGHLIGHT_STYLES[command]" # ps
"4 6 $ZSH_HIGHLIGHT_STYLES[default]" # aux
"8 8 $ZSH_HIGHLIGHT_STYLES[default]" # |
"9 12 $ZSH_HIGHLIGHT_STYLES[command]" # grep
"14 17 $ZSH_HIGHLIGHT_STYLES[default]" # java
)

View File

@ -0,0 +1,35 @@
#!/usr/bin/env zsh
# -------------------------------------------------------------------------------------------------
# Copyright (c) 2010-2011 zsh-syntax-highlighting contributors
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted
# provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this list of conditions
# and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice, this list of
# conditions and the following disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
# may be used to endorse or promote products derived from this software without specific prior
# written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# -------------------------------------------------------------------------------------------------
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
# vim: ft=zsh sw=2 ts=2 et
# -------------------------------------------------------------------------------------------------
BUFFER='azertyuiop'
expected_region_highlight=(
"1 10 $ZSH_HIGHLIGHT_STYLES[unknown-token]" # azertyuiop
)

View File

@ -0,0 +1,21 @@
zsh-syntax-highlighting / highlighters / pattern
================================================
This is the ***pattern*** highlighter, that highlights user defined patterns.
How to activate it
------------------
To activate it, add it to `ZSH_HIGHLIGHT_HIGHLIGHTERS`:
ZSH_HIGHLIGHT_HIGHLIGHTERS=( [...] pattern)
How to tweak it
---------------
To use this highlighter, associate patterns with styles in the `ZSH_HIGHLIGHT_PATTERNS` array, for example in `~/.zshrc`:
# To have commands starting with `rm -rf` in red:
ZSH_HIGHLIGHT_PATTERNS+=('rm -rf *' 'fg=white,bold,bg=red')
The syntax for declaring styles is [documented here](http://zsh.sourceforge.net/Doc/Release/Zsh-Line-Editor.html#SEC135).

View File

@ -0,0 +1,60 @@
#!/usr/bin/env zsh
# -------------------------------------------------------------------------------------------------
# Copyright (c) 2010-2011 zsh-syntax-highlighting contributors
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted
# provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this list of conditions
# and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice, this list of
# conditions and the following disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
# may be used to endorse or promote products derived from this software without specific prior
# written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# -------------------------------------------------------------------------------------------------
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
# vim: ft=zsh sw=2 ts=2 et
# -------------------------------------------------------------------------------------------------
# List of keyword and color pairs.
typeset -gA ZSH_HIGHLIGHT_PATTERNS
# Whether the pattern highlighter should be called or not.
_zsh_highlight_pattern_highlighter_predicate()
{
_zsh_highlight_buffer_modified
}
# Pattern syntax highlighting function.
_zsh_highlight_pattern_highlighter()
{
setopt localoptions extendedglob
local pattern
for pattern in ${(k)ZSH_HIGHLIGHT_PATTERNS}; do
_zsh_highlight_pattern_highlighter_loop "$BUFFER" "$pattern"
done
}
_zsh_highlight_pattern_highlighter_loop()
{
# This does *not* do its job syntactically, sorry.
local buf="$1" pat="$2"
local -a match mbegin mend
if [[ "$buf" == (#b)(*)(${~pat})* ]]; then
region_highlight+=("$((mbegin[2] - 1)) $mend[2] $ZSH_HIGHLIGHT_PATTERNS[$pat]")
"$0" "$match[1]" "$pat"; return $?
fi
}

View File

@ -0,0 +1,24 @@
zsh-syntax-highlighting / highlighters / root
=================================================
This is the ***root*** highlighter, that highlights the whole line if the current user is root.
How to activate it
------------------
To activate it, add it to `ZSH_HIGHLIGHT_HIGHLIGHTERS`:
ZSH_HIGHLIGHT_HIGHLIGHTERS=( [...] root)
How to tweak it
---------------
This highlighter defines the following styles:
* `root` - the style for the whole line if the current user is root.
To override one of those styles, change its entry in `ZSH_HIGHLIGHT_STYLES`, for example in `~/.zshrc`:
ZSH_HIGHLIGHT_STYLES[root]='bg=red'
The syntax for declaring styles is [documented here](http://zsh.sourceforge.net/Doc/Release/Zsh-Line-Editor.html#SEC135).

View File

@ -0,0 +1,45 @@
#!/usr/bin/env zsh
# -------------------------------------------------------------------------------------------------
# Copyright (c) 2010-2011 zsh-syntax-highlighting contributors
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted
# provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this list of conditions
# and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice, this list of
# conditions and the following disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
# may be used to endorse or promote products derived from this software without specific prior
# written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# -------------------------------------------------------------------------------------------------
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
# vim: ft=zsh sw=2 ts=2 et
# -------------------------------------------------------------------------------------------------
# Define default styles.
: ${ZSH_HIGHLIGHT_STYLES[root]:=standout}
# Whether the root highlighter should be called or not.
_zsh_highlight_root_highlighter_predicate()
{
_zsh_highlight_buffer_modified
}
# root highlighting function.
_zsh_highlight_root_highlighter()
{
[[ $(command id -u) -eq 0 ]] && region_highlight+=("0 $#BUFFER $ZSH_HIGHLIGHT_STYLES[root]")
}

View File

@ -0,0 +1,20 @@
zsh-syntax-highlighting / tests
===============================
Utility scripts for testing zsh-syntax-highlighting highlighters.
The tests expect the highlighter directory to contain a `test-data` directory with test data files. See the [main highlighter](../highlighters/main/test-data) for examples.
highlighting test
-----------------
[`test-highlighting.zsh`](tests/test-highlighting.zsh) tests the correctness of the highlighting. Usage:
zsh test-highlighting.zsh <HIGHLIGHTER NAME>
performance test
----------------
[`test-perfs.zsh`](tests/test-perfs.zsh) measures the time spent doing the highlighting. Usage:
zsh test-perfs.zsh <HIGHLIGHTER NAME>

View File

@ -0,0 +1,115 @@
#!/usr/bin/env zsh
# -------------------------------------------------------------------------------------------------
# Copyright (c) 2010-2011 zsh-syntax-highlighting contributors
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted
# provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this list of conditions
# and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice, this list of
# conditions and the following disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
# may be used to endorse or promote products derived from this software without specific prior
# written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# -------------------------------------------------------------------------------------------------
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
# vim: ft=zsh sw=2 ts=2 et
# -------------------------------------------------------------------------------------------------
# Check an highlighter was given as argument.
[[ -n "$1" ]] || {
echo "You must provide the name of a valid highlighter as argument." >&2
exit 1
}
# Check the highlighter is valid.
[[ -f ${0:h:h}/highlighters/$1/$1-highlighter.zsh ]] || {
echo "Could not find highlighter '$1'." >&2
exit 1
}
# Check the highlighter has test data.
[[ -d ${0:h:h}/highlighters/$1/test-data ]] || {
echo "Highlighter '$1' has no test data." >&2
exit 1
}
local -a errors highlight_zone
local -A observed_result
# Load the main script.
. ${0:h:h}/zsh-syntax-highlighting.zsh
# Activate the highlighter.
ZSH_HIGHLIGHT_HIGHLIGHTERS=($1)
# Process each test data file in test data directory.
for data_file in ${0:h:h}/highlighters/$1/test-data/*; do
# Load the data and prepare checking it.
BUFFER= ; expected_region_highlight=(); errors=()
echo -n "* ${data_file:t:r}: "
. $data_file
# Check the data declares $BUFFER.
if [[ ${#BUFFER} -eq 0 ]]; then
errors+=("'BUFFER' is not declared or blank.")
else
# Check the data declares $expected_region_highlight.
if [[ ${#expected_region_highlight} -eq 0 ]]; then
errors+=("'expected_region_highlight' is not declared or empty.")
else
# Process the data.
region_highlight=()
_zsh_highlight
# Overlapping regions can be declared in region_highlight, so we first build an array of the
# observed highlighting.
observed_result=()
for i in {1..${#region_highlight}}; do
highlight_zone=${(z)region_highlight[$i]}
for j in {$highlight_zone[1]..$highlight_zone[2]}; do
observed_result[$j]=$highlight_zone[3]
done
done
# Then we compare the observed result with the expected one.
for i in {1..${#expected_region_highlight}}; do
highlight_zone=${(z)expected_region_highlight[$i]}
for j in {$highlight_zone[1]..$highlight_zone[2]}; do
if [[ "$observed_result[$j]" != "$highlight_zone[3]" ]]; then
errors+=("'$BUFFER[$highlight_zone[1],$highlight_zone[2]]' [$highlight_zone[1],$highlight_zone[2]]: expected '$highlight_zone[3]', observed '$observed_result[$j]'.")
break
fi
done
done
fi
fi
# Format result/errors.
if [[ ${#errors} -eq 0 ]]; then
echo "OK"
else
echo "KO"
for error in $errors; do
echo " - $error"
done
fi
done

View File

@ -0,0 +1,75 @@
#!/usr/bin/env zsh
# -------------------------------------------------------------------------------------------------
# Copyright (c) 2010-2011 zsh-syntax-highlighting contributors
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted
# provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this list of conditions
# and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice, this list of
# conditions and the following disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
# may be used to endorse or promote products derived from this software without specific prior
# written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# -------------------------------------------------------------------------------------------------
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
# vim: ft=zsh sw=2 ts=2 et
# -------------------------------------------------------------------------------------------------
# Check an highlighter was given as argument.
[[ -n "$1" ]] || {
echo "You must provide the name of a valid highlighter as argument." >&2
exit 1
}
# Check the highlighter is valid.
[[ -f ${0:h:h}/highlighters/$1/$1-highlighter.zsh ]] || {
echo "Could not find highlighter '$1'." >&2
exit 1
}
# Check the highlighter has test data.
[[ -d ${0:h:h}/highlighters/$1/test-data ]] || {
echo "Highlighter '$1' has no test data." >&2
exit 1
}
# Load the main script.
. ${0:h:h}/zsh-syntax-highlighting.zsh
# Activate the highlighter.
ZSH_HIGHLIGHT_HIGHLIGHTERS=($1)
# Process each test data file in test data directory.
for data_file in ${0:h:h}/highlighters/$1/test-data/*; do
# Load the data and prepare checking it.
BUFFER=
echo -n "* ${data_file:t:r}: "
. $data_file
# Check the data declares $BUFFER.
if [[ ${#BUFFER} -eq 0 ]]; then
echo "KO\n - 'BUFFER' is not declared or blank."
else
# Measure the time taken by _zsh_highlight.
TIMEFMT="%*Es"
time ( BUFFER="$BUFFER" && _zsh_highlight)
fi
done

View File

@ -0,0 +1 @@
zsh-syntax-highlighting.zsh

View File

@ -0,0 +1,218 @@
#!/usr/bin/env zsh
# -------------------------------------------------------------------------------------------------
# Copyright (c) 2010-2011 zsh-syntax-highlighting contributors
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted
# provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this list of conditions
# and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice, this list of
# conditions and the following disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors
# may be used to endorse or promote products derived from this software without specific prior
# written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# -------------------------------------------------------------------------------------------------
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
# vim: ft=zsh sw=2 ts=2 et
# -------------------------------------------------------------------------------------------------
# -------------------------------------------------------------------------------------------------
# Core highlighting update system
# -------------------------------------------------------------------------------------------------
# Array declaring active highlighters names.
typeset -ga ZSH_HIGHLIGHT_HIGHLIGHTERS
# Update ZLE buffer syntax highlighting.
#
# Invokes each highlighter that needs updating.
# This function is supposed to be called whenever the ZLE state changes.
_zsh_highlight()
{
setopt localoptions nowarncreateglobal
# Store the previous command return code to restore it whatever happens.
local ret=$?
# Do not highlight if there are more than 300 chars in the buffer. It's most
# likely a pasted command or a huge list of files in that case..
[[ -n ${ZSH_HIGHLIGHT_MAXLENGTH:-} ]] && [[ $#BUFFER -gt $ZSH_HIGHLIGHT_MAXLENGTH ]] && return $ret
# Do not highlight if there are pending inputs (copy/paste).
[[ $PENDING -gt 0 ]] && return $ret
{
local -a selected_highlighters
local cache_place
# Select which highlighters in ZSH_HIGHLIGHT_HIGHLIGHTERS need to be invoked.
local highlighter; for highlighter in $ZSH_HIGHLIGHT_HIGHLIGHTERS; do
# If highlighter needs to be invoked
if "_zsh_highlight_${highlighter}_highlighter_predicate"; then
# Mark the highlighter as selected for update.
selected_highlighters+=($highlighter)
# Remove what was stored in its cache from region_highlight.
cache_place="_zsh_highlight_${highlighter}_highlighter_cache"
typeset -ga ${cache_place}
[[ ${#${(P)cache_place}} -gt 0 ]] && [[ ! -z ${region_highlight-} ]] && region_highlight=(${region_highlight:#(${(P~j.|.)cache_place})})
fi
done
# Invoke each selected highlighter and store the result in its cache.
local -a region_highlight_copy
for highlighter in $selected_highlighters; do
cache_place="_zsh_highlight_${highlighter}_highlighter_cache"
region_highlight_copy=($region_highlight)
{
"_zsh_highlight_${highlighter}_highlighter"
} always {
[[ ! -z ${region_highlight-} ]] && : ${(PA)cache_place::=${region_highlight:#(${(~j.|.)region_highlight_copy})}}
}
done
} always {
_ZSH_HIGHLIGHT_PRIOR_BUFFER=$BUFFER
_ZSH_HIGHLIGHT_PRIOR_CURSOR=$CURSOR
return $ret
}
}
# -------------------------------------------------------------------------------------------------
# API/utility functions for highlighters
# -------------------------------------------------------------------------------------------------
# Array used by highlighters to declare user overridable styles.
typeset -gA ZSH_HIGHLIGHT_STYLES
# Whether the command line buffer has been modified or not.
#
# Returns 0 if the buffer has changed since _zsh_highlight was last called.
_zsh_highlight_buffer_modified()
{
[[ "${_ZSH_HIGHLIGHT_PRIOR_BUFFER:-}" != "$BUFFER" ]]
}
# Whether the cursor has moved or not.
#
# Returns 0 if the cursor has moved since _zsh_highlight was last called.
_zsh_highlight_cursor_moved()
{
[[ -n $CURSOR ]] && [[ -n ${_ZSH_HIGHLIGHT_PRIOR_CURSOR-} ]] && (($_ZSH_HIGHLIGHT_PRIOR_CURSOR != $CURSOR))
}
# -------------------------------------------------------------------------------------------------
# Setup functions
# -------------------------------------------------------------------------------------------------
# Rebind all ZLE widgets to make them invoke _zsh_highlights.
_zsh_highlight_bind_widgets()
{
# Load ZSH module zsh/zleparameter, needed to override user defined widgets.
zmodload zsh/zleparameter 2>/dev/null || {
echo 'zsh-syntax-highlighting: failed loading zsh/zleparameter.' >&2
return 1
}
# Override ZLE widgets to make them invoke _zsh_highlight.
local cur_widget
for cur_widget in ${${(f)"$(builtin zle -la)"}:#(.*|_*|orig-*|run-help|which-command|beep)}; do
case $widgets[$cur_widget] in
# Already rebound event: do nothing.
user:$cur_widget|user:_zsh_highlight_widget_*);;
# User defined widget: override and rebind old one with prefix "orig-".
user:*) eval "zle -N orig-$cur_widget ${widgets[$cur_widget]#*:}; \
_zsh_highlight_widget_$cur_widget() { builtin zle orig-$cur_widget -- \"\$@\" && _zsh_highlight }; \
zle -N $cur_widget _zsh_highlight_widget_$cur_widget";;
# Completion widget: override and rebind old one with prefix "orig-".
completion:*) eval "zle -C orig-$cur_widget ${${widgets[$cur_widget]#*:}/:/ }; \
_zsh_highlight_widget_$cur_widget() { builtin zle orig-$cur_widget -- \"\$@\" && _zsh_highlight }; \
zle -N $cur_widget _zsh_highlight_widget_$cur_widget";;
# Builtin widget: override and make it call the builtin ".widget".
builtin) eval "_zsh_highlight_widget_$cur_widget() { builtin zle .$cur_widget -- \"\$@\" && _zsh_highlight }; \
zle -N $cur_widget _zsh_highlight_widget_$cur_widget";;
# Default: unhandled case.
*) echo "zsh-syntax-highlighting: unhandled ZLE widget '$cur_widget'" >&2 ;;
esac
done
}
# Load highlighters from directory.
#
# Arguments:
# 1) Path to the highlighters directory.
_zsh_highlight_load_highlighters()
{
# Check the directory exists.
[[ -d "$1" ]] || {
echo "zsh-syntax-highlighting: highlighters directory '$1' not found." >&2
return 1
}
# Load highlighters from highlighters directory and check they define required functions.
local highlighter highlighter_dir
for highlighter_dir ($1/*/); do
highlighter="${highlighter_dir:t}"
[[ -f "$highlighter_dir/${highlighter}-highlighter.zsh" ]] && {
. "$highlighter_dir/${highlighter}-highlighter.zsh"
type "_zsh_highlight_${highlighter}_highlighter" &> /dev/null &&
type "_zsh_highlight_${highlighter}_highlighter_predicate" &> /dev/null || {
echo "zsh-syntax-highlighting: '${highlighter}' highlighter should define both required functions '_zsh_highlight_${highlighter}_highlighter' and '_zsh_highlight_${highlighter}_highlighter_predicate' in '${highlighter_dir}/${highlighter}-highlighter.zsh'." >&2
}
}
done
}
# -------------------------------------------------------------------------------------------------
# Setup
# -------------------------------------------------------------------------------------------------
# Try binding widgets.
_zsh_highlight_bind_widgets || {
echo 'zsh-syntax-highlighting: failed binding ZLE widgets, exiting.' >&2
return 1
}
# Resolve highlighters directory location.
_zsh_highlight_load_highlighters "${ZSH_HIGHLIGHT_HIGHLIGHTERS_DIR:-${0:h}/highlighters}" || {
echo 'zsh-syntax-highlighting: failed loading highlighters, exiting.' >&2
return 1
}
# Reset scratch variables when commandline is done.
_zsh_highlight_preexec_hook()
{
_ZSH_HIGHLIGHT_PRIOR_BUFFER=
_ZSH_HIGHLIGHT_PRIOR_CURSOR=
}
autoload -U add-zsh-hook
add-zsh-hook preexec _zsh_highlight_preexec_hook 2>/dev/null || {
echo 'zsh-syntax-highlighting: failed loading add-zsh-hook.' >&2
}
# Initialize the array of active highlighters if needed.
[[ $#ZSH_HIGHLIGHT_HIGHLIGHTERS -eq 0 ]] && ZSH_HIGHLIGHT_HIGHLIGHTERS=(main) || true

View File

@ -0,0 +1,86 @@
# Conky, a system monitor, based on torsmo
#
# Any original torsmo code is licensed under the BSD license
#
# All code written since the fork of torsmo is licensed under the GPL
#
# Please see COPYING for details
#
# Copyright (c) 2004, Hannu Saransaari and Lauri Hakkarainen
# Copyright (c) 2005-2010 Brenden Matthews, Philip Kovacs, et. al. (see AUTHORS)
# All rights reserved.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Place below the other options, not below TEXT or XY
double_buffer yes
alignment top_left
background yes
border_width 1
cpu_avg_samples 2
default_color white
default_outline_color white
default_shade_color white
draw_borders no
draw_graph_borders yes
draw_outline no
draw_shades no
use_xft yes
xftfont BankGothic Lt BT:size=10
gap_x 5
gap_y 30
maximum_width 300
minimum_size 300 5
net_avg_samples 2
no_buffers yes
out_to_console no
out_to_stderr no
extra_newline no
own_window no
own_window_class Conky
own_window_transparent yes
own_window_type desktop
#own_window_hints undecorated,below,sticky,skip_taskbar,skip_page
stippled_borders 0
update_interval 1.0
uppercase no
use_spacer none
show_graph_scale no
show_graph_range no
TEXT
#$hr
${font BankGothic Md Bt :bold 10}System:$hr$font
Host:$color$nodename
OS: Arch $sysname $kernel - $machine
Up:$color $uptime
CPU:$color $cpu% ${cpubar 4}
RAM:$color $mem/$memmax - $memperc% ${membar 4}
Swap:$color $swap/$swapmax - $swapperc% ${swapbar 4}
${font BankGothic Md Bt :bold 10}Storage:$hr$font
Root: ${fs_used /}/${fs_size /} ${fs_bar 6 /}
Home: ${fs_used /home}/${fs_size /home} ${fs_bar 6 /home}
Terabyte: ${fs_used /media/Terabyte}/${fs_size /media/Terabyte} ${fs_bar 6 /media/Terabyte}
Windoze: ${fs_used /media/Windoze}/${fs_size /media/Windoze} ${fs_bar 6 /media/Windoze}
${font BankGothic Md Bt :bold 10}Net:$hr$font
In: ${addr eth0}
Ext: ${execi 3600 wget -O - http://ip.tupeux.com | tail}
Up: ${upspeed eth0} - Down: ${downspeed eth0}
${font BankGothic Md Bt :bold 10}MPD:$hr$font
$mpd_title$font
$mpd_artist
$mpd_album
$mpd_status $mpd_elapsed/$mpd_length
$mpd_bar

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,19 @@
# DO NOT EDIT! This file will be overwritten by LXAppearance.
# Any customization should be done in ~/.gtkrc-2.0.mine instead.
gtk-theme-name="Zukitwo"
gtk-icon-theme-name="Faience"
gtk-font-name="Cantarell 11"
gtk-cursor-theme-name="Adwaita"
gtk-cursor-theme-size=24
gtk-toolbar-style=GTK_TOOLBAR_BOTH_HORIZ
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
gtk-button-images=0
gtk-menu-images=0
gtk-enable-event-sounds=1
gtk-enable-input-feedback-sounds=0
gtk-xft-antialias=1
gtk-xft-hinting=1
gtk-xft-hintstyle="hintmedium"
gtk-xft-rgba="none"
include "/home/burchettm/.gtkrc-2.0.mine"

Binary file not shown.

View File

@ -0,0 +1,12 @@
[Desktop Entry]
Name=Crux Black
Type=X-GNOME-Metatheme
Comment=
[X-GNOME-Metatheme]
GtkTheme=Crux
MetacityTheme=Crux
IconTheme=gnome
GtkColorScheme=fg_color:#101010101010,bg_color:#e8c7eaeaebeb,text_color:#1a1a1a1a1a1a,base_color:#ffffffffffff,selected_fg_color:#ffffffffffff,selected_bg_color:#3eb83fe74000,tooltip_fg_color:#ffffffffffff,tooltip_bg_color:#56b556b556b5
CursorTheme=default
CursorSize=18

View File

@ -0,0 +1,12 @@
[Desktop Entry]
Name=Crux Blue
Type=X-GNOME-Metatheme
Comment=
[X-GNOME-Metatheme]
GtkTheme=Crux
MetacityTheme=Crux
IconTheme=gnome
GtkColorScheme=fg_color:#101010101010,bg_color:#e8c7eaeaebeb,text_color:#1a1a1a1a1a1a,base_color:#ffffffffffff,selected_fg_color:#ffffffffffff,selected_bg_color:#44586c809421,tooltip_fg_color:#ffffffffffff,tooltip_bg_color:#56b556b556b5
CursorTheme=default
CursorSize=18

View File

@ -0,0 +1,12 @@
[Desktop Entry]
Name=Crux Green
Type=X-GNOME-Metatheme
Comment=
[X-GNOME-Metatheme]
GtkTheme=Crux
MetacityTheme=Crux
IconTheme=gnome
GtkColorScheme=fg_color:#101010101010,bg_color:#e8c7eaeaebeb,text_color:#1a1a1a1a1a1a,base_color:#ffffffffffff,selected_fg_color:#ffffffffffff,selected_bg_color:#445894214d49,tooltip_fg_color:#ffffffffffff,tooltip_bg_color:#56b556b556b5
CursorTheme=default
CursorSize=18

View File

@ -0,0 +1,12 @@
[Desktop Entry]
Name=Crux Orange
Type=X-GNOME-Metatheme
Comment=
[X-GNOME-Metatheme]
GtkTheme=Crux
MetacityTheme=Crux
IconTheme=gnome
GtkColorScheme=fg_color:#101010101010,bg_color:#e8c7eaeaebeb,text_color:#1a1a1a1a1a1a,base_color:#ffffffffffff,selected_fg_color:#ffffffffffff,selected_bg_color:#e738797c139a,tooltip_fg_color:#ffffffffffff,tooltip_bg_color:#56b556b556b5
CursorTheme=default
CursorSize=18

View File

@ -0,0 +1,12 @@
[Desktop Entry]
Name=Crux Red
Type=X-GNOME-Metatheme
Comment=
[X-GNOME-Metatheme]
GtkTheme=Crux
MetacityTheme=Crux
IconTheme=gnome
GtkColorScheme=fg_color:#101010101010,bg_color:#e8c7eaeaebeb,text_color:#1a1a1a1a1a1a,base_color:#ffffffffffff,selected_fg_color:#ffffffffffff,selected_bg_color:#b3332dd02ccd,tooltip_fg_color:#ffffffffffff,tooltip_bg_color:#56b556b556b5
CursorTheme=default
CursorSize=18

View File

@ -0,0 +1,12 @@
[Desktop Entry]
Name=Crux Violet
Type=X-GNOME-Metatheme
Comment=
[X-GNOME-Metatheme]
GtkTheme=Crux
MetacityTheme=Crux
IconTheme=gnome
GtkColorScheme=fg_color:#101010101010,bg_color:#e8c7eaeaebeb,text_color:#1a1a1a1a1a1a,base_color:#ffffffffffff,selected_fg_color:#ffffffffffff,selected_bg_color:#73e33023aeb0,tooltip_fg_color:#ffffffffffff,tooltip_bg_color:#56b556b556b5
CursorTheme=default
CursorSize=18

View File

@ -0,0 +1,12 @@
[Desktop Entry]
Name=Crux White
Type=X-GNOME-Metatheme
Comment=
[X-GNOME-Metatheme]
GtkTheme=Crux
MetacityTheme=Crux
IconTheme=gnome
GtkColorScheme=fg_color:#101010101010,bg_color:#d9f4db73dc28,text_color:#1a1a1a1a1a1a,base_color:#ee14ee14ee14,selected_fg_color:#000000000000,selected_bg_color:#ffffffffffff,tooltip_fg_color:#ffffffffffff,tooltip_bg_color:#56b556b556b5
CursorTheme=default
CursorSize=18

View File

@ -0,0 +1,15 @@
[Desktop Entry]
Name=Crux of A-Ron
Type=X-GNOME-Metatheme
Comment=
GenericName=
[X-GNOME-Metatheme]
GtkTheme=Crux
MetacityTheme=Crux
IconTheme=gnome
GtkColorScheme=fg_color:#101010101010,bg_color:#e8c7eaeaebeb,text_color:#1a1a1a1a1a1a,base_color:#ffffffffffff,selected_fg_color:#ffffffffffff,selected_bg_color:#44588c579421,tooltip_fg_color:#ffffffffffff,tooltip_bg_color:#56b556b556b5
CursorTheme=default
CursorSize=18

View File

@ -0,0 +1,51 @@
#!/bin/bash
if [ "$1" == "--help" ]; then
echo Usage: $0 [OPTIONS]
echo Adjusts Compiz settings.
echo
echo " (no args) Sets the recommended settings."
echo " --fade Changes titlebar to fade."
echo
exit
fi
if [ "$1" == "" ]; then
zenity --question --text="\<big\>\<b\>Compiz shadow settings for Dust\</b\>\</big\>\nThis script will do the following things:\n\n- Adjust compiz gtk-window-decorator titlebar opacity\n<small> This will make the titlebar completely opaque. Compiz defaults to it being translucent.</small>\n\n- Adjust compiz 'decorator' plugin's drop shadow\n<small> This will give windows a large drop shadow.</small>\n\nDo you want to proceed?"
if [ "$?" != "0" ]; then
zenity --info --text="<big><b>Nothing done</b></big>\nDon't worry."
exit
fi
# Activate the blurring
gconftool-2 --set --type=string /apps/gwd/blur_type titlebar
gconftool-2 --set --type=float /apps/gwd/metacity_theme_opacity 1
gconftool-2 --set --type=bool /apps/gwd/metacity_theme_shade_opacity true
gconftool-2 --set --type=float /apps/gwd/metacity_theme_active_opacity 1
gconftool-2 --set --type=bool /apps/gwd/metacity_theme_active_shade_opacity true
# Set the compiz drop shadow
gconftool-2 --set --type=float /apps/compiz/plugins/decoration/allscreens/options/shadow_opacity 0.7
gconftool-2 --set --type=float /apps/compiz/plugins/decoration/allscreens/options/shadow_radius 25.0
gconftool-2 --set --type=string /apps/compiz/plugins/decoration/allscreens/options/shadow_color /apps/compiz/plugins/decoration/allscreens/options/shadow_color #000000ff
gconftool-2 --set --type=int /apps/compiz/plugins/decoration/allscreens/options/shadow_x_offset 0
gconftool-2 --set --type=int /apps/compiz/plugins/decoration/allscreens/options/shadow_y_offset 5
gconftool-2 --set --type=string /apps/compiz/plugins/decoration/allscreens/options/command /usr/bin/compiz-decorator
# Start the GTK window decorator
if [ -z "`pidof compiz.real`" ]; then echo; else
gtk-window-decorator --replace 2>/dev/null 1>/dev/null & disown
fi
zenity --info --text="\<big\>\<b\>Done!\</b\>\</big\>\nYour Compiz's decorator settings have now been adjusted. Try activating Compiz's window decoration plugin (via <i>ccsm</i>) if you did not see any changes."
elif [ "$1" == "--fade" ]; then
# Running this with the "--fade" option will remove the titlebar fading.
gconftool-2 --set --type=float /apps/gwd/metacity_theme_opacity 0.85
gconftool-2 --set --type=bool /apps/gwd/metacity_theme_shade_opacity true
gconftool-2 --set --type=float /apps/gwd/metacity_theme_active_opacity 1
gconftool-2 --set --type=bool /apps/gwd/metacity_theme_active_shade_opacity true
fi

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 B

View File

@ -0,0 +1,801 @@
# Dust theme
# (c) 2010 Rico Sta. Cruz, Kido Mariano, James Schriver
# Edited by Taylor "Ripps" L-Wren
# Licensed under the GPL.
# Requires Murrine GTK Engine v0.91.0
gtk_color_scheme = "fg_color:#323232\nbg_color:#CCD4D9\nbase_color:#fff\ntext_color:#323232\nselected_bg_color:#5B6475\nselected_fg_color:#fff\ntooltip_bg_color:#B8EAEB\ntooltip_fg_color:#323232"
style "default"
{
xthickness = 1
ythickness = 1
GtkWidget::link-color = "#3399ff"
GtkScrolledWindow ::scrollbar-spacing = 1
GtkScrolledWindow ::scrollbar-within-bevel = 0
GtkButton::child-displacement-x = 1
GtkButton::child-displacement-y = 1
GtkButton::default-border = { 0, 0, 0, 0 }
GtkCheckButton::indicator-size = 14
GtkPaned::handle-size = 6
GtkRange::trough-border = 2
GtkRange::slider-width = 13
GtkRange::stepper-size = 14
GtkRange::trough-under-steppers = 1
GtkScale::slider-length = 18
GtkScale::trough-side-details = 1
GtkScrollbar::min-slider-length = 30
GtkMenuBar::internal-padding = 0
GtkExpander::expander-size = 15
GtkToolbar::internal-padding = 1
GtkTreeView::expander-size = 15
GtkTreeView::vertical-separator = 0
GtkMenu::horizontal-padding = 0
GtkMenu::vertical-padding = 0
WnckTasklist::fade-overlay-rect = 0
# The following line hints to gecko (and possibly other appliations)
# that the entry should be drawn transparently on the canvas.
# Without this, gecko will fill in the background of the entry.
GtkEntry::honors-transparent-bg-hint = 1
GtkEntry::progress-border = { 2, 2, 2, 2 }
fg[NORMAL] = @fg_color
fg[PRELIGHT] = @fg_color
fg[SELECTED] = @selected_fg_color
fg[ACTIVE] = @fg_color
fg[INSENSITIVE] = darker (@bg_color)
bg[NORMAL] = @bg_color
bg[PRELIGHT] = shade (1.02, @bg_color)
bg[SELECTED] = @selected_bg_color
bg[INSENSITIVE] = @bg_color
bg[ACTIVE] = shade (0.9, @bg_color)
base[NORMAL] = @base_color
base[PRELIGHT] = shade (0.95, @bg_color)
base[ACTIVE] = mix (0.7, @selected_bg_color, @bg_color)
base[SELECTED] = @selected_bg_color
base[INSENSITIVE] = @bg_color
text[NORMAL] = @text_color
text[PRELIGHT] = @text_color
text[ACTIVE] = @selected_fg_color
text[SELECTED] = @selected_fg_color
text[INSENSITIVE] = darker (@bg_color)
engine "murrine"
{
animation = TRUE # FALSE = disabled, TRUE = enabled
arrowstyle = 1
border_shades = { 1.2, 1.0 } # gradient to draw on border
# border_colors = { "#D5DDE6", "#D5DDE6" }
colorize_scrollbar = TRUE # FALSE = disabled, TRUE = enabled
comboboxstyle = 0 # colorize the GtkComboBox below the arrow.
contrast = .85 # 0.8 for less contrast, more than 1.0 for more contrast on borders
#focus_color = @selected_bg_color
glazestyle = 5 # 0 = flat, 1 = curved, 2 = concave, 3 = top-curved, 4 = beryl
glow_shade = 1.20 # sets glow amount for buttons or widgets
glowstyle = 0 # 0 = top, 1 = bottom, 2 = top and bottom, 3 = center (vertical), 4 = center (horizontal)
gradient_shades = { 1.13, 1.02, 1.00, 1.02 } # default: {1.1,1.0,1.0,1.1}
highlight_shade = 1.0 # set highlight amount for buttons or widgets
lightborder_shade = 1.2 # sets lightborder amount for buttons or widgets
lightborderstyle = 1 # 0 = lightborder on top side, 1 = lightborder on all sides
listviewheaderstyle = 1 # 0 = flat, 1 = glassy, 2 = raised
listviewstyle = 0 # 0 = nothing, 1 = dotted
menubaritemstyle = 1 # 0 = menuitem look, 1 = button look
menubarstyle = 0 # 0 = flat, 1 = glassy, 2 = gradient, 3 = striped
menuitemstyle = 1 # 0 = flat, 1 = glassy, 2 = striped
menustyle = 0 # 0 = no vertical menu stripe, 1 = display vertical menu stripe
prelight_shade = 1.25 #to select the shade level used in the scrollbar's slider, GtkComboBox with comboboxstyle = 1 and in the prelight state with gradient_colors.
progressbarstyle = 0 # 0 = no stripes, 1 = diagonal stripes, 2 = vertical stripes
reliefstyle = 4 # 0 = flat, 1 = inset, 2 = shadow, = 3 for a gradient on shadow, = 4 for a stronger shadow.
rgba = FALSE # FALSE = disabled, TRUE = enabled
roundness = 2 # 0 = squared, 1 = old default, more will increase roundness
scrollbarstyle = 0 # 0 = nothing, 1 = circles, 2 = handles, 3 = diagonal stripes, 4 = diagonal stripes and handles, 5 = horizontal stripes, 6 = horizontal stripes and handles
shadow_shades = { 0.8, 2.2 }
sliderstyle = 0 # 0 = nothing added, 1 = handles
spinbuttonstyle = 1
stepperstyle = 1 # 0 = standard, 1 = integrated stepper handles, 2 = squared steppers with a rounded slider
#textstyle = 1
trough_shades = { 0.98, 1.08 } # draw gradient on trough of GtkScrollbar and GtkProgressbar
toolbarstyle = 1 # 0 = flat, 1 = glassy, 2 = gradient
}
}
style "wide"
{
xthickness = 2
ythickness = 2
}
style "wider"
{
xthickness = 3
ythickness = 3
}
style "dark"
{
bg[NORMAL] = "#303334"
bg[SELECTED] = shade(0.9,@selected_bg_color)
bg[PRELIGHT] = shade (0.5, @selected_bg_color)
bg[ACTIVE] = mix (0.5, @selected_bg_color, "#303334")
bg[INSENSITIVE] = "#2C2F30"
fg[NORMAL] = mix (0.7, '#efffff', @fg_color)
fg[PRELIGHT] = mix (0.8, '#efffff', @fg_color)
fg[SELECTED] = mix (0.8, '#efffff', @fg_color)
fg[ACTIVE] = mix (0.8, '#efffff', @fg_color)
fg[INSENSITIVE] = mix (0.4, '#efffff', @fg_color)
}
style "button" = "wider"
{
bg[NORMAL] = shade (1.10, @bg_color)
bg[PRELIGHT] = mix(0.82,shade (1.1, @bg_color),@selected_bg_color)
bg[ACTIVE] = shade (0.85, @bg_color)
engine "murrine"
{
border_shades = { .8, .5} # draw a gradient on the border.
border_colors = { @bg_color, @bg_color}
contrast = 1.4
lightborder_shade = 1.06
}
}
style "entry" {
xthickness = 3
ythickness = 3
bg[SELECTED] = mix (0.4, @selected_bg_color, @base_color)
fg[SELECTED] = @text_color
engine "murrine" {
focus_color = shade (0.65, @selected_bg_color)
}
}
style "toolbar-item" = "button"
{
bg[NORMAL] = "#9FA9AF" #shade(0.88,@bg_color)
bg[PRELIGHT] = "#DFE9EF" #shade(1.1,@bg_color)
bg[ACTIVE] = "#BFC9CF" #shade(0.6,@bg_color)
bg[SELECTED] = "#9FA9AF" #shade(0.88,@bg_color)
bg[INSENSITIVE] = "#9FA9AF" #shade(0.88,@bg_color)
engine "murrine"{
}
}
style "toolbar" = "toolbar-item"
{
xthickness = 1
ythickness = 1
engine "murrine"{
gradient_shades = { 1.00, 0.94, 0.94, 0.85 }
contrast = 1.15
}
}
style "toolbar-sep" = "toolbar-item"
{
xthickness = 2
}
style "dark-toolbar" = "dark"
{
xthickness = 3
ythickness = 3
bg[NORMAL] = "#303334"
bg[PRELIGHT] = shade (0.65, @selected_bg_color)
bg[SELECTED] = shade (0.35, @bg_color)
bg[ACTIVE] = shade (0.35, @bg_color)
engine "murrine"
{
border_shades = {1.3, 1.1} # draw a gradient on the border.
border_colors = { "#303334", "#303334" }
glowstyle = 4
gradient_shades = {1.05,1.0,1.0,0.9}
highlight_shade = 1.1
lightborder_shade = 1.05
reliefstyle = 4 # 0 = flat, 1 = inset, 2 = shadow, = 3 for a gradient on shadow, = 4 for a stronger shadow.
contrast = 1.4
}
}
style "dark-toolbar-sep" = "dark-toolbar"
{ xthickness = 2 }
style "pixmap-dark-toolbar" = "dark-toolbar"
{
xthickness = 1
ythickness = 1
# To-do: make the toolbar recolorable, possibly without using pixmaps
# We only like this because of the top line, anyway.
engine "pixmap"{
image {
function = BOX
file = "toolbar_o.png"
border = {1,1,1,1}
}
image
{
function = HANDLE
overlay_file = "handlebox.png"
overlay_stretch = FALSE
orientation = HORIZONTAL
}
image
{
function = HANDLE
overlay_file = "handlebox.png"
overlay_stretch = FALSE
orientation = VERTICAL
}
image
{
function = VLINE
recolorable = TRUE
file = "blank.png"
}
image
{
function = HLINE
recolorable = TRUE
file = "blank.png"
}
}
}
style "notebook" = "wider"
{
bg[NORMAL] = shade (1.0615, @bg_color)
bg[ACTIVE] = shade (0.85, @bg_color)
engine "murrine"
{
contrast = 1.0
lightborder_shade = 1.1
highlight_shade = 1.01
}
}
style "panel"
{
bg[NORMAL] = "#303334" # Default top/bottom panel background
bg[NORMAL] = "#303334"
bg[PRELIGHT] = shade(1.0, @selected_bg_color) # panel prelight
bg[ACTIVE] = @selected_bg_color # bottom panel active background
bg[SELECTED] = @selected_bg_color # Active window desktop lower panel background
bg[INSENSITIVE] = shade(0.90, @selected_bg_color)
fg[NORMAL] = @selected_fg_color # Default text
fg[PRELIGHT] = @selected_fg_color # Prelight
fg[ACTIVE] = @selected_fg_color # Bottom panel active text
fg[SELECTED] = @fg_color # Bottom panel selected window
engine "murrine"
{
border_shades = {1.2, 1.0} # draw a gradient on the border.
border_colors = { "#303334", "#303334" }
}
}
style "murrine-PanelGtkMenubar"
{
bg[NORMAL] = "#303334" # top desktop panel menu background color
bg[SELECTED] = darker(@selected_bg_color) # selected item background
fg[NORMAL] = @bg_color # default panel text !
fg[PRELIGHT] = @base_color # text after dropdown menu
#font_name = "Bold"
engine "murrine"
{
# Panel Menubar Tab
contrast = 0.75
glazestyle = 3 # 0 = flat highlight, 1 = curved highlight, 2 = concave style, 3 = top curved highlight, 4 = beryl highlight
glow_shade = 1.5 # Data type: Real; default = 1.0, Range 0-2, precision 0.1
glowstyle = 0 # 0 = Top glow, 1 = Bottom glow, 2 = Top and Bottom glow, 3 = Horizontal glow, 4 = Centered glow
}
}
widget "*clock-applet-button*" style "dark-toolbar"
style "menu" = "dark"
{
xthickness = 0
ythickness = 0
#Keep it this dark since OOo likes it
bg[NORMAL] = "#303334"
text[NORMAL] = @bg_color
text[PRELIGHT] = @selected_fg_color
}
style "menu-item" = "dark"
{
xthickness = 0
ythickness = 3
engine "murrine"
{
border_shades = { 1.0, .8} # draw a gradient on the border.
border_colors = { "#455179", "#455179" }
glowstyle = 0
gradient_shades = {1.1,1.0,1.0,0.7}
highlight_shade = 1.0
lightborder_shade = 1.0
roundness = 0
}
}
style "separator-menu-item"
{
GtkSeparatorMenuItem::horizontal-padding = 2
GtkWidget::wide-separators = 1
GtkWidget::separator-width = 1
GtkWidget::separator-height = 2
xthickness = 4
ythickness = 0
bg[NORMAL] = "#444"
}
# Based on the default style so that the colors from the button
# style are overriden again.
style "treeview-header" = "default"
{
xthickness = 2
ythickness = 1
bg[NORMAL] = shade(0.9, @bg_color)
bg[PRELIGHT] = shade(1.0, @bg_color)
bg[ACTIVE] = shade(0.8, @bg_color)
GtkWidget::focus-line-width = 0
}
style "tooltips"
{
xthickness = 4
ythickness = 4
bg[NORMAL] = @tooltip_bg_color
fg[NORMAL] = @tooltip_fg_color
}
style "progressbar"
{
xthickness = 0
ythickness = 0
fg[PRELIGHT] = @selected_fg_color
}
style "pixmap-statusbar"
{
ythickness = 3
xthickness = 3
engine "pixmap"
{
image
{
function = RESIZE_GRIP
recolorable = TRUE
detail = "statusbar"
overlay_file = "statusgrip.png"
overlay_border = {0,0,0,0}
overlay_stretch = TRUE
}
image
{
function = SHADOW
shadow = IN
file = "blank.png"
}
image
{
function = SHADOW
shadow = OUT
file = "blank.png"
}
image
{
function = SHADOW
shadow = ETCHED_IN
file = "blank.png"
}
image
{
function = SHADOW
shadow = ETCHED_OUT
file = "blank.png"
}
}
}
style "comboboxentry" = "wider"
{
}
style "spinbutton"
{
}
style "scale"
{
bg[PRELIGHT] = shade(0.9,@bg_color)
engine "murrine"{
roundness = 2
contrast = 1.1
highlight_shade = 1.2
lightborder_shade = 1.1
gradient_shades = {1.0,0.85,0.8,1.0}
reliefstyle = 2
}
}
style "menubar" = "dark"
{
# Static dark color so continuity doesn't break with toolbars
# when color changes
bg[NORMAL] = "#303334"
text[NORMAL] = @bg_color # Menubar text (OOo) # Menubar text (OOo)
engine "pixmap"
{
image {
function = BOX
file = "menubar.png"
#border = {1,1,1,1}
stretch = TRUE
}
image {
function = HANDLE
overlay_file = "handlebox.png"
overlay_stretch = FALSE
orientation = HORIZONTAL
}
image {
function = HANDLE
overlay_file = "handlebox.png"
overlay_stretch = FALSE
orientation = VERTICAL
}
}
}
style "frame"
{
#Uncomment for dark statusbars. Breaks some apps. (FIXME: Doesn't work)
#bg[ACTIVE] = shade(0.2,@bg_color)
#fg[NORMAL] = mix (1.5, @fg_color, '#ffffff')
#fg[PRELIGHT] = mix (1.4, @fg_color, '#ffffff')
}
style "frame-title" = "frame"
{
fg[NORMAL] = lighter (@fg_color)
}
# SZ07: This is added to tell the theme how to color checkmarks and radio items that are not in menus.
style "radiocheck"
{
text[NORMAL] = @selected_fg_color # Color for selected checks/radio items.
text[PRELIGHT] = @selected_fg_color # Color for selected checks/radio items on prelight.
engine "murrine"
{
roundness = 2
contrast = 1.03
highlight_shade = 1.0
lightborder_shade = 1.0
gradient_shades = {1.1,1.0,1.0,0.9}
reliefstyle = 2
}
}
style "scrollbar"
{
engine "murrine"
{
border_shades = { .5, .5} # draw a gradient on the border.
border_colors = { "#CCD4D9", "#CCD4D9" }
glazestyle = 3 # 0 = flat, 1 = curved, 2 = concave, 3 = top-curved, 4 = beryl
glow_shade = 1.1 # sets glow amount for buttons or widgets
glowstyle = 4 # 0 = top, 1 = bottom, 2 = top and bottom, 3 = center (vertical), 4 = center (horizontal)
gradient_shades = {1.02,1.01,0.96,0.95} # default: {1.1,1.0,1.0,1.1}
highlight_shade = 1.1 # set highlight amount for buttons or widgets
lightborder_shade = 1.3 # sets lightborder amount for buttons or widgets
roundness = 5
}
bg[SELECTED] = shade (0.6, @bg_color)
}
style "hscrollbar"
{
}
style "vscrollbar"
{
}
style "nautilus-location"
{
bg[NORMAL] = mix(0.60, @bg_color, @selected_bg_color)
}
#########################################
# Matches
#########################################
# default style is applied to every widget
class "GtkWidget" style "default"
# Increase the x/ythickness in some widgets
class "GtkRange" style "default"
class "GtkFrame" style "frame"
class "GtkSeparator" style "wide"
class "GtkEntry" style "entry"
class "GtkStatusbar" style "pixmap-statusbar"
class "GtkMenuBar" style:highest "menubar"
class "GtkRadioButton" style "radiocheck" # SZ07: Added for the checkmarks/radio
class "GtkCheckButton" style "radiocheck" # SZ07: Added for the checkmarks/radio
# Toolbar default: dark
#class "*HandleBox" style "pixmap-dark-toolbar"
#class "GtkToolbar" style "pixmap-dark-toolbar"
#widget_class "*HandleBox" style "pixmap-dark-toolbar"
#widget_class "*<GtkToolbar>.*" style "dark-toolbar"
# Toolbar default: light
class "*HandleBox" style "toolbar"
class "GtkToolbar" style "toolbar"
widget_class "*HandleBox" style "toolbar"
widget_class "*<GtkToolbar>.*" style "toolbar-item"
#
# Toolbar exceptions:
# Browser-type and viewer-type applications get a dark toolbar.
# Everything below the toolbar for these apps are the content. This will make
# a separation on function (toolbar) and content (client area).
#
# Work around for http://bugzilla.gnome.org/show_bug.cgi?id=382646
style "text-is-fg-color-workaround"
{
text[NORMAL] = @fg_color
text[PRELIGHT] = @fg_color
text[SELECTED] = @selected_fg_color
text[ACTIVE] = @fg_color
text[INSENSITIVE] = darker (@bg_color)
}
widget_class "*.<GtkComboBox>.<GtkCellView>" style "text-is-fg-color-workaround"
style "text-is-fg-color-workaround-dark"
{
#Make it work with this theme!
text[NORMAL] = mix (1.5, @fg_color, '#ffffff')
text[PRELIGHT] = mix (1.4, @fg_color, '#ffffff')
}
# Nautilus toolbar
widget_class "*Nautilus*Toolbar*" style "pixmap-dark-toolbar"
widget_class "*Nautilus*Tool*GtkButton" style "dark-toolbar"
widget_class "*Nautilus*Tool*.*.*" style "dark-toolbar"
widget_class "*Nautilus*Tool*GtkToggleButton" style "dark-toolbar"
widget_class "*Nautilus*Tool*Separator*" style "dark-toolbar-sep"
widget_class "*Nautilus*Tool*.<GtkComboBox>.<GtkCellView>" style "text-is-fg-color-workaround-dark"
# Evince/EOG
widget_class "*EggEditable*Toolbar*" style "pixmap-dark-toolbar"
widget_class "*EggEditable*Toolbar*.*.*.*" style "dark-toolbar"
widget_class "*EggEditable*Tool*.<GtkComboBox>.<GtkCellView>" style "text-is-fg-color-workaround-dark"
widget "*fullscreen-toolbar" style "pixmap-dark-toolbar"
widget "*fullscreen-toolbar.*" style "dark-toolbar"
widget "*fullscreen-toolbar*.GtkComboBox.GtkCellView" style "text-is-fg-color-workaround-dark"
# Epiphany
widget_class "*EphyToolbar*" style "pixmap-dark-toolbar"
widget_class "*EphyToolbar*.*.*.*" style "dark-toolbar"
widget_class "*EphyTool*.<GtkComboBox>.<GtkCellView>" style "text-is-fg-color-workaround-dark"
# Brasero
widget_class "*rasero*Toolbar*" style "pixmap-dark-toolbar"
widget_class "*rasero*Toolbar*.*" style "dark-toolbar"
widget_class "*rasero*Toolbar*.<GtkComboBox>.<GtkCellView>" style "text-is-fg-color-workaround-dark"
#gThumb
widget_class "*Gth*Toolbar*" style "pixmap-dark-toolbar"
widget_class "*Gth*Toolbar*.*" style "dark-toolbar"
widget_class "*Gth*Toolbar*.<GtkComboBox>.<GtkCellView>" style "text-is-fg-color-workaround-dark"
widget_class "*GthFull*" style "pixmap-dark-toolbar" #Doesn't work
#Totem
widget "*totem*" style "dark"
style "totem-dark" {
text[NORMAL] = mix (0.7, '#efffff', @fg_color)
text[PRELIGHT] = mix (0.8, '#efffff', @fg_color)
engine "murrine"
{
border_colors = { "#303334", "#303334" }
}
}
widget "*tmw_main_pane.EvSidebar.*GtkComboBox.*" style "totem-dark"
widget "*tmw_main_pane*GtkButton*" style "totem-dark" #Doesn't work
widget "*tmw_main_pane*GtkToolButton" style "totem-dark"
widget "*tmw_main_pane*GtkToggleButton" style "totem-dark"
class "GtkSpinButton" style "spinbutton"
class "GtkScale" style "scale"
class "GtkVScale" style "scale"
class "GtkHScale" style "scale"
class "GtkScrollbar" style "scrollbar"
class "GtkVScrollbar" style "vscrollbar"
class "GtkHScrollbar" style "hscrollbar"
class "GtkButton" style "button"
# General matching following, the order is choosen so that the right styles override each other
# eg. progressbar needs to be more important then the menu match.
widget_class "*<GtkNotebook>*<GtkEventBox>" style "notebook"
widget_class "*<GtkNotebook>*<GtkDrawingArea>" style "notebook"
widget_class "*<GtkNotebook>*<GtkLayout>" style "notebook"
widget_class "*<GtkNotebook>" style "notebook"
widget_class "*<GtkComboBoxEntry>*" style "comboboxentry"
widget_class "*<GtkCombo>*" style "comboboxentry"
widget_class "*<GtkMenuBar>.*" style "menu-item"
widget_class "*<GtkMenu>*" style "menu"
widget_class "*<GtkMenuItem>" style "menu-item"
widget_class "*<GtkSeparatorMenuItem>*" style "separator-menu-item"
widget_class "*<GtkCheckMenuItem>*" style "radiocheck"
widget_class "*<GtkRadioMenuItem>*" style "radiocheck"
widget_class "*<GtkFrame>" style "frame"
widget_class "*.<GtkFrame>.<GtkLabel>" style "frame-title"
widget_class "*<GtkStatusbar>*" style "wider"
widget_class "*<GtkProgressBar>" style "progressbar"
# Treeview header
widget_class "*.<GtkTreeView>.<GtkButton>" style "treeview-header"
widget_class "*.<GtkCTree>.<GtkButton>" style "treeview-header"
widget_class "*.<GtkList>.<GtkButton>" style "treeview-header"
widget_class "*.<GtkCList>.<GtkButton>" style "treeview-header"
#Panel
widget "*PanelWidget*" style "panel"
widget "*PanelApplet*" style "panel"
widget "*fast-user-switch*" style "panel" # Workaround for Fast User Switch applet
class "PanelApp*" style "panel"
class "PanelToplevel*" style "panel"
# The panel menubar
widget_class "*Panel*<GtkMenuBar>*" style:highest "murrine-PanelGtkMenubar"
#XFCE panel
widget_class "*notif*" style "panel"
widget_class "*Notif*" style "panel"
widget_class "*Tray*" style "panel"
widget_class "*tray*" style "panel"
widget "*Xfce*Panel*" style "panel"
class "*Xfce*Panel*" style "panel"
widget "gtk-tooltip*" style "tooltips"
###################################################
# Special cases and work arounds
###################################################
# Nautilus sidebar
widget_class "*NautilusSidePane.GtkFrame" style "pixmap-statusbar"
# Workarounds for Evolution
widget_class "*.ETable.ECanvas" style "treeview-header"
widget_class "*.ETree.ECanvas" style "treeview-header"
# Monodevelop uses an OptionPanel widget, which incidentally is dark in our theme.
# Undo it:
widget "*OptionPanel*" style "button"
widget "*optionPanel*" style "button"
# Special case the nautilus-extra-view-widget
# ToDo: A more generic approach for all applications that have a widget like this.
widget "*.nautilus-extra-view-widget" style : highest "nautilus-location"
style "menuitem-text-is-fg-color-workaround"
{
#text[NORMAL] = @fg_color
#text[PRELIGHT] = @selected_fg_color
#text[SELECTED] = @selected_fg_color
#text[ACTIVE] = @fg_color
#text[INSENSITIVE] = darker (@bg_color)
#Make it work with this theme!
text[NORMAL] = mix (1.5, @fg_color, '#ffffff')
text[PRELIGHT] = mix (1.4, @fg_color, '#ffffff')
}
widget "*.gtk-combobox-popup-menu.*" style "menuitem-text-is-fg-color-workaround"
# Work around the usage of GtkLabel inside GtkListItems to display text.
# This breaks because the label is shown on a background that is based on the
# base color set.
style "fg-is-text-color-workaround"
{
fg[NORMAL] = @text_color
fg[PRELIGHT] = @text_color
fg[ACTIVE] = @selected_fg_color
fg[SELECTED] = @selected_fg_color
fg[INSENSITIVE] = darker (@bg_color)
}
widget_class "*<GtkListItem>*" style "fg-is-text-color-workaround"
# The same problem also exists for GtkCList and GtkCTree
# Only match GtkCList and not the parent widgets, because that would also change the headers.
widget_class "*<GtkCList>" style "fg-is-text-color-workaround"
style "evo-new-button-workaround"
{
engine "murrine"
{
toolbarstyle = 0
}
}
widget_class "EShellWindow.GtkVBox.BonoboDock.BonoboDockBand.BonoboDockItem*" style "evo-new-button-workaround"
#Rhythmbox toolbar near the search entry. Use default + wide so that it doesn't turn dark.
style "rhythmbox-header" = "default"
{
xthickness = 3
ythickness = 3
engine "murrine" {
}
}
widget "*RBSourceHeader*" style:highest "rhythmbox-header"
widget "*HeaderToolbar*" style:highest "rhythmbox-header"
widget "*FooterToolbar*" style:highest "rhythmbox-header"
widget "*swt*toolbar*" style "default"
# RSC: Fix for CPU frequency applet
style "applet-text" = "panel"
{
fg[NORMAL] = @bg_color
}
widget_class "*CPUFreqApplet*" style:highest "applet-text"
# Firefox specific things:
#widget "MozillaGtkWidget*Menu*" style "default"
widget "MozillaGtkWidget*Tool*" style "toolbar-item"
#Change nautilus sidebar color
style "nautilus-sidebar"
{
GtkTreeView::even_row_color = "#D8E0E6"
}
widget_class "NautilusNavigationWindow.GtkTable.NautilusHorizontalSplitter.NautilusSidePane.GtkNotebook.*" style "nautilus-sidebar"

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 941 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 199 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

@ -0,0 +1,11 @@
[Desktop Entry]
Type=X-GNOME-Metatheme
Name=Dust Cold
Comment=Ubuntu Dust Cold theme
Encoding=UTF-8
[X-GNOME-Metatheme]
GtkTheme=Dust Cold
MetacityTheme=Dust Cold
IconTheme=Humanity-Dark
CursorTheme=DMZ-White

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 B

View File

@ -0,0 +1,414 @@
<?xml version="1.0"?>
<metacity_theme>
<info>
<name>Dust</name>
<author>Kido Mariano, Rico Sta. Cruz</author>
<copyright>GPL</copyright>
<date>Jul 28, 2008</date>
<description>Metacity theme</description>
</info>
<!--
General window layout (geometric stuff)
-->
<frame_geometry name="frame_geometry_normal" title_scale="medium" rounded_top_left="true" rounded_top_right="true">
<distance name="left_width" value="1"/>
<distance name="right_width" value="1"/>
<distance name="bottom_height" value="4"/>
<distance name="left_titlebar_edge" value="2"/>
<distance name="right_titlebar_edge" value="1"/>
<distance name="button_width" value="28"/>
<distance name="button_height" value="20"/>
<distance name="title_vertical_pad" value="1"/>
<border name="title_border" left="2" right="2" top="3" bottom="3"/>
<border name="button_border" left="0" right="0" top="2" bottom="1"/>
</frame_geometry>
<frame_geometry name="frame_geometry_abnormal" title_scale="medium" rounded_top_left="false" rounded_top_right="false">
<distance name="left_width" value="0"/>
<distance name="right_width" value="0"/>
<distance name="bottom_height" value="0"/>
<distance name="left_titlebar_edge" value="1"/>
<distance name="right_titlebar_edge" value="2"/>
<distance name="button_width" value="28"/>
<distance name="button_height" value="20"/>
<distance name="title_vertical_pad" value="0"/>
<border name="title_border" left="0" right="0" top="3" bottom="0"/>
<border name="button_border" left="0" right="0" top="2" bottom="1"/>
</frame_geometry>
<!--
Window Title
-->
<draw_ops name="draw_title_text_normal">
<title x="1" y="(((height - title_height) / 2) `max` 2) + 1" color="#1B1E1F"/>
<title x="0" y="(((height - title_height) / 2) `max` 2)" color="#FFFFFF"/>
</draw_ops>
<draw_ops name="draw_title_text_inactive">
<title x="0" y="(((height - title_height) / 2) `max` 2)" color="#727262"/>
</draw_ops>
<!--
Construct titlebar from rectangles instead so we can pick up the GTK theme
-->
<draw_ops name="draw_title">
<!-- Background gradient -->
<gradient type="diagonal" x="0" y="0" width="width+9" height="height">
<!--<color value="#4D5980"/>-->
<color value="shade/gtk:bg[SELECTED]/0.9"/>
<!--Static colors to match static menubar and all-->
<!--color value="#393E3F" /-->
<!--color value="#36393A" /-->
<color value="#333637" />
<color value="#303334" />
</gradient>
<!-- Topmost dark line -->
<line color="shade/gtk:bg[NORMAL]/0.30" x1="0" x2="width" y1="0" y2="0"/>
<!-- Darkening of the left arch -->
<line color="shade/gtk:bg[NORMAL]/0.30" x1="0" x2="4" y1="1" y2="1"/>
<line color="shade/gtk:bg[NORMAL]/0.30" x1="0" x2="2" y1="2" y2="2"/>
<line color="shade/gtk:bg[NORMAL]/0.30" x1="0" x2="1" y1="3" y2="3"/>
<line color="shade/gtk:bg[NORMAL]/0.30" x1="0" x2="1" y1="4" y2="4"/>
<line color="shade/gtk:bg[NORMAL]/0.30" x1="0" x2="0" y1="5" y2="20"/>
<!-- Top highlight -->
<!-- This uses <tint> (which supports alpha) instead of <line> (which doesn't) -->
<tint color="#ffffff" alpha="0.35" x="5" y="1" width="width - 10" height="1"/>
<!-- Upper-left highlight -->
<!-- Draw each pixel one by one. Again, using <tint> for alpha support. -->
<tint color="#ffffff" alpha="0.30" x="3" y="2" width="2" height="1"/>
<tint color="#ffffff" alpha="0.27" x="2" y="3" width="1" height="1"/>
<tint color="#ffffff" alpha="0.24" x="2" y="4" width="1" height="1"/>
<tint color="#ffffff" alpha="0.21" x="1" y="5" width="1" height="1"/>
<tint color="#ffffff" alpha="0.18" x="1" y="6" width="1" height="1"/>
<tint color="#ffffff" alpha="0.15" x="1" y="7" width="1" height="1"/>
<tint color="#ffffff" alpha="0.12" x="1" y="8" width="1" height="1"/>
<tint color="#ffffff" alpha="0.09" x="1" y="9" width="1" height="1"/>
<tint color="#ffffff" alpha="0.06" x="1" y="10" width="1" height="1"/>
<tint color="#ffffff" alpha="0.03" x="1" y="11" width="1" height="1"/>
<!-- Upper-right highlight -->
<!-- Same as above. -->
<tint color="#ffffff" alpha="0.30" x="width-5" y="2" width="2" height="1"/>
<tint color="#ffffff" alpha="0.27" x="width-3" y="3" width="1" height="1"/>
<tint color="#ffffff" alpha="0.24" x="width-3" y="4" width="1" height="1"/>
<tint color="#ffffff" alpha="0.21" x="width-2" y="5" width="1" height="1"/>
<tint color="#ffffff" alpha="0.18" x="width-2" y="6" width="1" height="1"/>
<tint color="#ffffff" alpha="0.15" x="width-2" y="7" width="1" height="1"/>
<tint color="#ffffff" alpha="0.12" x="width-2" y="8" width="1" height="1"/>
<tint color="#ffffff" alpha="0.09" x="width-2" y="9" width="1" height="1"/>
<tint color="#ffffff" alpha="0.06" x="width-2" y="10" width="1" height="1"/>
<tint color="#ffffff" alpha="0.03" x="width-2" y="11" width="1" height="1"/>
</draw_ops>
<draw_ops name="draw_title_inactive">
<!-- Background gradient -->
<gradient type="vertical" x="0" y="0" width="width+9" height="height">
<color value="#353839" />
<color value="#303334" />
</gradient>
<!-- Topmost dark line -->
<line color="shade/gtk:bg[NORMAL]/0.25" x1="1" x2="width-2" y1="0" y2="0"/>
<!-- Top highlight -->
<tint color="#ffffff" alpha="0.2" x="5" y="1" width="width - 10" height="1"/>
<!-- Lower-left highlight -->
<line color="shade/gtk:bg[NORMAL]/0.33" x1="3" x2 ="4" y1="2" y2="2" />
<line color="shade/gtk:bg[NORMAL]/0.32" x1="2" x2 ="2" y1="3" y2="4" />
<!-- Lower-left higlight fade -->
<gradient type="vertical" x="1" y="5" width="1" height="title_height - 4">
<color value="shade/gtk:bg[NORMAL]/0.30"/>
<color value="shade/gtk:bg[NORMAL]/0.25"/>
</gradient>
<!-- Upper right highlight -->
<line color="shade/gtk:bg[NORMAL]/0.30" x1="width-5" x2 ="width-4" y1="2" y2="2" />
<line color="shade/gtk:bg[NORMAL]/0.30" x1="width-3" x2 ="width-3" y1="3" y2="4" />
<!-- Lower-left higlight fade -->
<gradient type="vertical" x="width-2" y="5" width="1" height="title_height - 4">
<color value="shade/gtk:bg[NORMAL]/0.30"/>
<color value="shade/gtk:bg[NORMAL]/0.25"/>
</gradient>
</draw_ops>
<draw_ops name="draw_title_maximized">
<!-- Background gradient -->
<gradient type="vertical" x="0" y="0" width="width+9" height="height">
<!--<color value="#80594D"/>-->
<color value="shade/gtk:bg[SELECTED]/0.6"/>
<!--Static colors to mach static menubar and all-->
<color value="#393E3F" />
<color value="#36393A" />
<color value="#333637" />
<!--color value="shade/gtk:bg[NORMAL]/0.29" />
<color value="shade/gtk:bg[NORMAL]/0.27" />
<color value="shade/gtk:bg[NORMAL]/0.25" /-->
<color value="#303334" />
<!--color value="shade/gtk:bg[NORMAL]/0.24" /-->
</gradient>
<!-- Topmost dark line -->
<line color="shade/gtk:bg[NORMAL]/0.30" x1="0" x2="width" y1="0" y2="0"/>
<!-- Top highlight -->
<!-- This uses <tint> (which supports alpha) instead of <line> (which doesn't) -->
<tint color="#ffffff" alpha="0.35" x="1" y="1" width="width - 2" height="1"/>
</draw_ops>
<draw_ops name="draw_title_maximized_inactive">
<!-- Background gradient -->
<gradient type="vertical" x="0" y="0" width="width+9" height="height">
<!--<color value="#80594D"/>-->
<color value="#36393A" />
<color value="#303334" />
</gradient>
<!-- Topmost dark line -->
<line color="shade/gtk:bg[NORMAL]/0.30" x1="0" x2="width" y1="0" y2="0"/>
<!-- Top highlight -->
<!-- This uses <tint> (which supports alpha) instead of <line> (which doesn't) -->
<tint color="#ffffff" alpha="0.35" x="1" y="1" width="width - 2" height="1"/>
</draw_ops>
<!--
The frame around windows
-->
<draw_ops name="draw_frame">
<rectangle color="shade/gtk:bg[NORMAL]/0.25" x="0" y="0" width="width" height="height" filled="true"/>
<!-- RSC: Subtle gradient on left/right edges to match the menubar -->
<gradient type="vertical" x="0" y="0" width="width" height="100">
<color value="shade/gtk:bg[NORMAL]/0.25"/>
<color value="shade/gtk:bg[NORMAL]/0.15"/>
<color value="shade/gtk:bg[NORMAL]/0.25"/>
</gradient>
</draw_ops>
<!--Borderless only: make bottom border less apparent. We can do this now since our statusbars are light.-->
<draw_ops name="bottom_edge">
<rectangle color="shade/gtk:bg[NORMAL]/0.25" x="0" y="0" width="width" height="height" filled="true"/>
<gradient type="vertical" x="1" y="height-6" width="width-2" height="5">
<color value="shade/gtk:bg[NORMAL]/0.85"/>
<color value="shade/gtk:bg[NORMAL]/0.5"/>
</gradient>
</draw_ops>
<!--
Buttons
-->
<!-- close button-->
<draw_ops name="button_close_normal">
<image filename="button_close_normal.png" x="0" y="1" width="object_width" height="object_height"/>
</draw_ops>
<draw_ops name="button_close_prelight">
<image filename="button_close_prelight.png" x="0" y="1" width="object_width" height="object_height"/>
</draw_ops>
<draw_ops name="button_close_inactive_prelight">
<image filename="button_close_prelight.png" x="0" y="1" width="object_width" height="object_height" alpha="0.3"/>
</draw_ops>
<draw_ops name="button_close_pressed">
<image filename="button_close_pressed.png" x="0" y="1" width="object_width" height="object_height"/>
</draw_ops>
<draw_ops name="button_close_inactive">
<image filename="button_close_normal.png" x="0" y="1" width="object_width" height="object_height" alpha="0.3"/>
</draw_ops>
<!-- maximize button-->
<draw_ops name="button_max_normal">
<image filename="button_max_normal.png" x="0" y="1" width="object_width" height="object_height"/>
</draw_ops>
<draw_ops name="button_max_prelight">
<image filename="button_max_prelight.png" x="0" y="1" width="object_width" height="object_height"/>
</draw_ops>
<draw_ops name="button_max_inactive_prelight">
<image filename="button_max_prelight.png" x="0" y="1" width="object_width" height="object_height" alpha="0.3"/>
</draw_ops>
<draw_ops name="button_max_pressed">
<image filename="button_max_pressed.png" x="0" y="1" width="object_width" height="object_height"/>
</draw_ops>
<draw_ops name="button_max_inactive">
<image filename="button_max_normal.png" x="0" y="1" width="object_width" height="object_height" alpha="0.3"/>
</draw_ops>
<!-- minimize button-->
<draw_ops name="button_min_normal">
<image filename="button_min_normal.png" x="0" y="1" width="object_width" height="object_height"/>
</draw_ops>
<draw_ops name="button_min_prelight">
<image filename="button_min_prelight.png" x="0" y="1" width="object_width" height="object_height"/>
</draw_ops>
<draw_ops name="button_min_inactive_prelight">
<image filename="button_min_prelight.png" x="0" y="1" width="object_width" height="object_height" alpha="0.3"/>
</draw_ops>
<draw_ops name="button_min_pressed">
<image filename="button_min_pressed.png" x="0" y="1" width="object_width" height="object_height"/>
</draw_ops>
<draw_ops name="button_min_inactive">
<image filename="button_min_normal.png" x="0" y="1" width="object_width" height="object_height" alpha="0.3"/>
</draw_ops>
<!-- menu button -->
<!--
<draw_ops name="button_menu_normal">
<image filename="button_menu_normal.png" x="0" y="2" width="object_width" height="object_height"/>
</draw_ops>
<draw_ops name="button_menu_prelight">
<image filename="button_menu_prelight.png" x="0" y="2" width="object_width" height="object_height"/>
</draw_ops>
<draw_ops name="button_menu_inactive_prelight">
<image filename="button_menu_prelight.png" x="0" y="2" width="object_width" height="object_height" alpha="0.3"/>
</draw_ops>
<draw_ops name="button_menu_pressed">
<image filename="button_menu_pressed.png" x="0" y="2" width="object_width" height="object_height"/>
</draw_ops>
<draw_ops name="button_menu_inactive">
<image filename="button_menu_normal.png" x="0" y="2" width="object_width" height="object_height" alpha="0.3"/>
</draw_ops>-->
<!-- menu icon -->
<draw_ops name="button_menu_normal">
<icon x="6" y="2" width="mini_icon_width" height="mini_icon_height"/>
</draw_ops>
<draw_ops name="button_menu_prelight">
<icon x="6" y="2" width="mini_icon_width" height="mini_icon_height"/>
</draw_ops>
<draw_ops name="button_menu_inactive_prelight">
<icon x="6" y="2" width="mini_icon_width" height="mini_icon_height" alpha="0.3"/>
</draw_ops>
<draw_ops name="button_menu_pressed">
<icon x="6" y="2" width="mini_icon_width" height="mini_icon_height"/>
</draw_ops>
<draw_ops name="button_menu_inactive">
<icon x="6" y="2" width="mini_icon_width" height="mini_icon_height" alpha="0.3"/>
</draw_ops>
<!--
Frame styles
-->
<!-- normal -->
<frame_style name="frame_style_normal_focused" geometry="frame_geometry_normal">
<piece position="title" draw_ops="draw_title_text_normal"/>
<piece position="titlebar" draw_ops="draw_title"/>
<piece position="left_edge" draw_ops="draw_frame"/>
<piece position="right_edge" draw_ops="draw_frame"/>
<piece position="bottom_edge" draw_ops="bottom_edge"/>
<button function="close" state="normal" draw_ops="button_close_normal"/>
<button function="close" state="prelight" draw_ops="button_close_prelight"/>
<button function="close" state="pressed" draw_ops="button_close_pressed"/>
<button function="minimize" state="normal" draw_ops="button_min_normal"/>
<button function="minimize" state="prelight" draw_ops="button_min_prelight"/>
<button function="minimize" state="pressed" draw_ops="button_min_pressed"/>
<button function="maximize" state="normal" draw_ops="button_max_normal"/>
<button function="maximize" state="prelight" draw_ops="button_max_prelight"/>
<button function="maximize" state="pressed" draw_ops="button_max_pressed"/>
<button function="menu" state="normal" draw_ops="button_menu_normal"/>
<button function="menu" state="prelight" draw_ops="button_menu_prelight"/>
<button function="menu" state="pressed" draw_ops="button_menu_pressed"/>
</frame_style>
<frame_style name="frame_style_normal_unfocused" geometry="frame_geometry_normal">
<piece position="title" draw_ops="draw_title_text_inactive"/>
<piece position="titlebar" draw_ops="draw_title_inactive"/>
<piece position="left_edge" draw_ops="draw_frame"/>
<piece position="right_edge" draw_ops="draw_frame"/>
<piece position="bottom_edge" draw_ops="bottom_edge"/>
<button function="close" state="normal" draw_ops="button_close_inactive"/>
<button function="close" state="prelight" draw_ops="button_close_inactive_prelight"/>
<button function="close" state="pressed" draw_ops="button_close_inactive"/>
<button function="minimize" state="normal" draw_ops="button_min_inactive"/>
<button function="minimize" state="prelight" draw_ops="button_min_inactive_prelight"/>
<button function="minimize" state="pressed" draw_ops="button_min_inactive"/>
<button function="maximize" state="normal" draw_ops="button_max_inactive"/>
<button function="maximize" state="prelight" draw_ops="button_max_inactive_prelight"/>
<button function="maximize" state="pressed" draw_ops="button_max_inactive"/>
<button function="menu" state="normal" draw_ops="button_menu_inactive"/>
<button function="menu" state="prelight" draw_ops="button_menu_inactive_prelight"/>
<button function="menu" state="pressed" draw_ops="button_menu_inactive"/>
</frame_style>
<frame_style name="frame_style_maximized_focused" geometry="frame_geometry_abnormal">
<piece position="title" draw_ops="draw_title_text_normal"/>
<piece position="titlebar" draw_ops="draw_title_maximized"/>
<piece position="left_edge" draw_ops="draw_frame"/>
<piece position="right_edge" draw_ops="draw_frame"/>
<piece position="bottom_edge" draw_ops="bottom_edge"/>
<button function="close" state="normal" draw_ops="button_close_normal"/>
<button function="close" state="prelight" draw_ops="button_close_prelight"/>
<button function="close" state="pressed" draw_ops="button_close_pressed"/>
<button function="minimize" state="normal" draw_ops="button_min_normal"/>
<button function="minimize" state="prelight" draw_ops="button_min_prelight"/>
<button function="minimize" state="pressed" draw_ops="button_min_pressed"/>
<button function="maximize" state="normal" draw_ops="button_max_normal"/>
<button function="maximize" state="prelight" draw_ops="button_max_prelight"/>
<button function="maximize" state="pressed" draw_ops="button_max_pressed"/>
<button function="menu" state="normal" draw_ops="button_menu_normal"/>
<button function="menu" state="prelight" draw_ops="button_menu_prelight"/>
<button function="menu" state="pressed" draw_ops="button_menu_normal"/>
</frame_style>
<frame_style name="frame_style_maximized_unfocused" geometry="frame_geometry_abnormal">
<piece position="title" draw_ops="draw_title_text_inactive"/>
<piece position="titlebar" draw_ops="draw_title_maximized_inactive"/>
<piece position="left_edge" draw_ops="draw_frame"/>
<piece position="right_edge" draw_ops="draw_frame"/>
<piece position="bottom_edge" draw_ops="bottom_edge"/>
<button function="close" state="normal" draw_ops="button_close_inactive"/>
<button function="close" state="prelight" draw_ops="button_close_prelight"/>
<button function="close" state="pressed" draw_ops="button_close_inactive"/>
<button function="minimize" state="normal" draw_ops="button_min_inactive"/>
<button function="minimize" state="prelight" draw_ops="button_min_prelight"/>
<button function="minimize" state="pressed" draw_ops="button_min_inactive"/>
<button function="maximize" state="normal" draw_ops="button_max_inactive"/>
<button function="maximize" state="prelight" draw_ops="button_max_prelight"/>
<button function="maximize" state="pressed" draw_ops="button_max_inactive"/>
<button function="menu" state="normal" draw_ops="button_menu_inactive"/>
<button function="menu" state="prelight" draw_ops="button_menu_inactive"/>
<button function="menu" state="pressed" draw_ops="button_menu_inactive"/>
</frame_style>
<frame_style_set name="frame_style_set_normal">
<frame focus="yes" state="normal" resize="both" style="frame_style_normal_focused"/>
<frame focus="no" state="normal" resize="both" style="frame_style_normal_unfocused"/>
<frame focus="yes" state="maximized" style="frame_style_maximized_focused"/>
<frame focus="no" state="maximized" style="frame_style_maximized_unfocused"/>
<frame focus="yes" state="shaded" style="frame_style_normal_focused"/>
<frame focus="no" state="shaded" style="frame_style_normal_unfocused"/>
<frame focus="yes" state="maximized_and_shaded" style="frame_style_maximized_focused"/>
<frame focus="no" state="maximized_and_shaded" style="frame_style_maximized_unfocused"/>
</frame_style_set>
<window type="normal" style_set="frame_style_set_normal"/>
<window type="dialog" style_set="frame_style_set_normal"/>
<window type="modal_dialog" style_set="frame_style_set_normal"/>
<window type="menu" style_set="frame_style_set_normal"/>
<window type="utility" style_set="frame_style_set_normal"/>
<window type="border" style_set="frame_style_set_normal"/>
<menu_icon function="close" state="normal" draw_ops="button_close_normal"/>
<menu_icon function="maximize" state="normal" draw_ops="button_max_normal"/>
<menu_icon function="unmaximize" state="normal" draw_ops="button_max_normal"/>
<menu_icon function="minimize" state="normal" draw_ops="button_min_normal"/>
</metacity_theme>

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Some files were not shown because too many files have changed in this diff Show More