Initial commit
This commit is contained in:
commit
d66e685626
|
@ -0,0 +1,30 @@
|
|||
XTerm.*.metaSendsEscape: True
|
||||
XTerm.*.altSendsEscape: True
|
||||
|
||||
urxvt*loginShell:true
|
||||
urxvt*transparent:true
|
||||
urxvt*shading:10
|
||||
urxvt*scrollBar:false
|
||||
urxvt*background:Black
|
||||
urxvt*foreground:White
|
||||
urxvt*saveLines:65536
|
||||
urxvt*font:*-*-fixed-medium-r-normal--*-110-*-*-*-*-iso8859-1
|
||||
urxvt*boldFont:*-*-fixed-bold-r-normal--*-*-110-*-*-*-*-iso8859-1
|
||||
urxvt*cursorBlink:true
|
||||
urxvt*modifier:mod5
|
||||
urxvt*perl-ext:
|
||||
urxvt*perl-ext-common:
|
||||
|
||||
x-terminal-emulator*loginShell:true
|
||||
x-terminal-emulator*transparent:true
|
||||
x-terminal-emulator*shading:10
|
||||
x-terminal-emulator*scrollBar:false
|
||||
x-terminal-emulator*background:Black
|
||||
x-terminal-emulator*foreground:White
|
||||
x-terminal-emulator*saveLines:65536
|
||||
x-terminal-emulator*font:*-*-fixed-medium-r-normal--*-110-*-*-*-*-iso8859-1
|
||||
x-terminal-emulator*boldFont:*-*-fixed-bold-r-normal--*-*-110-*-*-*-*-iso8859-1
|
||||
x-terminal-emulator*cursorBlink:true
|
||||
x-terminal-emulator*modifier:mod5
|
||||
x-terminal-emulator*perl-ext:
|
||||
x-terminal-emulator*perl-ext-common:
|
|
@ -0,0 +1,26 @@
|
|||
#!/bin/sh
|
||||
|
||||
# wget -qO- dotfiles.mandark.fr/all | sh
|
||||
|
||||
backup_directory="$(date +%Y-%m-%d-%H:%M:%S)"
|
||||
|
||||
mkdir -p ~/$backup_directory
|
||||
|
||||
for file in emacs bashrc Xresources gitconfig screenrc rc.xml
|
||||
do
|
||||
case $file in
|
||||
rc.xml)
|
||||
if [ -d ~/.config/openbox/ ]
|
||||
then
|
||||
[ -f ~/.config/openbox/rc.xml ] && mv ~/.config/openbox/rc.xml ~/$backup_directory/
|
||||
wget -qO ~/.config/openbox/rc.xml mandark.fr/dotfiles/$file
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
[ -f ~/.$file ] && mv ~/.$file ~/$backup_directory/
|
||||
wget -qO ~/.$file mandark.fr/dotfiles/$file
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
echo "Your old files are in ~/$backup_directory"
|
|
@ -0,0 +1,234 @@
|
|||
# Try to restore environment variable of an ssh-agent
|
||||
ssh-agent-restore()
|
||||
{
|
||||
QUIET="$1"
|
||||
QTY="$(ls -1 /tmp/ssh-*/* 2>/dev/null | wc -l)"
|
||||
|
||||
if [ z"$QTY" = z"1" ]
|
||||
then
|
||||
export SSH_AUTH_SOCK="$(printf "%s" /tmp/ssh-*/*)"
|
||||
export SSH_AGENT_PID="${SSH_AUTH_SOCK##/*/*.}"
|
||||
elif [ z"$QTY" = z"0" -a -z "$QUIET" ]
|
||||
then
|
||||
printf "No ssh-agent found.\n" 1>&2
|
||||
elif [ -z "$QUIET" ]
|
||||
then
|
||||
select AUTH_SOCK in /tmp/ssh-*/*
|
||||
do
|
||||
export SSH_AUTH_SOCK="$AUTH_SOCK"
|
||||
export SSH_AGENT_PID="${SSH_AUTH_SOCK##/*/*.}"
|
||||
return
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
# Do this even in non-interactive shells, this permit :
|
||||
# ssh host1 ssh host2 ssh host3
|
||||
# If you only have one agent running on each host, it will use it.
|
||||
ssh-agent-restore --quiet
|
||||
|
||||
# If not running interactively, don't do anything more
|
||||
[ -z "$PS1" ] && return
|
||||
[ "$(cut -d. -f1 /proc/loadavg)" -gt 2 ] && return
|
||||
|
||||
DEBEMAIL=julien
|
||||
DEBEMAIL=$DEBEMAIL@
|
||||
DEBEMAIL=${DEBEMAIL}palard.fr
|
||||
DEBFULLNAME="Julien Palard"
|
||||
|
||||
shopt -s checkwinsize
|
||||
shopt -s cdspell
|
||||
shopt -s dirspell 2>/dev/null # Only in bash 4
|
||||
shopt -s autocd 2>/dev/null # Only in bash 4
|
||||
shopt -s globstar 2>/dev/null # Only in bash 4
|
||||
shopt -s nocaseglob
|
||||
|
||||
# http://nion.modprobe.de/blog/archives/572-less-colors-for-man-pages.html
|
||||
export LESS_TERMCAP_mb=$'\E[01;31m' # debut de blink
|
||||
export LESS_TERMCAP_md=$'\E[01;31m' # debut de gras
|
||||
export LESS_TERMCAP_me=$'\E[0m' # fin
|
||||
export LESS_TERMCAP_so=$'\E[01;44;33m' # début de la ligne d'état
|
||||
export LESS_TERMCAP_se=$'\E[0m' # fin
|
||||
export LESS_TERMCAP_us=$'\E[01;32m' # début de souligné
|
||||
export LESS_TERMCAP_ue=$'\E[0m' # fin
|
||||
export DEBEMAIL DEBFULLNAME
|
||||
export PATH="$PATH:~/mbin"
|
||||
export EDITOR=emacs
|
||||
export PYTHONIOENCODING=utf_8
|
||||
export LS_OPTIONS='--color=auto'
|
||||
|
||||
export HISTCONTROL=ignoredups
|
||||
export HISTFILESIZE=5000
|
||||
export HISTSIZE=5000
|
||||
|
||||
umask 022
|
||||
eval "`dircolors`"
|
||||
set -C
|
||||
|
||||
# I don't like the default blue (That is too dark for me)
|
||||
tput initc 12 400 400 1000
|
||||
|
||||
str_sum()
|
||||
{
|
||||
BC=$(which bc)
|
||||
if [ -z "$1" ]
|
||||
then
|
||||
echo "Usage str_sum STRING"
|
||||
return
|
||||
fi
|
||||
if [ -x "$BC" ] ; then
|
||||
printf "%s" "$1" | hexdump -b | head -n 1 | tr ' ' '+' \
|
||||
| sed 's/\+*$//g' | bc
|
||||
else
|
||||
echo 0
|
||||
fi
|
||||
}
|
||||
|
||||
HOSTNAME_SUM=$(str_sum "$(hostname)")
|
||||
HOSTNAME_BOLD=$(( ($HOSTNAME_SUM + 1) % 2))
|
||||
HOSTNAME_HUE=$(( ($HOSTNAME_SUM + 3) % 6 + 31))
|
||||
|
||||
USERNAME_SUM=$(str_sum "$(whoami)")
|
||||
USERNAME_BOLD=$(( ($USERNAME_SUM + 1) % 2))
|
||||
USERNAME_HUE=$(( ($USERNAME_SUM + 2) % 6 + 31))
|
||||
|
||||
HOSTNAME_COLOR=$'\E'"[$HOSTNAME_BOLD;${HOSTNAME_HUE}m"
|
||||
USERNAME_COLOR=$'\E'"[$USERNAME_BOLD;${USERNAME_HUE}m"
|
||||
|
||||
WHITE=$'\E[00m'
|
||||
|
||||
if [ $(id -u) -eq 0 ]
|
||||
then
|
||||
alias rm='rm -i'
|
||||
alias cp='cp -i'
|
||||
alias mv='mv -i'
|
||||
fi
|
||||
|
||||
# make less more friendly for non-text input files, see lesspipe(1)
|
||||
[ -x /usr/bin/lesspipe ] && eval "$(lesspipe)"
|
||||
|
||||
[ "$TERM" != 'linux' -a z"$TERM" != z'eterm-color' ] && TITLE="\[\033]0;\u@\H:\w\a\]" || TITLE=''
|
||||
|
||||
export PS1="$TITLE\[$USERNAME_COLOR\]\u\[$WHITE\]@\[$HOSTNAME_COLOR\]\H\[$WHITE\]"'\$ '
|
||||
|
||||
alias grep="grep --color"
|
||||
alias ls='ls $LS_OPTIONS'
|
||||
alias ll='ls $LS_OPTIONS -l'
|
||||
alias l='ls $LS_OPTIONS -lA'
|
||||
alias ...=".. 2"
|
||||
alias ....=".. 3"
|
||||
alias .....=".. 4"
|
||||
alias scr='screen -D -R -U -h 424242'
|
||||
alias lintian='lintian --pedantic -v -iI --display-experimental --show-overrides'
|
||||
alias fingerprint='find /etc/ssh -name "*.pub" -exec ssh-keygen -l -f {} \;'
|
||||
# My old emacs alias (Opening file with file:lineno) is replaced by a function
|
||||
# in my .emacs.
|
||||
alias e='emacs'
|
||||
|
||||
if [ -f /etc/bash_completion ]; then
|
||||
. /etc/bash_completion
|
||||
fi
|
||||
|
||||
if [ -f ~/.bash_aliases ]; then
|
||||
. ~/.bash_aliases
|
||||
fi
|
||||
|
||||
if [ -f ~/.my_bashrc ]; then
|
||||
. ~/.my_bashrc
|
||||
fi
|
||||
|
||||
..()
|
||||
{
|
||||
for ((j=${1:-1},i=0;i<j;i++))
|
||||
do
|
||||
builtin cd ..
|
||||
done
|
||||
}
|
||||
|
||||
# Json pretty printer
|
||||
jsonpp()
|
||||
{
|
||||
input="$([ $# -gt 0 ] && printf "%s\n" "$*" || cat -)"
|
||||
if ! [ z"$(which pygmentize)" = z"" ]
|
||||
then
|
||||
printf "%s" "$input" | python -mjson.tool | pygmentize -l js || printf "%s\n" "$input"
|
||||
else
|
||||
printf "%s" "$input" | python -minput.tool || printf "%s\n" "$input"
|
||||
fi
|
||||
}
|
||||
|
||||
urldecode()
|
||||
{
|
||||
input="$([ $# -gt 0 ] && printf "%s\n" "$*" || cat -)"
|
||||
python -c "import urllib2, sys; print urllib2.unquote(sys.argv[1])" "$input"
|
||||
}
|
||||
|
||||
urlencode()
|
||||
{
|
||||
input="$([ $# -gt 0 ] && printf "%s\n" "$*" || cat -)"
|
||||
python -c "import urllib2, sys; print urllib2.quote(sys.argv[1])" "$input"
|
||||
}
|
||||
|
||||
# Removes *~ and #*# files in curent folder, for a depth limited to 3 folders.
|
||||
clean()
|
||||
{
|
||||
find -maxdepth 3 -name .emacs_backups -prune \
|
||||
-o \( -type f -a \
|
||||
\( -name '*~' -o -name '#*#' \) \
|
||||
\) \
|
||||
-print0 | xargs -0 rm -f
|
||||
}
|
||||
|
||||
# Download and apply Julien's bashrc
|
||||
upgrade()
|
||||
{
|
||||
rm -f ~/.bashrc.1
|
||||
echo "Downloading mandark's bashrc..."
|
||||
wget --timeout=1 --quiet http://mdk.fr/dotfiles/bashrc?42 -O ~/.bashrc.1
|
||||
if grep -q grep ~/.bashrc.1
|
||||
then
|
||||
DIFF="$(diff ~/.bashrc ~/.bashrc.1)"
|
||||
if [ -z "$DIFF" ]
|
||||
then
|
||||
echo "Nothing to upgrade"
|
||||
else
|
||||
echo "Here is the applied patch :"
|
||||
printf "%s\n" "$DIFF"
|
||||
mv -f ~/.bashrc.1 ~/.bashrc
|
||||
echo "type . ~/.bashrc to load your new bashrc file !"
|
||||
fi
|
||||
else
|
||||
rm -f ~/.bashrc.1
|
||||
fi
|
||||
}
|
||||
|
||||
# Like pydoc, opens a manual page of a PHP function.
|
||||
phpdoc()
|
||||
{
|
||||
lynx "/usr/share/doc/php-doc/html/function.$(printf "%s" "$*" | sed 's/[^a-zA-Z0-9]/-/g').html"
|
||||
}
|
||||
|
||||
|
||||
|
||||
# From : http://jeroenjanssens.com/2013/08/16/quickly-navigate-your-filesystem-from-the-command-line.html
|
||||
export MARKPATH="$HOME/.marks"
|
||||
function jump
|
||||
{
|
||||
cd -P "$MARKPATH/$1" 2>/dev/null || echo "No such mark: $1"
|
||||
}
|
||||
|
||||
function mark
|
||||
{
|
||||
mkdir -p "$MARKPATH"
|
||||
ln -s "$(pwd)" "$MARKPATH/$1"
|
||||
}
|
||||
|
||||
function unmark
|
||||
{
|
||||
rm -i "$MARKPATH/$1"
|
||||
}
|
||||
|
||||
function marks
|
||||
{
|
||||
ls -l "$MARKPATH" | sed 's/ / /g' | cut -d' ' -f9- | sed 's/ -/\t-/g' && echo
|
||||
}
|
|
@ -0,0 +1,781 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Do not edit this file, it will be overwritten on install.
|
||||
Copy the file to $HOME/.config/openbox/ instead. -->
|
||||
<openbox_config xmlns="http://openbox.org/3.4/rc" xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
<resistance>
|
||||
<strength>20</strength>
|
||||
<screen_edge_strength>20</screen_edge_strength>
|
||||
</resistance>
|
||||
<focus>
|
||||
<focusNew>yes</focusNew>
|
||||
<!-- always try to focus new windows when they appear. other rules do
|
||||
apply -->
|
||||
<followMouse>yes</followMouse>
|
||||
<!-- move focus to a window when you move the mouse into it -->
|
||||
<focusLast>no</focusLast>
|
||||
<!-- focus the last used window when changing desktops, instead of the one
|
||||
under the mouse pointer. when followMouse is enabled -->
|
||||
<underMouse>no</underMouse>
|
||||
<!-- move focus under the mouse, even when the mouse is not moving -->
|
||||
<focusDelay>200</focusDelay>
|
||||
<!-- when followMouse is enabled, the mouse must be inside the window for
|
||||
this many milliseconds (1000 = 1 sec) before moving focus to it -->
|
||||
<raiseOnFocus>no</raiseOnFocus>
|
||||
<!-- when followMouse is enabled, and a window is given focus by moving the
|
||||
mouse into it, also raise the window -->
|
||||
</focus>
|
||||
<placement>
|
||||
<policy>UnderMouse</policy>
|
||||
<!-- 'Smart' or 'UnderMouse' -->
|
||||
<center>yes</center>
|
||||
<!-- whether to place windows in the center of the free area found or
|
||||
the top left corner -->
|
||||
<monitor>Primary</monitor>
|
||||
<!-- with Smart placement on a multi-monitor system, try to place new windows
|
||||
on: 'Any' - any monitor, 'Mouse' - where the mouse is, 'Active' - where
|
||||
the active window is, 'Primary' - only on the primary monitor -->
|
||||
<primaryMonitor>1</primaryMonitor>
|
||||
<!-- The monitor where Openbox should place popup dialogs such as the
|
||||
focus cycling popup, or the desktop switch popup. It can be an index
|
||||
from 1, specifying a particular monitor. Or it can be one of the
|
||||
following: 'Mouse' - where the mouse is, or
|
||||
'Active' - where the active window is -->
|
||||
</placement>
|
||||
<theme>
|
||||
<name>Onyx</name>
|
||||
<titleLayout>NLIMC</titleLayout>
|
||||
<!--
|
||||
available characters are NDSLIMC, each can occur at most once.
|
||||
N: window icon
|
||||
L: window label (AKA title).
|
||||
I: iconify
|
||||
M: maximize
|
||||
C: close
|
||||
S: shade (roll up/down)
|
||||
D: omnipresent (on all desktops).
|
||||
-->
|
||||
<keepBorder>no</keepBorder>
|
||||
<animateIconify>no</animateIconify>
|
||||
<font place="ActiveWindow">
|
||||
<name>sans</name>
|
||||
<size>8</size>
|
||||
<!-- font size in points -->
|
||||
<weight>bold</weight>
|
||||
<!-- 'bold' or 'normal' -->
|
||||
<slant>normal</slant>
|
||||
<!-- 'italic' or 'normal' -->
|
||||
</font>
|
||||
<font place="InactiveWindow">
|
||||
<name>sans</name>
|
||||
<size>8</size>
|
||||
<!-- font size in points -->
|
||||
<weight>bold</weight>
|
||||
<!-- 'bold' or 'normal' -->
|
||||
<slant>normal</slant>
|
||||
<!-- 'italic' or 'normal' -->
|
||||
</font>
|
||||
<font place="MenuHeader">
|
||||
<name>sans</name>
|
||||
<size>9</size>
|
||||
<!-- font size in points -->
|
||||
<weight>normal</weight>
|
||||
<!-- 'bold' or 'normal' -->
|
||||
<slant>normal</slant>
|
||||
<!-- 'italic' or 'normal' -->
|
||||
</font>
|
||||
<font place="MenuItem">
|
||||
<name>sans</name>
|
||||
<size>9</size>
|
||||
<!-- font size in points -->
|
||||
<weight>normal</weight>
|
||||
<!-- 'bold' or 'normal' -->
|
||||
<slant>normal</slant>
|
||||
<!-- 'italic' or 'normal' -->
|
||||
</font>
|
||||
<font place="ActiveOnScreenDisplay">
|
||||
<name>sans</name>
|
||||
<size>9</size>
|
||||
<!-- font size in points -->
|
||||
<weight>bold</weight>
|
||||
<!-- 'bold' or 'normal' -->
|
||||
<slant>normal</slant>
|
||||
<!-- 'italic' or 'normal' -->
|
||||
</font>
|
||||
<font place="InactiveOnScreenDisplay">
|
||||
<name>sans</name>
|
||||
<size>9</size>
|
||||
<!-- font size in points -->
|
||||
<weight>bold</weight>
|
||||
<!-- 'bold' or 'normal' -->
|
||||
<slant>normal</slant>
|
||||
<!-- 'italic' or 'normal' -->
|
||||
</font>
|
||||
</theme>
|
||||
<desktops>
|
||||
<!-- this stuff is only used at startup, pagers allow you to change them
|
||||
during a session
|
||||
|
||||
these are default values to use when other ones are not already set
|
||||
by other applications, or saved in your session
|
||||
|
||||
use obconf if you want to change these without having to log out
|
||||
and back in -->
|
||||
<number>4</number>
|
||||
<firstdesk>1</firstdesk>
|
||||
<names>
|
||||
<!-- set names up here if you want to, like this:
|
||||
<name>desktop 1</name>
|
||||
<name>desktop 2</name>
|
||||
-->
|
||||
</names>
|
||||
<popupTime>875</popupTime>
|
||||
<!-- The number of milliseconds to show the popup for when switching
|
||||
desktops. Set this to 0 to disable the popup. -->
|
||||
</desktops>
|
||||
<resize>
|
||||
<drawContents>no</drawContents>
|
||||
<popupShow>Nonpixel</popupShow>
|
||||
<!-- 'Always', 'Never', or 'Nonpixel' (xterms and such) -->
|
||||
<popupPosition>Center</popupPosition>
|
||||
<!-- 'Center', 'Top', or 'Fixed' -->
|
||||
<popupFixedPosition>
|
||||
<!-- these are used if popupPosition is set to 'Fixed' -->
|
||||
<x>10</x>
|
||||
<!-- positive number for distance from left edge, negative number for
|
||||
distance from right edge, or 'Center' -->
|
||||
<y>10</y>
|
||||
<!-- positive number for distance from top edge, negative number for
|
||||
distance from bottom edge, or 'Center' -->
|
||||
</popupFixedPosition>
|
||||
</resize>
|
||||
<!-- You can reserve a portion of your screen where windows will not cover when
|
||||
they are maximized, or when they are initially placed.
|
||||
Many programs reserve space automatically, but you can use this in other
|
||||
cases. -->
|
||||
<margins>
|
||||
<top>0</top>
|
||||
<bottom>0</bottom>
|
||||
<left>0</left>
|
||||
<right>0</right>
|
||||
</margins>
|
||||
<keyboard>
|
||||
<chainQuitKey>C-g</chainQuitKey>
|
||||
<!-- Keybindings for desktop switching -->
|
||||
<keybind key="C-A-Left">
|
||||
<action name="GoToDesktop">
|
||||
<to>left</to>
|
||||
<wrap>no</wrap>
|
||||
</action>
|
||||
</keybind>
|
||||
<keybind key="C-A-Right">
|
||||
<action name="GoToDesktop">
|
||||
<to>right</to>
|
||||
<wrap>no</wrap>
|
||||
</action>
|
||||
</keybind>
|
||||
<keybind key="C-A-Up">
|
||||
<action name="GoToDesktop">
|
||||
<to>up</to>
|
||||
<wrap>no</wrap>
|
||||
</action>
|
||||
</keybind>
|
||||
<keybind key="C-A-Down">
|
||||
<action name="GoToDesktop">
|
||||
<to>down</to>
|
||||
<wrap>no</wrap>
|
||||
</action>
|
||||
</keybind>
|
||||
<keybind key="S-A-Left">
|
||||
<action name="SendToDesktop">
|
||||
<to>left</to>
|
||||
<wrap>no</wrap>
|
||||
</action>
|
||||
</keybind>
|
||||
<keybind key="S-A-Right">
|
||||
<action name="SendToDesktop">
|
||||
<to>right</to>
|
||||
<wrap>no</wrap>
|
||||
</action>
|
||||
</keybind>
|
||||
<keybind key="S-A-Up">
|
||||
<action name="SendToDesktop">
|
||||
<to>up</to>
|
||||
<wrap>no</wrap>
|
||||
</action>
|
||||
</keybind>
|
||||
<keybind key="S-A-Down">
|
||||
<action name="SendToDesktop">
|
||||
<to>down</to>
|
||||
<wrap>no</wrap>
|
||||
</action>
|
||||
</keybind>
|
||||
<keybind key="W-F1">
|
||||
<action name="GoToDesktop">
|
||||
<to>1</to>
|
||||
</action>
|
||||
</keybind>
|
||||
<keybind key="W-F2">
|
||||
<action name="GoToDesktop">
|
||||
<to>2</to>
|
||||
</action>
|
||||
</keybind>
|
||||
<keybind key="W-F3">
|
||||
<action name="GoToDesktop">
|
||||
<to>3</to>
|
||||
</action>
|
||||
</keybind>
|
||||
<keybind key="W-F4">
|
||||
<action name="GoToDesktop">
|
||||
<to>4</to>
|
||||
</action>
|
||||
</keybind>
|
||||
<keybind key="W-d">
|
||||
<action name="ToggleShowDesktop"/>
|
||||
</keybind>
|
||||
<!-- Keybindings for windows -->
|
||||
<keybind key="A-F4">
|
||||
<action name="Close"/>
|
||||
</keybind>
|
||||
<keybind key="A-Escape">
|
||||
<action name="Lower"/>
|
||||
<action name="FocusToBottom"/>
|
||||
<action name="Unfocus"/>
|
||||
</keybind>
|
||||
<!-- Take a screenshot of the current window with gnome-screenshot when Alt+Print are pressed -->
|
||||
<keybind key="A-Print">
|
||||
<action name="Execute">
|
||||
<command>gnome-screenshot -w</command>
|
||||
</action>
|
||||
</keybind>
|
||||
<!-- Keybindings for window switching -->
|
||||
<keybind key="A-Tab">
|
||||
<action name="NextWindow">
|
||||
<finalactions>
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
<action name="Unshade"/>
|
||||
</finalactions>
|
||||
</action>
|
||||
</keybind>
|
||||
<keybind key="A-S-Tab">
|
||||
<action name="PreviousWindow">
|
||||
<finalactions>
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
<action name="Unshade"/>
|
||||
</finalactions>
|
||||
</action>
|
||||
</keybind>
|
||||
<keybind key="C-A-Tab">
|
||||
<action name="NextWindow">
|
||||
<panels>yes</panels>
|
||||
<desktop>yes</desktop>
|
||||
<finalactions>
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
<action name="Unshade"/>
|
||||
</finalactions>
|
||||
</action>
|
||||
</keybind>
|
||||
<!-- Keybindings for window switching with the arrow keys -->
|
||||
<keybind key="W-S-Right">
|
||||
<action name="DirectionalCycleWindows">
|
||||
<direction>right</direction>
|
||||
</action>
|
||||
</keybind>
|
||||
<keybind key="W-S-Left">
|
||||
<action name="DirectionalCycleWindows">
|
||||
<direction>left</direction>
|
||||
</action>
|
||||
</keybind>
|
||||
<keybind key="W-S-Up">
|
||||
<action name="DirectionalCycleWindows">
|
||||
<direction>up</direction>
|
||||
</action>
|
||||
</keybind>
|
||||
<keybind key="W-S-Down">
|
||||
<action name="DirectionalCycleWindows">
|
||||
<direction>down</direction>
|
||||
</action>
|
||||
</keybind>
|
||||
<keybind key="W-l">
|
||||
<action name="Execute">
|
||||
<command>i3lock -t -i ~/i3lock.png</command>
|
||||
</action>
|
||||
</keybind>
|
||||
<keybind key="F2">
|
||||
<action name="Execute">
|
||||
<command>x-terminal-emulator</command>
|
||||
</action>
|
||||
</keybind>
|
||||
<keybind key="F3">
|
||||
<action name="Execute">
|
||||
<command>x-www-browser</command>
|
||||
</action>
|
||||
</keybind>
|
||||
<!-- Keybindings for running applications -->
|
||||
<!-- Launch gnome-screenshot when Print is pressed -->
|
||||
<keybind key="Print">
|
||||
<action name="Execute">
|
||||
<command>gnome-screenshot</command>
|
||||
</action>
|
||||
</keybind>
|
||||
<keybind key="W-m">
|
||||
<action name="ShowMenu">
|
||||
<menu>root-menu</menu>
|
||||
</action>
|
||||
</keybind>
|
||||
</keyboard>
|
||||
<mouse>
|
||||
<dragThreshold>1</dragThreshold>
|
||||
<!-- number of pixels the mouse must move before a drag begins -->
|
||||
<doubleClickTime>200</doubleClickTime>
|
||||
<!-- in milliseconds (1000 = 1 second) -->
|
||||
<screenEdgeWarpTime>200</screenEdgeWarpTime>
|
||||
<!-- Time before changing desktops when the pointer touches the edge of the
|
||||
screen while moving a window, in milliseconds (1000 = 1 second).
|
||||
Set this to 0 to disable warping -->
|
||||
<screenEdgeWarpMouse>false</screenEdgeWarpMouse>
|
||||
<!-- Set this to TRUE to move the mouse pointer across the desktop when
|
||||
switching due to hitting the edge of the screen -->
|
||||
<context name="Frame">
|
||||
<mousebind button="A-Left" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
</mousebind>
|
||||
<mousebind button="A-Left" action="Click">
|
||||
<action name="Unshade"/>
|
||||
</mousebind>
|
||||
<mousebind button="A-Left" action="Drag">
|
||||
<action name="Move"/>
|
||||
</mousebind>
|
||||
<mousebind button="A-Right" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
<action name="Unshade"/>
|
||||
</mousebind>
|
||||
<mousebind button="A-Right" action="Drag">
|
||||
<action name="Resize"/>
|
||||
</mousebind>
|
||||
<mousebind button="A-Middle" action="Press">
|
||||
<action name="Lower"/>
|
||||
<action name="FocusToBottom"/>
|
||||
<action name="Unfocus"/>
|
||||
</mousebind>
|
||||
<mousebind button="A-Up" action="Click">
|
||||
<action name="GoToDesktop">
|
||||
<to>previous</to>
|
||||
</action>
|
||||
</mousebind>
|
||||
<mousebind button="A-Down" action="Click">
|
||||
<action name="GoToDesktop">
|
||||
<to>next</to>
|
||||
</action>
|
||||
</mousebind>
|
||||
<mousebind button="C-A-Up" action="Click">
|
||||
<action name="GoToDesktop">
|
||||
<to>previous</to>
|
||||
</action>
|
||||
</mousebind>
|
||||
<mousebind button="C-A-Down" action="Click">
|
||||
<action name="GoToDesktop">
|
||||
<to>next</to>
|
||||
</action>
|
||||
</mousebind>
|
||||
<mousebind button="A-S-Up" action="Click">
|
||||
<action name="SendToDesktop">
|
||||
<to>previous</to>
|
||||
</action>
|
||||
</mousebind>
|
||||
<mousebind button="A-S-Down" action="Click">
|
||||
<action name="SendToDesktop">
|
||||
<to>next</to>
|
||||
</action>
|
||||
</mousebind>
|
||||
</context>
|
||||
<context name="Titlebar">
|
||||
<mousebind button="Left" action="Drag">
|
||||
<action name="Move"/>
|
||||
</mousebind>
|
||||
<mousebind button="Left" action="DoubleClick">
|
||||
<action name="ToggleMaximizeFull"/>
|
||||
</mousebind>
|
||||
<mousebind button="Up" action="Click">
|
||||
<action name="if">
|
||||
<shaded>no</shaded>
|
||||
<then>
|
||||
<action name="Shade"/>
|
||||
<action name="FocusToBottom"/>
|
||||
<action name="Unfocus"/>
|
||||
<action name="Lower"/>
|
||||
</then>
|
||||
</action>
|
||||
</mousebind>
|
||||
<mousebind button="Down" action="Click">
|
||||
<action name="if">
|
||||
<shaded>yes</shaded>
|
||||
<then>
|
||||
<action name="Unshade"/>
|
||||
<action name="Raise"/>
|
||||
</then>
|
||||
</action>
|
||||
</mousebind>
|
||||
</context>
|
||||
<context name="Titlebar Top Right Bottom Left TLCorner TRCorner BRCorner BLCorner">
|
||||
<mousebind button="Left" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
<action name="Unshade"/>
|
||||
</mousebind>
|
||||
<mousebind button="Middle" action="Press">
|
||||
<action name="Lower"/>
|
||||
<action name="FocusToBottom"/>
|
||||
<action name="Unfocus"/>
|
||||
</mousebind>
|
||||
<mousebind button="Right" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
<action name="ShowMenu">
|
||||
<menu>client-menu</menu>
|
||||
</action>
|
||||
</mousebind>
|
||||
</context>
|
||||
<context name="Top">
|
||||
<mousebind button="Left" action="Drag">
|
||||
<action name="Resize">
|
||||
<edge>top</edge>
|
||||
</action>
|
||||
</mousebind>
|
||||
</context>
|
||||
<context name="Left">
|
||||
<mousebind button="Left" action="Drag">
|
||||
<action name="Resize">
|
||||
<edge>left</edge>
|
||||
</action>
|
||||
</mousebind>
|
||||
</context>
|
||||
<context name="Right">
|
||||
<mousebind button="Left" action="Drag">
|
||||
<action name="Resize">
|
||||
<edge>right</edge>
|
||||
</action>
|
||||
</mousebind>
|
||||
</context>
|
||||
<context name="Bottom">
|
||||
<mousebind button="Left" action="Drag">
|
||||
<action name="Resize">
|
||||
<edge>bottom</edge>
|
||||
</action>
|
||||
</mousebind>
|
||||
<mousebind button="Right" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
<action name="ShowMenu">
|
||||
<menu>client-menu</menu>
|
||||
</action>
|
||||
</mousebind>
|
||||
</context>
|
||||
<context name="TRCorner BRCorner TLCorner BLCorner">
|
||||
<mousebind button="Left" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
<action name="Unshade"/>
|
||||
</mousebind>
|
||||
<mousebind button="Left" action="Drag">
|
||||
<action name="Resize"/>
|
||||
</mousebind>
|
||||
</context>
|
||||
<context name="Client">
|
||||
<mousebind button="Left" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
</mousebind>
|
||||
<mousebind button="Middle" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
</mousebind>
|
||||
<mousebind button="Right" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
</mousebind>
|
||||
</context>
|
||||
<context name="Icon">
|
||||
<mousebind button="Left" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
<action name="Unshade"/>
|
||||
<action name="ShowMenu">
|
||||
<menu>client-menu</menu>
|
||||
</action>
|
||||
</mousebind>
|
||||
<mousebind button="Right" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
<action name="ShowMenu">
|
||||
<menu>client-menu</menu>
|
||||
</action>
|
||||
</mousebind>
|
||||
</context>
|
||||
<context name="AllDesktops">
|
||||
<mousebind button="Left" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
<action name="Unshade"/>
|
||||
</mousebind>
|
||||
<mousebind button="Left" action="Click">
|
||||
<action name="ToggleOmnipresent"/>
|
||||
</mousebind>
|
||||
</context>
|
||||
<context name="Shade">
|
||||
<mousebind button="Left" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
</mousebind>
|
||||
<mousebind button="Left" action="Click">
|
||||
<action name="ToggleShade"/>
|
||||
</mousebind>
|
||||
</context>
|
||||
<context name="Iconify">
|
||||
<mousebind button="Left" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
</mousebind>
|
||||
<mousebind button="Left" action="Click">
|
||||
<action name="Iconify"/>
|
||||
</mousebind>
|
||||
</context>
|
||||
<context name="Maximize">
|
||||
<mousebind button="Left" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
<action name="Unshade"/>
|
||||
</mousebind>
|
||||
<mousebind button="Middle" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
<action name="Unshade"/>
|
||||
</mousebind>
|
||||
<mousebind button="Right" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
<action name="Unshade"/>
|
||||
</mousebind>
|
||||
<mousebind button="Left" action="Click">
|
||||
<action name="ToggleMaximize"/>
|
||||
</mousebind>
|
||||
<mousebind button="Middle" action="Click">
|
||||
<action name="ToggleMaximize">
|
||||
<direction>vertical</direction>
|
||||
</action>
|
||||
</mousebind>
|
||||
<mousebind button="Right" action="Click">
|
||||
<action name="ToggleMaximize">
|
||||
<direction>horizontal</direction>
|
||||
</action>
|
||||
</mousebind>
|
||||
</context>
|
||||
<context name="Close">
|
||||
<mousebind button="Left" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
<action name="Unshade"/>
|
||||
</mousebind>
|
||||
<mousebind button="Left" action="Click">
|
||||
<action name="Close"/>
|
||||
</mousebind>
|
||||
</context>
|
||||
<context name="Desktop">
|
||||
<mousebind button="Up" action="Click">
|
||||
<action name="GoToDesktop">
|
||||
<to>previous</to>
|
||||
</action>
|
||||
</mousebind>
|
||||
<mousebind button="Down" action="Click">
|
||||
<action name="GoToDesktop">
|
||||
<to>next</to>
|
||||
</action>
|
||||
</mousebind>
|
||||
<mousebind button="A-Up" action="Click">
|
||||
<action name="GoToDesktop">
|
||||
<to>previous</to>
|
||||
</action>
|
||||
</mousebind>
|
||||
<mousebind button="A-Down" action="Click">
|
||||
<action name="GoToDesktop">
|
||||
<to>next</to>
|
||||
</action>
|
||||
</mousebind>
|
||||
<mousebind button="C-A-Up" action="Click">
|
||||
<action name="GoToDesktop">
|
||||
<to>previous</to>
|
||||
</action>
|
||||
</mousebind>
|
||||
<mousebind button="C-A-Down" action="Click">
|
||||
<action name="GoToDesktop">
|
||||
<to>next</to>
|
||||
</action>
|
||||
</mousebind>
|
||||
<mousebind button="Left" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
</mousebind>
|
||||
<mousebind button="Right" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
</mousebind>
|
||||
</context>
|
||||
<context name="Root">
|
||||
<!-- Menus -->
|
||||
<mousebind button="Middle" action="Press">
|
||||
<action name="ShowMenu">
|
||||
<menu>client-list-combined-menu</menu>
|
||||
</action>
|
||||
</mousebind>
|
||||
<mousebind button="Right" action="Press">
|
||||
<action name="ShowMenu">
|
||||
<menu>root-menu</menu>
|
||||
</action>
|
||||
</mousebind>
|
||||
</context>
|
||||
<context name="MoveResize">
|
||||
<mousebind button="Up" action="Click">
|
||||
<action name="GoToDesktop">
|
||||
<to>previous</to>
|
||||
</action>
|
||||
</mousebind>
|
||||
<mousebind button="Down" action="Click">
|
||||
<action name="GoToDesktop">
|
||||
<to>next</to>
|
||||
</action>
|
||||
</mousebind>
|
||||
<mousebind button="A-Up" action="Click">
|
||||
<action name="GoToDesktop">
|
||||
<to>previous</to>
|
||||
</action>
|
||||
</mousebind>
|
||||
<mousebind button="A-Down" action="Click">
|
||||
<action name="GoToDesktop">
|
||||
<to>next</to>
|
||||
</action>
|
||||
</mousebind>
|
||||
</context>
|
||||
</mouse>
|
||||
<menu>
|
||||
<!-- You can specify more than one menu file in here and they are all loaded,
|
||||
just don't make menu ids clash or, well, it'll be kind of pointless -->
|
||||
<!-- default menu file (or custom one in $HOME/.config/openbox/) -->
|
||||
<!-- system menu files on Debian systems -->
|
||||
<file>/var/lib/openbox/debian-menu.xml</file>
|
||||
<file>menu.xml</file>
|
||||
<hideDelay>200</hideDelay>
|
||||
<!-- if a press-release lasts longer than this setting (in milliseconds), the
|
||||
menu is hidden again -->
|
||||
<middle>no</middle>
|
||||
<!-- center submenus vertically about the parent entry -->
|
||||
<submenuShowDelay>100</submenuShowDelay>
|
||||
<!-- time to delay before showing a submenu after hovering over the parent
|
||||
entry.
|
||||
if this is a negative value, then the delay is infinite and the
|
||||
submenu will not be shown until it is clicked on -->
|
||||
<submenuHideDelay>400</submenuHideDelay>
|
||||
<!-- time to delay before hiding a submenu when selecting another
|
||||
entry in parent menu
|
||||
if this is a negative value, then the delay is infinite and the
|
||||
submenu will not be hidden until a different submenu is opened -->
|
||||
<applicationIcons>yes</applicationIcons>
|
||||
<!-- controls if icons appear in the client-list-(combined-)menu -->
|
||||
<manageDesktops>yes</manageDesktops>
|
||||
<!-- show the manage desktops section in the client-list-(combined-)menu -->
|
||||
</menu>
|
||||
<applications>
|
||||
<application role="browser">
|
||||
<decor>no</decor>
|
||||
<fullscreen>yes</fullscreen>
|
||||
</application>
|
||||
<application name="x-terminal-emulator">
|
||||
<decor>no</decor>
|
||||
<fullscreen>yes</fullscreen>
|
||||
</application>
|
||||
<!--
|
||||
# this is an example with comments through out. use these to make your
|
||||
# own rules, but without the comments of course.
|
||||
# you may use one or more of the name/class/role/title/type rules to specify
|
||||
# windows to match
|
||||
|
||||
<application name="the window's _OB_APP_NAME property (see obxprop)"
|
||||
class="the window's _OB_APP_CLASS property (see obxprop)"
|
||||
role="the window's _OB_APP_ROLE property (see obxprop)"
|
||||
title="the window's _OB_APP_TITLE property (see obxprop)"
|
||||
type="the window's _OB_APP_TYPE property (see obxprob)..
|
||||
(if unspecified, then it is 'dialog' for child windows)">
|
||||
# you may set only one of name/class/role/title/type, or you may use more
|
||||
# than one together to restrict your matches.
|
||||
|
||||
# the name, class, role, and title use simple wildcard matching such as those
|
||||
# used by a shell. you can use * to match any characters and ? to match
|
||||
# any single character.
|
||||
|
||||
# the type is one of: normal, dialog, splash, utility, menu, toolbar, dock,
|
||||
# or desktop
|
||||
|
||||
# when multiple rules match a window, they will all be applied, in the
|
||||
# order that they appear in this list
|
||||
|
||||
|
||||
# each rule element can be left out or set to 'default' to specify to not
|
||||
# change that attribute of the window
|
||||
|
||||
<decor>yes</decor>
|
||||
# enable or disable window decorations
|
||||
|
||||
<shade>no</shade>
|
||||
# make the window shaded when it appears, or not
|
||||
|
||||
<position force="no">
|
||||
# the position is only used if both an x and y coordinate are provided
|
||||
# (and not set to 'default')
|
||||
# when force is "yes", then the window will be placed here even if it
|
||||
# says you want it placed elsewhere. this is to override buggy
|
||||
# applications who refuse to behave
|
||||
<x>center</x>
|
||||
# a number like 50, or 'center' to center on screen. use a negative number
|
||||
# to start from the right (or bottom for <y>), ie -50 is 50 pixels from the
|
||||
# right edge (or bottom).
|
||||
<y>200</y>
|
||||
<monitor>1</monitor>
|
||||
# specifies the monitor in a xinerama setup.
|
||||
# 1 is the first head, or 'mouse' for wherever the mouse is
|
||||
</position>
|
||||
|
||||
<focus>yes</focus>
|
||||
# if the window should try be given focus when it appears. if this is set
|
||||
# to yes it doesn't guarantee the window will be given focus. some
|
||||
# restrictions may apply, but Openbox will try to
|
||||
|
||||
<desktop>1</desktop>
|
||||
# 1 is the first desktop, 'all' for all desktops
|
||||
|
||||
<layer>normal</layer>
|
||||
# 'above', 'normal', or 'below'
|
||||
|
||||
<iconic>no</iconic>
|
||||
# make the window iconified when it appears, or not
|
||||
|
||||
<skip_pager>no</skip_pager>
|
||||
# asks to not be shown in pagers
|
||||
|
||||
<skip_taskbar>no</skip_taskbar>
|
||||
# asks to not be shown in taskbars. window cycling actions will also
|
||||
# skip past such windows
|
||||
|
||||
<fullscreen>yes</fullscreen>
|
||||
# make the window in fullscreen mode when it appears
|
||||
|
||||
<maximized>true</maximized>
|
||||
# 'Horizontal', 'Vertical' or boolean (yes/no)
|
||||
</application>
|
||||
|
||||
# end of the example
|
||||
-->
|
||||
</applications>
|
||||
</openbox_config>
|
|
@ -0,0 +1,228 @@
|
|||
;;
|
||||
;; .emacs for conf in /home/mandark
|
||||
;;
|
||||
;; Made by Palard Julien
|
||||
;; Login <julien@palard.fr>
|
||||
;;
|
||||
;; Started on Sun Nov 16 12:00:18 2008 Julien Palard
|
||||
;;
|
||||
|
||||
(setq user-full-name "Julien Palard")
|
||||
(setq user-mail-address "julien@palard.fr")
|
||||
|
||||
(require 'cl)
|
||||
|
||||
(defun load-file-if-exists (file)
|
||||
"Load a file only if it exists."
|
||||
(if (file-exists-p file)
|
||||
(load-file file)))
|
||||
|
||||
(add-to-list 'load-path "~/.emacs.d/")
|
||||
|
||||
;; Disable all version control backends (Start faster if don't use them) :
|
||||
(setq vc-handled-backends ())
|
||||
|
||||
;; Disable transient mark mode, I don't like it :
|
||||
(transient-mark-mode nil)
|
||||
|
||||
(autoload 'php-mode "php-mode" "Mode for editing PHP source files")
|
||||
|
||||
;; Never use tabs to indent :
|
||||
(setq-default indent-tabs-mode nil)
|
||||
(setq-default tab-width 4)
|
||||
(setq-default py-indent-offset 4)
|
||||
(setq-default show-trailing-whitespace t)
|
||||
(add-hook 'term-mode-hook
|
||||
(lambda() (make-local-variable 'show-trailing-whitespace)
|
||||
(setq show-trailing-whitespace nil)))
|
||||
|
||||
(setq auto-mode-alist (cons '("\\.html" . html-mode) auto-mode-alist))
|
||||
(setq auto-mode-alist (cons '("\\.li" . c-mode) auto-mode-alist))
|
||||
(setq auto-mode-alist (cons '("\\.tpl" . html-mode) auto-mode-alist))
|
||||
(setq auto-mode-alist (cons '("\\.php" . php-mode) auto-mode-alist))
|
||||
|
||||
(setq inhibit-startup-message t)
|
||||
(setq european-calendar-style t)
|
||||
|
||||
(global-font-lock-mode t)
|
||||
(column-number-mode t)
|
||||
|
||||
(global-set-key "\C-cc" 'compile)
|
||||
(global-set-key "\C-c\C-g" 'goto-line)
|
||||
(global-set-key "\C-cg" 'goto-line)
|
||||
(global-set-key "\M-n" 'forward-paragraph)
|
||||
(global-set-key "\M-p" 'backward-paragraph)
|
||||
(global-set-key "\C-xrv" 'list-registers)
|
||||
; from http://www.emacswiki.org/emacs/BackspaceKey
|
||||
;;(global-set-key (kbd "C-h") 'delete-backward-char)
|
||||
(global-set-key (kbd "M-h") 'backward-kill-word)
|
||||
;;(global-set-key (kbd "C-?") 'help-command)
|
||||
|
||||
(add-to-list 'load-path "~/.emacs.d/geben-0.26")
|
||||
(add-to-list 'load-path "~/.emacs.d/geben-0.26/tree-widget")
|
||||
(autoload 'geben "geben" "PHP Debugger on Emacs" t)
|
||||
|
||||
(pc-bindings-mode)
|
||||
;(display-time-mode t) Floods my GNU screen's monitoring
|
||||
(require 'footnote)
|
||||
(add-hook 'message-mode-hook 'footnote-mode)
|
||||
(iswitchb-mode t)
|
||||
(show-paren-mode t)
|
||||
(add-hook 'write-file-hooks 'delete-trailing-whitespace)
|
||||
|
||||
(put 'upcase-region 'disabled nil)
|
||||
|
||||
;; ========== Place Backup Files in Specific Directory ==========
|
||||
|
||||
;; Enable backup files.
|
||||
(setq make-backup-files t)
|
||||
|
||||
;; Enable versioning with default values (keep five last versions, I think!)
|
||||
(setq version-control t)
|
||||
|
||||
;; Save all backup file in this directory.
|
||||
(setq backup-directory-alist (quote ((".*" . "~/.emacs_backups/"))))
|
||||
|
||||
(global-set-key (read-kbd-macro "C-M-[") 'shrink-window-horizontally)
|
||||
(global-set-key (read-kbd-macro "C-M-]") 'enlarge-window-horizontally)
|
||||
|
||||
(fset 'yes-or-no-p 'y-or-n-p)
|
||||
|
||||
(icomplete-mode 99)
|
||||
|
||||
(global-set-key "\M-/" 'hippie-expand)
|
||||
(setq hippie-expand-try-functions-list
|
||||
'(try-complete-file-name-partially
|
||||
try-complete-file-name
|
||||
try-expand-all-abbrevs
|
||||
try-expand-list
|
||||
try-expand-line
|
||||
try-expand-dabbrev
|
||||
try-expand-dabbrev-all-buffers
|
||||
try-expand-dabbrev-from-kill)
|
||||
)
|
||||
|
||||
(setq-default truncate-partial-width-windows nil)
|
||||
|
||||
(setq-default delete-old-versions t)
|
||||
|
||||
;; /*
|
||||
;; ** Eeple Indent Style
|
||||
;; ** - Based on the BSD Allman Style, but with an indent of 4 instead of 8.
|
||||
;; ** - Tab size is set to 4, so each 4 spaces are a tab
|
||||
;; ** - Opening AND Closing Bracket have to be on the same column
|
||||
;; ** -
|
||||
;; **
|
||||
;; */
|
||||
;; int_main(int_ac,_char_**av)
|
||||
;; {
|
||||
;; --->if_(ac_==_ac)
|
||||
;; --->{
|
||||
;; --->--->ac_=_ac;
|
||||
;; --->}
|
||||
;; --->else
|
||||
;; --->{
|
||||
;; --->--->av_=_av;
|
||||
;; --->}
|
||||
;; }
|
||||
|
||||
(defun eeple-indent-style ()
|
||||
(interactive)
|
||||
(c-set-style "bsd")
|
||||
(c-set-offset 'case-label 4)
|
||||
(setq c-basic-offset 4))
|
||||
|
||||
(add-hook 'php-mode-hook 'eeple-indent-style)
|
||||
(add-hook 'c-mode-hook 'eeple-indent-style)
|
||||
|
||||
(menu-bar-mode nil)
|
||||
(setq font-lock-maximum-size nil)
|
||||
|
||||
(load-file-if-exists "~/.emacs.d/rcirc-julien.el")
|
||||
|
||||
;; flymake-cursor (require 'cl)
|
||||
;; wget http://www.emacswiki.org/emacs/download/flymake-cursor.el
|
||||
;; aptitude install pyflakes to check python code
|
||||
(require 'flymake-cursor nil 'noerror)
|
||||
(global-set-key [f4] 'flymake-goto-next-error)
|
||||
|
||||
(when (load "flymake" t)
|
||||
(defun flymake-pyflakes-init ()
|
||||
(let* ((temp-file (flymake-init-create-temp-buffer-copy
|
||||
'flymake-create-temp-inplace))
|
||||
(local-file (file-relative-name
|
||||
temp-file
|
||||
(file-name-directory buffer-file-name))))
|
||||
(list "python-check" (list local-file))))
|
||||
|
||||
(add-to-list 'flymake-allowed-file-name-masks
|
||||
'("\\.py\\'" flymake-pyflakes-init)))
|
||||
|
||||
(add-hook 'find-file-hook 'flymake-find-file-hook)
|
||||
(setq flymake-start-syntax-check-on-find-file nil)
|
||||
|
||||
(defun iwb ()
|
||||
"indent whole buffer"
|
||||
(interactive)
|
||||
(delete-trailing-whitespace)
|
||||
(indent-region (point-min) (point-max) nil)
|
||||
(untabify (point-min) (point-max)))
|
||||
(global-set-key [f12] 'iwb)
|
||||
|
||||
(custom-set-faces
|
||||
;; custom-set-faces was added by Custom.
|
||||
;; If you edit it by hand, you could mess it up, so be careful.
|
||||
;; Your init file should contain only one such instance.
|
||||
;; If there is more than one, they won't work right.
|
||||
'(flymake-errline ((nil (:inverse-video t))))
|
||||
'(font-lock-comment-delimiter-face ((default (:inherit font-lock-comment-face)) (((class color) (min-colors 8) (background light)) nil)))
|
||||
'(font-lock-comment-face ((nil (:weight bold)))))
|
||||
|
||||
(custom-set-variables
|
||||
;; custom-set-variables was added by Custom.
|
||||
;; If you edit it by hand, you could mess it up, so be careful.
|
||||
;; Your init file should contain only one such instance.
|
||||
;; If there is more than one, they won't work right.
|
||||
)
|
||||
|
||||
(defun terminal-init-screen ()
|
||||
"Terminal initialization function for screen-256color."
|
||||
(load "term/xterm")
|
||||
(xterm-register-default-colors)
|
||||
(tty-set-up-initial-frame-faces))
|
||||
|
||||
|
||||
(global-set-key [left] 'windmove-left)
|
||||
(global-set-key [right] 'windmove-right)
|
||||
(global-set-key [up] 'windmove-up)
|
||||
(global-set-key [down] 'windmove-down)
|
||||
|
||||
;; Highlight 80th column
|
||||
(require 'whitespace)
|
||||
(setq whitespace-style '(face empty tabs lines-tail trailing))
|
||||
(global-whitespace-mode t)
|
||||
|
||||
(defun konix/find-file-hook ()
|
||||
(if (and
|
||||
(string-match "^\\(.+\\):\\([0-9]+\\)$" buffer-file-name)
|
||||
(not
|
||||
(file-exists-p buffer-file-name)))
|
||||
;; the given file does not exist and is of the form file_name:number, I
|
||||
;; most likely wants to open file_name at line number
|
||||
(progn
|
||||
(let (
|
||||
(old_buffer (current-buffer))
|
||||
(file_name (match-string-no-properties 1 buffer-file-name))
|
||||
(line (match-string-no-properties 2 buffer-file-name))
|
||||
)
|
||||
(if (file-exists-p file_name)
|
||||
(progn
|
||||
(find-file file_name)
|
||||
(goto-line (string-to-int line))
|
||||
(kill-buffer old_buffer)
|
||||
nil)
|
||||
nil)))
|
||||
nil))
|
||||
(add-to-list 'find-file-hook 'konix/find-file-hook)
|
||||
|
||||
(eval-after-load 'rcirc '(require 'rcirc-http-notify))
|
|
@ -0,0 +1,45 @@
|
|||
[user]
|
||||
name = Julien Palard
|
||||
email = julien@palard.fr
|
||||
|
||||
[color]
|
||||
diff = auto
|
||||
status = auto
|
||||
branch = auto
|
||||
interactive = auto
|
||||
grep = true
|
||||
ui = true
|
||||
|
||||
[color "branch"]
|
||||
current = yellow reverse
|
||||
local = yellow
|
||||
remote = green
|
||||
|
||||
[color "diff"]
|
||||
meta = yellow bold
|
||||
frag = magenta bold
|
||||
old = red bold
|
||||
new = green bold
|
||||
|
||||
[color "status"]
|
||||
added = yellow
|
||||
changed = green
|
||||
untracked = cyan
|
||||
|
||||
[alias]
|
||||
st = status
|
||||
ci = commit -a
|
||||
br = branch
|
||||
co = checkout
|
||||
df = diff
|
||||
lg = log --date-order --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --
|
||||
w = whatchanged
|
||||
pom = push origin master
|
||||
# show list of contributors in descending order by number of commits
|
||||
rank = shortlog -sn --no-merges
|
||||
|
||||
[push]
|
||||
default = tracking
|
||||
|
||||
[apply]
|
||||
whitespace = strip
|
|
@ -0,0 +1,163 @@
|
|||
# This file has been auto-generated by i3-config-wizard(1).
|
||||
# It will not be overwritten, so edit it as you like.
|
||||
#
|
||||
# Should you change your keyboard layout somewhen, delete
|
||||
# this file and re-run i3-config-wizard(1).
|
||||
#
|
||||
|
||||
# i3 config file (v4)
|
||||
#
|
||||
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
|
||||
|
||||
set $mod Mod4
|
||||
|
||||
# Font for window titles. Will also be used by the bar unless a different font
|
||||
# is used in the bar {} block below. ISO 10646 = Unicode
|
||||
font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
|
||||
# The font above is very space-efficient, that is, it looks good, sharp and
|
||||
# clear in small sizes. However, if you need a lot of unicode glyphs or
|
||||
# right-to-left text rendering, you should instead use pango for rendering and
|
||||
# chose a FreeType font, such as:
|
||||
# font pango:DejaVu Sans Mono 10
|
||||
|
||||
# Use Mouse+$mod to drag floating windows to their wanted position
|
||||
floating_modifier $mod
|
||||
|
||||
# start a terminal
|
||||
bindsym $mod+Return exec i3-sensible-terminal
|
||||
|
||||
# kill focused window
|
||||
bindsym $mod+Shift+q kill
|
||||
|
||||
# start dmenu (a program launcher)
|
||||
bindsym $mod+d exec dmenu_run
|
||||
# There also is the (new) i3-dmenu-desktop which only displays applications
|
||||
# shipping a .desktop file. It is a wrapper around dmenu, so you need that
|
||||
# installed.
|
||||
# bindsym $mod+d exec --no-startup-id i3-dmenu-desktop
|
||||
|
||||
# change focus
|
||||
bindsym $mod+j focus left
|
||||
bindsym $mod+k focus down
|
||||
bindsym $mod+l focus up
|
||||
bindsym $mod+semicolon focus right
|
||||
|
||||
# alternatively, you can use the cursor keys:
|
||||
bindsym $mod+Left focus left
|
||||
bindsym $mod+Down focus down
|
||||
bindsym $mod+Up focus up
|
||||
bindsym $mod+Right focus right
|
||||
|
||||
# move focused window
|
||||
bindsym $mod+Shift+j move left
|
||||
bindsym $mod+Shift+k move down
|
||||
bindsym $mod+Shift+l move up
|
||||
bindsym $mod+Shift+semicolon move right
|
||||
|
||||
# alternatively, you can use the cursor keys:
|
||||
bindsym $mod+Shift+Left move left
|
||||
bindsym $mod+Shift+Down move down
|
||||
bindsym $mod+Shift+Up move up
|
||||
bindsym $mod+Shift+Right move right
|
||||
|
||||
# split in horizontal orientation
|
||||
bindsym $mod+h split h
|
||||
|
||||
# split in vertical orientation
|
||||
bindsym $mod+v split v
|
||||
|
||||
# enter fullscreen mode for the focused container
|
||||
bindsym $mod+f fullscreen
|
||||
|
||||
# change container layout (stacked, tabbed, toggle split)
|
||||
bindsym $mod+s layout stacking
|
||||
bindsym $mod+w layout tabbed
|
||||
bindsym $mod+e layout toggle split
|
||||
|
||||
# toggle tiling / floating
|
||||
bindsym $mod+Shift+space floating toggle
|
||||
|
||||
# change focus between tiling / floating windows
|
||||
bindsym $mod+space focus mode_toggle
|
||||
|
||||
# focus the parent container
|
||||
bindsym $mod+a focus parent
|
||||
|
||||
# focus the child container
|
||||
#bindsym $mod+d focus child
|
||||
|
||||
|
||||
|
||||
# switch to workspace
|
||||
bindsym $mod+1 workspace 1: term
|
||||
bindsym $mod+2 workspace 2: web
|
||||
bindsym $mod+3 workspace 3: talk
|
||||
bindsym $mod+4 workspace 4: mdk.fr
|
||||
bindsym $mod+5 workspace 5: vlc
|
||||
bindsym $mod+6 workspace 6
|
||||
bindsym $mod+7 workspace 7
|
||||
bindsym $mod+8 workspace 8
|
||||
bindsym $mod+9 workspace 9
|
||||
bindsym $mod+0 workspace 10
|
||||
|
||||
# move focused container to workspace
|
||||
bindsym $mod+Shift+1 move container to workspace 1: term
|
||||
bindsym $mod+Shift+2 move container to workspace 2: web
|
||||
bindsym $mod+Shift+3 move container to workspace 3: talk
|
||||
bindsym $mod+Shift+4 move container to workspace 4: mdk.fr
|
||||
bindsym $mod+Shift+5 move container to workspace 5: vlc
|
||||
bindsym $mod+Shift+6 move container to workspace 6
|
||||
bindsym $mod+Shift+7 move container to workspace 7
|
||||
bindsym $mod+Shift+8 move container to workspace 8
|
||||
bindsym $mod+Shift+9 move container to workspace 9
|
||||
bindsym $mod+Shift+0 move container to workspace 10
|
||||
|
||||
# reload the configuration file
|
||||
bindsym $mod+Shift+c reload
|
||||
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
|
||||
bindsym $mod+Shift+r restart
|
||||
# exit i3 (logs you out of your X session)
|
||||
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'"
|
||||
|
||||
# resize window (you can also use the mouse for that)
|
||||
mode "resize" {
|
||||
# These bindings trigger as soon as you enter the resize mode
|
||||
|
||||
# Pressing left will shrink the window’s width.
|
||||
# Pressing right will grow the window’s width.
|
||||
# Pressing up will shrink the window’s height.
|
||||
# Pressing down will grow the window’s height.
|
||||
bindsym j resize shrink width 10 px or 10 ppt
|
||||
bindsym k resize grow height 10 px or 10 ppt
|
||||
bindsym l resize shrink height 10 px or 10 ppt
|
||||
bindsym semicolon resize grow width 10 px or 10 ppt
|
||||
|
||||
# same bindings, but for the arrow keys
|
||||
bindsym Left resize shrink width 10 px or 10 ppt
|
||||
bindsym Down resize grow height 10 px or 10 ppt
|
||||
bindsym Up resize shrink height 10 px or 10 ppt
|
||||
bindsym Right resize grow width 10 px or 10 ppt
|
||||
|
||||
# back to normal: Enter or Escape
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
}
|
||||
|
||||
bindsym $mod+r mode "resize"
|
||||
|
||||
# Start i3bar to display a workspace bar (plus the system information i3status
|
||||
# finds out, if available)
|
||||
bar {
|
||||
status_command i3status
|
||||
}
|
||||
|
||||
# Mandark's conf :
|
||||
hide_edge_borders both
|
||||
bindsym $mod+o exec i3lock
|
||||
for_window [window_role="browser"] border none
|
||||
for_window [class="URxvt"] border none
|
||||
assign [instance="crx_nckgahadagoaajjgafhacjanaoiihapd"] → 3: talk
|
||||
assign [class="Google-chrome"] → 2: web
|
||||
assign [title="Hangouts"] → 3: talk
|
||||
|
||||
focus_follows_mouse no
|
|
@ -0,0 +1,42 @@
|
|||
general {
|
||||
output_format = "i3bar"
|
||||
colors = true
|
||||
interval = 5
|
||||
}
|
||||
|
||||
order += "load"
|
||||
order += "wireless wlan0"
|
||||
order += "ethernet eth0"
|
||||
order += "battery 0"
|
||||
order += "disk /"
|
||||
order += "tztime local"
|
||||
|
||||
|
||||
wireless wlan0 {
|
||||
format_up = "W: (%quality at %essid, %bitrate) %ip"
|
||||
format_down = ""
|
||||
}
|
||||
|
||||
ethernet eth0 {
|
||||
# if you use %speed, i3status requires the cap_net_admin capability
|
||||
format_up = "E: %ip (%speed)"
|
||||
format_down = ""
|
||||
}
|
||||
|
||||
battery 0 {
|
||||
format = "%status %percentage %remaining %emptytime"
|
||||
path = "/sys/class/power_supply/BAT%d/uevent"
|
||||
low_threshold = 10
|
||||
}
|
||||
|
||||
tztime local {
|
||||
format = "%Y-%m-%d %H:%M:%S"
|
||||
}
|
||||
|
||||
load {
|
||||
format = "%1min %5min %15min"
|
||||
}
|
||||
|
||||
disk "/" {
|
||||
format = "df %free"
|
||||
}
|
Loading…
Reference in New Issue