diff --git a/.Xresources b/.Xresources index f64bb74f..be900748 100644 --- a/.Xresources +++ b/.Xresources @@ -23,13 +23,15 @@ URxvt*scrollBar: false !! Plugins !! clipboard and keyboard-select are not provided by default. -URxvt.perl-ext-common : default,matcher,keyboard-select +! URxvt.perl-ext-common : default,matcher,keyboard-select +URxvt.perl-ext-common : matcher,keyboard-select + ! URxvt.keysym.M-v: perl:clipboard:paste ! URxvt.keysym.M-C-v: perl:clipboard:paste_escaped !! Keyboard-Select -URxvt.keysym.M-Escape: perl:keyboard-select:activate +URxvt.keysym.M-Escape: perl:keyboard-select:activate ! URxvt.keysym.M-s: perl:keyboard-select:search !! URL Support diff --git a/.arch-pkg-aur-zeus b/.arch-pkg-aur-zeus index 66a73567..b20228f0 100644 --- a/.arch-pkg-aur-zeus +++ b/.arch-pkg-aur-zeus @@ -5,6 +5,7 @@ dropbox dropbox-cli emacs-mediawiki-bzr emacs-yasnippet +grub gsharkdown handbrake-cli-svn handbrake-svn @@ -12,6 +13,7 @@ movgrab package-query pacman-color rxvt-unicode-patched +texlive-dummy trash-cli urlview urxvt-clipboard diff --git a/.arch-pkg-explicit-zeus b/.arch-pkg-explicit-zeus index d945126e..e6ead6b5 100644 --- a/.arch-pkg-explicit-zeus +++ b/.arch-pkg-explicit-zeus @@ -22,7 +22,6 @@ bzr calc catdvi cmus -consolekit coreutils cpufrequtils cronie @@ -43,6 +42,7 @@ emacs-lua-mode emacs-mediawiki-bzr emacs-nox emacs-yasnippet +expac fakeroot fbv feh @@ -92,7 +92,6 @@ libtool licenses links linux -linux-docs linux-lts logrotate lrzip @@ -157,9 +156,7 @@ task tcpdump texi2html texinfo -texlive-genericextra -texlive-latexextra -texlive-pictures +texlive-dummy trash-cli tree unrar @@ -185,7 +182,7 @@ wireshark-gtk wpa_supplicant wv xf86-input-synaptics -xf86-video-intel-uxa +xf86-video-intel xf86-video-vesa xfsprogs xorg-server diff --git a/.arch-pkg-official-zeus b/.arch-pkg-official-zeus index a6747060..0f03080b 100644 --- a/.arch-pkg-official-zeus +++ b/.arch-pkg-official-zeus @@ -37,7 +37,6 @@ cdparanoia cloog cmus compositeproto -consolekit coreutils cpufrequtils cracklib @@ -75,6 +74,7 @@ emacs-nox enca enchant eventlog +expac expat faac faad2 @@ -135,7 +135,6 @@ gpgme gpm grep groff -grub gsasl gsettings-desktop-schemas gsfonts @@ -326,7 +325,6 @@ licenses links linux linux-api-headers -linux-docs linux-firmware linux-lts lirc-utils @@ -466,11 +464,6 @@ task tcpdump texi2html texinfo -texlive-bin -texlive-core -texlive-genericextra -texlive-latexextra -texlive-pictures tree ttf-dejavu tzdata @@ -510,7 +503,7 @@ xextproto xf86dgaproto xf86-input-evdev xf86-input-synaptics -xf86-video-intel-uxa +xf86-video-intel xf86-video-vesa xf86vidmodeproto xfsprogs diff --git a/.config/awesome/rc.lua b/.config/awesome/rc.lua index c5efc15d..1da073c2 100644 --- a/.config/awesome/rc.lua +++ b/.config/awesome/rc.lua @@ -128,7 +128,7 @@ batf:close() -- Volume volmwidget = widget({ type = "textbox" }) -vicious.register(volmwidget, vicious.widgets.volume, "Master: $1% $2 ", 1, "Master") +vicious.register(volmwidget, vicious.widgets.volume, "Master $1% $2 ", 1, "Master") -- PCM may not be available all the time on every machine. -- If PCM is toggled after awesome has been started, you'll need to reload the -- configuration. @@ -137,13 +137,17 @@ local volpf = io.popen("amixer | grep PCM 2>/dev/null") local volpl = volpf:read("*a") if volpl ~= "" then volpwidget = widget({ type = "textbox" }) - vicious.register(volpwidget, vicious.widgets.volume, "PCM: $1%", 1, "PCM") + vicious.register(volpwidget, vicious.widgets.volume, "PCM $1%", 1, "PCM") end volpf:close() -- Separator separator = widget({ type = "textbox" }) separator.text = " | " +separatordate = widget({ type = "textbox" }) +separatordate.text = " |" +separatorapps = widget({ type = "textbox" }) +separatorapps.text = " " -- Create a wibox for each screen and add it mywibox = {} @@ -222,7 +226,7 @@ for s = 1, screen.count() do }, s == 1 and systraywidget or nil, clockwidget, - separator, + separatordate, volpwidget, volmwidget, separator, @@ -231,7 +235,7 @@ for s = 1, screen.count() do netwidget, separator, batwidget, - separator, + separatorapps, mytasklist[s], layout = awful.widget.layout.horizontal.rightleft } @@ -331,7 +335,7 @@ globalkeys = awful.util.table.join( -- Touchpad awful.key({ }, "XF86TouchpadToggle", function () os.execute("synclient TouchpadOff=`synclient -l | grep -c 'TouchpadOff.*=.*0'`") end), - -- awful.key({ }, "XF86Tool", function () os.execute("synclient TouchpadOff=`synclient -l | grep -c 'TouchpadOff.*=.*0'`") end), + awful.key({ }, "XF86Tools", function () os.execute("synclient TouchpadOff=`synclient -l | grep -c 'TouchpadOff.*=.*0'`") end), -- Mouse control -- Bind ''Meta4+Ctrl+m'' to move the mouse to the coordinates set above. diff --git a/.emacs b/.emacs index b282e52c..55573a71 100644 --- a/.emacs +++ b/.emacs @@ -366,18 +366,33 @@ the line." ;; Duplicate line (define-key my-keys-minor-mode-map (kbd "C-d") 'duplicate-line) +(define-key my-keys-minor-mode-map (kbd "M-a") 'beginning-of-defun) +(define-key my-keys-minor-mode-map (kbd "M-e") 'end-of-defun) ;; Paste from clipboard. ;; (define-key my-keys-minor-mode-map (kbd "M-p") (kbd "C-u M-! xclip -o")) -(define-key my-keys-minor-mode-map (kbd "M-p") (kbd "C-u M-! xsel -o")) +(define-key my-keys-minor-mode-map (kbd "C-") (kbd "M-| xsel -p -i")) +(define-key my-keys-minor-mode-map (kbd "C-") (kbd "C-u M-! xsel -o")) +(define-key my-keys-minor-mode-map (kbd "C-") (kbd "C-u M-! xsel -o -b")) + +;; Modern scrolling +(global-set-key [next] + (lambda () (interactive) + (condition-case nil (scroll-up) + (end-of-buffer (goto-char (point-max)))))) + +(global-set-key [prior] + (lambda () (interactive) + (condition-case nil (scroll-down) + (beginning-of-buffer (goto-char (point-min)))))) ;; Compilation (define-key my-keys-minor-mode-map (kbd "") 'compile) (define-key my-keys-minor-mode-map (kbd "") 'next-error) ;; Window resize -(define-key my-keys-minor-mode-map (kbd "S-C-") 'shrink-window-horizontally) -(define-key my-keys-minor-mode-map (kbd "S-C-") 'enlarge-window-horizontally) +;; (define-key my-keys-minor-mode-map (kbd "S-C-") 'shrink-window-horizontally) +;; (define-key my-keys-minor-mode-map (kbd "S-C-") 'enlarge-window-horizontally) ;; (define-key my-keys-minor-mode-map (kbd "S-C-") 'shrink-window) ;; (define-key my-keys-minor-mode-map (kbd "S-C-") 'enlarge-window) @@ -497,10 +512,10 @@ the line." ;;============================================================================== ;; Auto-Complete ;;============================================================================== -(add-to-list 'load-path "/usr/share/emacs/site-lisp/auto-complete") -(require 'auto-complete-config) -(add-to-list 'ac-dictionary-directories "/usr/share/emacs/site-lisp/auto-complete/ac-dict") -(ac-config-default) +;; (add-to-list 'load-path "/usr/share/emacs/site-lisp/auto-complete") +;; (require 'auto-complete-config) +;; (add-to-list 'ac-dictionary-directories "/usr/share/emacs/site-lisp/auto-complete/ac-dict") +;; (ac-config-default) ;;============================================================================== ;; AucTeX diff --git a/.shell.d/alias_rc b/.shell.d/alias_rc index afb04491..5f38f59d 100644 --- a/.shell.d/alias_rc +++ b/.shell.d/alias_rc @@ -76,10 +76,8 @@ alias echolibpath='echo -e ${LD_LIBRARY_PATH//:/\\n}' ## Shutdown / Reboot ## Will only work with consolekit and dbus daemons running. if [ -e "/usr/bin/dbus-send" ]; then - alias halt='dbus-send --system --print-reply --dest="org.freedesktop.ConsoleKit" /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Stop' - alias reboot='dbus-send --system --print-reply --dest="org.freedesktop.ConsoleKit" /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Restart' - alias restart='dbus-send --system --print-reply --dest="org.freedesktop.ConsoleKit" /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Restart' - alias shutdown='dbus-send --system --print-reply --dest="org.freedesktop.ConsoleKit" /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Stop' + alias halt='sudo halt' + alias reboot='sudo reboot' fi ## Screensaver @@ -126,9 +124,11 @@ if [ "$PACMAN_FRONTEND" = "pacman" ]; then alias pc='sudo pacman -Scc' alias pi='sudo pacman -S --needed' alias pqi='pacman -Qi' + alias pql='pacman -Ql' + alias pqo='pacman -Qo' alias pqs='pacman -Qs' - alias psi='pacman -Si' alias pr='sudo pacman -Rs' + alias psi='pacman -Si' alias pss='pacman -Ss' alias pu='sudo pacman -Syu' fi @@ -137,12 +137,13 @@ if [ "$PACMAN_FRONTEND" = "pacman-color" ]; then alias pc='sudo pacman-color -Scc' alias pi='sudo pacman -S --needed' alias pqi='pacman-color -Qi' + alias pql='pacman-color -Ql' + alias pqo='pacman-color -Qo' alias pqs='pacman-color -Qs' - alias psi='pacman-color -Si' alias pr='sudo pacman-color -Rs' + alias psi='pacman-color -Si' alias pss='pacman-color -Ss' alias pu='sudo pacman-color -Syu' - alias pql='pacman -Ql' fi ##============================================================================== diff --git a/.shell.d/funs_rc b/.shell.d/funs_rc index 95e84c05..2bea0995 100644 --- a/.shell.d/funs_rc +++ b/.shell.d/funs_rc @@ -422,6 +422,74 @@ lsofstat() done } +## Format C +formatc() +{ + echo "WARNING: Work in progress." + + if [ ! $# -eq 1 ]; then + echo "Wrong number of argument." + return + fi + + + FILE="$1" + + ## Remove trailing whitespace + sed -i 's/\s*$//g' "$FILE" + + ## Function parenthesis + sed -i 's/\([^ ]\)(/\1 (/g' "$FILE" + sed -i 's/\s\s\+(/ (/g' "$FILE" + + ## Semicolon + sed -i 's/\([^ ]\);/\1 ;/g' "$FILE" + sed -i 's/;\([^ ]\)/; \1/g' "$FILE" + # Skip line -- Bad idea because of 'for' loops. + # sed -i 's/^\(\s*\)\(.*\);\s*\(.\+\)$/\1\2;\n\1\3/g' "$FILE" + + ## Commas + sed -i 's/\s\s\+,/,/g' "$FILE" + sed -i 's/,\([^ ]\)/, \1/g' "$FILE" + + ## Plus/Minus + sed -i 's/\([^+-]\)\([-+]\)\([^ +-]\)/\1\2 \3/g' "$FILE" + sed -i 's/\([^ +-]\)\([-+]\)\([^+-]\)/\1 \2\3/g' "$FILE" + sed -i 's/\( \+++\)/++/g' "$FILE" + sed -i 's/\(++ \+\)/++/g' "$FILE" + sed -i 's/\( \+--\)/--/g' "$FILE" + sed -i 's/\(-- \+\)/--/g' "$FILE" + + ## Modulus, Equality, Affectation, Binary ops, Comparison + sed -i 's/\s\s\+\(%\|==\|&&\|||\|<=\|>=\|!=\)/ \1/g' "$FILE" + sed -i 's/\(%\|==\|&&\|||\|<=\|>=\|!=\)\s\s\+/\1 /g' "$FILE" + sed -i 's/\([^ ]\)\(%\|==\|&&\|||\|<=\|>=\|!=\)/\1 \2/g' "$FILE" + sed -i 's/\(%\|==\|&&\|||\|<=\|>=\|!=\)\([^ ]\)/\1 \2/g' "$FILE" + + ## Equality, >, < + sed -i 's/\s\s\+\([<>=]\)/ \1/g' "$FILE" + sed -i 's/\([<>=]\)\s\s\+/\1 /g' "$FILE" + sed -i 's/\([<>=]\)\([^ =]\)/\1 \2/g' "$FILE" + sed -i 's/\([^ ]\)\([<>]\)/\1 \2/g' "$FILE" + sed -i 's/\([^ =<>]\)\(=\)/\1 \2/g' "$FILE" + + ## Asterisk, slash + sed -i 's/\s\s\+\*/ \*/g' "$FILE" + sed -i 's/\*\s\s\+/\* /g' "$FILE" + + sed -i 's/\([^\/]\)\/\s\+/\1\//g' "$FILE" + sed -i 's/\s\+\/\([^\/]\)/\/\1/g' "$FILE" + + + ## Braces + sed -i 's/^\( *\)\(.\+\) *{ *$/\1\2\n\1{/g' "$FILE" + + ## Proper comments + sed -i 's:// *\([[:lower:]]\):// \u\1:g' "$FILE" + sed -i 's:\(//.*[^\.]\)$:\1\.:g' "$FILE" +} + + ##============================================================================== ## Pacman Functions ##============================================================================== diff --git a/.shell.d/main_rc b/.shell.d/main_rc index 3e5a0119..47bc535e 100644 --- a/.shell.d/main_rc +++ b/.shell.d/main_rc @@ -11,6 +11,9 @@ umask 027 ## Path export PATH=.:$PATH +## TeXlive +export PATH=/usr/local/texlive/2012/bin/x86_64-linux/:$PATH + ## Terminal # if [[ "$TERM" = "*rxvt*" ]]; then # export TERM="rxvt-unicode" diff --git a/.xinitrc b/.xinitrc index 38d7915b..9bbfdf10 100644 --- a/.xinitrc +++ b/.xinitrc @@ -17,8 +17,11 @@ ##============================================================================== ## Launch session ##============================================================================== +udiskie & +[ -e /usr/bin/awesome ] && exec awesome # [ -e /usr/bin/awesome ] && exec ck-launch-session awesome -[ -e /usr/bin/awesome ] && exec ck-launch-session zsh -c "udiskie & awesome" +# [ -e /usr/bin/awesome ] && exec ck-launch-session zsh -c "udiskie & awesome" +# [ -e /usr/bin/awesome ] && exec zsh -c "udiskie & awesome"