From 2b8467c945910bded807b6e799de6a59628173a5 Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Sat, 1 Jan 2011 03:11:16 +0100 Subject: [PATCH] Emacs, newsbeuter, zsh Removed whitespace-mode from emacs, it was messing up the performance of my settings. Removed old settings from emacs that I didn't use anymore. Now showing the article index in articlelist in newsbeuter --- emacs | 202 ++-------------------------------- newsbeuter/config | 2 +- newsbeuter/urls | 1 + zsh/functions/chpwd_show_todo | 5 + zshrc | 7 +- 5 files changed, 22 insertions(+), 195 deletions(-) create mode 100644 zsh/functions/chpwd_show_todo diff --git a/emacs b/emacs index 24751c8..30d5884 100644 --- a/emacs +++ b/emacs @@ -1,15 +1,13 @@ -;; -*- mode: Emacs-Lisp; mode: whitespace -*- +;; -*- mode: Emacs-Lisp; -*- (add-to-list 'load-path "~/.emacs.d") ;; Requires -(require 'paren) (require 'uniquify) (require 'autopair) (require 'color-theme) (require 'flymake) -(require 'org-install) (require 'zenburn) -(require 'lua-mode) +;(require 'lua-mode) (require 'tabbar) (require 'minimap) ;(require 'manage-org) @@ -32,9 +30,11 @@ "batch-mode.elc" "A Major mode for editing Batch files" t) (autoload 'rainbow-mode "rainbow-mode.elc" "A Minor mode for showing colors inline" t) +(autoload 'lua-mode + "lua-mode.elc" "A Major mode for editing Lua files" t) ;; Functions -(require 'functions) +;(require 'functions) ;; Platform specifics ;(if (eq system-type 'gnu/linux) ; if we're running linux @@ -52,129 +52,7 @@ ; backup file location auto-save-file-name-transforms `((".*" ,temporary-file-directory t)) ; autosave file location - whitespace-line-column 80 ; change color after the 80th column - whitespace-style '(tabs trailing lines-tail) inhibit-default-init t) - -(setq org-todo-keywords (quote ((sequence "TODO(t)" - "NEXT(n)" - "|" "Done(d!/!)") - (sequence "WAITING(w@/!)" - "SOMEDAY(s!)" - "|" "CANCELLED(c@/!)") - (sequence "QUOTE(q!)" - "QUOTED(Q!)" - "|" "APPROVED(A@)" - "EXPIRED(E@)" - "REJECTED(R@)") - (sequence "OPEN(O)" - "|" "CLOSED(C)")) )) -(setq org-todo-keyword-faces - (quote (("TODO" :foreground "red" :weight bold) - ("NEXT" :foreground "blue" :weight bold) - ("DONE" :foreground "forest green" :weight bold) - ("WAITING" :foreground "yellow" :weight bold) - ("SOMEDAY" :foreground "goldenrod" :weight bold) - ("CANCELLED" :foreground "orangered" :weight bold) - ("QUOTE" :foreground "hotpink" :weight bold) - ("QUOTED" :foreground "indianred1" :weight bold) - ("APPROVED" :foreground "forest green" :weight bold) - ("EXPIRED" :foreground "olivedrab1" :weight bold) - ("REJECTED" :foreground "olivedrab" :weight bold) - ("OPEN" :foreground "magenta" :weight bold) - ("CLOSED" :foreground "forest green" :weight bold)))) -(setq org-use-fast-todo-selection t) -(setq org-todo-state-tags-triggers - (quote (("CANCELLED" - ("CANCELLED" . t)) - ("WAITING" - ("WAITING" . t)) - ("SOMEDAY" - ("WAITING" . t)) - (done - ("WAITING")) - ("TODO" - ("WAITING") - ("CANCELLED")) - ("NEXT" - ("WAITING")) - ("DONE" - ("WAITING") - ("CANCELED"))))) -(setq org-default-notes-file "~/prj/org/refile.org") -(setq org-capture-templates - (quote (("t" "todo" entry (file "~/prj/org/refile.org") "* TODO %? -%U -%a" :clock-in t :clock-resume t) - ("n" "note" entry (file "~/prj/org/refile.org") "* %? -%U -%a -:CLOCK: -:END:" :clock-in t :clock-resume t)))) -(setq org-completion-use-ido t) ; Use IDO for target completion -(setq org-refile-targets - (quote ((org-agenda-files :maxlevel . 5) (nil :maxlevel . 5)))) - ; Targets include this file and any file - ; and any file contributing to the - ; agenda - up to 5 levels deep -(setq org-refile-use-outline-path (quote file)) - ; Targets start with the file name - - ; allows creating level 1 tasks -(setq org-outline-path-complete-in-steps t) - ; Targets complete in steps so we start - ; with filename, TAB shows the next - ; level of targets etc -(setq org-refile-allow-creating-parent-nodes (quote confirm)) - ; Allow refile to create parent tasks - ; with confirmation -(setq org-agenda-custom-commands - (quote - (("w" "Tasks waiting on something" - tags "WAITING/!" - ((org-use-tag-inheritance nil) - (org-agenda-todo-ignore-scheduled nil) - (org-agenda-todo-ignore-deadlines nil) - (org-agenda-todo-ignore-with-date nil) - (org-agenda-overriding-header "Waiting Tasks"))) - ("r" "Refile New Notes and Tasks" - tags "LEVEL=1+REFILE" - ((org-agenda-todo-ignore-with-date nil) - (org-agenda-todo-ignore-deadlines nil) - (org-agenda-todo-ignore-scheduled nil) - (org-agenda-overriding-header "Tasks to Refile"))) - ("N" "Notes" - tags "NOTE" - ((org-agenda-overriding-header "Notes"))) - ("n" "Next" - tags-todo "-WAITING-CANCELLED/!NEXT" - ((org-agenda-overriding-heaer "Next Tasks"))) - ("p" "Projects" - tags-todo "LEVEL=2-REFILE|LEVEL=1+REFILE/!-DONE-CANCELLED" - (;(org-agenda-skip-function 'bh/skip-non-projects) - (org-agenda-overriding-header "Projects"))) - ("o" "other (Non-Project) tasks" - tags-todo "LEVEL=2-REFILE|LEVEL=1+REFILE/!-DONE-CANCELLED" - (;(org-agenda-skip-function 'bh/skip-projects) - (org-agenda-overriding-header "Other Non-Project Tasks"))) - ("A" "Tasks to be Archived" - tags "LEVEL=2-REFILE/DONE|CANCELLED" - ((org-agenda-overriding-header "Tasks to Archive"))) - ("h" "Habits" - tags "STYLE=\"habit\"" - ((org-agenda-todo-ignore-with-date nil) - (org-agenda-todo-ignore-scheduled nil) - (org-agenda-todo-ignore-deadlines nil) - (org-agenda-overriding-header "Habits"))) - ("#" "Stuck Projects" - tags-todo "LEVEL=2-REFILE|LEVEL=1+REFILE/!-DONE-CANCELLED" - ((org-agenda-skip-function 'bh/skip-non-stuck-projects) - (org-agenda-overriding-header "Stuck Projects"))) - ("c" "Select default clocking task" - tags "LEVEL=2-REFILE" - ((org-agenda-skip-function - '(org-agenda-skip-subree-if 'notregexp "^\\*\\* Organization")) - (org-agenda-overriding-header - "Set default clocking task with C-u C-u I")))))) (setq-default indent-tabs-mode nil) ; spaces, no tabs (fset 'yes-or-no-p 'y-or-n-p) ; switch yes or no answers to y or n @@ -195,41 +73,11 @@ ;; Keybindings (global-set-key "\C-m" 'newline-and-indent) ; Automatically indent on newline -;;; Org Mode -(global-set-key "\C-cl" 'org-store-link ) -(global-set-key "\C-ca" 'org-agenda ) -(global-set-key "\C-cb" 'org-iswitchb ) -(global-set-key (kbd "") 'org-agenda ) -;(global-set-key (kbd "") 'bh/org-todo ) -;(global-set-key (kbd "") 'bh/widen ) -(global-set-key (kbd "") 'set-truncate-lines ) -(global-set-key (kbd "") 'org-cycle-agenda-files ) -;(global-set-key (kbd " b") 'bbdb ) -(global-set-key (kbd " c") 'calendar ) -(global-set-key (kbd " f") 'boxquote-insert-file ) -;(global-set-key (kbd " g") 'gnus ) -(global-set-key (kbd " h") 'bh/hide-other ) -;(global-set-key (kbd " i") 'bh/org-info ) -;(global-set-key (kbd " I") 'bh/clock-in ) -;(global-set-key (kbd " O") 'bh/clock-out ) -(global-set-key (kbd " r") 'boxquote-region ) -(global-set-key (kbd " s") 'bh/go-to-scratch ) -;(global-set-key (kbd " t") 'bh/insert-inactive-timestamp) -(global-set-key (kbd " u") 'bh/untabify ) -(global-set-key (kbd " v") 'visible-mode ) -;(global-set-key (kbd " SPC") 'bh/clock-in-last-task ) -(global-set-key (kbd "C-") 'previous-buffer ) (global-set-key (kbd "C-x n r") 'narrow-to-region ) -(global-set-key (kbd "C-") 'next-buffer ) -(global-set-key (kbd "") 'org-clock-goto ) -(global-set-key (kbd "C-") 'org-clock-in ) -(global-set-key (kbd "C-s-") 'bh/save-then-publish ) -(global-set-key (kbd "M-") 'org-resolve-clocks ) -(global-set-key (kbd "C-M-r") 'org-capture ) -(global-set-key (kbd "M-") 'bh/killframe ) (global-set-key [C-next] 'tabbar-forward ) (global-set-key [C-prior] 'tabbar-backward ) (global-set-key [C-tab] 'hs-toggle-hiding ) +(global-set-key (kbd "") 'compile) ;; File associations (add-to-list 'auto-mode-alist '("\\.vala$" . vala-mode)) @@ -264,9 +112,6 @@ ;; Hooks (add-hook 'find-file-hook 'flymake-find-file-hook) -(add-hook 'find-file-hook - (lambda () - (whitespace-mode t))) (add-hook 'after-save-hook (lambda () (setq fname (buffer-file-name)) @@ -274,19 +119,9 @@ (if (string-equal suffix "el") (byte-compile-file fname)))) -;(add-hook 'after-make-frame-hook -; (lambda () -; (set-default-font "-*-terminus-medium-*-*-*-14-*-*-*-*-*-*-*") -; (message "hello") -; (set-frame-font "-*-terminus-medium-*-*-*-14-*-*-*-*-*-*-*"))) -;(add-hook 'after-make-frame-functions -; (lambda (&rest frame) -; (message "world") -; (set-frame-font "-*-terminus-medium-*-*-*-14-*-*-*-*-*-*-*")) t) ;;; C (add-hook 'c-mode-hook (lambda () - (whitespace-mode t) (hs-minor-mode t))) ;;; CSS (add-hook 'css-mode-hook @@ -295,40 +130,23 @@ ;;; Emacs Lisp (add-hook 'emacs-lisp-mode-hook (lambda () - (whitespace-mode t) (auto-complete-mode t))) ;;; Interactive Lisp (add-hook 'lisp-interaction-mode-hook (lambda () - (whitespace-mode t) (auto-complete-mode t))) ;;; Org -(add-hook 'org-mode-hook - (lambda () - (flyspell-mode 1) - (auto-fill-mode 1) - (message "org-mode started"))) - -;(defvar org-loaded nil) -;(add-hook 'org-agenda-mode-hook +;(add-hook 'org-mode-hook ; (lambda () -; (if (not org-loaded) -; (progn -; (add-hook 'kill-emacs-hook -; (lambda () -; (save-org-files) -; (push-org-files))) -; (get-org-files) -; (setq org-loaded t))))) -;(if (not (file-exists-p "~/prj/org")) -; (clone-org-files)) +; (flyspell-mode 1) +; (auto-fill-mode 1) +; (message "org-mode started"))) (custom-set-variables ;; custom-set-variables was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. - '(org-agenda-files (quote ("~/prj/org/iactor.org" "~/prj/org/peitsman.org" "~/prj/org/tgn.org" "~/Documents/iACTOR/tasks.org" "~/prj/org/seiko.org" "~/prj/org/projects.org" "~/prj/org/refile.org" "~/prj/org/aethon.org"))) '(tabbar-mode t nil (tabbar))) (custom-set-faces ;; custom-set-faces was added by Custom. diff --git a/newsbeuter/config b/newsbeuter/config index d895ded..ea1789d 100644 --- a/newsbeuter/config +++ b/newsbeuter/config @@ -7,6 +7,6 @@ reload-threads 3 show-read-feeds no show-read-articles no text-width 80 -articlelist-format "%f %t" +articlelist-format "%-4i %f %t" feedlist-title-format "%N %V %> %u feeds with new articles" articlelist-title-format "%N %V %T" diff --git a/newsbeuter/urls b/newsbeuter/urls index 8624194..6013b43 100644 --- a/newsbeuter/urls +++ b/newsbeuter/urls @@ -61,6 +61,7 @@ http://iphonedevelopertips.com/feed iphone http://www.archlinux.org/feeds/news/ software http://gitlog.wordpress.com/feed/ software http://luakit.org/projects/luakit/news.atom software +http://www.reddit.com/r/luakit.rss http://rollingrelease.com/?feed=rss software http://sourceforge.net/export/rss2_keepsake.php?group_id=134378 software http://valajournal.blogspot.com/feeds/posts/default software diff --git a/zsh/functions/chpwd_show_todo b/zsh/functions/chpwd_show_todo new file mode 100644 index 0000000..f9cd576 --- /dev/null +++ b/zsh/functions/chpwd_show_todo @@ -0,0 +1,5 @@ +# -*- mode: Shell-script -*- + +if [ -e ".todo" ]; then + todo +fi diff --git a/zshrc b/zshrc index 61b39ca..b070c96 100644 --- a/zshrc +++ b/zshrc @@ -34,6 +34,7 @@ typeset -ga chpwd_functions preexec_functions+='preexec_update_git_vars' precmd_functions+='precmd_update_git_vars' chpwd_functions+='chpwd_update_git_vars' +chpwd_functions+='chpwd_show_todo' # Set the prompt. PROMPT='%{${fg[cyan]}%}%B%~%b%{${fg[default]}%} %(?.%{${fg[green]}%}O.%{${fg[red]}%}X)%{${fg[default]}%} %# ' @@ -42,8 +43,10 @@ RPROMPT='$(prompt_git_info)%{${fg[default]}%}' # Aliases alias alpine="alpine -p ""{imap.gmail.com/ssl/user=tom.willemsen@archlinux.us}remote_pinerc""" alias evolus-pencil="/usr/lib/evolus-pencil-svn/evolus-pencil.sh" -alias grep="grep --color=always" -alias ls="ls -F --color=always" +alias grep="grep --color=auto" +alias ls="ls -F --color=auto" +alias slrn="NNTPSERVER='news.eternal-september.org' slrn" +alias cower="cower --color=auto --target=~/aur/" # Set terminal name to current runnign application case $TERM in