Emacs: improved support.

master
Pierre Neidhardt 2013-05-24 17:23:01 +02:00
parent 91abf4c422
commit 391ac7881e
9 changed files with 31 additions and 13 deletions

View File

@ -334,11 +334,11 @@ globalkeys = awful.util.table.join(
awful.key({ }, "XF86Explorer", function () awful.util.spawn(termcmd .. "ranger") end),
awful.key({ }, "XF86MyComputer", function () awful.util.spawn(termcmd .. "ranger") end),
-- Screen lock
awful.key({ modkey, }, "s", function () awful.util.spawn("slock") end),
awful.key({ }, "XF86ScreenSaver", function () awful.util.spawn("slock") end),
awful.key({ }, "XF86Sleep", function () awful.util.spawn("slock") end),
awful.key({ }, "XF86Standby", function () awful.util.spawn("slock") end),
-- Screen lock. xlockmore is useful for LDAP login because slock does not work with it.
awful.key({ modkey, }, "s", function () awful.util.spawn_with_shell("xlock 2>/dev/null || slock") end),
awful.key({ }, "XF86ScreenSaver", function () awful.util.spawn_with_shell("xlock 2>/dev/null || slock") end),
awful.key({ }, "XF86Sleep", function () awful.util.spawn_with_shell("xlock 2>/dev/null || slock") end),
awful.key({ }, "XF86Standby", function () awful.util.spawn_with_shell("xlock 2>/dev/null || slock") end),
-- PDF Reader
awful.key({ modkey, }, "p", function () awful.util.spawn("zathura") end),

View File

@ -42,7 +42,7 @@ adblocker-filterlist=/home/morpheo/neidhard/.config/dwb/adblock_lists
proxy=false
user-agent=
full-content-zoom=true
editor=urxvt -e emacsclient -a "" -c dwb_uri
editor=emacsclient -a "" -c dwb_uri
enable-accelerated-compositing=false
enable-private-browsing=false
enable-favicon=true

View File

@ -47,7 +47,7 @@
;; TODO: This mode is really messy. Replace it.
(autoload 'linum-mode "linum" "toggle line numbers on/off" t)
;; (setq linum-format "%-4d ")
(setq linum-format "%d ")
(if (display-graphic-p) (setq linum-format "%d") (setq linum-format "%d "))
;; (global-linum-mode 1) ;; TODO: This may generate warnings with emacsclient. Bug?
(add-hook 'find-file-hook (lambda () (linum-mode 1)))
(define-key my-keys-minor-mode-map (kbd "C-<f5>") 'linum-mode) ;; Toggle line numbers.

View File

@ -13,7 +13,6 @@
(set-face-underline-p 'link t)
(set-face-foreground 'minibuffer-prompt "#00ffff" )
(set-face-background 'region "#262626")
(set-face-background 'shadow "#1c1c1c" ) ;; For line numbers.
(set-face-background 'isearch "#00002a" )
(set-face-foreground 'isearch nil )
(set-face-background 'isearch-lazy-highlight-face "#3a3a3a" )
@ -22,6 +21,12 @@
(set-face-foreground 'error "red")
(set-face-bold-p 'error t)))
;; Line numbers. Graphic version has a gray bar separating text from line
;; numbers, so we can leave the background black.
(if (display-graphic-p)
(set-face-background 'shadow "black" )
(set-face-background 'shadow "#1c1c1c" ))
;; Programming
(set-face-foreground 'font-lock-builtin-face "#2a80d4" )
(set-face-bold-p 'font-lock-builtin-face t )

View File

@ -24,14 +24,23 @@ if [ -n "$(command -v emacs)" ] && [ ! -f "$EMFILE" ]; then
if [ -z "$(command -v base64)" ]; then
echo ":: base64 not found."
else
sudo sh -c "echo 'IyEvYmluL3NoCklTX0dSQVBISUNBTD0kKGVtYWNzIC1iYXRjaCAtUSAtLWV2YWw9JyhpZiAoZmJv
dW5kcCAnIiciJ3Rvb2wtYmFyLW1vZGUpIChtZXNzYWdlICIxIikgKG1lc3NhZ2UgIjAiKSknIDI+
JjEpCgppZiBbICRJU19HUkFQSElDQUwgLWVxIDEgXTsgdGhlbgogICAgZW1hY3NjbGllbnQgLWEg
IiIgLWMgIiRAIgplbHNlCiAgICBlbWFjc2NsaWVudCAtYSAiIiAtdCAiJEAiCmZpCg==' | base64 -d > "'"'"$EMFILE"'"'"
sudo sh -c "echo 'IyEvYmluL3NoCmlmIFsgLXogIiRESVNQTEFZIiBdOyB0aGVuCiAgICBJU19HUkFQSElDQUw9MApl
bHNlCiAgICBJU19HUkFQSElDQUw9JChlbWFjcyAtYmF0Y2ggLVEgLS1ldmFsPScoaWYgKGZib3Vu
ZHAgJyInIid0b29sLWJhci1tb2RlKSAobWVzc2FnZSAiMSIpIChtZXNzYWdlICIwIikpJyAyPiYx
KQpmaQoKaWYgWyAkSVNfR1JBUEhJQ0FMIC1lcSAxIF07IHRoZW4KICAgIGVtYWNzY2xpZW50IC1h
ICIiIC1jICIkQCIKZWxzZQogICAgZW1hY3NjbGllbnQgLWEgIiIgLXQgIiRAIgpmaQo=
' | base64 -d > "'"'"$EMFILE"'"'"
chmod 755 "'"'"$EMFILE"'"'""
fi
fi
if [ -f "$HOME/.xkb/symbols/frex" ] && [ ! -f "/usr/local/share/X11/xkb/symbols/frex" ]; then
echo "==> frex font (press Ctrl-D to skip)"
sudo sh -c 'umask 022 && mkdir -p /usr/local/share/X11/xkb/symbols && cp "$HOME/.xkb/symbols/frex" /usr/local/share/X11/xkb/symbols/'
echo
fi
if [ -d "$SOURCEDIR" ]; then
echo "==> Abook"
# [ -d "$SOURCEDIR" ] && ln -snf "$(realpath ${SOURCEDIR}/contacts)" "${HOME}/.abook"

View File

@ -112,7 +112,6 @@ alias xres='xrandr -s $(xrandr | awk '"'"'/^ / {print $1;exit}'"'"')'
if [ -n "$(command -v em)" ]; then
alias ema='emacs -q -l ~/.emacs-light'
alias emacs-reload="emacsclient -e '(kill-emacs)' >/dev/null 2>&1; emacs --daemon"
[ -f "$HOME/todo.org" ] && alias todo='em ~/todo.org'
fi
##==============================================================================

View File

@ -88,11 +88,14 @@ fi
if [ -n "$(command -v emacs)" ]; then
EDITOR='emacs'
fi
GIT_EDITOR="$EDITOR"
## 'em' is a script for emacsclient. See 'homeinit'.
if [ -n "$(command -v em)" ]; then
EDITOR='em'
GIT_EDITOR='emacsclient -a "" -t'
fi
export EDITOR
export GIT_EDITOR
## Internet Browser
[ -n "$(command -v luakit)" ] && export BROWSER="luakit"

View File

@ -5,3 +5,4 @@
########################################################################
[ -d "$HOME/temp" ] && TEMP="$HOME/temp"
alias todo='$EDITOR ~/todo.org'

1
README
View File

@ -367,6 +367,7 @@ wmfs
wv
x264
xclip
xlockmore
yasm
zathura
zsh