From ffa6b50281c7b997de378d9ecbb3ceae07012b37 Mon Sep 17 00:00:00 2001 From: Ambrevar Date: Fri, 15 Jun 2012 15:54:02 +0100 Subject: [PATCH] Committed most of the home config files. --- .Xresources | 88 +++ .arch-mirrors-edf23ads | 6 + .arch-mirrors-odin | 4 + .arch-mirrors-peteramd | 6 + .arch-pkg-aur-edf23ads | 15 + .arch-pkg-aur-odin | 14 + .arch-pkg-aur-peteramd | 18 + .arch-pkg-explicit-edf23ads | 206 ++++++ .arch-pkg-explicit-odin | 168 +++++ .arch-pkg-explicit-peteramd | 294 ++++++++ .arch-pkg-official-edf23ads | 627 +++++++++++++++++ .arch-pkg-official-odin | 473 +++++++++++++ .arch-pkg-official-peteramd | 635 ++++++++++++++++++ .bashrc | 48 ++ .cmus/autosave | 145 ++++ .config/awesome/rc.lua | 515 ++++++++++++++ .config/awesome/themes/getskin.sh | 2 + .config/gtk-3.0/settings.ini | 3 + .config/luakit/binds.lua | 331 +++++++++ .config/luakit/globals.lua | 99 +++ .config/luakit/rc.lua | 200 ++++++ .config/lxterminal/lxterminal.conf | 18 + .config/ranger/apps.py | 137 ++++ .config/ranger/options.py | 25 + .config/ranger/rc.conf | 78 +++ .config/ranger/scope.sh | 85 +++ .config/wmfs/speeddown.sh | 10 + .config/wmfs/speedup.sh | 10 + .config/wmfs/status.sh | 237 +++++++ .config/wmfs/wmfs-status.sh | 173 +++++ .config/wmfs/wmfs.d/bars | 58 ++ .config/wmfs/wmfs.d/client | 11 + .config/wmfs/wmfs.d/keys | 139 ++++ .config/wmfs/wmfs.d/launchers | 19 + .config/wmfs/wmfs.d/rules | 24 + .config/wmfs/wmfs.d/tags | 23 + .config/wmfs/wmfs.d/themes | 266 ++++++++ .config/wmfs/wmfsrc | 15 + .emacs | 419 ++++++++++++ .emacs.d/abbrev_defs | 117 ++++ .../plugins/smart-compile/smart-compile.el | 211 ++++++ .../yas/snippets/text-mode/cc-mode/else | 6 + .../yas/snippets/text-mode/cc-mode/for | 6 + .../yas/snippets/text-mode/cc-mode/fun | 6 + .../yas/snippets/text-mode/cc-mode/main | 7 + .../yas/snippets/text-mode/cc-mode/while | 6 + .../text-mode/latex-mode/art.yasnippet | 101 +++ .../text-mode/latex-mode/beam.yasnippet | 134 ++++ .../text-mode/latex-mode/letter.yasnippet | 289 ++++++++ .gtkrc-2.0 | 20 + .nanorc | 313 +++++++++ .rtorrent.rc | 104 +++ .save | 224 ++++++ .shell.d/alias_rc | 211 ++++++ .shell.d/colors | 76 +++ .shell.d/funs_bash | 231 +++++++ .shell.d/funs_rc | 461 +++++++++++++ .shell.d/keys_zsh | 64 ++ .shell.d/main_rc | 69 ++ .shell.d/options_bash | 177 +++++ .shell.d/options_zsh | 104 +++ .shell.d/personal_rc | 19 + .taskrc | 34 + .vimrc | 282 ++++++++ .xinitrc | 47 ++ .zshrc | 50 ++ 66 files changed, 9013 insertions(+) create mode 100644 .Xresources create mode 100644 .arch-mirrors-edf23ads create mode 100644 .arch-mirrors-odin create mode 100644 .arch-mirrors-peteramd create mode 100644 .arch-pkg-aur-edf23ads create mode 100644 .arch-pkg-aur-odin create mode 100644 .arch-pkg-aur-peteramd create mode 100644 .arch-pkg-explicit-edf23ads create mode 100644 .arch-pkg-explicit-odin create mode 100644 .arch-pkg-explicit-peteramd create mode 100644 .arch-pkg-official-edf23ads create mode 100644 .arch-pkg-official-odin create mode 100644 .arch-pkg-official-peteramd create mode 100644 .bashrc create mode 100644 .cmus/autosave create mode 100644 .config/awesome/rc.lua create mode 100644 .config/awesome/themes/getskin.sh create mode 100644 .config/gtk-3.0/settings.ini create mode 100644 .config/luakit/binds.lua create mode 100644 .config/luakit/globals.lua create mode 100644 .config/luakit/rc.lua create mode 100644 .config/lxterminal/lxterminal.conf create mode 100644 .config/ranger/apps.py create mode 100644 .config/ranger/options.py create mode 100644 .config/ranger/rc.conf create mode 100755 .config/ranger/scope.sh create mode 100755 .config/wmfs/speeddown.sh create mode 100755 .config/wmfs/speedup.sh create mode 100755 .config/wmfs/status.sh create mode 100755 .config/wmfs/wmfs-status.sh create mode 100644 .config/wmfs/wmfs.d/bars create mode 100644 .config/wmfs/wmfs.d/client create mode 100644 .config/wmfs/wmfs.d/keys create mode 100644 .config/wmfs/wmfs.d/launchers create mode 100644 .config/wmfs/wmfs.d/rules create mode 100644 .config/wmfs/wmfs.d/tags create mode 100644 .config/wmfs/wmfs.d/themes create mode 100644 .config/wmfs/wmfsrc create mode 100644 .emacs create mode 100644 .emacs.d/abbrev_defs create mode 100644 .emacs.d/plugins/smart-compile/smart-compile.el create mode 100644 .emacs.d/plugins/yas/snippets/text-mode/cc-mode/else create mode 100644 .emacs.d/plugins/yas/snippets/text-mode/cc-mode/for create mode 100644 .emacs.d/plugins/yas/snippets/text-mode/cc-mode/fun create mode 100644 .emacs.d/plugins/yas/snippets/text-mode/cc-mode/main create mode 100644 .emacs.d/plugins/yas/snippets/text-mode/cc-mode/while create mode 100644 .emacs.d/plugins/yas/snippets/text-mode/latex-mode/art.yasnippet create mode 100644 .emacs.d/plugins/yas/snippets/text-mode/latex-mode/beam.yasnippet create mode 100644 .emacs.d/plugins/yas/snippets/text-mode/latex-mode/letter.yasnippet create mode 100644 .gtkrc-2.0 create mode 100644 .nanorc create mode 100644 .rtorrent.rc create mode 100755 .save create mode 100644 .shell.d/alias_rc create mode 100644 .shell.d/colors create mode 100644 .shell.d/funs_bash create mode 100644 .shell.d/funs_rc create mode 100644 .shell.d/keys_zsh create mode 100644 .shell.d/main_rc create mode 100644 .shell.d/options_bash create mode 100644 .shell.d/options_zsh create mode 100644 .shell.d/personal_rc create mode 100644 .taskrc create mode 100644 .vimrc create mode 100644 .xinitrc create mode 100644 .zshrc diff --git a/.Xresources b/.Xresources new file mode 100644 index 00000000..a1a42435 --- /dev/null +++ b/.Xresources @@ -0,0 +1,88 @@ +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!! Xresources +!! 2011-10-25 +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +! vim:nu:ai:si:et:ts=4:sw=4:ft=xdefaults: + +! Commands : xfontsel +! Colors : LightYellow Black + +!xterm*background: black +!xterm*faceName:terminus +!xterm*faceSize:8 +!xterm*font:-*-terminus-medium-r-normal-*-14-*-*-*-*-*-*-* + +! ------------------------------------------------- +! terminal colors +! ------------------------------------------------- + +!tangoesque scheme +!*background: #111111 +!*background: #000000 +! *foreground: #babdb6 +!Black (not tango) + DarkGrey +! *color0: #000000 +! *color8: #555753 +! DarkRed + Red +! *color1: #ff6565 +! *color9: #ff8d8d +! DarkGreen + Green +! *color2: #93d44f +! *color10: #c8e7a8 +! DarkYellow + Yellow +! *color3: #eab93d +! *color11: #ffc123 +! DarkBlue + Blue +! *color4: #204a87 +! *color12: #3465a4 +! DarkMangenta + Mangenta +! *color5: #ce5c00 +! *color13: #f57900 +!DarkCyan + Cyan (both not tango) +! *color6: #89b6e2 +! *color14: #46a4ff +! LightGrey + White +! *color7: #cccccc +! *color15: #ffffff +! +!================= +! Urxvt +!================= + +urxvt*background: black +urxvt*foreground: white +urxvt*saveLines: 10000 +URxvt.font: xft:DejaVu Sans Mono:pixelsize=12 +! URxvt.font: -*-dina-medium-r-*-*-16-*-*-*-*-*-*-* +! URxvt.font: xft:monaco:size=10 +urxvt*scrollBar:false + +URxvt.perl-ext: default,url-select,tabbed +! URxvt.perl-ext-common: +URxvt.keysym.M-u: perl:url-select:select_next +URxvt.urlLauncher: luakit +URxvt.underlineURLs: true + +! urxvt*font: -*-fixed-medium-r-*-*-18-*-*-*-*-*-iso8859-* +! urxvt*charClass: 33:48,35:48,37-38:48,43-47:48,58:48,61:48,63-64:48,95:48,126:48 +! urxvt.perl-ext-common: default,tabbed +! urxvt.tabbed.tabbar-fg: 2 +! urxvt.tabbed.tabbar-bg: 0 + +! urxvt.tabbed.tab-bg: 0 +! urxvt.tabbed.tab-fg: 3 + + +!================= +! Xterm +!================= + +!xterm*background: black +!xterm*saveLines: 10000 +!xterm*foreground: white +!xterm*font: -*-fixed-medium-r-*-*-18-*-*-*-*-*-iso8859-* +!xterm*charClass: 33:48,35:48,37-38:48,43-47:48,58:48,61:48,63-64:48,95:48,126:48 +! xterm*scrollBar:true +! xterm*Scrollbar.backgroundPixmap: gradient:horizontal?dimension=14&start=darkgreen&end=pink +! xterm*Scrollbar.foregroungPixmap: black diff --git a/.arch-mirrors-edf23ads b/.arch-mirrors-edf23ads new file mode 100644 index 00000000..2eb2a840 --- /dev/null +++ b/.arch-mirrors-edf23ads @@ -0,0 +1,6 @@ +[options] +[core] +[extra] +[community] +[multilib] +[archlinuxfr] diff --git a/.arch-mirrors-odin b/.arch-mirrors-odin new file mode 100644 index 00000000..55245c4f --- /dev/null +++ b/.arch-mirrors-odin @@ -0,0 +1,4 @@ +[options] +[core] +[extra] +[community] diff --git a/.arch-mirrors-peteramd b/.arch-mirrors-peteramd new file mode 100644 index 00000000..eb4814ba --- /dev/null +++ b/.arch-mirrors-peteramd @@ -0,0 +1,6 @@ +[options] +[core] +[extra] +[community] +[multilib] +[archlinuxfr] diff --git a/.arch-pkg-aur-edf23ads b/.arch-pkg-aur-edf23ads new file mode 100644 index 00000000..d0f6b85f --- /dev/null +++ b/.arch-pkg-aur-edf23ads @@ -0,0 +1,15 @@ +bashmount +doxymacs-git +dropbox +dropbox-cli +emacs-auto-complete-git +emacs-yasnippet +emacs-yasnippet-latex-git +fbpdf-git +guvcview +movgrab +python-unipath +submarine +trash-cli +vicious-git +wmfs-git diff --git a/.arch-pkg-aur-odin b/.arch-pkg-aur-odin new file mode 100644 index 00000000..d396bc5c --- /dev/null +++ b/.arch-pkg-aur-odin @@ -0,0 +1,14 @@ +auto-complete +bashmount +dropbox +dropbox-cli +emacs-yasnippet +emacs-yasnippet-latex-git +gsharkdown +libfetch +movgrab +ns-3 +package-query +pacman-color +trash-cli +yaourt diff --git a/.arch-pkg-aur-peteramd b/.arch-pkg-aur-peteramd new file mode 100644 index 00000000..9fc6b67f --- /dev/null +++ b/.arch-pkg-aur-peteramd @@ -0,0 +1,18 @@ +basex +bashmount +doxymacs +dropbox +dropbox-cli +emacs-auto-complete-git +emacs-yasnippet +emacs-yasnippet-latex-git +gmp-ecm +localepurge +movgrab +msieve +pugixml +submarine +trash-cli +vicious-git +vlc-ncurses +xqilla diff --git a/.arch-pkg-explicit-edf23ads b/.arch-pkg-explicit-edf23ads new file mode 100644 index 00000000..56c6e50d --- /dev/null +++ b/.arch-pkg-explicit-edf23ads @@ -0,0 +1,206 @@ +abs +acpi +alsa-utils +atool +auctex +autoconf +automake +awesome +bash +bash-completion +bashmount +bc +binutils +bison +blas +bzip2 +bzr +calc +checkinstall +clang +claws-mail +cmus +coreutils +crda +cronie +cryptsetup +device-mapper +dhclient +dhcpcd +diffutils +doxymacs-git +dropbox +dropbox-cli +dvgrab +e2fsprogs +elfutils +emacs-auto-complete-git +emacs-lua-mode +emacs-nox +emacs-yasnippet +emacs-yasnippet-latex-git +evince +fakeroot +fbpdf-git +fbv +feh +fftw +file +filesystem +findutils +firefox +firefox-adblock-plus +flashplugin +flex +gawk +gcc +gcc-libs +gcolor2 +gdb +gettext +gimp +glibc +gnome-themes-standard +gnumeric +gnuplot +gparted +gpicview +gprolog +grep +grub +gtk-aurora-engine +gtk-engines +guvcview +gzip +hdparm +heirloom-mailx +highlight +htop +hunspell-en +hunspell-fr +ifplugd +inetutils +initscripts +inkscape +iputils +jfsutils +jre7-openjdk +ladspa +latex2html +latex2rtf +less +lib32-v4l-utils +libaio +libavc1394 +libpipeline +libquicktime +libstdc++5 +libtool +licenses +liferea +links +linux +linux-lts +logrotate +lshw +lvm2 +lxde-icon-theme +lxterminal +m4 +make +man-db +man-pages +mdadm +midori +movgrab +mplayer +nano +ncdu +nmap +ntfs-3g +ntfsprogs +numlockx +openssh +p7zip +pacman +pacman-color +patch +pciutils +pcmciautils +pdksh +perl +pkg-config +pkgtools +postfix +ppp +procps +psmisc +pstoedit +pwgen +ranger +reiserfsprogs +rpmextract +rtorrent +rxvt-unicode +screen +scrot +sed +shadow +skype +splint +submarine +subversion +sudo +sysfsutils +syslog-ng +sysstat +sysvinit +tar +task +texinfo +texlive-genericextra +texlive-langextra +texlive-latexextra +texlive-pictures +texlive-science +thunderbird +trash-cli +tree +ttf-dejavu +udev +unrar +unzip +upx +usbutils +util-linux +valgrind +vi +vicious-git +vlock +wget +which +wireless_tools +wmfs-git +wmname +wpa_actiond +wpa_supplicant +xclip +xcursor-vanilla-dmz-aa +xf86-input-synaptics +xf86-video-ati +xf86-video-vesa +xfconf +xfsprogs +xkeycaps +xorg-server +xorg-utils +xorg-xdm +xorg-xinit +xorg-xmodmap +xorg-xrandr +xpdf +xscreensaver +xsel +yaourt +zenity +zsh diff --git a/.arch-pkg-explicit-odin b/.arch-pkg-explicit-odin new file mode 100644 index 00000000..3544abe4 --- /dev/null +++ b/.arch-pkg-explicit-odin @@ -0,0 +1,168 @@ +acpi +alsa-utils +atool +auto-complete +autoconf +automake +awesome +bash +bash-completion +bashmount +binutils +bison +bzip2 +bzr +calc +cmus +consolekit +coreutils +cpufrequtils +cronie +cryptsetup +ctags +cups +device-mapper +dhcpcd +diffutils +dropbox +dropbox-cli +e2fsprogs +emacs-lua-mode +emacs-nox +emacs-yasnippet +emacs-yasnippet-latex-git +fakeroot +feh +file +filesystem +findutils +flashplugin +flex +gawk +gcc +gcc-libs +gcolor2 +gdb +gettext +glibc +gnuplot +gparted +grep +grub +gsharkdown +gzip +hdparm +heirloom-mailx +highlight +hplip +htop +inetutils +initscripts +inkscape +iproute2 +iptables +iputils +jfsutils +laptop-mode-tools +less +libpipeline +libtool +licenses +links +linux +linux-lts +logrotate +luakit +lvm2 +lxterminal +m4 +make +man-db +man-pages +mdadm +mediainfo +mercurial +mkinitcpio +movgrab +mplayer +mutt +nano +ncdu +ncurses +net-tools +nmap +ns-3 +numlockx +openssh +p7zip +package-query +pacman +pacman-color +pari +patch +pciutils +pcmciautils +perl +pkg-config +ppp +procps-ng +psmisc +pwgen +pygtk +ranger +reiserfsprogs +rtorrent +rxvt-unicode +scons +scrot +sed +shadow +slock +splint +sudo +sxiv +sysfsutils +syslog-ng +systemd-tools +sysvinit +tar +task +texinfo +texlive-genericextra +texlive-latexextra +texlive-pictures +trash-cli +tree +unrar +unzip +usbutils +util-linux +valgrind +vi +vicious +vim +vlock +waf +wget +which +wireless_tools +wpa_supplicant +xf86-input-synaptics +xf86-video-ati +xf86-video-vesa +xfsprogs +xorg-server +xorg-twm +xorg-xev +xorg-xinit +xorg-xrandr +xorg-xrdb +xsel +xterm +xz +yaourt +zathura +zathura-djvu +zathura-pdf-poppler +zathura-ps +zsh diff --git a/.arch-pkg-explicit-peteramd b/.arch-pkg-explicit-peteramd new file mode 100644 index 00000000..896a4cc7 --- /dev/null +++ b/.arch-pkg-explicit-peteramd @@ -0,0 +1,294 @@ +abs +acpi +acpid +alsa-utils +arch-wiki-lite +aspell-en +aspell-fr +atool +at-spi2-atk +at-spi2-core +attr +auctex +autoconf +automake +awesome +basex +bash +bash-completion +bashmount +bison +bzip2 +bzr +calc +chrpath +cmus +consolekit +coreutils +cppcheck +cronie +cryptsetup +ctags +cups +cyrus-sasl +dash +dbus-python +device-mapper +dhclient +dhcpcd +diffutils +dina-font +djvulibre +dosfstools +doxygen +doxymacs +dropbox +dropbox-cli +dvtm +e2fsprogs +emacs-auto-complete-git +emacs-lua-mode +emacs-nox +emacs-yasnippet +emacs-yasnippet-latex-git +epdfview +fakeroot +feh +file +filesystem +findutils +firefox +flashplugin +flex +gamin +gaupol +gawk +gcc-multilib +gcolor2 +gconf +gdb +gettext +ghostscript +gif2png +gimp +git +glew +glib +glibc +gnome-icon-theme +gnome-icon-theme-extras +gnome-icon-theme-symbolic +gnumeric +gnuplot +goffice +gparted +grep +grub +gsfonts +gstreamer0.10-good-plugins +gstreamer0.10-ugly-plugins +gtk-engines +gzip +handbrake +hdparm +heirloom-mailx +highlight +hplip +htop +hunspell-en +hunspell-fr +icon-naming-utils +ifplugd +inetutils +initscripts +inkscape +iotop +iptables +iputils +jfsutils +kmod +latex2html +less +libev +libftdi +libirman +libmediainfo +libpng12 +libspectre +libtool +libtorrent +libusb +libxdg-basedir +libxvmc +libzen +licenses +links +linux +linux-firmware +linux-lts +linux-manpages +lirc-utils +lm_sensors +localepurge +logrotate +lrzip +lshw +ltrace +lua +luakit +lvm2 +lxterminal +lzo2 +m4 +make +man-db +man-pages +mdadm +mediainfo +mkvtoolnix-cli +mkvtoolnix-gtk +moc +movgrab +mpg123 +mplayer +msieve +msmtp +mtools +mutt +namcap +nano +ncdu +netcfg +net-tools +ngrep +nmap +ntfs-3g +ntfsprogs +numlockx +openssh +oss +oxygen-gtk2 +p7zip +pacman +pacman-color +pacman-mirrorlist +pam +pari +patch +pciutils +pcmciautils +perl +phonon-gstreamer +pkg-config +pkgtools +pmount +postfix +postgresql-libs +ppp +procps-ng +psmisc +pugixml +pwgen +python2-eyed3 +python-gobject2 +python-lxml +python-urwid +ranger +reiserfsprogs +rlwrap +rpmextract +rtorrent +rxvt-unicode +samba +screen +scrot +sed +shadow +slock +splint +strace +submarine +subversion +sudo +sxiv +sysfsutils +syslog-ng +sysstat +sysvbanner +sysvinit +tar +task +tcl +texinfo +texlive-core +texlive-formatsextra +texlive-genericextra +texlive-latexextra +texlive-pictures +texlive-science +thunderbird +trash-cli +tree +ttf-droid +ttf-freefont +ttf-inconsolata +ttf-liberation +ttf-ubuntu-font-family +udev +unrar +unzip +upx +urxvt-url-select +usbutils +util-linux +valgrind +vi +vicious-git +vlc-ncurses +vlock +wget +which +wireless_tools +wmname +wpa_actiond +wpa_supplicant +xclip +xcursor-vanilla-dmz-aa +xf86-video-ati +xf86-video-vesa +xfsprogs +xmlrpc-c +xmlstarlet +xorg-fonts-100dpi +xorg-fonts-75dpi +xorg-iceauth +xorg-server +xorg-server-utils +xorg-sessreg +xorg-xbacklight +xorg-xcmsdb +xorg-xev +xorg-xfontsel +xorg-xgamma +xorg-xhost +xorg-xinit +xorg-xinput +xorg-xmessage +xorg-xmodmap +xorg-xprop +xorg-xrandr +xorg-xrdb +xorg-xrefresh +xorg-xsetroot +xosd +xqilla +xsel +xz +yaourt +youtube-dl +zathura +zathura-djvu +zathura-pdf-poppler +zathura-ps +zip +zsh diff --git a/.arch-pkg-official-edf23ads b/.arch-pkg-official-edf23ads new file mode 100644 index 00000000..eb717863 --- /dev/null +++ b/.arch-pkg-official-edf23ads @@ -0,0 +1,627 @@ +a52dec +aalib +abs +acl +acpi +alsa-lib +alsa-utils +apr +apr-util +aspell +ati-dri +atk +atkmm +atool +attr +auctex +autoconf +automake +avahi +awesome +babl +bash +bash-completion +bc +binutils +bison +blas +bluez +bzip2 +bzr +ca-certificates +ca-certificates-java +cairomm +cairo-xcb +calc +cantarell-fonts +cdparanoia +checkinstall +cifs-utils +clang +claws-mail +cloog +cmus +colord +compositeproto +consolekit +coreutils +cracklib +crda +cronie +cryptsetup +curl +damageproto +db +dbus +dbus-core +dbus-glib +dconf +desktop-file-utils +device-mapper +dhclient +dhcpcd +dialog +diffutils +dirmngr +djvulibre +dmxproto +dri2proto +dvgrab +e2fsprogs +eject +elfutils +emacs-lua-mode +emacs-nox +enca +enchant +eventlog +evince +expat +faac +faad2 +fakeroot +fbv +feh +ffmpeg +fftw +file +filesystem +findutils +firefox +firefox-adblock-plus +fixesproto +flac +flashplugin +flex +fontconfig +fontsproto +freeglut +freetype2 +fribidi +fuse +gawk +gc +gcc +gcc-libs +gcolor2 +gconf +gd +gdb +gdbm +gdk-pixbuf2 +gegl +gettext +ghostscript +giblib +giflib +gimp +git +glib2 +glibc +glibmm +glib-networking +glproto +gmp +gnome-icon-theme +gnome-icon-theme-symbolic +gnome-themes-standard +gnumeric +gnupg +gnuplot +gnutls +goffice +gparted +gpgme +gpicview +gpm +gprolog +grep +groff +grub +gsettings-desktop-schemas +gsfonts +gsl +gsm +gstreamer0.10 +gstreamer0.10-base +gtk2 +gtk3 +gtk-aurora-engine +gtk-engines +gtkmm +gtkspell +gtk-update-icon-cache +gzip +hdparm +heirloom-mailx +hicolor-icon-theme +highlight +hspell +htop +hunspell +hunspell-en +hunspell-fr +iana-etc +icon-naming-utils +icu +ifplugd +imagemagick +imlib2 +inetutils +initscripts +inkscape +inputproto +iproute2 +iputils +isl +iw +jack +jasper +jbig2dec +jfsutils +jre7-openjdk +jre7-openjdk-headless +json-c +json-glib +kbd +kbproto +keyutils +kmod +krb5 +ladspa +lame +latex2html +latex2rtf +lcms +lcms2 +less +lesstif +lib32-alsa-lib +lib32-bzip2 +lib32-dbus-core +lib32-expat +lib32-fontconfig +lib32-freetype2 +lib32-gcc-libs +lib32-glib2 +lib32-glibc +lib32-libdrm +lib32-libffi +lib32-libgl +lib32-libglapi +lib32-libice +lib32-libjpeg-turbo +lib32-libmng +lib32-libpciaccess +lib32-libpng +lib32-libsm +lib32-libtiff +lib32-libx11 +lib32-libxau +lib32-libxcb +lib32-libxcursor +lib32-libxdamage +lib32-libxdmcp +lib32-libxext +lib32-libxfixes +lib32-libxi +lib32-libxrandr +lib32-libxrender +lib32-libxss +lib32-libxv +lib32-libxxf86vm +lib32-openssl +lib32-pcre +lib32-qt +lib32-sqlite3 +lib32-util-linux +lib32-v4l-utils +lib32-zlib +libaio +libao +libarchive +libass +libassuan +libasyncns +libatasmart +libavc1394 +libbluray +libcaca +libcap +libcap-ng +libcddb +libcdio +libcroco +libcups +libdaemon +libdatrie +libdca +libdmx +libdrm +libdv +libedit +libetpan +libev +libevent +libexif +libffi +libfontenc +libftdi +libgcrypt +libgee +libgl +libglade +libglapi +libgnome-keyring +libgpg-error +libgphoto2 +libgsf +libgssglue +libgusb +libice +libid3tag +libiec61883 +libieee1284 +libirman +libjpeg-turbo +libksba +libldap +libltdl +libmad +libmikmod +libmng +libmodplug +libmp4v2 +libmpc +libmpcdec +libmysqlclient +libnl +libnotify +libogg +libpcap +libpciaccess +libpipeline +libpng +libproxy +libpulse +libquicktime +libraw1394 +librsvg +libsamplerate +libsasl +libsigc++ +libsigsegv +libsm +libsndfile +libsoup +libspectre +libssh2 +libstdc++5 +libtasn1 +libthai +libtheora +libtiff +libtirpc +libtool +libtorrent +libunique +libusb +libusb-compat +libva +libvdpau +libvorbis +libvpx +libwbclient +libwebkit +libwmf +libx11 +libxau +libxaw +libxcb +libxcomposite +libxcursor +libxdamage +libxdg-basedir +libxdmcp +libxext +libxfce4util +libxfixes +libxfont +libxft +libxi +libxinerama +libxkbfile +libxml2 +libxmu +libxp +libxpm +libxrandr +libxrender +libxslt +libxss +libxt +libxtst +libxv +libxvmc +libxxf86dga +libxxf86vm +licenses +liferea +links +linux +linux-api-headers +linux-firmware +linux-lts +lirc-utils +llvm +lm_sensors +logrotate +lshw +lsof +lua +lvm2 +lxde-icon-theme +lxterminal +m4 +make +man-db +man-pages +mcpp +mdadm +mesa +midori +mime-types +mkinitcpio +mkinitcpio-busybox +mozilla-common +mpfr +mpg123 +mplayer +mtdev +mupdf +nano +ncdu +ncurses +neon +netpbm +net-snmp +nettle +net-tools +nmap +nspr +nss +ntfs-3g +ntfsprogs +numlockx +opencore-amr +openjpeg +openssh +openssl +orc +p11-kit +p7zip +package-query +pacman +pacman-color +pacman-mirrorlist +pam +pango +pangomm +parted +patch +pciutils +pcmciautils +pcre +pdksh +perl +perl-encode-locale +perl-error +perl-file-listing +perl-html-parser +perl-html-tagset +perl-http-cookies +perl-http-daemon +perl-http-date +perl-http-message +perl-http-negotiate +perl-libwww +perl-lwp-mediatypes +perl-net-http +perl-uri +perl-www-robotrules +perl-xml-parser +perl-xml-simple +pilot-link +pinentry +pixman +pkg-config +pkgtools +plotutils +polkit +poppler +poppler-data +poppler-glib +popt +portaudio +postfix +postgresql-libs +ppl +ppp +printproto +procps +psmisc +pstoedit +pth +pwgen +pygobject2-devel +pygtk +python +python2 +python2-cairo +python2-distribute +python2-gobject2 +qt +randrproto +ranger +readline +recode +recordproto +reiserfsprogs +renderproto +rhino +rpmextract +rsync +rtmpdump +rtorrent +run-parts +rxvt-unicode +sane +schroedinger +screen +scrnsaverproto +scrot +sdl +sdl_mixer +sed +sg3_utils +shadow +shared-color-profiles +shared-mime-info +skype +smbclient +smpeg +speex +splint +sqlite +startup-notification +subversion +sudo +sysfsutils +syslog-ng +sysstat +sysvinit +t1lib +talloc +tar +task +tdb +texinfo +texlive-bin +texlive-core +texlive-genericextra +texlive-langextra +texlive-latexextra +texlive-pictures +texlive-science +thunderbird +tree +ttf-dejavu +tzdata +udev +udisks +unixodbc +unrar +unzip +upx +usbutils +util-linux +v4l-utils +valgrind +vi +videoproto +vlock +vte +vte-common +wavpack +wget +which +wireless-regdb +wireless_tools +wmname +wpa_actiond +wpa_supplicant +wxgtk +x264 +xcb-proto +xcb-util +xcb-util-image +xcb-util-keysyms +xcb-util-wm +xclip +xcursor-vanilla-dmz-aa +xdg-utils +xextproto +xf86dgaproto +xf86-input-evdev +xf86-input-synaptics +xf86-video-ati +xf86-video-vesa +xf86vidmodeproto +xfconf +xfsprogs +xineramaproto +xkeyboard-config +xkeycaps +xmlrpc-c +xorg-appres +xorg-bdftopcf +xorg-fonts-alias +xorg-fonts-encodings +xorg-fonts-misc +xorg-font-util +xorg-font-utils +xorg-mkfontdir +xorg-mkfontscale +xorg-server +xorg-server-common +xorg-sessreg +xorg-setxkbmap +xorg-utils +xorg-xauth +xorg-xdm +xorg-xdpyinfo +xorg-xdriinfo +xorg-xev +xorg-xinit +xorg-xkbcomp +xorg-xlsatoms +xorg-xlsclients +xorg-xmodmap +xorg-xprop +xorg-xrandr +xorg-xrdb +xorg-xset +xorg-xvinfo +xorg-xwininfo +xpdf +xproto +xscreensaver +xsel +xvidcore +xz +yajl +yaourt +zenity +zlib +zsh +zziplib diff --git a/.arch-pkg-official-odin b/.arch-pkg-official-odin new file mode 100644 index 00000000..06ab95f4 --- /dev/null +++ b/.arch-pkg-official-odin @@ -0,0 +1,473 @@ +a52dec +aalib +acl +acpi +alsa-lib +alsa-utils +archlinux-keyring +aspell +ati-dri +atk +atkmm +atool +attr +auctex +autoconf +automake +avahi +awesome +bash +bash-completion +bc +binutils +bison +bzip2 +bzr +ca-certificates +cairo +cairomm +calc +cdparanoia +cifs-utils +cloog +cmus +compositeproto +consolekit +coreutils +cpufrequtils +cracklib +cronie +cryptsetup +ctags +cups +cups-filters +curl +damageproto +db +dbus +dbus-core +dbus-glib +desktop-file-utils +device-mapper +dhcpcd +dialog +diffutils +dirmngr +djvulibre +dnssec-anchors +dri2proto +e2fsprogs +eject +emacs-lua-mode +emacs-nox +enca +enchant +eventlog +expat +faac +faad2 +fakeroot +feh +file +filesystem +findutils +fixesproto +flac +flashplugin +flex +fontconfig +fontsproto +foomatic-db +foomatic-db-engine +foomatic-filters +freeglut +freetype2 +fribidi +gawk +gc +gcc +gcc-libs +gcolor2 +gd +gdb +gdbm +gdk-pixbuf2 +geoclue +gettext +ghostscript +giblib +giflib +girara-common +girara-gtk2 +git +glib2 +glibc +glibmm +glib-networking +glproto +gmp +gnupg +gnuplot +gnutls +gparted +gpgme +gpm +grep +groff +grub +gsettings-desktop-schemas +gsl +gstreamer0.10 +gstreamer0.10-base +gstreamer0.10-python +gtk2 +gtkmm +gtkspell +gtk-update-icon-cache +gzip +hdparm +heirloom-mailx +hicolor-icon-theme +highlight +hplip +hspell +htop +hunspell +hwids +iana-etc +icu +imagemagick +imlib2 +inetutils +initscripts +inkscape +inputproto +iproute2 +iptables +iputils +isl +jack +jasper +jfsutils +json-c +kbd +kbproto +keyutils +kmod +krb5 +lame +laptop-mode-tools +lcms +lcms2 +ldns +less +libarchive +libass +libassuan +libasyncns +libatasmart +libbluray +libcaca +libcap +libcap-ng +libcddb +libcdio +libcups +libdaemon +libdatrie +libdca +libdrm +libedit +libev +libexif +libffi +libfontenc +libftdi +libgcrypt +libgl +libglade +libglapi +libgpg-error +libgssglue +libice +libid3tag +libidn +libirman +libjpeg-turbo +libksba +libldap +libltdl +libmad +libmediainfo +libmms +libmng +libmp4v2 +libmpc +libnl +libogg +libpcap +libpciaccess +libpipeline +libpng +libproxy +libpulse +libsamplerate +libsasl +libsigc++ +libsigsegv +libsm +libsndfile +libsoup +libspectre +libssh2 +libsystemd +libtasn1 +libthai +libtheora +libtiff +libtirpc +libtool +libtorrent +libunique +libusb-compat +libusbx +libvdpau +libvorbis +libvpx +libwbclient +libwebkit +libx11 +libxau +libxaw +libxcb +libxcomposite +libxcursor +libxdamage +libxdg-basedir +libxdmcp +libxext +libxfixes +libxfont +libxft +libxi +libxinerama +libxkbfile +libxml2 +libxmu +libxpm +libxrandr +libxrender +libxslt +libxss +libxt +libxtst +libxv +libxvmc +libxxf86dga +libxxf86vm +libzen +licenses +links +linux +linux-api-headers +linux-firmware +linux-lts +lirc-utils +logrotate +lsof +lua +luafilesystem +luajit +luakit +lvm2 +lxterminal +m4 +make +man-db +man-pages +mcpp +mdadm +mediainfo +mercurial +mesa +mime-types +mkinitcpio +mkinitcpio-busybox +mozilla-common +mpfr +mpg123 +mplayer +mtdev +mutt +nano +ncdu +ncurses +net-snmp +nettle +net-tools +nmap +nspr +nss +numlockx +opencore-amr +openjpeg +openslp +openssh +openssl +orc +p11-kit +p7zip +pacman +pacman-mirrorlist +pam +pambase +pango +pangomm +pari +parted +patch +pciutils +pcmciautils +pcre +perl +perl-error +pinentry +pixman +pkg-config +polkit +poppler +poppler-data +poppler-glib +popt +ppl +ppp +procps-ng +psmisc +pth +pwgen +pygobject2-devel +pygtk +python +python2 +python2-cairo +python2-dbus +python2-distribute +python2-gobject2 +python-configobj +python-dbus-common +python-pycurl +randrproto +ranger +readline +recode +recordproto +reiserfsprogs +renderproto +rtorrent +run-parts +rxvt-unicode +schroedinger +scons +scrnsaverproto +scrot +sdl +sed +sg3_utils +shadow +shared-mime-info +slock +smbclient +splint +sqlite +startup-notification +sudo +sxiv +sysfsutils +syslog-ng +systemd-tools +sysvinit +t1lib +talloc +tar +task +tdb +texinfo +texlive-bin +texlive-core +texlive-genericextra +texlive-latexextra +texlive-pictures +tree +ttf-dejavu +tzdata +udisks +unrar +unzip +usbutils +util-linux +valgrind +vi +vicious +videoproto +vim +vim-runtime +vlock +vte +vte-common +waf +wget +which +wireless_tools +wpa_supplicant +wxgtk +x264 +xbitmaps +xcb-proto +xcb-util +xcb-util-image +xcb-util-keysyms +xcb-util-wm +xextproto +xf86dgaproto +xf86-input-evdev +xf86-input-synaptics +xf86-video-ati +xf86-video-vesa +xf86vidmodeproto +xfsprogs +xineramaproto +xkeyboard-config +xmlrpc-c +xorg-bdftopcf +xorg-fonts-alias +xorg-fonts-encodings +xorg-fonts-misc +xorg-font-util +xorg-font-utils +xorg-luit +xorg-mkfontdir +xorg-mkfontscale +xorg-server +xorg-server-common +xorg-setxkbmap +xorg-twm +xorg-xauth +xorg-xev +xorg-xinit +xorg-xkbcomp +xorg-xmessage +xorg-xrandr +xorg-xrdb +xproto +xsel +xterm +xvidcore +xz +yajl +zathura +zathura-djvu +zathura-pdf-poppler +zathura-ps +zlib +zsh +zziplib diff --git a/.arch-pkg-official-peteramd b/.arch-pkg-official-peteramd new file mode 100644 index 00000000..871788c2 --- /dev/null +++ b/.arch-pkg-official-peteramd @@ -0,0 +1,635 @@ +a52dec +aalib +abs +acl +acpi +acpid +alsa-lib +alsa-utils +apr +apr-util +arch-wiki-lite +aspell +aspell-en +aspell-fr +ati-dri +atk +atkmm +atool +at-spi2-atk +at-spi2-core +attr +auctex +autoconf +automake +avahi +awesome +babl +bash +bash-completion +binutils-multilib +bison +boost-libs +bzip2 +bzr +ca-certificates +ca-certificates-java +cairo +cairomm +calc +cdparanoia +chrpath +cifs-utils +cloog +cmake +cmus +colord +compositeproto +consolekit +coreutils +cppcheck +cracklib +cronie +cryptsetup +ctags +cups +curl +cyrus-sasl +damageproto +dash +db +dbus +dbus-core +dbus-glib +dbus-python +dconf +desktop-file-utils +device-mapper +dhclient +dhcpcd +dialog +diffutils +dina-font +dirmngr +djvulibre +dnssec-anchors +dosfstools +doxygen +dri2proto +dvtm +e2fsprogs +eject +elfutils +emacs-lua-mode +emacs-nox +enca +enchant +epdfview +eventlog +expat +faac +faad2 +fakeroot +feh +ffmpeg +file +filesystem +findutils +firefox +fixesproto +flac +flashplugin +flex +fontconfig +fontsproto +foomatic-db +foomatic-db-engine +foomatic-filters +freeglut +freetype2 +fribidi +fuse +gamin +gaupol +gawk +gc +gcc-libs-multilib +gcc-multilib +gcolor2 +gconf +gd +gdb +gdbm +gdk-pixbuf2 +gegl +geoclue +gettext +ghostscript +giblib +gif2png +giflib +gimp +girara-common +girara-gtk2 +git +glew +glib +glib2 +glibc +glibmm +glib-networking +glproto +gmp +gnome-icon-theme +gnome-icon-theme-extras +gnome-icon-theme-symbolic +gnumeric +gnupg +gnuplot +gnutls +goffice +gparted +gpgme +gpm +grep +groff +grub +gsasl +gsettings-desktop-schemas +gsfonts +gsl +gsm +gstreamer0.10 +gstreamer0.10-base +gstreamer0.10-base-plugins +gstreamer0.10-good +gstreamer0.10-good-plugins +gstreamer0.10-ugly +gstreamer0.10-ugly-plugins +gtk2 +gtk3 +gtk-engines +gtkmm +gtkspell +gtk-update-icon-cache +gzip +handbrake +hdparm +heirloom-mailx +hicolor-icon-theme +highlight +hplip +hspell +htop +hunspell +hunspell-en +hunspell-fr +iana-etc +icon-naming-utils +icu +ifplugd +imagemagick +imlib2 +inetutils +initscripts +inkscape +inputproto +iotop +iproute2 +iptables +iputils +isl +jack +jasper +java-jline +java-rhino +jdk7-openjdk +jfsutils +jre7-openjdk +jre7-openjdk-headless +json-c +kbd +kbproto +keyutils +kmod +krb5 +lame +latex2html +lcms +lcms2 +ldns +less +lib32-gcc-libs +lib32-glibc +libarchive +libass +libassuan +libasyncns +libatasmart +libavc1394 +libbluray +libcaca +libcap +libcap-ng +libcddb +libcdio +libcroco +libcups +libdaemon +libdatrie +libdca +libdrm +libdv +libdvdread +libebml +libedit +libev +libevent +libexif +libffi +libfontenc +libftdi +libgcrypt +libgee +libgl +libglade +libglapi +libgnome-keyring +libgpg-error +libgphoto2 +libgsf +libgssglue +libgusb +libice +libid3tag +libidn +libiec61883 +libieee1284 +libirman +libjpeg-turbo +libksba +libldap +libltdl +libmad +libmatroska +libmediainfo +libmms +libmng +libmp4v2 +libmpc +libmpeg2 +libmysqlclient +libnl +libnotify +libogg +libpcap +libpciaccess +libpipeline +libpng +libpng12 +libproxy +libpulse +libraw1394 +librsvg +libsamplerate +libsasl +libshout +libsidplay +libsigc++ +libsigsegv +libsm +libsndfile +libsoup +libsoup-gnome +libspectre +libssh2 +libtasn1 +libthai +libtheora +libtiff +libtirpc +libtool +libtorrent +libunique +libusb +libusb-compat +libva +libvdpau +libvisual +libvorbis +libvpx +libwbclient +libwebkit +libwmf +libx11 +libxau +libxaw +libxcb +libxcomposite +libxcursor +libxdamage +libxdg-basedir +libxdmcp +libxext +libxfixes +libxfont +libxft +libxi +libxinerama +libxkbfile +libxml2 +libxmu +libxpm +libxrandr +libxrender +libxslt +libxss +libxt +libxtst +libxv +libxvmc +libxxf86dga +libxxf86vm +libzen +licenses +links +linux +linux-api-headers +linux-firmware +linux-headers +linux-lts +linux-manpages +lirc-utils +lm_sensors +logrotate +lrzip +lshw +lsof +ltrace +lua +luafilesystem +luajit +luakit +lvm2 +lxterminal +lzo2 +m4 +make +man-db +man-pages +mcpp +mdadm +mediainfo +mesa +mime-types +mkinitcpio +mkinitcpio-busybox +mkvtoolnix-cli +mkvtoolnix-gtk +moc +mozilla-common +mpfr +mpg123 +mplayer +msmtp +mtools +mutt +namcap +nano +nasm +ncdu +ncurses +neon +netcfg +netpbm +net-snmp +nettle +net-tools +ngrep +nmap +nspr +nss +ntfs-3g +ntfsprogs +numlockx +opencore-amr +openjpeg +openslp +openssh +openssl +orc +oss +oxygen-gtk2 +p11-kit +p7zip +package-query +pacman +pacman-color +pacman-mirrorlist +pam +pango +pangomm +pari +parted +patch +pciutils +pcmciautils +pcre +perl +perl-error +perl-xml-parser +perl-xml-simple +phonon-gstreamer +pinentry +pixman +pkg-config +pkgtools +pmount +polkit +poppler +poppler-data +poppler-glib +popt +postfix +postgresql-libs +ppl +ppp +procps-ng +psmisc +pth +pwgen +pyalpm +pygobject2-devel +pygtk +python +python2 +python2-cairo +python2-distribute +python2-eyed3 +python2-gobject2 +python-gobject2 +python-lxml +python-pyelftools +python-urwid +randrproto +ranger +readline +recode +recordproto +reiserfsprogs +renderproto +rhino +rlwrap +rpmextract +rsync +rtmpdump +rtorrent +run-parts +rxvt-unicode +samba +sane +schroedinger +screen +scrnsaverproto +scrot +sdl +sed +sg3_utils +shadow +shared-color-profiles +shared-mime-info +slock +smbclient +speex +splint +sqlite +startup-notification +strace +subversion +sudo +sxiv +sysfsutils +syslog-ng +sysstat +sysvbanner +sysvinit +t1lib +taglib +talloc +tar +task +tcl +tdb +texinfo +texlive-bin +texlive-core +texlive-formatsextra +texlive-genericextra +texlive-latexextra +texlive-pictures +texlive-science +thunderbird +tree +ttf-dejavu +ttf-droid +ttf-freefont +ttf-inconsolata +ttf-liberation +ttf-ubuntu-font-family +tzdata +udev +udisks +unixodbc +unrar +unzip +upx +urxvt-url-select +usbutils +util-linux +v4l-utils +valgrind +vi +videoproto +vlock +vte +vte-common +wavpack +wget +which +wireless_tools +wmname +wpa_actiond +wpa_supplicant +wxgtk +x264 +xcb-proto +xcb-util +xcb-util-image +xcb-util-keysyms +xcb-util-wm +xclip +xcursor-vanilla-dmz-aa +xdg-utils +xerces-c +xextproto +xf86dgaproto +xf86-input-evdev +xf86-video-ati +xf86-video-vesa +xf86vidmodeproto +xfsprogs +xineramaproto +xkeyboard-config +xmlrpc-c +xmlstarlet +xorg-bdftopcf +xorg-fonts-100dpi +xorg-fonts-75dpi +xorg-fonts-alias +xorg-fonts-encodings +xorg-fonts-misc +xorg-font-util +xorg-font-utils +xorg-iceauth +xorg-mkfontdir +xorg-mkfontscale +xorg-server +xorg-server-common +xorg-server-utils +xorg-sessreg +xorg-setxkbmap +xorg-xauth +xorg-xbacklight +xorg-xcmsdb +xorg-xev +xorg-xfontsel +xorg-xgamma +xorg-xhost +xorg-xinit +xorg-xinput +xorg-xkbcomp +xorg-xmessage +xorg-xmodmap +xorg-xprop +xorg-xrandr +xorg-xrdb +xorg-xrefresh +xorg-xset +xorg-xsetroot +xosd +xproto +xsel +xvidcore +xz +yajl +yaourt +yasm +youtube-dl +zathura +zathura-djvu +zathura-pdf-poppler +zathura-ps +zip +zlib +zsh +zziplib diff --git a/.bashrc b/.bashrc new file mode 100644 index 00000000..29bc6067 --- /dev/null +++ b/.bashrc @@ -0,0 +1,48 @@ +################################################################################ +## Shell Config -- Master File +## Date 2011-11-19 +################################################################################ + +##============================================================================== +## If not running interactively, don't do anything +##============================================================================== +[ -z "$PS1" ] && return + + +##============================================================================== +## Base functions +##============================================================================== + +isShell() +{ + if [ "$1" = "$(ps | grep $$ | awk '{print $4}')" ]; then + return 0 + else + return 1 + fi +} + +safeSource() +{ + if [ -f "$1" ]; then + source "$1" + return 0 + else + echo "Warning: $1 not found when sourcing!" + return 1 + fi +} + + +##============================================================================== +## Sourcing +##============================================================================== + +SHELLDIR="$HOME/.shell.d" + +safeSource "${SHELLDIR}/main_rc" # Should be sourced first. +safeSource "${SHELLDIR}/options_bash" +safeSource "${SHELLDIR}/funs_rc" +safeSource "${SHELLDIR}/funs_bash" +safeSource "${SHELLDIR}/alias_rc" +safeSource "${SHELLDIR}/personal_rc" diff --git a/.cmus/autosave b/.cmus/autosave new file mode 100644 index 00000000..bebb9e7b --- /dev/null +++ b/.cmus/autosave @@ -0,0 +1,145 @@ +set aaa_mode=album +set altformat_current= %F +set altformat_playlist= %f%= %d +set altformat_title=%f +set altformat_trackwin= %f%= %d +set auto_reshuffle=true +set buffer_seconds=10 +set color_cmdline_bg=default +set color_cmdline_fg=default +set color_error=lightred +set color_info=lightyellow +set color_separator=blue +set color_statusline_bg=gray +set color_statusline_fg=black +set color_titleline_bg=blue +set color_titleline_fg=white +set color_win_bg=default +set color_win_cur=lightyellow +set color_win_cur_sel_bg=blue +set color_win_cur_sel_fg=lightyellow +set color_win_dir=lightblue +set color_win_fg=default +set color_win_inactive_cur_sel_bg=gray +set color_win_inactive_cur_sel_fg=lightyellow +set color_win_inactive_sel_bg=gray +set color_win_inactive_sel_fg=black +set color_win_sel_bg=blue +set color_win_sel_fg=white +set color_win_title_bg=blue +set color_win_title_fg=white +set confirm_run=true +set continue=true +set display_artist_sort_name=false +set dsp.alsa.device=default +set dsp.oss.device= +set format_current= %a - %l -%3n. %t%= %y +set format_playlist= %-25%a %3n. %t%= %y %d +set format_playlist_va= %-25%A %3n. %t (%a)%= %y %d +set format_title=%a - %l - %t (%y) +set format_trackwin=%3n. %t%= %y %d +set format_trackwin_va=%3n. %t (%a)%= %y %d +set id3_default_charset=ISO-8859-1 +set lib_sort=albumartist date album discnumber tracknumber title filename +set mixer.alsa.channel=PCM +set mixer.alsa.device=default +set mixer.oss.channel=PCM +set mixer.oss.device= +set mixer.pulse.restore_volume=1 +set output_plugin=alsa +set passwd= +set pl_sort= +set play_library=false +set play_sorted=false +set repeat=false +set repeat_current=false +set replaygain=disabled +set replaygain_limit=true +set replaygain_preamp=6.000000 +set resume=true +set set_term_title=true +set show_hidden=false +set show_remaining_time=false +set shuffle=false +set smart_artist_sort=true +set softvol=false +set softvol_state=0 0 +set status_display_program= +bind browser backspace browser-up +bind browser i toggle show_hidden +bind browser space win-activate +bind browser u win-update +bind common ! push shell +bind common + vol +10% +bind common , seek -1m +bind common - vol -10% +bind common . seek +1m +bind common 1 view tree +bind common 2 view sorted +bind common 3 view playlist +bind common 4 view queue +bind common 5 view browser +bind common 6 view filters +bind common 7 view settings +bind common = vol +10% +bind common C toggle continue +bind common D win-remove +bind common E win-add-Q +bind common F push filter +bind common G win-bottom +bind common I echo {} +bind common L push live-filter +bind common M toggle play_library +bind common N search-prev +bind common P win-mv-before +bind common [ vol +1% +0 +bind common ] vol +0 +1% +bind common ^B win-page-up +bind common ^C echo Type :quit to exit cmus. +bind common ^F win-page-down +bind common ^L refresh +bind common ^R toggle repeat_current +bind common a win-add-l +bind common b player-next +bind common c player-pause +bind common delete win-remove +bind common down win-down +bind common e win-add-q +bind common end win-bottom +bind common enter win-activate +bind common g win-top +bind common h seek -5 +bind common home win-top +bind common i win-sel-cur +bind common j win-down +bind common k win-up +bind common l seek +5 +bind common left seek -5 +bind common m toggle aaa_mode +bind common n search-next +bind common o toggle play_sorted +bind common p win-mv-after +bind common page_down win-page-down +bind common page_up win-page-up +bind common q quit -i +bind common r toggle repeat +bind common right seek +5 +bind common s toggle shuffle +bind common space win-toggle +bind common t toggle show_remaining_time +bind common tab win-next +bind common u update-cache +bind common up win-up +bind common v player-stop +bind common x player-play +bind common y win-add-p +bind common z player-prev +bind common { vol -1% -0 +bind common } vol -0 -1% +fset 90s=date>=1990&date<2000 +fset classical=genre="Classical" +fset missing-tag=!stream&(artist=""|album=""|title=""|tracknumber=-1|date=-1) +fset mp3=filename="*.mp3" +fset ogg=filename="*.ogg" +fset ogg-or-mp3=ogg|mp3 +factivate diff --git a/.config/awesome/rc.lua b/.config/awesome/rc.lua new file mode 100644 index 00000000..9e85dd0a --- /dev/null +++ b/.config/awesome/rc.lua @@ -0,0 +1,515 @@ +-------------------------------------------------------------------------------- +-- Awesome configuration +-- Date 2012-03-25 +-------------------------------------------------------------------------------- + +-- Standard awesome library +require("awful") +require("awful.autofocus") +require("awful.rules") + +-- Theme handling library +require("beautiful") + +-- Notification library +require("naughty") + +-- Widget library +require("vicious") + +-------------------------------------------------------------------------------- +-- {{{ Error handling +-------------------------------------------------------------------------------- +-- Check if awesome encountered an error during startup and fell back to +-- another config (This code will only ever execute for the fallback config) +if awesome.startup_errors then + naughty.notify({ preset = naughty.config.presets.critical, + title = "Oops, there were errors during startup!", + text = awesome.startup_errors }) +end + +-- Handle runtime errors after startup +do + local in_error = false + awesome.add_signal("debug::error", function (err) + -- Make sure we don't go into an endless error loop + if in_error then return end + in_error = true + + naughty.notify({ preset = naughty.config.presets.critical, + title = "Oops, an error happened!", + text = err }) + in_error = false + end) +end +-- }}} + + + + +-------------------------------------------------------------------------------- +-- {{{ Variable definitions +-------------------------------------------------------------------------------- +-- Themes define colours, icons, and wallpapers +-- beautiful.init("/usr/share/awesome/themes/default/theme.lua") +-- beautiful.init("/usr/share/awesome/themes/zenburn/theme.lua") +beautiful.init(awful.util.getdir("config") .. "/themes/custom/theme.lua") +terminal = "lxterminal" +-- webbrowser = os.getenv("BROWSER") or "luakit" +webbrowser = "luakit" +mailclient = "thunderbird" +pdfreader = "zathura" +termcmd = "lxterminal -e " +editor = os.getenv("EDITOR") or "nano" +editor_cmd = terminal .. " -e " .. editor + +-------------------------------------------------------------------------------- +-- Default modkey. +-- Usually, Mod4 is the key with a logo between Control and Alt. +-- If you do not like this or do not have such a key, +-- I suggest you to remap Mod4 to another key using xmodmap or other tools. +-- However, you can use another modifier like Mod1, but it may interact with others. +modkey = "Mod4" + +-- Table of layouts to cover with awful.layout.inc, order matters. +layouts = +{ + awful.layout.suit.tile, + awful.layout.suit.tile.left, + awful.layout.suit.tile.bottom, + awful.layout.suit.tile.top, + awful.layout.suit.fair, + awful.layout.suit.fair.horizontal, + awful.layout.suit.spiral, + awful.layout.suit.spiral.dwindle, + awful.layout.suit.max, + awful.layout.suit.max.fullscreen, + awful.layout.suit.magnifier, + awful.layout.suit.floating +} +-- }}} + +-- {{{ Tags +-- Define a tag table which hold all screen tags. +tags = {} +for s = 1, screen.count() do + -- Each screen has its own tag table. + -- tags[s] = awful.tag({ 1, 2, 3, 4, 5, 6, 7, 8, 9 }, s, layouts[1]) + tags[s] = awful.tag({ " 1 ", " 2 "," 3 "," 4 ", " 5. Factory ", " 6. Music ", "7. Mail " }, s, layouts[1]) +end +-- }}} + +-------------------------------------------------------------------------------- + +-- {{{ Menu +-- Create a laucher widget and a main menu +myawesomemenu = { + { "manual", terminal .. " -e man awesome" }, + { "edit config", editor_cmd .. " " .. awesome.conffile }, + { "restart", awesome.restart }, + { "quit", awesome.quit } +} + +mymainmenu = awful.menu({ items = { { "awesome", myawesomemenu, beautiful.awesome_icon }, + { "open terminal", terminal } + } + }) + +mylauncher = awful.widget.launcher({ image = image(beautiful.awesome_icon), + menu = mymainmenu }) +-- }}} + +-------------------------------------------------------------------------------- + +-- {{{ Wibox + +-- Clock +clockwidget = awful.widget.textclock({ align = "right" }) + +-- Systray +systraywidget = widget({ type = "systray" }) + +-- CPU +cpuwidget = widget({ type = "textbox" }) +vicious.register(cpuwidget, vicious.widgets.cpu, 'CPU $1% | ') + +-- Net +netwidget = widget({ type = "textbox" }) +vicious.register(netwidget, vicious.widgets.net, '↓${eth0 down_kb} ↑${eth0 up_kb} | ', 3) + +-- Battery +batwidget = widget({ type = "textbox" }) +local batf = io.popen("ls '/sys/class/power_supply' 2>/dev/null") +local batl = batf:read("*a") +if batl ~= "" then + -- vicious.register(batwidget, vicious.widgets.bat, '$2%$1$3 | ', 60, "BAT0") + vicious.register(batwidget, vicious.widgets.bat, + function (widget, args) + if args[2] <= 10 then return '' .. args[2] .. '%' .. args[1] .. args[3] .. ' | ' + else return '' .. args[2] .. '%' .. args[1] .. args[3] .. ' | ' + end + end, + 60, "BAT0") +end +batf:close() + + +-- Volume +volmwidget = widget({ type = "textbox" }) +volpwidget = widget({ type = "textbox" }) +vicious.register(volmwidget, vicious.widgets.volume, "Master: $1% $2 ", 1, "Master") +vicious.register(volpwidget, vicious.widgets.volume, "PCM: $1% | ", 1, "PCM") + +-- Separator +separator = widget({ type = "textbox" }) +separator.text = " | " + +-- Create a wibox for each screen and add it +mywibox = {} +mypromptbox = {} +mylayoutbox = {} +mytaglist = {} +mytaglist.buttons = awful.util.table.join( + awful.button({ }, 1, awful.tag.viewonly), + awful.button({ modkey }, 1, awful.client.movetotag), + awful.button({ }, 3, awful.tag.viewtoggle), + awful.button({ modkey }, 3, awful.client.toggletag), + awful.button({ }, 4, awful.tag.viewnext), + awful.button({ }, 5, awful.tag.viewprev) + ) +mytasklist = {} +mytasklist.buttons = awful.util.table.join( + awful.button({ }, 1, function (c) + if c == client.focus then + c.minimized = true + else + if not c:isvisible() then + awful.tag.viewonly(c:tags()[1]) + end + -- This will also un-minimize + -- the client, if needed + client.focus = c + c:raise() + end + end), + awful.button({ }, 3, function () + if instance then + instance:hide() + instance = nil + else + instance = awful.menu.clients({ width=250 }) + end + end), + awful.button({ }, 4, function () + awful.client.focus.byidx(1) + if client.focus then client.focus:raise() end + end), + awful.button({ }, 5, function () + awful.client.focus.byidx(-1) + if client.focus then client.focus:raise() end + end)) + +for s = 1, screen.count() do + -- Create a promptbox for each screen + mypromptbox[s] = awful.widget.prompt({ layout = awful.widget.layout.horizontal.leftright }) + -- Create an imagebox widget which will contains an icon indicating which layout we're using. + -- We need one layoutbox per screen. + mylayoutbox[s] = awful.widget.layoutbox(s) + mylayoutbox[s]:buttons(awful.util.table.join( + awful.button({ }, 1, function () awful.layout.inc(layouts, 1) end), + awful.button({ }, 3, function () awful.layout.inc(layouts, -1) end), + awful.button({ }, 4, function () awful.layout.inc(layouts, 1) end), + awful.button({ }, 5, function () awful.layout.inc(layouts, -1) end))) + -- Create a taglist widget + mytaglist[s] = awful.widget.taglist(s, awful.widget.taglist.label.all, mytaglist.buttons) + + -- Create a tasklist widget + mytasklist[s] = awful.widget.tasklist(function(c) + return awful.widget.tasklist.label.currenttags(c, s) + end, mytasklist.buttons) + + -- Create the wibox + mywibox[s] = awful.wibox({ position = "top", screen = s }) + -- Add widgets to the wibox - order matters + mywibox[s].widgets = { + { + mylayoutbox[s], + -- mylauncher, + mytaglist[s], + mypromptbox[s], + layout = awful.widget.layout.horizontal.leftright + }, + s == 1 and systraywidget or nil, + clockwidget, + volpwidget, + volmwidget, + cpuwidget, + netwidget, + batwidget, + separator, + mytasklist[s], + layout = awful.widget.layout.horizontal.rightleft + } +end +-- }}} + +-------------------------------------------------------------------------------- + +-- {{{ Mouse bindings +root.buttons(awful.util.table.join( + awful.button({ }, 3, function () mymainmenu:toggle() end), + awful.button({ }, 4, awful.tag.viewnext), + awful.button({ }, 5, awful.tag.viewprev) +)) +-- }}} + +-- CUSTOM +-- set the desired pixel coordinates: +local safeCoords = {x=0, y=0} +-- Flag to tell Awesome whether to do this at startup. +local moveMouseOnStartup = true + +-- Simple function to move the mouse to the coordinates set above. +local function moveMouseAway(x_co, y_co) + mouse.coords({ x=x_co, y=y_co }) +end + +-- Does not work +local function moveMouse(x_co, y_co) + t=mouse.coords() + -- t is 'nil', why? + -- mouse.coords( {x=t[1], y=t[2]} ) +end + +-- Optionally move the mouse when rc.lua is read (startup) +if moveMouseOnStartup then + moveMouseAway(safeCoords.x, safeCoords.y) +end + +-------------------------------------------------------------------------------- + +-- {{{ Key bindings +globalkeys = awful.util.table.join( + -- Custom + -- awful.key({ modkey, }, "l", function () awful.util.spawn("xscreensaver-command --lock") end), + awful.key({ modkey, }, "l", function () awful.util.spawn("slock") end), + awful.key({ modkey, }, "e", function () awful.util.spawn(termcmd .. "ranger") end), + awful.key({ modkey, }, "a", function () awful.util.spawn(termcmd .. "cmus") end), + + +-- Bind ''Meta4+Ctrl+m'' to move the mouse to the coordinates set above. +-- this is useful if you needed the mouse for something and now want it out of the way + awful.key({ modkey, "Control" }, "m", function() moveMouseAway(safeCoords.x, safeCoords.y) end), + awful.key({ modkey, "Control" }, "h", function() moveMouse(5, 0) end), + + + awful.key({ modkey, "Mod1" }, "a", function () awful.util.spawn("cmus-remote -u") end), + awful.key({ modkey, "Shift" }, "a", function () awful.util.spawn("cmus-remote -n") end), + awful.key({ modkey, "Control" }, "a", function () awful.util.spawn("cmus-remote -r") end), + + awful.key({}, "Print", function () awful.util.spawn("scrot '%Y-%m-%d-%H%M%S_$wx$h.png' -e 'mkdir -p ~/shots && mv $f ~/shots/'") end), + + awful.key({ modkey, }, "w", function () awful.util.spawn(webbrowser) end), + awful.key({ modkey, }, "t", function () awful.util.spawn(mailclient) end), + awful.key({ modkey, }, "p", function () awful.util.spawn(pdfreader) end), + + -- Sound Volume + awful.key({ modkey, }, "KP_Subtract", function () awful.util.spawn("amixer set Master 5%-") end), + awful.key({ modkey, }, "KP_Add", function () awful.util.spawn("amixer set Master 5%+") end), + awful.key({ modkey, }, "KP_Enter", function () awful.util.spawn("amixer set Master toggle") end), + awful.key({ modkey, }, "-", function () awful.util.spawn("amixer set Master 5%-") end), + awful.key({ modkey, }, "+", function () awful.util.spawn("amixer set Master 5%+") end), + awful.key({ modkey, }, "=", function () awful.util.spawn("amixer set Master toggle") end), + + awful.key({ modkey, "Mod1" }, "KP_Subtract", function () awful.util.spawn("amixer set PCM 5%-") end), + awful.key({ modkey, "Mod1" }, "KP_Add", function () awful.util.spawn("amixer set PCM 5%+") end), + + + + -- Misc + + awful.key({ modkey, }, "Prior", awful.tag.viewprev ), + awful.key({ modkey, }, "Next", awful.tag.viewnext ), + awful.key({ modkey, }, "Escape", awful.tag.history.restore), + + awful.key({ modkey, }, "Right", + function () + awful.client.focus.byidx( 1) + if client.focus then client.focus:raise() end + end), + awful.key({ modkey, }, "Left", + function () + awful.client.focus.byidx(-1) + if client.focus then client.focus:raise() end + end), + + + -- Layout manipulation + awful.key({ modkey, "Mod1" }, "Right", function () awful.client.swap.byidx( 1) end), + awful.key({ modkey, "Mod1" }, "Left", function () awful.client.swap.byidx( -1) end), + -- awful.key({ modkey, "Control" }, "j", function () awful.screen.focus_relative( 1) end), + -- awful.key({ modkey, "Control" }, "k", function () awful.screen.focus_relative(-1) end), + awful.key({ modkey, }, "u", awful.client.urgent.jumpto), + awful.key({ modkey, }, "Tab", + function () + awful.client.focus.history.previous() + if client.focus then + client.focus:raise() + end + end), + + + + -- Standard program + awful.key({ modkey, }, "Return", function () awful.util.spawn(terminal) end), + awful.key({ modkey, "Control" }, "r", awesome.restart), + awful.key({ modkey, "Shift" }, "q", awesome.quit), + + awful.key({ modkey,"Shift" }, "Right", function () awful.tag.incmwfact( 0.05) end), + awful.key({ modkey,"Shift" }, "Left", function () awful.tag.incmwfact(-0.05) end), + -- awful.key({ modkey, "Shift" }, "Right", function () awful.tag.incnmaster( 1) end), + -- awful.key({ modkey, "Shift" }, "Left", function () awful.tag.incnmaster(-1) end), + -- awful.key({ modkey, "Control" }, "h", function () awful.tag.incncol( 1) end), + -- awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1) end), + + awful.key({ modkey, }, "space", function () awful.layout.inc(layouts, 1) end), + awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(layouts, -1) end), + + awful.key({ modkey, "Control" }, "n", awful.client.restore), + + -- Prompt + awful.key({ modkey }, "r", function () mypromptbox[mouse.screen]:run() end), + + awful.key({ modkey }, "x", + function () + awful.prompt.run({ prompt = "Run Lua code: " }, + mypromptbox[mouse.screen].widget, + awful.util.eval, nil, + awful.util.getdir("cache") .. "/history_eval") + end) +) + +clientkeys = awful.util.table.join( + awful.key({ modkey, }, "f", function (c) c.fullscreen = not c.fullscreen end), + awful.key({ modkey, "Shift" }, "c", function (c) c:kill() end), + awful.key({ modkey, "Control" }, "space", awful.client.floating.toggle ), + awful.key({ modkey, "Control" }, "Return", function (c) c:swap(awful.client.getmaster()) end), + awful.key({ modkey, }, "o", awful.client.movetoscreen ), + awful.key({ modkey, "Shift" }, "r", function (c) c:redraw() end), + awful.key({ modkey, }, "t", function (c) c.ontop = not c.ontop end), + awful.key({ modkey, }, "n", + function (c) + -- The client currently has the input focus, so it cannot be + -- minimized, since minimized clients can't have the focus. + c.minimized = true + end), + awful.key({ modkey, }, "m", + function (c) + c.maximized_horizontal = not c.maximized_horizontal + c.maximized_vertical = not c.maximized_vertical + end) +) + +-- Compute the maximum number of digit we need, limited to 9 +keynumber = 0 +for s = 1, screen.count() do + keynumber = math.min(9, math.max(#tags[s], keynumber)); +end + +-- Bind all key numbers to tags. +-- Be careful: we use keycodes to make it works on any keyboard layout. +-- This should map on the top row of your keyboard, usually 1 to 9. +for i = 1, keynumber do + globalkeys = awful.util.table.join(globalkeys, + awful.key({ modkey }, "#" .. i + 9, + function () + local screen = mouse.screen + if tags[screen][i] then + awful.tag.viewonly(tags[screen][i]) + end + end), + awful.key({ modkey, "Control" }, "#" .. i + 9, + function () + local screen = mouse.screen + if tags[screen][i] then + awful.tag.viewtoggle(tags[screen][i]) + end + end), + awful.key({ modkey, "Shift" }, "#" .. i + 9, + function () + if client.focus and tags[client.focus.screen][i] then + awful.client.movetotag(tags[client.focus.screen][i]) + end + end), + awful.key({ modkey, "Control", "Shift" }, "#" .. i + 9, + function () + if client.focus and tags[client.focus.screen][i] then + awful.client.toggletag(tags[client.focus.screen][i]) + end + end)) +end + +clientbuttons = awful.util.table.join( + awful.button({ }, 1, function (c) client.focus = c; c:raise() end), + awful.button({ modkey }, 1, awful.mouse.client.move), + awful.button({ modkey }, 3, awful.mouse.client.resize)) + +-- Set keys +root.keys(globalkeys) +-- }}} + +-------------------------------------------------------------------------------- +-- {{{ Rules +awful.rules.rules = { + -- All clients will match this rule. + { rule = { }, + properties = { border_width = beautiful.border_width, + border_color = beautiful.border_normal, + focus = true, + keys = clientkeys, + buttons = clientbuttons } }, + { rule = { class = "MPlayer" }, + properties = { floating = true } }, + { rule = { class = "pinentry" }, + properties = { floating = true } }, + { rule = { class = "Gimp" }, + properties = { floating = true } }, + { rule = { class = "Thunderbird" }, + properties = { tag = tags[1][7] } }, + + -- TODO: does not work. + { rule = { name = "cmus"}, + properties = { tag = tags[1][6] } }, +} +-- }}} + +-- {{{ Signals +-- Signal function to execute when a new client appears. +client.add_signal("manage", function (c, startup) + -- Add a titlebar + -- awful.titlebar.add(c, { modkey = modkey }) + + -- Enable sloppy focus + c:add_signal("mouse::enter", function(c) + if awful.layout.get(c.screen) ~= awful.layout.suit.magnifier + and awful.client.focus.filter(c) then + client.focus = c + end + end) + + if not startup then + -- Set the windows at the slave, + -- i.e. put it at the end of others instead of setting it master. + -- awful.client.setslave(c) + + -- Put windows in a smart way, only if they does not set an initial position. + if not c.size_hints.user_position and not c.size_hints.program_position then + awful.placement.no_overlap(c) + awful.placement.no_offscreen(c) + end + end +end) + +client.add_signal("focus", function(c) c.border_color = beautiful.border_focus end) +client.add_signal("unfocus", function(c) c.border_color = beautiful.border_normal end) +-- }}} diff --git a/.config/awesome/themes/getskin.sh b/.config/awesome/themes/getskin.sh new file mode 100644 index 00000000..e9013536 --- /dev/null +++ b/.config/awesome/themes/getskin.sh @@ -0,0 +1,2 @@ +#!/bin/bash +[ -d /usr/share/awesome/themes/default ] && cp -rn "/usr/share/awesome/themes/default/*" "${HOME}/.config/awesome/themes/custom/" diff --git a/.config/gtk-3.0/settings.ini b/.config/gtk-3.0/settings.ini new file mode 100644 index 00000000..42da4f82 --- /dev/null +++ b/.config/gtk-3.0/settings.ini @@ -0,0 +1,3 @@ +[Settings] +gtk-theme-name = Adwaita +gtk-fallback-icon-theme = gnome \ No newline at end of file diff --git a/.config/luakit/binds.lua b/.config/luakit/binds.lua new file mode 100644 index 00000000..07a67f3d --- /dev/null +++ b/.config/luakit/binds.lua @@ -0,0 +1,331 @@ +----------------- +-- Keybindings -- +----------------- + +-- Binding aliases +local key, buf, but = lousy.bind.key, lousy.bind.buf, lousy.bind.but +local cmd, any = lousy.bind.cmd, lousy.bind.any + +-- Util aliases +local match, join = string.match, lousy.util.table.join +local strip, split = lousy.util.string.strip, lousy.util.string.split + +-- Globals or defaults that are used in binds +local scroll_step = globals.scroll_step or 20 +local more, less = "+"..scroll_step.."px", "-"..scroll_step.."px" +local zoom_step = globals.zoom_step or 0.1 + +-- Add binds to a mode +function add_binds(mode, binds, before) + assert(binds and type(binds) == "table", "invalid binds table type: " .. type(binds)) + mode = type(mode) ~= "table" and {mode} or mode + for _, m in ipairs(mode) do + local mdata = get_mode(m) + if mdata and before then + mdata.binds = join(binds, mdata.binds or {}) + elseif mdata then + mdata.binds = mdata.binds or {} + for _, b in ipairs(binds) do table.insert(mdata.binds, b) end + else + new_mode(m, { binds = binds }) + end + end +end + +-- Add commands to command mode +function add_cmds(cmds, before) + add_binds("command", cmds, before) +end + +-- Adds the default menu widget bindings to a mode +menu_binds = { + -- Navigate items + key({}, "j", function (w) w.menu:move_down() end), + key({}, "k", function (w) w.menu:move_up() end), + key({}, "Down", function (w) w.menu:move_down() end), + key({}, "Up", function (w) w.menu:move_up() end), + key({}, "Tab", function (w) w.menu:move_down() end), + key({"Shift"}, "Tab", function (w) w.menu:move_up() end), +} + +-- Add binds to special mode "all" which adds its binds to all modes. +add_binds("all", { + key({}, "Escape", function (w) w:set_mode() end), + key({"Control"}, "[", function (w) w:set_mode() end), + + -- Mouse bindings + but({}, 8, function (w) w:back() end), + but({}, 9, function (w) w:forward() end), + + -- Open link in new tab or navigate to selection + but({}, 2, function (w, m) + -- Ignore button 2 clicks in form fields + if not m.context.editable then + -- Open hovered uri in new tab + local uri = w.view.hovered_uri + if uri then + w:new_tab(uri, false) + else -- Open selection in current tab + uri = luakit.selection.primary + if uri then w:navigate(w:search_open(uri)) end + end + end + end), + + -- Open link in new tab when Ctrl-clicked. + but({"Control"}, 1, function (w, m) + local uri = w.view.hovered_uri + if uri then + w:new_tab(uri, false) + end + end), + + -- Zoom binds + but({"Control"}, 4, function (w, m) w:zoom_in() end), + but({"Control"}, 5, function (w, m) w:zoom_out() end), + + -- Horizontal mouse scroll binds + but({"Shift"}, 4, function (w, m) w:scroll{ x = less } end), + but({"Shift"}, 5, function (w, m) w:scroll{ x = more } end), +}) + +add_binds("normal", { + -- Autoparse the `[count]` before a binding and re-call the hit function + -- with the count removed and added to the opts table. + any(function (w, m) + local count, buf + if m.buffer then + count = string.match(m.buffer, "^(%d+)") + end + if count then + buf = string.sub(m.buffer, #count + 1, (m.updated_buf and -2) or -1) + local opts = join(m, {count = tonumber(count)}) + opts.buffer = (#buf > 0 and buf) or nil + if lousy.bind.hit(w, m.binds, m.mods, m.key, opts) then + return true + end + end + return false + end), + + key({}, "i", function (w) w:set_mode("insert") end), + key({}, ":", function (w) w:set_mode("command") end), + + -- Scrolling + key({}, "j", function (w) w:scroll{ y = more } end), + key({}, "k", function (w) w:scroll{ y = less } end), + key({}, "h", function (w) w:scroll{ x = less } end), + key({}, "l", function (w) w:scroll{ x = more } end), + -- key({}, "^", function (w) w:scroll{ x = "0%" } end), + -- key({}, "$", function (w) w:scroll{ x = "100%" } end), + -- key({"Control"}, "e", function (w) w:scroll{ y = more } end), + -- key({"Control"}, "y", function (w) w:scroll{ y = less } end), + -- key({"Control"}, "d", function (w) w:scroll{ y = "+0.5p" } end), + -- key({"Control"}, "u", function (w) w:scroll{ y = "-0.5p" } end), + -- key({"Control"}, "f", function (w) w:scroll{ y = "+1.0p" } end), + -- key({"Control"}, "b", function (w) w:scroll{ y = "-1.0p" } end), + key({}, "space", function (w) w:scroll{ y = "+0.5p" } end), + key({"Shift"}, "space", function (w) w:scroll{ y = "-0.5p" } end), + + -- Specific scroll + buf("^gg$", function (w, b, m) w:scroll{ y = m.count.."%" } end, {count = 0}), + buf("^G$", function (w, b, m) w:scroll{ y = m.count.."%" } end, {count = 100}), + + -- Traditional scrolling commands + key({}, "Down", function (w) w:scroll{ y = more } end), + key({}, "Up", function (w) w:scroll{ y = less } end), + key({}, "Left", function (w) w:scroll{ x = less } end), + key({}, "Right", function (w) w:scroll{ x = more } end), + key({}, "Page_Down", function (w) w:scroll{ y = "+1.0p" } end), + key({}, "Page_Up", function (w) w:scroll{ y = "-1.0p" } end), + key({}, "Home", function (w) w:scroll{ y = "0%" } end), + key({}, "End", function (w) w:scroll{ y = "100%" } end), + -- key({}, "$", function (w) w:scroll{ x = "100%" } end), + -- key({}, "0", function (w, m) + -- if not m.count then w:scroll{ y = "0%" } else return false end + -- end), + + -- Zooming + key({}, "+", function (w, m) w:zoom_in(zoom_step * m.count) end, {count=1}), + key({}, "-", function (w, m) w:zoom_out(zoom_step * m.count) end, {count=1}), + key({}, "=", function (w, m) w:zoom_set() end), + buf("^z[iI]$", function (w, b, m) w:zoom_in(zoom_step * m.count, b == "zI") end, {count=1}), + buf("^z[oO]$", function (w, b, m) w:zoom_out(zoom_step * m.count, b == "zO") end, {count=1}), + -- Zoom reset or specific zoom ([count]zZ for full content zoom) + buf("^z[zZ]$", function (w, b, m) w:zoom_set(m.count/100, b == "zZ") end, {count=100}), + + -- Fullscreen + key({}, "F11", function (w) + w.win.fullscreen = not w.win.fullscreen + end), + + -- Clipboard + key({}, "p", function (w) + local uri = luakit.selection.primary + if uri then w:navigate(w:search_open(uri)) else w:error("Empty selection.") end + end), + key({}, "P", function (w, m) + local uri = luakit.selection.primary + if not uri then w:error("Empty selection.") return end + for i = 1, m.count do w:new_tab(w:search_open(uri)) end + end, {count = 1}), + + -- Yanking + buf("^yy$", function (w) + local uri = string.gsub(w.view.uri or "", " ", "%%20") + luakit.selection.primary = uri + luakit.selection.clipboard = uri + w:notify("Yanked uri: " .. uri) + end), + + buf("^yt$", function (w) + local title = w.view.title + luakit.selection.primary = title + luakit.selection.clipboard = uri + w:notify("Yanked title: " .. title) + end), + + -- Commands + key({"Control"}, "a", function (w) w:navigate(w:inc_uri(1)) end), + key({"Control"}, "x", function (w) w:navigate(w:inc_uri(-1)) end), + buf("^o$", function (w, c) w:enter_cmd(":open ") end), + buf("^t$", function (w, c) w:enter_cmd(":tabopen ") end), + buf("^w$", function (w, c) w:enter_cmd(":winopen ") end), + buf("^O$", function (w, c) w:enter_cmd(":open " .. (w.view.uri or "")) end), + buf("^T$", function (w, c) w:enter_cmd(":tabopen " .. (w.view.uri or "")) end), + buf("^W$", function (w, c) w:enter_cmd(":winopen " .. (w.view.uri or "")) end), + buf("^,g$", function (w, c) w:enter_cmd(":open google ") end), + + -- History + key({}, "BackSpace", function (w, m) w:back(m.count) end), + key({"Mod1"}, "Left", function (w, m) w:back(m.count) end), + key({"Mod1"}, "Right", function (w, m) w:forward(m.count) end), + key({}, "H", function (w, m) w:back(m.count) end), + key({}, "L", function (w, m) w:forward(m.count) end), + key({}, "XF86Back", function (w, m) w:back(m.count) end), + key({}, "XF86Forward", function (w, m) w:forward(m.count) end), + -- key({"Control"}, "o", function (w, m) w:back(m.count) end), + -- key({"Control"}, "i", function (w, m) w:forward(m.count) end), + -- key({}, "b", function (w, m) w:back(m.count) end), + + -- Tab + key({"Control"}, "Page_Up", function (w) w:prev_tab() end), + key({"Control"}, "Page_Down", function (w) w:next_tab() end), + key({"Control"}, "Tab", function (w) w:next_tab() end), + key({"Shift","Control"}, "Tab", function (w) w:prev_tab() end), + buf("^gT$", function (w, b, m) w:prev_tab(m.count) end, {count=1}), + buf("^gt$", function (w, b, m) if not w:goto_tab(m.count) then w:next_tab() end end, {count=0}), + + key({"Control"}, "t", function (w) w:new_tab(globals.homepage) end), + key({"Control"}, "w", function (w) w:close_tab() end), + key({}, "d", function (w, m) for i=1,m.count do w:close_tab() end end, {count=1}), + + key({}, "<", function (w, m) w.tabs:reorder(w.view, w.tabs:current() - m.count) end, {count=1}), + key({}, ">", function (w, m) w.tabs:reorder(w.view, (w.tabs:current() + m.count) % w.tabs:count()) end, {count=1}), + key({"Mod1"}, "Page_Up", function (w, m) w.tabs:reorder(w.view, w.tabs:current() - m.count) end, {count=1}), + key({"Mod1"}, "Page_Down", function (w, m) w.tabs:reorder(w.view, (w.tabs:current() + m.count) % w.tabs:count()) end, {count=1}), + + buf("^gH$", function (w, b, m) for i=1,m.count do w:new_tab(globals.homepage) end end, {count=1}), + buf("^gh$", function (w) w:navigate(globals.homepage) end), + + -- Open tab from current tab history + buf("^gy$", function (w) w:new_tab(w.view.history or "") end), + + key({}, "r", function (w) w:reload() end), + key({}, "R", function (w) w:reload(true) end), + key({"Control"}, "c", function (w) w:stop() end), + + -- Config reloading + key({"Control", "Shift"}, "R", function (w) w:restart() end), + + -- Window + buf("^ZZ$", function (w) w:save_session() w:close_win() end), + buf("^ZQ$", function (w) w:close_win() end), + -- buf("^D$", function (w) w:close_win() end), + + -- Enter passthrough mode + key({"Control"}, "z", function (w) w:set_mode("passthrough") end), +}) + +add_binds("insert", { + key({"Control"}, "z", function (w) w:set_mode("passthrough") end), +}) + +add_binds({"command", "search"}, { + key({"Shift"}, "Insert", function (w) w:insert_cmd(luakit.selection.primary) end), + key({"Control"}, "w", function (w) w:del_word() end), + key({"Control"}, "u", function (w) w:del_line() end), + key({"Control"}, "h", function (w) w:del_backward_char() end), + key({"Control"}, "d", function (w) w:del_forward_char() end), + key({"Control"}, "a", function (w) w:beg_line() end), + key({"Control"}, "e", function (w) w:end_line() end), + key({"Control"}, "f", function (w) w:forward_char() end), + key({"Control"}, "b", function (w) w:backward_char() end), + key({"Mod1"}, "f", function (w) w:forward_word() end), + key({"Mod1"}, "b", function (w) w:backward_word() end), +}) + +-- Switching tabs with Mod1+{1,2,3,...} +mod1binds = {} +for i=1,10 do + table.insert(mod1binds, + key({"Mod1"}, tostring(i % 10), function (w) w.tabs:switch(i) end)) +end +add_binds("normal", mod1binds) + +-- Command bindings which are matched in the "command" mode from text +-- entered into the input bar. +add_cmds({ + -- Detect bangs (I.e. ":command! ") + buf("^%S+!", function (w, cmd, opts) + local cmd, args = string.match(cmd, "^(%S+)!+(.*)") + if cmd then + opts = join(opts, { bang = true }) + return lousy.bind.match_cmd(w, opts.binds, cmd .. args, opts) + end + end), + + -- cmd({command, alias1, ...}, function (w, arg, opts) .. end, opts), + -- cmd("co[mmand]", function (w, arg, opts) .. end, opts), + cmd("c[lose]", function (w) w:close_tab() end), + cmd("print", function (w) w:eval_js("print()", "rc.lua") end), + cmd("reload", function (w) w:reload() end), + cmd("restart", function (w) w:restart() end), + cmd("write", function (w) w:save_session() end), + cmd("noh[lsearch]", function (w) w:clear_search() end), + + cmd("back", function (w, a) w:back(tonumber(a) or 1) end), + cmd("f[orward]", function (w, a) w:forward(tonumber(a) or 1) end), + cmd("inc[rease]", function (w, a) w:navigate(w:inc_uri(tonumber(a) or 1)) end), + cmd("o[pen]", function (w, a) w:navigate(w:search_open(a)) end), + cmd("t[abopen]", function (w, a) w:new_tab(w:search_open(a)) end), + cmd("w[inopen]", function (w, a) window.new{w:search_open(a)} end), + cmd({"javascript", "js"}, function (w, a) w:eval_js(a, "javascript") end), + + cmd("q[uit]", function (w, a, o) w:close_win(o.bang) end), + cmd({"viewsource", "vs" }, function (w, a, o) w:toggle_source(not o.bang and true or nil) end), + cmd({"writequit", "wq"}, function (w, a, o) w:save_session() w:close_win(o.bang) end), + + cmd("lua", function (w, a) + if a then + local ret = assert(loadstring("return function(w) return "..a.." end"))()(w) + if ret then print(ret) end + else + w:set_mode("lua") + end + end), + + cmd("dump", function (w, a) + local fname = string.gsub(w.win.title, '[^%w%.%-]', '_')..'.html' -- sanitize filename + local file = a or luakit.save_file("Save file", w.win, xdg.download_dir or '.', fname) + if file then + local fd = assert(io.open(file, "w"), "failed to open: " .. file) + local html = assert(w:eval_js("document.documentElement.outerHTML", "dump"), "Unable to get HTML") + assert(fd:write(html), "unable to save html") + io.close(fd) + w:notify("Dumped HTML to: " .. file) + end + end), +}) + +-- vim: et:sw=4:ts=8:sts=4:tw=80 diff --git a/.config/luakit/globals.lua b/.config/luakit/globals.lua new file mode 100644 index 00000000..a7abe287 --- /dev/null +++ b/.config/luakit/globals.lua @@ -0,0 +1,99 @@ +-- Global variables for luakit +globals = { + homepage = "about:blank", + -- homepage = "http://google.com/", + -- homepage = "http://luakit.org/", + -- homepage = "http://github.com/mason-larobina/luakit", + scroll_step = 40, + zoom_step = 0.1, + max_cmd_history = 100, + max_srch_history = 100, + -- http_proxy = "http://example.com:3128", + default_window_size = "800x600", + + -- Disables loading of hostnames from /etc/hosts (for large host files) + -- load_etc_hosts = false, + -- Disables checking if a filepath exists in search_open function + -- check_filepath = false, +} + +-- Make useragent +local _, arch = luakit.spawn_sync("uname -sm") +-- Only use the luakit version if in date format (reduces identifiability) +local lkv = string.match(luakit.version, "^(%d+.%d+.%d+)") +globals.useragent = string.format("Mozilla/5.0 (%s) AppleWebKit/%s+ (KHTML, like Gecko) WebKitGTK+/%s luakit%s", + string.sub(arch, 1, -2), luakit.webkit_user_agent_version, + luakit.webkit_version, (lkv and ("/" .. lkv)) or "") + +-- Search common locations for a ca file which is used for ssl connection validation. +local ca_files = { + -- $XDG_DATA_HOME/luakit/ca-certificates.crt + luakit.data_dir .. "/ca-certificates.crt", + "/etc/certs/ca-certificates.crt", + "/etc/ssl/certs/ca-certificates.crt", +} +-- Use the first ca-file found +for _, ca_file in ipairs(ca_files) do + if os.exists(ca_file) then + soup.ssl_ca_file = ca_file + break + end +end + +-- Change to stop navigation sites with invalid or expired ssl certificates +soup.ssl_strict = false + +-- Set cookie acceptance policy +cookie_policy = { always = 0, never = 1, no_third_party = 2 } +soup.accept_policy = cookie_policy.always + +-- List of search engines. Each item must contain a single %s which is +-- replaced by URI encoded search terms. All other occurances of the percent +-- character (%) may need to be escaped by placing another % before or after +-- it to avoid collisions with lua's string.format characters. +-- See: http://www.lua.org/manual/5.1/manual.html#pdf-string.format + +search_engines = { + -- arch = "http://wiki.archlinux.org/wiki/Special:Search?search=%s", + -- debbugs = "http://bugs.debian.org/%s", + -- duckduckgo = "http://duckduckgo.com/?q=%s", + -- luakit = "http://luakit.org/search/index/luakit?q=%s", + -- sourceforge = "http://sf.net/search/?words=%s", + arch = "http://wiki.archlinux.org/index.php?title=Special%%3ASearch&search=%s&go=Go", + aur = "https://aur.archlinux.org/packages.php?O=0&K=%s&do_Search=Go", + google = "http://google.com/search?q=%s", + imdb = "http://imdb.com/find?s=all&q=%s", -- Note that imdb is messy with spaces. + torrent = "http://torrentz.eu/search?f=%s", + w = "http://en.wikipedia.org/wiki/Special:Search?search=%s", + wb = "http://en.wikibooks.org/wiki/Special:Search?search=%s", + wbf = "http://fr.wikibooks.org/wiki/Special:Search?search=%s", + wf = "http://fr.wikipedia.org/wiki/Special:Search?search=%s", + wr = "http://www.wordreference.com/enfr/%s", + youtube = "http://www.youtube.com/results?search_query=%s", +} + +-- Set google as fallback search engine +search_engines.default = search_engines.google +-- Use this instead to disable auto-searching +--search_engines.default = "%s" + +-- Per-domain webview properties +-- See http://webkitgtk.org/reference/WebKitWebSettings.html +domain_props = { --[[ + ["all"] = { + enable_scripts = false, + enable_plugins = false, + enable_private_browsing = false, + user_stylesheet_uri = "", + }, + ["youtube.com"] = { + enable_scripts = true, + enable_plugins = true, + }, + ["bbs.archlinux.org"] = { + user_stylesheet_uri = "file://" .. luakit.data_dir .. "/styles/dark.css", + enable_private_browsing = true, + }, ]] +} + +-- vim: et:sw=4:ts=8:sts=4:tw=80 diff --git a/.config/luakit/rc.lua b/.config/luakit/rc.lua new file mode 100644 index 00000000..a0826d78 --- /dev/null +++ b/.config/luakit/rc.lua @@ -0,0 +1,200 @@ +----------------------------------------------------------------------- +-- luakit configuration file, more information at http://luakit.org/ -- +----------------------------------------------------------------------- + +require "lfs" + +if unique then + unique.new("org.luakit") + -- Check for a running luakit instance + if unique.is_running() then + if uris[1] then + for _, uri in ipairs(uris) do + if lfs.attributes(uri) then uri = os.abspath(uri) end + unique.send_message("tabopen " .. uri) + end + else + unique.send_message("winopen") + end + luakit.quit() + end +end + +-- Load library of useful functions for luakit +require "lousy" + +-- Small util functions to print output (info prints only when luakit.verbose is true) +function warn(...) io.stderr:write(string.format(...) .. "\n") end +function info(...) if luakit.verbose then io.stdout:write(string.format(...) .. "\n") end end + +-- Load users global config +-- ("$XDG_CONFIG_HOME/luakit/globals.lua" or "/etc/xdg/luakit/globals.lua") +require "globals" + +-- Load users theme +-- ("$XDG_CONFIG_HOME/luakit/theme.lua" or "/etc/xdg/luakit/theme.lua") +lousy.theme.init(lousy.util.find_config("theme.lua")) +theme = assert(lousy.theme.get(), "failed to load theme") + +-- Load users window class +-- ("$XDG_CONFIG_HOME/luakit/window.lua" or "/etc/xdg/luakit/window.lua") +require "window" + +-- Load users webview class +-- ("$XDG_CONFIG_HOME/luakit/webview.lua" or "/etc/xdg/luakit/webview.lua") +require "webview" + +-- set dark about:blank -- Buggy with some site. +-- webview.init_funcs.set_dark = function (view, w) +-- view:add_signal("navigation-request", function (_, uri) +-- if uri == "about:blank" then +-- view:load_string("", "about:blank") -- change this +-- return true +-- end +-- end) +-- end + +-- Load users mode configuration +-- ("$XDG_CONFIG_HOME/luakit/modes.lua" or "/etc/xdg/luakit/modes.lua") +require "modes" + +-- Load users keybindings +-- ("$XDG_CONFIG_HOME/luakit/binds.lua" or "/etc/xdg/luakit/binds.lua") +require "binds" + +---------------------------------- +-- Optional user script loading -- +---------------------------------- + +require "webinspector" + +-- Add sqlite3 cookiejar +require "cookies" + +-- Cookie blocking by domain (extends cookies module) +-- Add domains to the whitelist at "$XDG_CONFIG_HOME/luakit/cookie.whitelist" +-- and blacklist at "$XDG_CONFIG_HOME/luakit/cookie.blacklist". +-- Each domain must be on it's own line and you may use "*" as a +-- wildcard character (I.e. "*google.com") +--require "cookie_blocking" + +-- Block all cookies by default (unless whitelisted) +--cookies.default_allow = false + +-- Add uzbl-like form filling +require "formfiller" + +-- Add proxy support & manager +require "proxy" + +-- Add quickmarks support & manager +require "quickmarks" + +-- Add session saving/loading support +require "session" + +-- Add command to list closed tabs & bind to open closed tabs +require "undoclose" + +-- Add command to list tab history items +require "tabhistory" + +-- Add greasemonkey-like javascript userscript support +require "userscripts" + +-- Add bookmarks support +require "bookmarks" + +-- Add download support +require "downloads" +require "downloads_chrome" + +-- CUSTOM +downloads.default_dir = os.getenv("HOME") .. "/temp" +downloads.add_signal("download-location", function (uri, file) + if not file or file == "" then + file = (string.match(uri, "/([^/]+)$") + or string.match(uri, "^%w+://(.+)") + or string.gsub(uri, "/", "_") + or "untitled") + end + return downloads.default_dir .. "/" .. file +end) + +-- Add vimperator-like link hinting & following +-- (depends on downloads) +require "follow" + +-- To use a custom character set for the follow hint labels un-comment and +-- modify the following: +--local s = follow.styles +--follow.style = s.sort(s.reverse(s.charset("asdfqwerzxcv"))) -- I'm a lefty + +-- Add command history +require "cmdhist" + +-- Add search mode & binds +require "search" + +-- Add ordering of new tabs +require "taborder" + +-- Save web history +require "history" +require "history_chrome" + +-- Add command completion +require "completion" + +-- NoScript plugin, toggle scripts and or plugins on a per-domain basis. +-- `,ts` to toggle scripts, `,tp` to toggle plugins, `,tr` to reset. +-- Remove all "enable_scripts" & "enable_plugins" lines from your +-- domain_props table (in config/globals.lua) as this module will conflict. +--require "noscript" + +require "follow_selected" +require "go_input" +require "go_next_prev" +require "go_up" + +----------------------------- +-- End user script loading -- +----------------------------- + +-- Restore last saved session +local w = (session and session.restore()) +if w then + for i, uri in ipairs(uris) do + w:new_tab(uri, i == 1) + end +else + -- Or open new window + window.new(uris) +end + +------------------------------------------- +-- Open URIs from other luakit instances -- +------------------------------------------- + +if unique then + unique.add_signal("message", function (msg, screen) + local cmd, arg = string.match(msg, "^(%S+)%s*(.*)") + local w = lousy.util.table.values(window.bywidget)[1] + if cmd == "tabopen" then + w:new_tab(arg) + elseif cmd == "winopen" then + w = window.new((arg ~= "") and { arg } or {}) + end + w.win.screen = screen + w.win.urgency_hint = true + end) +end + +-- CUSTOM +local close_win = window.methods.close_win +window.methods.close_win = function (w, ...) + session.save{w} + close_win(w, ...) +end + +-- vim: et:sw=4:ts=8:sts=4:tw=80 diff --git a/.config/lxterminal/lxterminal.conf b/.config/lxterminal/lxterminal.conf new file mode 100644 index 00000000..8aa4c053 --- /dev/null +++ b/.config/lxterminal/lxterminal.conf @@ -0,0 +1,18 @@ + +[general] +fontname=Monospace 10 +selchars=-A-Za-z0-9,./?%&#:_ +scrollback=1000 +bgcolor=#000000000000 +bgalpha=65535 +fgcolor=#aaaaaaaaaaaa +disallowbold=false +cursorblinks=false +cursorunderline=false +audiblebell=false +tabpos=top +hidescrollbar=true +hidemenubar=true +hideclosebutton=true +disablef10=false +disablealt=false diff --git a/.config/ranger/apps.py b/.config/ranger/apps.py new file mode 100644 index 00000000..6a35917f --- /dev/null +++ b/.config/ranger/apps.py @@ -0,0 +1,137 @@ +# -*- coding: utf-8 -*- +# Copyright (C) 2009, 2010, 2011 Roman Zimbelmann +# This configuration file is licensed under the same terms as ranger. +# =================================================================== + +# In order to add application definitions "on top of" the default ones +# in your ~/.config/ranger/apps.py, you should subclass the class defined +# here like this: + +import ranger +from ranger.api.apps import * +from ranger.ext.get_executables import get_executables + +from ranger.defaults.apps import CustomApplications as DefaultApps +class CustomApplications(DefaultApps): + def app_default(self, c): + """How to determine the default application?""" + f = c.file + + if f.basename.lower() == 'makefile' and c.mode == 1: + made = self.either(c, 'make') + if made: return made + + if f.extension is not None: + + if f.extension in ('pdf', ): + c.flags += 'd' + return self.either(c, 'llpp', 'zathura', 'mupdf', 'apvlv', + 'evince', 'okular', 'epdfview') + + # CUSTOM + if f.extension == 'djvu': + c.flags += 'd' + return self.either(c, 'zathura', 'evince') + + if f.extension == 'ps': + c.flags += 'd' + return self.either(c, 'zathura', 'evince') + + # CUSTOM + if f.extension == 'm2ts': + c.flags += 'd' + return self.either(c, 'mplayer2', 'mplayer', 'smplayer', 'vlc') + + if f.extension in ('xml', 'csv'): + return self.either(c, 'editor') + + if f.extension == 'mid': + return self.either(c, 'wildmidi') + + if f.extension in ('html', 'htm', 'xhtml') or f.extension == 'swf': + c.flags += 'd' + handler = self.either(c, + 'luakit', 'uzbl', 'vimprobable', 'vimprobable2', 'jumanji', + 'firefox', 'seamonkey', 'iceweasel', 'opera', + 'surf', 'midori', 'epiphany', 'konqueror') + # Only return if some program was found: + if handler: + return handler + if f.extension in ('html', 'htm', 'xhtml'): + # These browsers can't handle flash, so they're not called above. + c.flags += 'D' + return self.either(c, 'elinks', 'links', 'links2', 'lynx', 'w3m') + + if f.extension == 'nes': + return self.either(c, 'fceux') + + if f.extension in ('swc', 'smc', 'sfc'): + return self.either(c, 'zsnes') + + if f.extension == 'doc': + c.flags += 'd' + return self.either(c, 'abiword', 'libreoffice', + 'soffice', 'ooffice') + if f.extension in ('odt', 'ods', 'odp', 'odf', 'odg', 'sxc', + 'stc', 'xls', 'xlsx', 'xlt', 'xlw', 'gnm', 'gnumeric'): + c.flags += 'd' + return self.either(c, 'gnumeric', 'kspread', + 'libreoffice', 'soffice', 'ooffice') + + if f.mimetype is not None: + if INTERPRETED_LANGUAGES.match(f.mimetype): + return self.either(c, 'edit_or_run') + + if f.container: + return self.either(c, 'aunpack', 'file_roller') + + # CUSTOM + if f.video or f.audio: + if f.video: + c.flags += 'd' + return self.either(c, 'mplayer2', 'mplayer', 'smplayer', 'vlc', + 'totem') + + # CUSTOM + if f.image: + if c.mode in (11, 12, 13, 14): + return self.either(c, 'set_bg_with_feh') + else: + return self.either(c, 'sxiv', 'feh', 'gpicview' , 'eog', 'mirage') + + if f.document or f.filetype.startswith('text') or f.size == 0: + return self.either(c, 'editor') + + # You can put this at the top of the function and mimeopen will + # always be used for every file. + return self.either(c, 'mimeopen') + + + # ----------------------------------------- application definitions + # Note: Trivial application definitions are at the bottom + + # CUSTOM + @depends_on('feh', 'X') + def app_feh(self, c): + c.flags += 'd' + if c.mode is 0 and len(c.files) is 1 and self.fm.env.cwd: + # view all files in the cwd + images = [f.basename for f in self.fm.env.cwd.files if f.image] + return 'feh', '-Z', '-.', '--start-at', c.file.basename, images + return 'feh', '-Z', '-.', c + +# Forked applications +CustomApplications.generic( + 'luakit', 'uzbl', 'vimprobable', 'vimprobable2', 'jumanji', + 'firefox', 'seamonkey', 'iceweasel', 'opera', + 'surf', 'midori', 'epiphany', 'konqueror', + 'evince', 'zathura', 'apvlv', 'okular', 'epdfview', 'mupdf', 'llpp', + 'eog', 'mirage', 'gimp', + 'libreoffice', 'soffice', 'ooffice', 'gnumeric', 'kspread', 'abiword', + 'gmplayer', 'smplayer', 'vlc', + flags='d', deps=['X']) + +INTERPRETED_LANGUAGES = re.compile(r''' + ^(text|application)/x-( + haskell|perl|python|ruby|sh + )$''', re.VERBOSE) diff --git a/.config/ranger/options.py b/.config/ranger/options.py new file mode 100644 index 00000000..6fc9769e --- /dev/null +++ b/.config/ranger/options.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +# Copyright (C) 2009, 2010, 2011 Roman Zimbelmann +# This configuration file is licensed under the same terms as ranger. +# =================================================================== +# This is the main configuration file of ranger. It consists of python +# code, but fear not, you don't need any python knowledge for changing +# the settings. +# +# Lines beginning with # are comments. To enable a line, remove the #. +# +# You can customize ranger in the file ~/.config/ranger/options.py. +# It has the same syntax as this file. In fact, you can just copy this +# file there with `ranger --copy-config=options' and make your modifications. +# But make sure you update your configs when you update ranger. +# =================================================================== + +# from ranger.api.options import * + +# Which colorscheme to use? These colorschemes are available by default: +# default, default88, jungle, snow +# Snow is monochrome and default88 uses 88 colors. +colorscheme = 'default88' + +# Display the directory name in tabs? +dirname_in_tabs = True diff --git a/.config/ranger/rc.conf b/.config/ranger/rc.conf new file mode 100644 index 00000000..8bfd2e82 --- /dev/null +++ b/.config/ranger/rc.conf @@ -0,0 +1,78 @@ +# =================================================================== +# This file contains the default startup commands for ranger. +# To change them, it is recommended to create the file +# ~/.config/ranger/rc.conf and add your custom commands there. +# +# If you copy this whole file there, add this line to your options.py +# so it is not loaded twice: +# +# load_default_rc = False +# +# The purpose of this file is mainly to define keybindings. For +# changing settings or running more complex python code, use the +# configuation file "options.py" or define commands in "commands.py". +# +# Each line is a command that will be run before the user interface +# is initialized. As a result, you can not use commands which rely +# on the UI such as :delete or :mark. +# =================================================================== + +# =================================================================== +# == Define keys for the browser +# =================================================================== + +# Basic +map ! console shell -w + +# For the nostalgics: Midnight Commander bindings +map bulkrename +map console shell -w file "%f" +map console touch +map console mkdir +map console delete seriously? +map exit + +# =================================================================== +# == Personal shorcuts +# =================================================================== + +## Move to trash (without Trash-CLI) +# map DD shell mv -t ~/.local/share/Trash/files %s + +## Move to trash (with Trash-CLI) +map DD shell trash-put %s + +## Extraction. Ranger uses '1l', but does not work when extension is not right. +map ex shell aunpack -e %s + +## SVN add. +map esa shell -w svn add %s + +## SVN revert. +map esr shell -w svn revert %s + +## SVN stats. +map ess shell -w svn status + +## MPlayer +map ev console shell mplayer "%f" -sub "%s" -subcp latin1 + +## Cmus +map ea shell cmus-remote -P %s + +# Quick moves +map K move up=5 +map J move down=5 + + + +## Browse +#map move down=5 +#map move up=5 + +## Tabs +#map tab_move 1 +#map tab_move -1 + +## Create Project Archive +# map ap console archiveproject diff --git a/.config/ranger/scope.sh b/.config/ranger/scope.sh new file mode 100755 index 00000000..0ef18bdb --- /dev/null +++ b/.config/ranger/scope.sh @@ -0,0 +1,85 @@ +#!/bin/bash +# ranger supports enhanced previews. If the option "use_preview_script" +# is set to True and this file exists, this script will be called and its +# output is displayed in ranger. ANSI color codes are supported. + +# NOTES: This script is considered a configuration file. If you upgrade +# ranger, it will be left untouched. (You must update it yourself.) +# Also, ranger disables STDIN here, so interactive scripts won't work properly + +# Meanings of exit codes: +# code | meaning | action of ranger +# -----+------------+------------------------------------------- +# 0 | success | success. display stdout as preview +# 1 | no preview | failure. display no preview at all +# 2 | plain text | display the plain content of the file +# 3 | fix width | success. Don't reload when width changes +# 4 | fix height | success. Don't reload when height changes +# 5 | fix both | success. Don't ever reload + +# Meaningful aliases for arguments: +path="$1" # Full path of the selected file +width="$2" # Width of the preview pane (number of fitting characters) +height="$3" # Height of the preview pane (number of fitting characters) + +maxln=200 # Stop after $maxln lines. Can be used like ls | head -n $maxln + +# Find out something about the file: +mimetype=$(file --mime-type -Lb "$path") +extension=${path##*.} + +# Functions: +# "have $1" succeeds if $1 is an existing command/installed program +function have { type -P "$1" > /dev/null; } +# "success" returns the exit code of the first program in the last pipe chain +function success { test ${PIPESTATUS[0]} = 0; } + +case "$extension" in + # Archive extensions: + 7z|a|ace|alz|arc|arj|bz|bz2|cab|cpio|deb|gz|jar|lha|lz|lzh|lzma|lzo|\ + rar|rpm|rz|t7z|tar|tbz|tbz2|tgz|tlz|txz|tZ|tzo|war|xpi|xz|Z|zip) + als "$path" | head -n $maxln + success && exit 0 || acat "$path" | head -n $maxln && exit 3 + exit 1;; + # PDF documents: + pdf) + pdftotext -l 10 -nopgbrk -q "$path" - | head -n $maxln | fmt -s -w $width + success && exit 0 || exit 1;; + # CUSTOM + # MKV videos: + mkv) + mediainfo "$path" | sed 's/ \+:/: /;' + success && exit 5 || exit 1;; + + # BitTorrent Files + torrent) + transmission-show "$path" | head -n $maxln && exit 3 + success && exit 5 || exit 1;; + # HTML Pages: + htm|html|xhtml) + have w3m && w3m -dump "$path" | head -n $maxln | fmt -s -w $width && exit 4 + have lynx && lynx -dump "$path" | head -n $maxln | fmt -s -w $width && exit 4 + have elinks && elinks -dump "$path" | head -n $maxln | fmt -s -w $width && exit 4 + ;; # fall back to highlight/cat if theres no lynx/elinks +esac + +case "$mimetype" in + # Syntax highlight for text files: + text/* | */xml) + highlight --out-format=ansi "$path" | head -n $maxln + success && exit 5 || exit 2;; + # Ascii-previews of images: + image/*) + img2txt --gamma=0.6 --width="$width" "$path" && exit 4 || exit 1;; + # Display information about media files: + video/* | audio/*) + have exiftool && exiftool "$path" && exit 5 + # Use sed to remove spaces so the output fits into the narrow window + if have mediainfo; then + mediainfo "$path" | sed 's/ \+:/: /;' + success && exit 5 + fi + exit 1;; +esac + +exit 1 diff --git a/.config/wmfs/speeddown.sh b/.config/wmfs/speeddown.sh new file mode 100755 index 00000000..c65117d7 --- /dev/null +++ b/.config/wmfs/speeddown.sh @@ -0,0 +1,10 @@ +#!/bin/bash +# speeddown.sh +# sources + +RXB=$(cat /sys/class/net/eth0/statistics/rx_bytes) +sleep 2 +RXBN=$(cat /sys/class/net/eth0/statistics/rx_bytes) +RXDIF=$(echo $((RXBN - RXB)) ) + +echo "$((RXDIF / 1024 / 2))" diff --git a/.config/wmfs/speedup.sh b/.config/wmfs/speedup.sh new file mode 100755 index 00000000..9f9a192c --- /dev/null +++ b/.config/wmfs/speedup.sh @@ -0,0 +1,10 @@ +#!/bin/bash +# speedup.sh +# sources + +TXB=$(cat /sys/class/net/eth0/statistics/tx_bytes) +sleep 2 +TXBN=$(cat /sys/class/net/eth0/statistics/tx_bytes) +TXDIF=$(echo $((TXBN - TXB)) ) + +echo "$((TXDIF / 1024 / 2))" diff --git a/.config/wmfs/status.sh b/.config/wmfs/status.sh new file mode 100755 index 00000000..eb4e1215 --- /dev/null +++ b/.config/wmfs/status.sh @@ -0,0 +1,237 @@ +#!/bin/bash +################################################################################ +## WMFS Config -- Status Bar Script +## Date 2012-01-07 +## +## Author: Ambrevar +## Adapted from AddiKT1ve +################################################################################ + +# Prevent script from running multiple time. +# WARNING: it will kill all process with 'wmfs' and 'status.sh' in their names! +kill $(ps U $UID | awk '/wmfs/&&/status.sh/' | grep -vi "$$\|grep\|awk" | awk '{print $1}') + + +## mpd info +## is required for "now playing" informations +_mpd() { + if [ "`mpc 2>&1 | wc -l`" -gt "1" ]; then + if [ "`mpc | grep "^\[paused\]"`" != "" ]; then + mpd_current="`mpc current` [pause]" + else + mpd_current=`mpc current` + fi + else + mpd_current="\o/" + fi + mpd="\\#cba642\\$mpd_current" +} + +# mocp author info +# is required for "now playing" informations +_mocp_author(){ + author=`mocp -i | grep Artist | awk -F ": " '{print $2}'` + mocp_author="\\#cba642\\$author" +} + +# mocp author info +# is required for "now playing" informations +_mocp_song(){ + SONG=`mocp -i | grep SongTitle | awk -F ": " '{print $2}'` +} + +# network +# network usage stats +_network() { + # Variables + ethiface=eth0 + wlaniface=wlan0 + tmpdir=/tmp + + # Functions + function rx_bytes # download + { + [[ -e "/sys/class/net/$1/statistics/rx_bytes" ]] \ + && echo $(cat /sys/class/net/$1/statistics/rx_bytes) + } + function tx_bytes # upload + { + [[ -e "/sys/class/net/$1/statistics/tx_bytes" ]] \ + && echo $(cat /sys/class/net/$1/statistics/tx_bytes) + } + + # Download + lastrxbytes=0 + if [ -f "$tmpdir/last_rxbytes" ]; then + lastrxbytes=$(cat "$tmpdir/last_rxbytes") + fi + # Upload + lasttxbytes=0 + if [ -f "$tmpdir/last_txbytes" ]; then + lasttxbytes=$(cat "$tmpdir/last_txbytes") + fi + + # Download + rxbytes=$(rx_bytes $ethiface) + rxresult=$((($rxbytes-lastrxbytes)/1000)) + echo $rxbytes > "$tmpdir/last_rxbytes" + + # Upload + txbytes=$(tx_bytes $ethiface) + txresult=$((($txbytes-lasttxbytes)/1000)) + echo $txbytes > "$tmpdir/last_txbytes" + + # Output + network="\\#81ae51\\↓ $rxresult Ko/s | $txresult Ko/s ↑\\#ffffff\\" +} + +# battery state +_battery() { + if [ -e /sys/class/power_supply/BAT*/status ]; then + + bat_percent=$((`cat /sys/class/power_supply/BAT*/energy_now`/`cat /sys/class/power_supply/BAT*/energy_full_design | sed 's/00$//'`)) + bat_acpi=`cat /sys/class/power_supply/BAT*/status` + + # use an arrow to show if battery is charging, discharging or full/AC + if [ "$bat_acpi" = "Discharging" ]; then + bat_state="↓" + elif [ "$bat_acpi" = "Charging" ]; then + bat_state="↑" + fi + + # blinking battery percent indicator if bat_percent < 15 + if [ "$bat_percent" -lt "15" ]; then + bat_fail=1 + if [ "`cat /tmp/batteryfail`" ]; then + color="\\#ff6b6b\\" + echo 0 > /tmp/batteryfail + else + color="\\#435e87\\" + echo 1 > /tmp/batteryfail + fi + else + bat_fail=0 + color="\\#C0C0C0\\" + fi + + ## battery time + ## is required + # bat_remtime="`acpi | cut -d' ' -f5 | cut -d':' -f1,2`" + + battery="$color Bat. $bat_percent% $bat_statei\\#ffffff\\" + else + battery="$color On sector\\#ffffff\\" + fi +} + +# uptime +_uptime() { + uptime=`cut -d'.' -f1 /proc/uptime` + secs=$((${uptime}%60)) + mins=$((${uptime}/60%60)) + hours=$((${uptime}/3600%24)) + days=$((${uptime}/86400)) + uptime="${mins}m ${secs}s" + + if [ "${hours}" -ne "0" ]; then + uptime="${hours}h ${uptime}" + fi + + if [ "${days}" -ne "0" ]; then + uptime="${days}d ${uptime}" + fi + + uptime="\\#ff8200\\${uptime}\\#ffffff\\" +} + +# memory usage +_memory() { + memory_used="`free -m | sed -n 's|^-.*:[ \t]*\([0-9]*\) .*|\1|gp'`" + memory_total="`free -m | sed -n 's|^M.*:[ \t]*\([0-9]*\) .*|\1|gp'`" + memory="$memory_used/$memory_total Mo" +} + +# volume +# is required +_volume() { + if [ "`amixer get Master | grep '\[off\]$'`" = "" ]; then + volume=`amixer get Master | sed -n 's|.*\[\([0-9]*\)\%.*|\1%|pg'` + else + volume="[off]" + fi + volume="\\#47B6cA\\Vol. ${volume}\\#ffffff\\" +} + +# date +_date() { + sys_date=`date '+%a %d %b %Y'` + date="\\#ff6b6b\\$sys_date\\#ffffff\\" +} + +# Hour +_hour() { + sys_hour=`date '+%H:%M'` + hour="\\#1793d1\\$sys_hour \\#ffffff\\ " +} + +# ompload +# +# is required +# is required +_ompload() { + [ -e /tmp/omploadurl ] && ompload_url=`cat /tmp/omploadurl` + ompload="$ompload_url" +} + +# CPU Usage +# is required +_cpuusage() { + cpuusage="CPU " + for i in 1 2 3 4 + do + cpuusage+="$(conky -i2 -u 0.5 |tail -n5|grep CPU$i|cut -f2 -d':') " + done + cpuusage="\\#fec023\\$cpuusage\\#ffffff\\ " +} + + +# HD Usage +# is required +_diskusage() { + diskusage="HDD " + diskusage+="$(conky -i2 -u 0.5|tail -n5|grep HDD|cut -f2 -d':') " +} + +# Separator +# For appearance only +_separator() { + separator="•" +} + + +# concatenate arguments +statustext() { + args="" + for arg in $@; do + _${arg} + args="${args} `eval echo '$'$arg`" + done + + # wmfs magic + wmfs -s "$args" +} + +################################################################################ +## status text +## +## add from the above definition without underscore. +## Example: +## while true; do statustext volume separator date separator hour separator ; sleep 1; done +################################################################################ + +# The status will be constantly updated until WMFS is closed. +while [ "$(ps U $UID | awk '{print $5}' | grep ^wmfs$)" != "" ] ; do + statustext battery separator diskusage separator cpuusage separator network separator volume separator date separator hour separator + sleep 1 +done + diff --git a/.config/wmfs/wmfs-status.sh b/.config/wmfs/wmfs-status.sh new file mode 100755 index 00000000..a4907954 --- /dev/null +++ b/.config/wmfs/wmfs-status.sh @@ -0,0 +1,173 @@ +#!/bin/bash +################################################################################ +## WMFS Status bar +## Date: 2012-03-02 +################################################################################ + +################################################################################ +## Options +################################################################################ + +TIMING=1 + +#colors +default="#222222" +green="#4E9A06" +lightgreen="#6DDD00" +grey="#7D7D7D" +dark="#1A1A1A" +dblue="#1874cd" +blue="#63b8ff" +red="#CC0000" +orange="#FFB000" +purple="#8E00FF" + +# separator +sep="^R[right;2;10;$default]" + +# Terminal command +# termcmd="urxvtc -e " +termcmd="lxterminal -e " + +################################################################################ +## Commands +################################################################################ + +# power +pwr(){ + if [ -e /sys/class/power_supply/BAT*/status ]; then + pwrperc="$(awk 'sub(/,/,"") {print $4}' <(acpi -b) | cut -d , -f 1 $1)" + if [ "$pwrperc" == "100%" ]; then + pwr="100" + else + pwr="$(echo $pwrperc | cut -c1-2)" + fi + echo "^s[70;10;$grey;bat]^p[90;2;40;8;0;$pwr;100;$dark;$dblue]^R[110;2;1;10;$default]" + fi +} + +# cpugraph +cpugraph(){ + cpu="$(eval $(awk '/^cpu /{print "previdle=" $5 "; prevtotal=" $2+$3+$4+$5 }' /proc/stat); sleep 0.4; + eval $(awk '/^cpu /{print "idle=" $5 "; total=" $2+$3+$4+$5 }' /proc/stat); + intervaltotal=$((total-${prevtotal:-0})); + echo "$((100*( (intervaltotal) - ($idle-${previdle:-0}) ) / (intervaltotal) ))")" + echo "^s[140;10;$grey;core]^g[170;2;80;8;$cpu;100;$dark;$orange;cpugraph](1;spawn;$termcmd htop)" +} + +# membar +membar(){ + memu="$(free -m | sed -n 's|^-.*:[ \t]*\([0-9]*\) .*|\1|gp')" + memt="$(free -m | sed -n 's|^M.*:[ \t]*\([0-9]*\) .*|\1|gp')" + echo "^s[260;10;$grey;mem ]^p[290;2;80;8;0;$memu;$memt;$dark;$lightgreen](1;spawn;$termcmd htop)^R[330;2;1;10;$default]" +} + +# hdd section +hdd(){ + hdd="$(df -h|grep sda3|awk '{print $5}' | cut -c1-2)" + echo "^s[390;10;$grey;hdd]^p[415;2;40;8;0;$hdd;100;$dark;$grey](1;spawn;$termcmd ncdu)" +} + +# internet section +# netup(){ +# netup="$("$HOME/bin/speedup.sh")" +# echo "^s[465;10;$grey;net ]^p[490;2;100;4;0;$netup;150;$dark;$dblue](1;spawn;$termcmd net-monitor)" +# } + +# netdown(){ +# netdown="$("$HOME/bin/speeddown.sh")" +# echo "^p[490;7;100;4;0;$netdown;2200;$dark;$blue](1;spawn;$termcmd net-monitor)" +# } + +# date/time section +day(){ + day="$(date +"%d")" + echo "^s[630;10;$grey;date]^p[660;2;100;4;0;$day;31;$dark;$grey]" +} +month(){ + month="(date +"%m")" + echo "^p[660;7;100;4;0;$month;12;$dark;$grey]" +} +hour(){ + hour="$(date +"%I")" + echo "^s[770;10;$grey;time ]^p[800;2;80;4;0;$hour;12;$dark;$green]" +} +minute(){ + minute="$(date +"%M")" + echo "^p[800;7;80;4;0;$minute;60;$dark;$green]^R[820;0;1;12;$default]^R[840;0;1;12;$default]^R[860;0;1;12;$default]" +} + +# sound +volpcm(){ + volpcm="$(amixer get PCM | tail -1 | sed 's/.*\[\([0-9]*%\)\].*/\1/')" + if [ "$volpcm" == "100%" ]; then + pcm="100" + else + pcm="$(echo $volpcm | cut -c1-2)" + fi + echo "^s[10;10;$grey;vol ]^p[30;2;50;4;0;$pcm;100;$dark;$dblue]" +} + + + +statustext() +{ + wmfs -c status "topbar $(pwr) $(cpugraph) $(membar) $(hdd) $(day) $(month) $(hour) $(minute)" + wmfs -c status "bottombar $(volpcm)" +} + +while true; +do + statustext + sleep $TIMING +done + + +################################################################################ +## Not used +################################################################################ + +# MOC +# music(){ +# music="$(conky -c ~/.config/wmfs/conkyrc_mocp)" +# echo "^s[270;10;#7D7D7D;$music]" +# } + +# mocp control +# mocpctrl(){ +# echo "^s[90;9;$grey;mocp](1;spawn;urxvt -e mocp) ^R[125;1;16;10;$dark]^s[126;10;$grey;<<](1;spawn;mocp -r) ^R[142;1;24;10;$dark]^s[150;10;$grey;>I](1;spawn;mocp -p) ^R[167;1;16;10;$dark]^s[168;10;$grey;>>](1;spawn;mocp -f) ^R[184;1;16;10;$dark]^s[188;9;$grey;II](1;spawn;mocp -G)" +# } + +# mocpbar +# mocpbar(){ +# if [ "$(pidof mocp)" ]; then +# total="$(mocp -Q %ts)" +# curr="$(mocp -Q %cs)" +# else +# total="20" +# curr="0" +# fi +# echo "^p[210;1;50;10;1;$curr;$total;$dark;$grey]" +# } + +## Mail +# email(){ +# if [ "$(pidof claws-mail)" ];then +# mail="$(claws-mail --status | awk '{print $2}')" +# else +# mail="0" +# fi +# echo "^s[20;10;$grey;mail]^s[45;10;$green;$mail]" +# } + + +## Volume +# volibm(){ +# volume="$(conky -c ~/.config/wmfs/conkyrc_sound)" +# if [ "$volume" == "mute" ]; then +# ibm="0" +# else +# ibm="$(conky -c ~/.config/wmfs/conkyrc_sound | awk '{printf $1*100/14}' | cut -d . -f 1 $1)" +# fi +# echo "^p[30;7;50;4;0;$ibm;100;$dark;$blue]" +# } diff --git a/.config/wmfs/wmfs.d/bars b/.config/wmfs/wmfs.d/bars new file mode 100644 index 00000000..6ad7fa04 --- /dev/null +++ b/.config/wmfs/wmfs.d/bars @@ -0,0 +1,58 @@ +[bars] + + # Position: + # + # 0 Top + # 1 Bottom + # 2 Hide + + # Element type: + # + # t Tags + # s Statustext (will take available space) + # y Systray (can be set only ONE time among all element) + # l Launcher (will be expended at launcher use) + + # [bar] + # name = "rightbar" + # position = 1 + # screen = 1 + # elements = "yslt" + # theme = "blue" + # [/bar] + + # [bar] + # name = "topbar" + # position = 2 + # screen = 0 + # elements = "s" + # theme = "topbar" + # [/bar] + + +[bar] + name = "topbar" + position = 0 + screen = 0 + elements = "tlsy" # element order in bar + theme = "blue" + #theme = "default" +[/bar] + +[bar] + name = "bottombar" + position = 1 + screen = 0 + elements = "s" # element order in bar + # theme = "blue" + theme = "bluish" +[/bar] + +# [bar] +# position = 0 +# screen = 1 +# elements = "ts" +# theme = "default" +# [/bar] + +[/bars] diff --git a/.config/wmfs/wmfs.d/client b/.config/wmfs/wmfs.d/client new file mode 100644 index 00000000..c969daf1 --- /dev/null +++ b/.config/wmfs/wmfs.d/client @@ -0,0 +1,11 @@ +[client] + theme = "blue" + key_modifier = "Super" + + [mouse] button = "1" func = "client_focus_click" [/mouse] + [mouse] button = "1" func = "mouse_swap" [/mouse] + [mouse] button = "2" func = "mouse_tab" [/mouse] + [mouse] button = "3" func = "mouse_resize" [/mouse] + [mouse] button = "4" func = "client_focus_next_tab" [/mouse] + [mouse] button = "5" func = "client_focus_prev_tab" [/mouse] +[/client] diff --git a/.config/wmfs/wmfs.d/keys b/.config/wmfs/wmfs.d/keys new file mode 100644 index 00000000..0a3f745c --- /dev/null +++ b/.config/wmfs/wmfs.d/keys @@ -0,0 +1,139 @@ +[keys] + + ###################### + # Software shortcuts # + ###################### + [key] mod = {"Super"} key = "Return" func = "spawn" cmd = "lxterminal || urxvt || xterm" [/key] + [key] mod = {"Super"} key = "w" func = "spawn" cmd = "firefox" [/key] + [key] mod = {"Super"} key = "t" func = "spawn" cmd = "thunderbird" [/key] + [key] mod = {"Super"} key = "e" func = "spawn" cmd = "lxterminal -e ranger" [/key] + [key] mod = {"Super"} key = "r" func = "spawn" cmd = "evince" [/key] + + ## Cmus + [key] mod = {"Super"} key = "a" func = "spawn" cmd = "lxterminal -e cmus" [/key] + [key] mod = {"Super","Alt"} key = "a" func = "spawn" cmd = "cmus-remote -u" [/key] + [key] mod = {"Super","Shift"} key = "a" func = "spawn" cmd = "cmus-remote -n" [/key] + [key] mod = {"Super","Control"} key = "a" func = "spawn" cmd = "cmus-remote -r" [/key] + + # Sound Control + [key] mod = {"Super"} key = "KP_Subtract" func = "spawn" cmd = "amixer set Master 5%-" [/key] + [key] mod = {"Super"} key = "KP_Add" func = "spawn" cmd = "amixer set Master 5%+" [/key] + [key] mod = {"Super"} key = "KP_Divide" func = "spawn" cmd = "amixer set Master mute" [/key] + [key] mod = {"Super"} key = "KP_Multiply" func = "spawn" cmd = "amixer set Master unmute" [/key] + + # Take a screenshot. + [key] key = "Print" func = "spawn" cmd = "scrot '%Y-%m-%d-%H%M%S_$wx$h.png' -e 'mkdir -p ~/shots && mv $f ~/shots/'" [/key] + + # Lock the screen. + [key] mod = {"Super"} key = "l" func = "spawn" cmd = "xscreensaver-command --lock" [/key] + + + ################# + # WMFS commands # + ################# + [key] mod = {"Control", "Super", "Alt"} key = "q" func = "quit" [/key] + [key] mod = {"Control", "Super", "Alt"} key = "r" func = "reload" [/key] + + # Toggle client free/tile + [key] mod = {"Super"} key = "f" func = "client_toggle_free" [/key] + + # Launcher + [key] mod = {"Super"} key = "p" func = "launcher" cmd = "exec" [/key] + # Man launcher + [key] mod = {"Super"} key = "m" func = "launcher" cmd = "launcher_man" [/key] + + [key] mod = {"Super"} key = "q" func = "client_close" [/key] + + #################### + # Tag manipulation # + #################### + [key] mod = {"Super"} key = "F1" func = "tag_set" cmd = "0" [/key] + [key] mod = {"Super"} key = "F2" func = "tag_set" cmd = "1" [/key] + [key] mod = {"Super"} key = "F3" func = "tag_set" cmd = "2" [/key] + [key] mod = {"Super"} key = "F4" func = "tag_set" cmd = "3" [/key] + [key] mod = {"Super"} key = "F5" func = "tag_set" cmd = "4" [/key] + [key] mod = {"Super"} key = "F6" func = "tag_set" cmd = "5" [/key] + [key] mod = {"Super"} key = "F7" func = "tag_set" cmd = "6" [/key] + [key] mod = {"Super"} key = "F8" func = "tag_set" cmd = "7" [/key] + [key] mod = {"Super"} key = "F9" func = "tag_set" cmd = "8" [/key] + [key] mod = {"Super"} key = "F10" func = "tag_set" cmd = "9" [/key] + [key] mod = {"Super"} key = "F11" func = "tag_set" cmd = "10" [/key] + [key] mod = {"Super"} key = "F12" func = "tag_set" cmd = "11" [/key] + + [key] mod = {"Super", "Alt"} key = "F1" func = "tag_client" cmd = "0" [/key] + [key] mod = {"Super", "Alt"} key = "F2" func = "tag_client" cmd = "1" [/key] + [key] mod = {"Super", "Alt"} key = "F3" func = "tag_client" cmd = "2" [/key] + [key] mod = {"Super", "Alt"} key = "F4" func = "tag_client" cmd = "3" [/key] + [key] mod = {"Super", "Alt"} key = "F5" func = "tag_client" cmd = "4" [/key] + [key] mod = {"Super", "Alt"} key = "F6" func = "tag_client" cmd = "5" [/key] + [key] mod = {"Super", "Alt"} key = "F7" func = "tag_client" cmd = "6" [/key] + [key] mod = {"Super", "Alt"} key = "F8" func = "tag_client" cmd = "7" [/key] + + [key] mod = {"Super", "Alt"} key = "KP_Subtract" func = "tag_del" [/key] + [key] mod = {"Super", "Alt"} key = "KP_Add" func = "tag_new" [/key] + + [key] mod = {"Super"} key = "Next" func = "tag_next" [/key] + [key] mod = {"Super"} key = "Prior" func = "tag_prev" [/key] + + # tag function: cmd = nameofthetag + #[key] mod = {"Super"} key = "z" func = "tag" cmd = "2" [/key] + + #[key] mod = {"Control"} key = "Up" func = "screen_next" [/key] + #[key] mod = {"Control"} key = "Down" func = "screen_prev" [/key] + + # Focus next / prev client and next / prev tabbed client + [key] mod = { "Super" } key = "Tab" func = "client_focus_next" [/key] + [key] mod = { "Super", "Shift" } key = "Tab" func = "client_focus_prev" [/key] + [key] mod = { "Super", "Alt" } key = "Tab" func = "client_focus_next_tab" [/key] + [key] mod = { "Super", "Alt", "Shift" } key = "Tab" func = "client_focus_prev_tab" [/key] + + # Focus next client with direction + [key] mod = {"Super"} key = "Left" func = "client_focus_left" [/key] + [key] mod = {"Super"} key = "Right" func = "client_focus_right" [/key] + [key] mod = {"Super"} key = "Up" func = "client_focus_top" [/key] + [key] mod = {"Super"} key = "Down" func = "client_focus_bottom" [/key] + + # swap next client with direction: + [key] mod = {"Super", "Alt"} key = "Left" func = "client_swap_left" [/key] + [key] mod = {"Super", "Alt"} key = "Right" func = "client_swap_right" [/key] + [key] mod = {"Super", "Alt"} key = "Up" func = "client_swap_top" [/key] + [key] mod = {"Super", "Alt"} key = "Down" func = "client_swap_bottom" [/key] + + # Resize selected tiled client with direction + [key] mod = {"Super", "Shift"} key = "Left" func = "client_resize_left" cmd = "20" [/key] + [key] mod = {"Super", "Shift"} key = "Right" func = "client_resize_left" cmd = "-20" [/key] + [key] mod = {"Super", "Shift"} key = "Up" func = "client_resize_top" cmd = "20" [/key] + [key] mod = {"Super", "Shift"} key = "Down" func = "client_resize_top" cmd = "-20" [/key] + [key] mod = {"Super", "Control"} key = "Left" func = "client_resize_right" cmd = "-20" [/key] + [key] mod = {"Super", "Control"} key = "Right" func = "client_resize_right" cmd = "20" [/key] + [key] mod = {"Super", "Control"} key = "Up" func = "client_resize_bottom" cmd = "-20" [/key] + [key] mod = {"Super", "Control"} key = "Down" func = "client_resize_bottom" cmd = "20" [/key] + + # Tabbing command + [key] mod = {"Alt", "Super"} key = "h" func = "client_tab_left" [/key] + [key] mod = {"Alt", "Super"} key = "l" func = "client_tab_right" [/key] + [key] mod = {"Alt", "Super"} key = "k" func = "client_tab_top" [/key] + [key] mod = {"Alt", "Super"} key = "j" func = "client_tab_bottom" [/key] + [key] mod = {"Alt", "Super"} key = "u" func = "client_untab" [/key] + #[key] mod = {"Super"} key = "t" func = "client_tab_next_opened" [/key] + + + ########## + # Unused # + ########## + # Layout manipulation + #[key] mod = {"Super"} key = "m" func = "layout_vmirror" [/key] + #[key] mod = {"Super", "Shift"} key = "m" func = "layout_hmirror" [/key] + # [key] mod = {"Super"} key = "r" func = "layout_rotate_right" [/key] + # [key] mod = {"Super", "Shift"} key = "r" func = "layout_rotate_left" [/key] + + # [key] mod = {"Control", "Super", "Alt"} key = "h" func = "layout_integrate_left" [/key] + # [key] mod = {"Control", "Super", "Alt"} key = "j" func = "layout_integrate_bottom" [/key] + # [key] mod = {"Control", "Super", "Alt"} key = "k" func = "layout_integrate_top" [/key] + # [key] mod = {"Control", "Super", "Alt"} key = "l" func = "layout_integrate_right" [/key] + + # Layout set historic travelling function (TESTING) + # [key] mod = {"Super"} key = "o" func = "layout_prev_set" [/key] + # [key] mod = {"Super", "Shift"} key = "o" func = "layout_next_set" [/key] + +[/keys] diff --git a/.config/wmfs/wmfs.d/launchers b/.config/wmfs/wmfs.d/launchers new file mode 100644 index 00000000..01bacabc --- /dev/null +++ b/.config/wmfs/wmfs.d/launchers @@ -0,0 +1,19 @@ +[launchers] + # command can be an uicb function or an uicb function + extension (see example) + # Example of uicb + ext: + # command = "spawn xterm -e" + + [launcher] + name = "exec" + prompt = " Run:" + command = "spawn" + width = 300 + [/launcher] + + [launcher] + name = "launcher_man" + prompt = " Man:" + command = "spawn lxterminal -e man" + width = 300 + [/launcher] +[/launchers] diff --git a/.config/wmfs/wmfs.d/rules b/.config/wmfs/wmfs.d/rules new file mode 100644 index 00000000..3da91a55 --- /dev/null +++ b/.config/wmfs/wmfs.d/rules @@ -0,0 +1,24 @@ +[rules] + [rule] + instance = "Mail" + class = "Thunderbird" + + role = "3pane" + # name = "" + # theme = "default" + + tag = 6 # 2nd tag + screen = 0 + + free = false + tab = false + ignore_tag = false + [/rule] + + [rule] + instance = "xv" + class = "MPlayer" + free = true + [/rule] + +[/rules] diff --git a/.config/wmfs/wmfs.d/tags b/.config/wmfs/wmfs.d/tags new file mode 100644 index 00000000..ff5fcf87 --- /dev/null +++ b/.config/wmfs/wmfs.d/tags @@ -0,0 +1,23 @@ + +[tags] + theme = "blue" + + # Use no screen option or screen = -1 to set tag on each screen + [tag] + name = " 1 " + # statusline="" + [/tag] + + [tag] name = " 2 " [/tag] + [tag] name = " 3 " [/tag] + [tag] name = " 4 " [/tag] + [tag] name = " Forge " [/tag] + [tag] name = " Music " [/tag] + [tag] name = " Mail " [/tag] + + # Mousebinds associated to Tags element button + [mouse] button = "1" func = "tag_click" [/mouse] + [mouse] button = "4" func = "tag_next" [/mouse] + [mouse] button = "5" func = "tag_prev" [/mouse] + +[/tags] diff --git a/.config/wmfs/wmfs.d/themes b/.config/wmfs/wmfs.d/themes new file mode 100644 index 00000000..d58a2988 --- /dev/null +++ b/.config/wmfs/wmfs.d/themes @@ -0,0 +1,266 @@ +# Multi theme section +[themes] +# No name mean default + + [theme] + # font = "fixed" + + # Bars + bars_width = 21 + bars_fg = "#E6E6E6" + bars_bg = "#4D0000" + + # Element tags + tags_normal_fg = "#E6E6E6" + tags_normal_bg = "#800000" + + tags_sel_fg = "#E6E6E6" + tags_sel_bg = "#CC6666" + + tags_occupied_fg = "#E6E6E6" + tags_occupied_bg = "#994D4D" + tags_occupied_statusline = "\R[0;0;100;1;#994D4D]" + + tags_urgent_fg = "#E6E6E6" + tags_urgent_bg = "#D88C34" + + tags_border_color = "#000000" + #tags_border_color = "#112211" + tags_border_width = 1 + + # Frame / Client + client_normal_fg = "#E6E6E6" + client_normal_bg = "#330000" + client_normal_statusline = "\s[3;9;#121212;x] \s[2;8;#E6E6E6;x](1;client_close)" + + client_sel_fg = "#E6E6E6" + client_sel_bg = "#660000" + client_sel_statusline = "\s[3;9;#121212;x] \s[2;8;#E6E6E6;x](1;client_close)" + + frame_bg = "#555555" + client_titlebar_width = 18 + client_border_width = 1 + [/theme] + + [theme] + name = "blue" + font = "dejavu-8" + +# BAR +# bg = "#191919" +# fg = "#D4D4D4" +# TAGS +# occupied_bg = "#003366" +# occupied_fg = "#D4D4D4" +# sel_fg = "#191919" +# sel_bg = "#7E89A2" +# urgent_bg = "#DD1111" +# urgent_fg = "#000000" + +# CLIENT +# fg_focus = "#9F9AB3" +# border_focus = "#003366" +# CLIENT +# border_normal = "#191919" +# fg_normal = "#7E89A2" + + + # Bars + bars_width = 21 + bars_fg = "#D4D4D4" + bars_bg = "#000000" + + # Element tags + tags_normal_fg = "#D4D4D4" + tags_normal_bg = "#191919" + + tags_sel_fg = "#191919" + tags_sel_bg = "#7E89A2" + + tags_occupied_fg = "#D4D4D4" + tags_occupied_bg = "#003366" + # tags_occupied_statusline = "\R[0;0;100;1;#994D4D]" + + tags_urgent_fg = "#000000" + tags_urgent_bg = "#DD1111" + + tags_border_color = "#000000" + tags_border_width = 1 + + # Frame / Client + client_normal_fg = "#7E89A2" + client_normal_bg = "#333333" + client_normal_statusline = "\s[3;9;#121212;x] \s[2;8;#E6E6E6;x](1;client_close)" + + client_sel_fg = "#9F9AB3" + client_sel_bg = "#003366" + client_sel_statusline = "\s[3;9;#121212;x] \s[2;8;#E6E6E6;x](1;client_close)" + + frame_bg = "#FF0000" + client_titlebar_width = 18 + client_border_width = 1 + [/theme] + + + [theme] + # default arp theme + name = "greygreen" + font = "snap" + # Bars + bars_width = 12 + bars_fg = "#7D7D7D" + bars_bg = "#222222" + # Element tags + tags_normal_fg = "#7D7D7D" + tags_normal_bg = "#222222" + #tags_normal_statusline = "" + tags_sel_fg = "#222222" + tags_sel_bg = "#6DDD00" + #tags_sel_statusline = "" + tags_occupied_fg = "#7D7D7D" + tags_occupied_bg = "#1A1A1A" + tags_occupied_statusline = "\R[2;11;11;1;#6DDD00]" + tags_border_color = "#222222" + tags_border_width = 0 + # Frame / Client + client_normal_fg = "#7D7D7D" + client_normal_bg = "#222222" + #client_normal_statusline = "" + client_sel_fg = "#222222" + client_sel_bg = "#7D7D7D" + #client_sel_statusline = "" + frame_bg = "#C7C7C7" + client_titlebar_width = 1 + client_border_width = 1 + [/theme] + + [theme] + name = "bluish" + font = "snap" + # Bars + bars_width = 12 + bars_fg = "#63b8ff" + bars_bg = "#222222" + # Element tags + tags_normal_fg = "#7D7D7D" + tags_normal_bg = "#222222" + # tags_normal_statusline = "" + tags_sel_fg = "#222222" + tags_sel_bg = "#63b8ff" + # tags_sel_statusline = "" + tags_occupied_fg = "#7D7D7D" + tags_occupied_bg = "#1A1A1A" + tags_occupied_statusline = "\R[2;11;14;1;#63b8ff]" + tags_border_color = "#222222" + tags_border_width = 0 + # Frame / Client + client_normal_fg = "#7D7D7D" + client_normal_bg = "#222222" + client_normal_statusline = "\s[3;9;#7D7D7D;#](1;client_close)" + client_sel_fg = "#222222" + client_sel_bg = "#63b8ff" + client_sel_statusline = "\s[3;9;#222222;#](1;client_close)" + frame_bg = "#63b8ff" + client_titlebar_width = 12 + client_border_width = 1 + [/theme] + + [theme] + name = "topbar" + font = "-*-terminus-medium-*-*-*-*-*-*-*-*-*-*-pt154" + # Bars + bars_width = 2 + bars_fg = "#63b8ff" + bars_bg = "#222222" + # Element tags + tags_normal_fg = "#7D7D7D" + tags_normal_bg = "#222222" + # tags_normal_statusline = "" + tags_sel_fg = "#222222" + tags_sel_bg = "#63b8ff" + # tags_sel_statusline = "" + tags_occupied_fg = "#7D7D7D" + tags_occupied_bg = "#222222" + tags_occupied_statusline = "\R[1;0;2;4;#63b8ff]" + tags_border_color = "#222222" + tags_border_width = 0 + # Frame / Client + client_normal_fg = "#7D7D7D" + client_normal_bg = "#222222" + client_normal_statusline = "\s[3;9;#7D7D7D;#](1;client_close)" + client_sel_fg = "#222222" + client_sel_bg = "#63b8ff" + client_sel_statusline = "\s[3;9;#222222;#](1;client_close)" + frame_bg = "#63b8ff" + client_titlebar_width = 12 + client_border_width = 1 + [/theme] + + [theme] + # clients without title + name = "titleless" + font = "-*-terminus-medium-*-*-*-*-*-*-*-*-*-*-pt154" + # Bars + bars_width = 12 + bars_fg = "#7D7D7D" + bars_bg = "#222222" + # Element tags + tags_normal_fg = "#7D7D7D" + tags_normal_bg = "#222222" + #tags_normal_statusline = "" + tags_sel_fg = "#222222" + tags_sel_bg = "#6DDD00" + #tags_sel_statusline = "" + tags_occupied_fg = "#7D7D7D" + tags_occupied_bg = "#222222" + tags_occupied_statusline = "\R[1;0;2;4;#6DDD00]" + tags_border_color = "#222222" + tags_border_width = 0 + # Frame / Client + client_normal_fg = "#7D7D7D" + client_normal_bg = "#222222" + #client_normal_statusline = "" + client_sel_fg = "#7D7D7D" + client_sel_bg = "#222222" + #client_sel_statusline = "" + frame_bg = "#C7C7C7" + client_titlebar_width = 0 + client_border_width = 2 + [/theme] + + [theme] + # theme from sources + name = "defaultnew" + font = "fixed" + # Bars + bars_width = 14 + bars_fg = "#AABBAA" + bars_bg = "#223322" + # Element tags + tags_normal_fg = "#AABBAA" + tags_normal_bg = "#223322" + # tags_normal_statusline = "" + tags_sel_fg = "#223322" + tags_sel_bg = "#AABBAA" + # tags_sel_statusline = "" + tags_occupied_fg = "#AABBAA" + tags_occupied_bg = "#445544" + tags_occupied_statusline = "\R[0;0;3;3;#AABBAA]" + tags_urgent_fg = "#223322" + tags_urgent_bg = "#CC5544" + # tags_urgent_statusline = "" + tags_border_color = "#112211" + tags_border_width = 1 + # Frame / Client + client_normal_fg = "#AABBAA" + client_normal_bg = "#223322" + client_normal_statusline = "\s[3;9;#121212;x] \s[2;8;#ff0000;x](1;client_close)" + client_sel_fg = "#223322" + client_sel_bg = "#AABBAA" + client_sel_statusline = "\s[3;9;#121212;x] \s[2;8;#ff0000;x](1;client_close)" + frame_bg = "#555555" + client_titlebar_width = 12 + client_border_width = 1 + [/theme] + +[/themes] diff --git a/.config/wmfs/wmfsrc b/.config/wmfs/wmfsrc new file mode 100644 index 00000000..ee4fe8b2 --- /dev/null +++ b/.config/wmfs/wmfsrc @@ -0,0 +1,15 @@ +# +# WMFS2 configuration file +# + +# Possible file inclusion: +# @include "file" + +@include "wmfs.d/themes" +@include "wmfs.d/bars" +@include "wmfs.d/tags" +@include "wmfs.d/client" +@include "wmfs.d/launchers" +@include "wmfs.d/rules" +@include "wmfs.d/keys" + diff --git a/.emacs b/.emacs new file mode 100644 index 00000000..50addb09 --- /dev/null +++ b/.emacs @@ -0,0 +1,419 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Emacs config +;; 2011-12-08 +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;;============================================================================== +;; General +;;============================================================================== + +;; Make questions less annoying +(defalias 'yes-or-no-p 'y-or-n-p) + +;; Print column number +(column-number-mode 1) + +;; Kill whole line +(setq kill-whole-line t) + +;; Line numbers +(autoload 'linum-mode "linum" "toggle line numbers on/off" t) +(global-set-key (kbd "C-") 'linum-mode) +(setq linum-format "%d ") +(global-linum-mode 1) + +;; Indentation +;(setq standard-indent 4) ;; Set standard indent to 2 rather that 4 +(setq-default tab-width 4) ; Tab width set to 2 spaces +(setq-default indent-tabs-mode nil) ; Indentation cannot insert tabs +(setq c-default-style "linux" c-basic-offset 4) ;; Identation style + +;; Line by line scrolling +(setq scroll-step 1) + +;; Highlight selections -- not activated by default on old emacs. +(transient-mark-mode 1) + +;; Mousewheel scrolling -- Does not work? +;(mouse-wheel-mode t) + +;; No trailing whitespace +;; WARNING: this can break some configuration files needing whitespaces at the +;; end. +;; (add-hook 'before-save-hook 'delete-trailing-whitespace) + +;; Abbreviation support +(setq default-abbrev-mode t) + +;; Remember last cursor position +(setq save-place-file "~/.emacs.d/.saveplace") +(setq-default save-place t) +(require 'saveplace) + +;; Disable autosave features +(setq auto-save-default nil) + +;; Place Backup Files in Specific Directory +(setq backup-inhibited t) ;; Disable backup files. +;(setq make-backup-files t) ;; Enable backup files. +;(setq version-control t) ;; Enable versioning with default values (keep five last versions, I think!) +;(setq backup-directory-alist (quote ((".*" . "~/.emacs.d/.backups/")))) ;; Save all backup file in this directory. + +;; Remove menu-bar +(menu-bar-mode -1) + +;; Set Fill Column +(setq-default fill-column 80) +;; (setq auto-fill-mode 1) ;; Does not work ? +(add-hook 'text-mode-hook 'turn-on-auto-fill) +(add-hook 'c-mode-common-hook + (lambda () + (auto-fill-mode 1) + (set (make-local-variable 'fill-nobreak-predicate) + (lambda () + (not (eq (get-text-property (point) 'face) + 'font-lock-comment-face )) + )) + )) + + +;; Man-mode +(setenv "MANWIDTH" "80") + +;;============================================================================== +;; Theme +;;============================================================================== +(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. + '(minibuffer-prompt ((t (:foreground "cyan"))))) + +;;============================================================================== +;; Completion +;;============================================================================== +;(global-set-key (kbd "C-") 'dabbrev-expand) +;(define-key minibuffer-local-map (kbd "C-") 'dabbrev-expand) + + + +;;============================================================================== +;; Example of automode default modification +;;============================================================================== +(setq auto-mode-alist + (append + '(("\\.m$" . octave-mode) + ) + auto-mode-alist) + ) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; FUNCTIONS +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;;============================================================================== +;; Unfill paragraph +;;============================================================================== + +(defun unfill-paragraph () + (interactive) + (let ((fill-column (point-max))) + (fill-paragraph nil))) + +(defun unfill-region () + (interactive) + (let ((fill-column (point-max))) + (fill-region (region-beginning) (region-end) nil))) + +;;============================================================================== +;; Duplicate line +;;============================================================================== +(defun duplicate-line (arg) + "Duplicate current line, leaving point in lower line." + (interactive "*p") + + ;; save the point for undo + (setq buffer-undo-list (cons (point) buffer-undo-list)) + + ;; local variables for start and end of line + (let ((bol (save-excursion (beginning-of-line) (point))) + eol) + (save-excursion + + ;; don't use forward-line for this, because you would have + ;; to check whether you are at the end of the buffer + (end-of-line) + (setq eol (point)) + + ;; store the line and disable the recording of undo information + (let ((line (buffer-substring bol eol)) + (buffer-undo-list t) + (count arg)) + ;; insert the line arg times + (while (> count 0) + (newline) ;; because there is no newline in 'line' + (insert line) + (setq count (1- count))) + ) + + ;; create the undo information + (setq buffer-undo-list (cons (cons eol (point)) buffer-undo-list))) + ) ; end-of-let + + ;; put the point in the lowest line and return + (next-line arg)) + + +;;============================================================================== +;; Select windows +;;============================================================================== + +(defun select-next-window () + "Switch to the next window" + (interactive) + (select-window (next-window))) + +(defun select-previous-window () + "Switch to the previous window" + (interactive) + (select-window (previous-window))) + +(global-set-key (kbd "M-") 'select-next-window) +(global-set-key (kbd "M-") 'select-previous-window) +;; (global-set-key (kbd "M-") 'select-next-window) +;; (global-set-key (kbd "M-") 'select-previous-window) +(global-set-key (kbd "M-") 'previous-buffer) +(global-set-key (kbd "M-") 'next-buffer) + + +;;============================================================================== +;; Comment DWIM -- toggle comment line +;;============================================================================== + +;; Original idea from +;; http://www.opensubscriber.com/message/emacs-devel@gnu.org/10971693.html +(defun comment-dwim-line (&optional arg) + "Replacement for the comment-dwim command. + If no region is selected and current line is not blank and we are not at the end of the line, + then comment current line. + Replaces default behaviour of comment-dwim, when it inserts comment at the end of the line." + (interactive "*P") + (comment-normalize-vars) + (if (and (not (region-active-p)) (not (looking-at "[ \t]*$"))) + (comment-or-uncomment-region (line-beginning-position) (line-end-position)) + (comment-dwim arg))) +(global-set-key "\M-;" 'comment-dwim-line) + + + +;;============================================================================== +;; My Keys Minor-Mode +;;============================================================================== + +(defvar my-keys-minor-mode-map (make-keymap) "my-keys-minor-mode keymap.") + +;; Duplicate line +(define-key my-keys-minor-mode-map (kbd "C-d") 'duplicate-line) + +;; 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")) + +;; 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) +;; (define-key my-keys-minor-mode-map (kbd "S-C-") 'enlarge-window) + + +;; My-Keys options +(define-minor-mode my-keys-minor-mode + "A minor mode so that my key settings override annoying major modes." + t " my-keys" 'my-keys-minor-mode-map) + +(my-keys-minor-mode 1) + +(defun my-minibuffer-setup-hook () + (my-keys-minor-mode 0)) + +(add-hook 'minibuffer-setup-hook 'my-minibuffer-setup-hook) + +;;============================================================================== +;; Programming +;;============================================================================== + +;; autoinsert C/C++ header +(define-auto-insert + (cons "\\.\\([Hh]\\|hh\\|hpp\\)\\'" "My C / C++ header") + '(nil + "/" (make-string 79 ?*) "\n" + " * @file " (file-name-nondirectory buffer-file-name) "\n" + " * @date \n" + " * @brief \n" + " *\n" + " " (make-string 78 ?*) "/\n\n" + (let* ((noext (substring buffer-file-name 0 (match-beginning 0))) + (nopath (file-name-nondirectory noext)) + (ident (concat (upcase nopath) "_H"))) + (concat "#ifndef " ident "\n" + "#define " ident " 1\n\n\n" + "\n\n#endif // " ident "\n")) + )) + +;; auto insert C/C++ +(define-auto-insert + (cons "\\.\\([Cc]\\|cc\\|cpp\\)\\'" "My C++ implementation") + '(nil + "/" (make-string 79 ?*) "\n" + " * @file " (file-name-nondirectory buffer-file-name) "\n" + " * @date \n" + " * @brief \n" + " *\n" + " " (make-string 78 ?*) "/\n\n" + (let* ((noext (substring buffer-file-name 0 (match-beginning 0))) + (nopath (file-name-nondirectory noext)) + (ident (concat nopath ".h"))) + (if (file-exists-p ident) + (concat "#include \"" ident "\"\n"))) + )) + + +;; auto insert LaTeX Article +(define-auto-insert + (cons "\\.\\(tex\\)\\'" "My LaTeX implementation") + '(nil + (make-string 80 ?%) "\n" + "\\documentclass[11pt]{article}\n" + "\\usepackage[utf8]{inputenc}\n" + "\\usepackage[T1]{fontenc}\n" + "% \\usepackage{lmodern}\n" + (make-string 80 ?%) "\n" + + "\\title{Title}\n" + "\\author{\\textsc{P.~Neidhardt}}\n" + )) + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Plugins +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;;============================================================================== +;; smart-compile +;;============================================================================== + +(add-to-list 'load-path "~/.emacs.d/plugins/smart-compile") + +(require 'smart-compile) + +(defun my-c-mode-hook () + (local-set-key (kbd "") (kbd "C-x C-s M-x smart-compile C-j C-j")) + ) +(define-key my-keys-minor-mode-map (kbd "C-") 'next-error) + +(add-hook 'c-mode-hook 'my-c-mode-hook) +(add-hook 'c++-mode-hook 'my-c-mode-hook) +(add-hook 'cpp-mode-hook 'my-c-mode-hook) + + +;;============================================================================== +;; Yasnippet +;;============================================================================== + +;; (add-to-list 'load-path "/usr/share/emacs/site-lisp/yas") +;; (require 'yasnippet) ;; not yasnippet-bundle +;; (yas/initialize) + +;; ;; Develop and keep personal snippets under ~/emacs.d/mysnippets +;; ;; (setq yas/root-directory "~/emacs.d/mysnippets") +;; (setq yas/root-directory "~/.emacs.d/plugins/yas/snippets" ) + +;; ;; "/usr/share/emacs/site-lisp/yas/snippets" + +;; ;; Load the snippets +;; (yas/load-directory "/usr/share/emacs/site-lisp/yas/snippets") +;; (yas/load-directory yas/root-directory) + +;;============================================================================== +;; 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) + +;;============================================================================== +;; AucTeX +;;============================================================================== + +;; Activate AucTeX +(load "auctex.el" nil t t) +(load "preview-latex.el" nil t t) + +;; Compile to PDF by default +(setq TeX-PDF-mode t) + +(setq TeX-view-program-selection + '((output-dvi "DVI Viewer") + (output-ps "PS Viewer") + (output-pdf "PDF Viewer") + (output-html "Web browser"))) +(setq TeX-view-program-list + '(("DVI Viewer" "zathura --fork %o") + ("PS Viewer" "zathura --fork %o") + ("PDF Viewer" "zathura --fork %o") + ("Web browser" "luakit %o"))) + +;; Add 'Compress PDF' compilation command +(eval-after-load "TeX" + '(add-to-list 'TeX-command-list + '("Compress" "if [ -e %s.pdf ]; then gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=%s-COMPRESSED.pdf %s.pdf && rm -rf %s.pdf && mv %s-COMPRESSED.pdf %s.pdf;fi" TeX-run-command nil t :help "Compress PDF" + ) + t ) + ) + +;; Add '--shell-escape' switch to compilation command (useful for using GnuPlot from TikZ) +(eval-after-load "tex" + '(setcdr (assoc "LaTeX" TeX-command-list) + '("%`%l%(mode) --shell-escape %' %t" + TeX-run-TeX nil (latex-mode doctex-mode) :help "Run LaTeX") + ) + ) + +(defun my-tex-mode-hook () +(local-set-key (kbd "") (kbd "C-x C-s C-c C-c C-j"))) + +(add-hook 'TeX-mode-hook 'my-tex-mode-hook) + + +;;============================================================================== +;; Lua +;;============================================================================== +(setq auto-mode-alist (cons '("\.lua$" . lua-mode) auto-mode-alist)) +(autoload 'lua-mode "lua-mode" "Lua editing mode." t) + +;;============================================================================== +;; DoxyMacs +;;============================================================================== + +;; (require 'doxymacs) +;; (add-hook 'c-mode-common-hook 'doxymacs-mode) + +;; ;; Fontified comments. +;; (defun my-doxymacs-font-lock-hook () +;; (if (or (eq major-mode 'c-mode) (eq major-mode 'c++-mode)) +;; (doxymacs-font-lock))) +;; (add-hook 'font-lock-mode-hook 'my-doxymacs-font-lock-hook) + +;;============================================================================== +;; MediaWiki +;;============================================================================== + +;; (setq mediawiki-site-alist +;; (append '("ArchWiki" "https://wiki.archlinux.org/" "username" "password" "Main Page") +;; mediawiki-site-alist)) diff --git a/.emacs.d/abbrev_defs b/.emacs.d/abbrev_defs new file mode 100644 index 00000000..529bfd66 --- /dev/null +++ b/.emacs.d/abbrev_defs @@ -0,0 +1,117 @@ +;;-*-coding: emacs-mule;-*- +(define-abbrev-table 'Buffer-menu-mode-abbrev-table '()) + +(define-abbrev-table 'apropos-mode-abbrev-table '()) + +(define-abbrev-table 'awk-mode-abbrev-table '()) + +(define-abbrev-table 'c++-mode-abbrev-table '()) + +(define-abbrev-table 'c-mode-abbrev-table '()) + +(define-abbrev-table 'comint-mode-abbrev-table '()) + +(define-abbrev-table 'completion-list-mode-abbrev-table '()) + +(define-abbrev-table 'docTeX-mode-abbrev-table '()) + +(define-abbrev-table 'emacs-lisp-mode-abbrev-table '()) + +(define-abbrev-table 'fundamental-mode-abbrev-table '()) + +(define-abbrev-table 'global-abbrev-table '()) + +(define-abbrev-table 'idl-mode-abbrev-table '()) + +(define-abbrev-table 'java-mode-abbrev-table '()) + +(define-abbrev-table 'lisp-mode-abbrev-table '()) + +(define-abbrev-table 'objc-mode-abbrev-table '()) + +(define-abbrev-table 'outline-mode-abbrev-table '()) + +(define-abbrev-table 'pike-mode-abbrev-table '()) + +(define-abbrev-table 'select-tags-table-mode-abbrev-table '()) + +(define-abbrev-table 'snippet-mode-abbrev-table '()) + +(define-abbrev-table 'special-mode-abbrev-table '()) + +(define-abbrev-table 'text-mode-abbrev-table + '( + ("Arch" "Arch~Linux" nil 1) + ("ac" "avec" nil 0) + ("ajd" "aujourd'hui" nil 2) + ("arch" "architecture" nil 1) + ("autom" "automatique" nil 2) + ("bcp" "beaucoup" nil 2) + ("biblio" "bibliothque" nil 1) + ("chai" "je ne sais" nil 1) + ("config" "configuration" nil 1) + ("configs" "configurations" nil 1) + ("cd" "c'est--dire" nil 1) + ("dc" "donc" nil 1) + ("dep" "dpendance" nil 1) + ("deps" "dpendances" nil 1) + ("dico" "Dictionnaire" nil 2) + ("dispo" "disponible" nil 1) + ("dispos" "disponibles" nil 1) + ("distro" "distribution" nil 1) + ("ds" "dans" nil 1) + ("ex" "exemple" nil 3) + ("exo" "exercice" nil 1) + ("ficheir" "fichier" nil 0) + ("ficheirs" "fichiers" nil 0) + ("gd" "grand" nil 3) + ("infos" "informations" nil 1) + ("latex" "LaTeX" nil 10) + ("linux" "GNU/Linux" nil 1) + ("lng" "language" nil 1) + ("lq" "lorsque" nil 3) + ("lql" "lequel" nil 2) + ("lqls" "lesquels" nil 1) + ("mail" "e-mail" nil 1) + ("mm" "mme" nil 16) + ("mnt" "maintenant" nil 2) + ("ms" "mais" nil 4) + ("nb" "nombre" nil 0) + ("ns" "nous" nil 1) + ("pb" "problme" nil 4) + ("pbs" "problmes" nil 1) + ("pcq" "parce que" nil 3) + ("pgrm" "programme" nil 1) + ("pgrms" "programmes" nil 1) + ("plsu" "plus" nil 3) + ("poru" "pour" nil 1) + ("pq" "pourquoi" nil 2) + ("pr" "pour" nil 3) + ("ptt" "petit" nil 1) + ("p" "peut-tre" nil 2) + ("qd" "quand" nil 4) + ("qq" "quelque" nil 1) + ("qqch" "quelque chose" nil 1) + ("qqn" "quelqu'un" nil 1) + ("qqns" "quelques-uns" nil 1) + ("qqs" "quelques" nil 1) + ("quelque" "quelque" nil 1) + ("ques" "question" nil 1) + ("ss" "sous" nil 1) + ("ssi" "si et seulement si" nil 1) + ("stp" "s'il te plat" nil 1) + ("svp" "s'il vous plat" nil 1) + ("teh" "the" nil 1) + ("tex" "TeX" nil 2) + ("tjrs" "toujours" nil 4) + ("ts" "tous" nil 1) + ("tt" "tout" nil 3) + ("tte" "toute" nil 1) + ("ttes" "toutes" nil 1) + ("ya" "il y a" nil 6) + ("yen" "il y en" nil 1) + ("" "tre" nil 1) + )) + +(define-abbrev-table 'vc-svn-log-view-mode-abbrev-table '()) + diff --git a/.emacs.d/plugins/smart-compile/smart-compile.el b/.emacs.d/plugins/smart-compile/smart-compile.el new file mode 100644 index 00000000..17ea7679 --- /dev/null +++ b/.emacs.d/plugins/smart-compile/smart-compile.el @@ -0,0 +1,211 @@ +;;; smart-compile.el --- an interface to `compile' + +;; Copyright (C) 1998-2011 by Seiji Zenitani + +;; Author: Seiji Zenitani +;; $Id$ +;; Keywords: tools, unix +;; Created: 1998-12-27 +;; Compatibility: Emacs 21 or later +;; URL(en): http://homepage.mac.com/zenitani/comp-e.html +;; URL(jp): http://homepage.mac.com/zenitani/elisp-j.html#smart-compile + +;; Contributors: Sakito Hisakura + +;; This file 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 2, or (at your option) +;; any later version. + +;; This file 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 GNU Emacs; see the file COPYING. If not, write to +;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. + +;;; Commentary: + +;; This package provides `smart-compile' function. +;; You can associates a particular file with a particular compile functions, +;; by editing `smart-compile-alist'. +;; +;; To use this package, add these lines to your .emacs file: +;; (require 'smart-compile) +;; +;; Note that it requires emacs 21 or later. + +;;; Code: + +(defgroup smart-compile nil + "An interface to `compile'." + :group 'processes + :prefix "smarct-compile") + +(defcustom smart-compile-alist '( + (emacs-lisp-mode . (emacs-lisp-byte-compile)) + (html-mode . (browse-url-of-buffer)) + (nxhtml-mode . (browse-url-of-buffer)) + (html-helper-mode . (browse-url-of-buffer)) + (octave-mode . (run-octave)) + ("\\.c\\'" . "gcc -Wall -Wextra -W -Wuninitialized -Wunused -Wunused-function -Wunused-parameter -Wunused-value -Wunused-variable -Wshadow -Wdeclaration-after-statement -lm %f -o %n -g -O0") +;; ("\\.c\\'" . "gcc -O2 %f -lm -o %n && ./%n") + ("\\.[Cc]+[Pp]*\\'" . "g++ -O2 %f -lm -o %n") + ("\\.m\\'" . "gcc -O2 %f -lobjc -lpthread -o %n") + ("\\.java\\'" . "javac %f") + ("\\.php\\'" . "php -l %f") + ("\\.f90\\'" . "gfortran %f -o %n") + ("\\.[Ff]\\'" . "gfortran %f -o %n") + ("\\.cron\\(tab\\)?\\'" . "crontab %f") + ("\\.tex\\'" . (tex-file)) + ("\\.texi\\'" . "makeinfo %f") + ("\\.mp\\'" . "mptopdf %f") + ("\\.pl\\'" . "perl -cw %f") + ("\\.rb\\'" . "ruby -cw %f") +) "List of compile commands. In argument, +some keywords beginning with '%' will be replaced by: + + %F absolute pathname ( /usr/local/bin/netscape.bin ) + %f file name without directory ( netscape.bin ) + %n file name without extension ( netscape ) + %e extension of file name ( bin ) + +" + :type '(repeat + (cons + (choice + (regexp :tag "Filename pattern") + (function :tag "Major-mode")) + (choice + (string :tag "Compilation command") + (sexp :tag "Lisp expression")))) + :group 'smart-compile) +(put 'smart-compile-alist 'risky-local-variable t) + +(defconst smart-compile-replace-alist '( + ("%F" . (buffer-file-name)) + ("%f" . (file-name-nondirectory (buffer-file-name))) + ("%n" . (file-name-sans-extension + (file-name-nondirectory (buffer-file-name)))) + ("%e" . (or (file-name-extension (buffer-file-name)) "")) + )) +(put 'smart-compile-replace-alist 'risky-local-variable t) + +(defvar smart-compile-check-makefile t) +(make-variable-buffer-local 'smart-compile-check-makefile) + +(defcustom smart-compile-make-program "make " + "The command by which to invoke the make program." + :type 'string + :group 'smart-compile) + + +;;;###autoload +(defun smart-compile (&optional arg) + "An interface to `compile'. +It calls `compile' or other compile function, +which is defined in `smart-compile-alist'." + (interactive "p") + (let ((name (buffer-file-name)) + (not-yet t)) + + (if (not name)(error "cannot get filename.")) +;; (message (number-to-string arg)) + + (cond + + ;; local command + ;; The prefix 4 (C-u M-x smart-compile) skips this section + ;; in order to re-generate the compile-command + ((and (not (= arg 4)) ; C-u M-x smart-compile + (local-variable-p 'compile-command) + compile-command) + (call-interactively 'compile) + (setq not-yet nil) + ) + + ;; make? + ((and smart-compile-check-makefile + (or (file-readable-p "Makefile") + (file-readable-p "makefile"))) + (if (y-or-n-p "Makefile is found. Try 'make'? ") + (progn + (set (make-local-variable 'compile-command) "make ") + (call-interactively 'compile) + (setq not-yet nil) + ) + (setq smart-compile-check-makefile nil))) + + ) ;; end of (cond ...) + + ;; compile + (let( (alist smart-compile-alist) + (case-fold-search nil) + (function nil) ) + (while (and alist not-yet) + (if (or + (and (symbolp (caar alist)) + (eq (caar alist) major-mode)) + (and (stringp (caar alist)) + (string-match (caar alist) name)) + ) + (progn + (setq function (cdar alist)) + (if (stringp function) + (progn + (set (make-local-variable 'compile-command) + (smart-compile-string function)) + (call-interactively 'compile) + ) + (if (listp function) + (eval function) + )) + (setq alist nil) + (setq not-yet nil) + ) + (setq alist (cdr alist)) ) + )) + + ;; If compile-command is not defined and the contents begins with "#!", + ;; set compile-command to filename. + (if (and not-yet + (not (memq system-type '(windows-nt ms-dos))) + (not (string-match "/\\.[^/]+$" name)) + (not + (and (local-variable-p 'compile-command) + compile-command)) + ) + (save-restriction + (widen) + (if (equal "#!" (buffer-substring 1 (min 3 (point-max)))) + (set (make-local-variable 'compile-command) name) + )) + ) + + ;; compile + (if not-yet (call-interactively 'compile) ) + + )) + +(defun smart-compile-string (arg) + "Document forthcoming..." + (if (and (boundp 'buffer-file-name) + (stringp buffer-file-name)) + (let ((rlist smart-compile-replace-alist) + (case-fold-search nil)) + (while rlist + (while (string-match (caar rlist) arg) + (setq arg + (replace-match + (eval (cdar rlist)) t nil arg))) + (setq rlist (cdr rlist)) + ) + )) + arg) + +(provide 'smart-compile) + +;;; smart-compile.el ends here diff --git a/.emacs.d/plugins/yas/snippets/text-mode/cc-mode/else b/.emacs.d/plugins/yas/snippets/text-mode/cc-mode/else new file mode 100644 index 00000000..d6ef06dc --- /dev/null +++ b/.emacs.d/plugins/yas/snippets/text-mode/cc-mode/else @@ -0,0 +1,6 @@ +#name : else { ... } +# -- +else +{ + $0 +} \ No newline at end of file diff --git a/.emacs.d/plugins/yas/snippets/text-mode/cc-mode/for b/.emacs.d/plugins/yas/snippets/text-mode/cc-mode/for new file mode 100644 index 00000000..67279774 --- /dev/null +++ b/.emacs.d/plugins/yas/snippets/text-mode/cc-mode/for @@ -0,0 +1,6 @@ +#name : for (...; ...; ...) { ... } +# -- +for (${1:i = 0}; ${2:i < N}; ${3:i++}) +{ + $0 +} \ No newline at end of file diff --git a/.emacs.d/plugins/yas/snippets/text-mode/cc-mode/fun b/.emacs.d/plugins/yas/snippets/text-mode/cc-mode/fun new file mode 100644 index 00000000..ee06d7d2 --- /dev/null +++ b/.emacs.d/plugins/yas/snippets/text-mode/cc-mode/fun @@ -0,0 +1,6 @@ +#name : type fun (args) { ... } +# -- +${1:type} ${2:name} (${3:args}) +{ + $0 +} \ No newline at end of file diff --git a/.emacs.d/plugins/yas/snippets/text-mode/cc-mode/main b/.emacs.d/plugins/yas/snippets/text-mode/cc-mode/main new file mode 100644 index 00000000..50af4b6a --- /dev/null +++ b/.emacs.d/plugins/yas/snippets/text-mode/cc-mode/main @@ -0,0 +1,7 @@ +#name: int main(argc, argv) { ... } +# -- +int main(int argc, char** argv) +{ + $0 + return 0; +} diff --git a/.emacs.d/plugins/yas/snippets/text-mode/cc-mode/while b/.emacs.d/plugins/yas/snippets/text-mode/cc-mode/while new file mode 100644 index 00000000..14c6ba64 --- /dev/null +++ b/.emacs.d/plugins/yas/snippets/text-mode/cc-mode/while @@ -0,0 +1,6 @@ +#name : while (...) { ... } +# -- +while (${1:condition}) +{ + $0 +} \ No newline at end of file diff --git a/.emacs.d/plugins/yas/snippets/text-mode/latex-mode/art.yasnippet b/.emacs.d/plugins/yas/snippets/text-mode/latex-mode/art.yasnippet new file mode 100644 index 00000000..3d41bc57 --- /dev/null +++ b/.emacs.d/plugins/yas/snippets/text-mode/latex-mode/art.yasnippet @@ -0,0 +1,101 @@ +# -*- mode: snippet -*- +# contributor: Mads D. Kristensen +# contributor : Song Qiang +# contributor : Pierre Neidhardt 2012-03-17 +# key: art +# group: skeleton +# name: \documentclass{article} ... +# -- +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\documentclass[11pt]{article} +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} +% \usepackage{lmodern} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\title{${1:Title}} +\author{${2:\textsc{P.~Neidhardt}}} + +%%============================================================================= + +\usepackage[]{amsmath,amssymb,amsfonts} +\usepackage[]{gensymb} +\usepackage[]{geometry} +\usepackage[]{graphicx} +\usepackage[]{listings} +\usepackage[]{needspace} +\usepackage[svgnames]{xcolor} +\usepackage{tikz} + +%% Load last. +\usepackage[]{hyperref} +\usepackage[frenchb]{babel} + +%% Href. +\hypersetup{ + colorlinks=true, + linkcolor=orange, + linktoc=page, + urlcolor=blue, +} + +%% Source code. +\lstdefinestyle{customc}{ + % numbers=left, + belowcaptionskip=1\baselineskip, + frame=L, + xleftmargin=\parindent, + % framexleftmargin=\parindent, + language=C, + basicstyle=\footnotesize\ttfamily, + keywordstyle=\bfseries\color{green!40!black}, + commentstyle=\itshape\color{purple!40!black}, + identifierstyle=\color{blue}, + stringstyle=\color{orange}, + numberstyle=\ttfamily +} + +\lstdefinestyle{customasm}{ + % numbers=left, + belowcaptionskip=1\baselineskip, + frame=L, + xleftmargin=\parindent, + language=[x86masm]Assembler, + basicstyle=\footnotesize\ttfamily, + commentstyle=\itshape\color{purple!40!black}, +} + +\lstset{escapechar=@,style=customc} + +%% Misc. +\newcommand{\fancybox}[2]{ + \begin{figure}[h] + \centering + \caption{#1} + \begin{tikzpicture} + \node[draw,rounded corners]{#2}; + \end{tikzpicture} + \end{figure} +} + +\newcommand{\comment}[1]{} +% \renewcommand{\thefigure}{\arabic{section}.\arabic{figure}} +% \renewcommand{\arraystretch}{1.5} + +\let\latexbak\LaTeX +\renewcommand{\LaTeX}{{\rm \latexbak}} + +\let\texbak\TeX +\renewcommand{\TeX}{{\rm \texbak}} + +\def\unix{\textsc{Unix}} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\begin{document} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\maketitle +\tableofcontents + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\end{document} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/.emacs.d/plugins/yas/snippets/text-mode/latex-mode/beam.yasnippet b/.emacs.d/plugins/yas/snippets/text-mode/latex-mode/beam.yasnippet new file mode 100644 index 00000000..d299e20d --- /dev/null +++ b/.emacs.d/plugins/yas/snippets/text-mode/latex-mode/beam.yasnippet @@ -0,0 +1,134 @@ +# -*- mode: snippet -*- +# contributor : Pierre Neidhardt 2012-04-27 +# key: beam +# group: skeleton +# name: \documentclass{beamer} ... +# -- +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\documentclass[xcolor=latex,svgnames,table]{beamer} +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} +% \usepackage{lmodern} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\title{${1:Title}} +\subtitle{${2:Subtitle}} +\author{${3:\textcolor{structure.fg!60!white}{\textrm{\textsc{P.~Neidhardt}}}}} +\institute{\textcolor{sidebarSection}{${4:Institute}}} + +\let\latexbak\LaTeX +\renewcommand{\LaTeX}{{\rm \latexbak}} + +\let\texbak\TeX +\renewcommand{\TeX}{{\rm \texbak}} + +\def\unix{\textsc{Unix}} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Source code. +\usepackage{listings} +\lstdefinestyle{customc}{ + % numbers=left, + belowcaptionskip=1\baselineskip, + frame=L, + xleftmargin=\parindent, + % framexleftmargin=\parindent, + language=C, + basicstyle=\footnotesize\ttfamily, + keywordstyle=\bfseries\color{green!40!black}, + commentstyle=\itshape\color{purple!40!black}, + identifierstyle=\color{blue}, + stringstyle=\color{orange}, + numberstyle=\ttfamily +} + +\lstdefinestyle{customasm}{ + % numbers=left, + belowcaptionskip=1\baselineskip, + frame=L, + xleftmargin=\parindent, + language=[x86masm]Assembler, + basicstyle=\footnotesize\ttfamily, + commentstyle=\itshape\color{purple!40!black}, +} + +\lstset{escapechar=@,style=customc} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Beamer config +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%% Remove navigation bar. +\beamertemplatenavigationsymbolsempty + +%% Colors +\colorlet{sidebarSection}{orange!100!black} +\colorlet{sidebarSub}{yellow!100!black} + +%% Themes +\usecolortheme{whale} + +%% Background +\setbeamertemplate{background canvas}[vertical shading][top=white,bottom=white] + +%% Bars +\setbeamercolor{frametitle}{bg=black, fg=white} +\useoutertheme[height=0pt]{sidebar} +\setbeamertemplate{sidebar canvas left}[horizontal shading][left=white!40!black,right=black] +\setbeamercolor{author in sidebar}{fg=red} +\setbeamercolor{section in sidebar shaded}{fg= sidebarSection} +\setbeamercolor{subsection in sidebar shaded}{fg= sidebarSub} +\setbeamercolor{subsection in sidebar}{fg=white} +\setbeamercolor{title}{fg=white,bg=black} +\setbeamertemplate{title page}[default][colsep=-4bp,rounded=true,shadow=true] + +%% Blocks +\setbeamertemplate{blocks}[rounded] [shadow=true] +\setbeamercolor{block title}{fg=white,bg=structure.fg!80!black} +\setbeamercolor{block body}{fg=black,bg=structure.bg} + +%% Footline +\setbeamertemplate{footline}[page number] + +%% Lists +%% default, triangle, circle, square, ball +\setbeamertemplate{itemize item}[ball] + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Locale +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\usepackage[frenchb]{babel} + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\begin{document} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\begin{frame} +\titlepage{} +\end{frame} + + +\def\ftitle{First Title} +\def\fsubtitle{First Subtitle} + +\section{\ftitle} +\subsection{\fsubtitle} +\frame[shrink,containsverbatim]{ +\frametitle{\ftitle} +\framesubtitle{\fsubtitle} + +\begin{lstlisting}[caption=Hello world!] +int main(int argc, char** argv) +{ + printf("Hello world\n"); + return 0; +} + +\end{lstlisting} + +} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\end{document} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/.emacs.d/plugins/yas/snippets/text-mode/latex-mode/letter.yasnippet b/.emacs.d/plugins/yas/snippets/text-mode/latex-mode/letter.yasnippet new file mode 100644 index 00000000..ffc593ec --- /dev/null +++ b/.emacs.d/plugins/yas/snippets/text-mode/latex-mode/letter.yasnippet @@ -0,0 +1,289 @@ +# -*- mode: snippet -*- +# contributor : Xavier Danaux +# contributor : Pierre Neidhardt 2012-04-27 +# key: let +# group: skeleton +# name: \documentclass{article} ... +# -- +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\documentclass[12pt]{article} +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} +% \usepackage{lmodern} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%%============================================================================== +%% Localization +%%============================================================================== + +%% Each language has 2 entries. +%% The one with an argument activates the text, the other one disables it. +% \renewcommand{\locale}{en} +\def\locale{${1:en}} + +%%============================================================================== +%% Personal Information +%%============================================================================== + +\def\firstname{Pierre} +\def\familyname{Neidhardt} +\def\street{77 rue Bellecombe} +\def\postcode{69006} +\def\city{Lyon} +\def\country{France} +\def\phone{\en{(+33) }09 52 92 86 07} +\def\mobile{\en{(+33) }07 61 08 55 94} +\def\mail{pe.neidhardt@gmail.com} +\def\institute{INSA Lyon} + +%%============================================================================== +%% Recipient Information +%%============================================================================== + +%% Recipient gender +\def\gender{${2:male}} + +%% Recipient +\def\recipientfirstname{${3:Firstname}} +\def\recipientfamilyname{${4:Familyname}} +\def\recipientinstitute{${5:Institute}} +\def\recipientstreet{${6:Street}} +\def\recipientcity{${7:City}} +\def\recipientpostcode{${8:Postcode}} + +%%============================================================================== +%% PDF Metadata +%%============================================================================== + +\def\FileAuthor{\firstname{} \familyname} +\def\FileTitle{\firstname{} \familyname{}'s cover letter} +\def\FileSubject{Cover letter} +\def\FileKeyWords{\firstname{} \familyname, Cover letter} + + +%%============================================================================== +%% Aliases +%%============================================================================== + +\let\latextemp\LaTeX +\renewcommand{\LaTeX}{{\rm \latextemp}} + + +%%============================================================================== +%% General options +%%============================================================================== + +\usepackage{lmodern} +\usepackage{eukdate} +\usepackage{lipsum} +\usepackage{marvosym} +\usepackage{ifthen} +\usepackage[svgname]{xcolor} + +%% Language +\newcommand{\en}[1]{} +\newcommand{\fr}[1]{} +\ifthenelse{\equal{\locale}{en}}{ +\renewcommand{\en}[1]{#1}}{} + +\ifthenelse{\equal{\locale}{fr}}{ +\renewcommand{\fr}[1]{#1}}{} + + + +%% Gender commands. +\newcommand{\male}[1]{} +\newcommand{\female}[1]{} +\ifthenelse{\equal{\gender}{male}}{ +\renewcommand{\male}[1]{#1} +}{} +\ifthenelse{\equal{\gender}{female}}{ +\renewcommand{\female}[1]{#1} +} + +\def\civility{% +\en{\male{M.}\female{Ms.}}% +\fr{\male{Monsieur}\female{Madame}}% +} + +%% Greetings toggle. +\newcommand{\greetings}[1]{} +\ifthenelse{\equal{\gender}{}}{} +{\renewcommand{\greetings}[1]{#1}} + +%% Compilation options +\usepackage{ifpdf} +\ifpdf + \usepackage[pdftex]{graphicx} +\else + \usepackage[dvips]{graphicx} +\fi + +%% Babel +\fr{\usepackage[frenchb]{babel}} + + +%% Day-of-week translation +\makeatletter +\fr{ +\renewcommand\weekday{% +\ifcase\theeuk@date Samedi\or Dimanche\or Lundi\or +Mardi\or Mercredi\or Jeudi\or Vendredi\fi} +} +\newcommand\weekdaylower{% +\ifcase\theeuk@date samedi\or dimanche\or lundi\or +mardi\or mercredi\or jeudi\or vendredi\fi} +\makeatother + + +%% Layout +\usepackage[scale=0.8]{geometry} +% \en{\setlength{\parindent}{0pt}} +\fr{ + \setlength{\parindent}{4ex} +} +\addtolength{\parskip}{6pt} + +%% Width of the minipage used to display parts of text on the right. +\newlength{\mpwidth} +\addtolength{\mpwidth}{0.4\textwidth} + +\pagestyle{empty} + +%% Fonts +\renewcommand{\familydefault}{\sfdefault} + +\let\emphtemp\emph +\renewcommand{\emph}{{\rm\emphtemp}} + +%% PDF Metadata +\ifpdf + \usepackage[]{hyperref} + \hypersetup{ + pdfauthor = \FileAuthor, + pdftitle = \FileTitle, + pdfsubject = \FileSubject, + pdfkeywords = \FileKeyWords, + pdfcreator = \LaTeX, + pdfproducer = \LaTeX, + pdftex, + pdfborder=0, + breaklinks, + baseurl=http://, + pdfpagemode=None, + pdfstartview=XYZ, + pdfstartpage=1, + colorlinks=true, + urlcolor=black + } +\else + \usepackage[dvips]{hyperref} +\fi + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\begin{document} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%%============================================================================== +%% Personal particulars +%%============================================================================== + +\en{\hfill} +\begin{minipage}{\mpwidth} +%~ \en{\raggedleft}% +%~ \fr{\raggedright}% +{\bfseries \firstname{} \familyname} +\vspace{0.5em}\newline +\small\itshape% +\street \newline +\postcode\ \city\ -- \country{} +\vspace{0.5em}\newline +\Mobilefone~\mobile \newline +\Telefon~\phone \newline +\Letter~\href{mailto:\mail}{\mail} +\end{minipage} +\vspace{\baselineskip} + +%%============================================================================== +%% Recipient particulars +%%============================================================================== + +\en{} +\fr{\hfill} +\begin{minipage}{\mpwidth} +{\bfseries \civility{} \recipientfirstname{} \recipientfamilyname} +\vspace{0.5em}\newline +\recipientinstitute{} +\vspace{0.5em}\newline +{\small\itshape +\recipientstreet{} \newline +\recipientpostcode{} \recipientcity{} \newline +} +\end{minipage} + +%%============================================================================== +%% Date +%%============================================================================== + +\vspace{1em} + +\hfill +\begin{minipage}{\mpwidth} +\en{\today} +\fr{\city, le \weekdaylower\ \today} +\end{minipage}\newline%[2em] + +%%============================================================================== +%% Object +%%============================================================================== +% \noindent +% \textbf{\en{Object}\fr{Objet}~:} +% This is my object.\newline\vspace{\baselineskip} + + +%%============================================================================== +%% Content +%%============================================================================== +\greetings{ +\en{Dear}\fr{\male{Cher}\female{Chère}} \civility{} \recipientfamilyname,\newline +} + +\lipsum[1] + +Thanks for your consideration; I am looking forward to hearing from you soon! + +%%============================================================================== +%% Closing +%%============================================================================== + +\vfill + +\en{ +Yours sincerely, +} +\fr{ +%~ Cordialement, +Veuillez agréer, \civility{}, l'expression de mes sentiments les meilleurs. +} + +\vspace{1em} +\hfill +\begin{minipage}{\mpwidth} +\textbf{\firstname\ \familyname}\newline +%\includegraphics[scale=0.75]{signature_blue} +\end{minipage} + +%%============================================================================== +%% P.S. & Attachment +%%============================================================================== + +\vfill + +\noindent\em +\fr{Ci-joint~: Curriculum Vit\ae} +\en{Attachment: Curriculum Vit\ae} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\end{document} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/.gtkrc-2.0 b/.gtkrc-2.0 new file mode 100644 index 00000000..d078a307 --- /dev/null +++ b/.gtkrc-2.0 @@ -0,0 +1,20 @@ +# DO NOT EDIT! This file will be overwritten by LXAppearance. +# Any customization should be done in ~/.gtkrc-2.0.mine instead. + +gtk-theme-name="Clearlooks" +gtk-icon-theme-name="nuoveXT2" +gtk-font-name="Sans 10" +gtk-cursor-theme-name="Vanilla-DMZ-AA" +gtk-cursor-theme-size=0 +gtk-toolbar-style=GTK_TOOLBAR_ICONS +gtk-toolbar-icon-size=GTK_ICON_SIZE_SMALL_TOOLBAR +gtk-button-images=0 +gtk-menu-images=1 +gtk-enable-event-sounds=1 +gtk-enable-input-feedback-sounds=1 +gtk-xft-antialias=1 +gtk-xft-hinting=1 +gtk-xft-hintstyle="hintfull" +gtk-xft-rgba="rgb" +gtk-color-scheme="tooltip_fg_color:#000000\nbase_color:#ffffff\nselected_fg_color:#ffffff\ntext_color:#1A1A1A\nbg_color:#EDECEB\ntooltip_bg_color:#F5F5B5\nselected_bg_color:#000033336666\nfg_color:#000000\n" +include "/home/peter/.gtkrc-2.0.mine" diff --git a/.nanorc b/.nanorc new file mode 100644 index 00000000..44b890b8 --- /dev/null +++ b/.nanorc @@ -0,0 +1,313 @@ +## Sample initialization file for GNU nano. +## +## Please note that you must have configured nano with --enable-nanorc +## for this file to be read! Also note that this file should not be in +## DOS or Mac format, and that characters specially interpreted by the +## shell should not be escaped here. +## +## To make sure a value is disabled, use "unset