Luakit: added some search engines.

Shell: added some functions (lsofstat,pacman-official).
.save: smarter way to get pacman official packages.
master
Ambrevar 2012-06-29 17:13:47 +01:00
parent 16f2ffbaaf
commit cb66c63b76
7 changed files with 47 additions and 14 deletions

View File

@ -1,10 +1,12 @@
auto-complete
bashmount
bustle
dropbox
dropbox-cli
emacs-yasnippet
emacs-yasnippet-latex-git
gsharkdown
linux-custom
movgrab
otf-texgyre
package-query

View File

@ -11,6 +11,7 @@ bash-completion
bashmount
binutils
bison
bustle
bzip2
bzr
calc
@ -73,6 +74,7 @@ libtool
licenses
links
linux
linux-custom
linux-docs
linux-lts
logrotate
@ -137,6 +139,7 @@ syslog-ng
sysvinit
tar
task
tcpdump
texinfo
texlive-genericextra
texlive-latexextra
@ -156,6 +159,8 @@ waf
wget
which
wireless_tools
wireshark-cli
wireshark-gtk
wpa_supplicant
xf86-input-synaptics
xf86-video-intel

View File

@ -374,6 +374,8 @@ pcre
perl
perl-error
perl-locale-gettext
perl-test-pod
perl-yaml-syck
pidgin
pinentry
pixman
@ -442,6 +444,7 @@ t1lib
talloc
tar
task
tcpdump
tdb
texinfo
texlive-bin
@ -471,6 +474,8 @@ wget
which
wildmidi
wireless_tools
wireshark-cli
wireshark-gtk
wpa_supplicant
wxgtk
x264
@ -492,6 +497,7 @@ xfsprogs
xineramaproto
xkeyboard-config
xmlrpc-c
xmlto
xorg-bdftopcf
xorg-fonts-alias
xorg-fonts-encodings

View File

@ -1,9 +1,6 @@
-- 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,
@ -54,8 +51,6 @@ soup.accept_policy = cookie_policy.always
-- 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",
@ -68,6 +63,8 @@ search_engines = {
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",
wkf = "http://fr.wiktionary.org/wiki/Special:Search?search=%s",
wk = "http://en.wiktionary.org/wiki/Special:Search?search=%s",
wr = "http://www.wordreference.com/enfr/%s",
youtube = "http://www.youtube.com/results?search_query=%s",
}

5
.save
View File

@ -1,7 +1,7 @@
#!/bin/bash
################################################################################
## Home Config Backup Script
## 2012-06-21
## 2012-06-29
################################################################################
## Note for Zsh: because of the KSH-style arrays (index starting at 0), you
## cannot use array index to append elements to arrays -- or the KSH_ARRAYS
@ -115,9 +115,8 @@ if [ -e "/usr/bin/pacman" ]; then
PKG_LOCAL='pacman -Qq | sort'
PKG_FOREIGN='pacman -Qmq | sort'
PKG_EXPLICIT='pacman -Qeq | sort'
PKG_FILTER='grep \< | cut -f2 -d" "'
diff <(eval "${PKG_LOCAL}") <(eval "${PKG_FOREIGN}") | eval "${PKG_FILTER}" >"${ARCH_PKG_OFFICIAL}-$(hostname)"
diff <(eval "${PKG_LOCAL}") <(eval "${PKG_FOREIGN}") --new-line-format='' --unchanged-group-format='%>' >"${ARCH_PKG_OFFICIAL}-$(hostname)"
eval "${PKG_EXPLICIT}" >"${ARCH_PKG_EXPLICIT}-$(hostname)"
eval "${PKG_FOREIGN}" >"${ARCH_PKG_AUR}-$(hostname)"

View File

@ -323,8 +323,16 @@ cleanvcs()
fi
}
## LSOF stats. Print number of open files per process.
lsofstat()
{
LSOFOUT=$(lsof|awk '{print $1}')
for i in $(echo $LSOFOUT |sort -u);do
echo -n "$i "
echo $LSOFOUT | grep ^$i | wc -l
done
}
##==============================================================================
## Pacman Functions
@ -355,6 +363,14 @@ if [ -f "/usr/bin/pacman" ]; then
pacman -Qi $1 | grep "Size" | sed 's/^[^[:digit:]]*//'
}
fi
## Retrieve official packages list.
if [ -f "/usr/bin/pacman" ]; then
pacman-official()
{
diff <(pacman -Qq|sort) <(pacman -Qmq | sort) --new-line-format='' --unchanged-group-format='%>'
}
fi
## Compare installed packages with list.
if [ -f "/usr/bin/pacman" ]; then

16
README
View File

@ -1,13 +1,12 @@
################################################################################
# Unix Home Configuration #
# Author: Ambrevar #
# Date: 2012-06-21 #
# Date: 2012-06-29 #
################################################################################
Synopsis
********
This repository contains configuration files for various Unix-programs.
Target distribution: Arch Linux (might work for most Unices as well)
Generic Comments
@ -18,7 +17,7 @@ technical support. (Especially for applications that do not provide examples in
their documentation.) There is no use in blind-copying the content of any file
into your personal home folder. At best it might break things.
In case you still want to copy some files -- for quick genuine testing purpose
In case you still want to copy some files -- for quick and dirty testing purpose
-- do not forget that most of the files are in hidden folders. Also note that
in some shells, the '*' joker will NOT match hidden files, that is
@ -27,7 +26,16 @@ in some shells, the '*' joker will NOT match hidden files, that is
will copy non-hidden folders only. To match all folders, use the following
joker instead:
cp -r source-dir/.??* dest-dir/
cp -r source-dir/{.*,*} dest-dir/ # zsh
cp -r source-dir/{.??*,*} dest-dir/ # bash
Still, the solution for bash is not perfect as it affects 3 characters files
only. A more convenient solution:
# bash only.
shopt -s dotglob
cp -r source-dir/* dest-dir/
Some applications will need extra dependencies other than the default ones. You
might have a look at the .arch-pkg-explicit* files to see what software I've