A variety of accumulated changes/fixes
Notable changes include: * .Xdefaults: - added comments - switched from url-select to url-picker (for urxvt) * .bashrc: added some alias' and changed PATH * .bin/vol.sh: *depreciated* * .bin/xmonadClose.sh: added experimental timed-action support * .config/dunst/dunstrc: - changed transparency to 15% - issue with getting "follow = v" to work; where v = mouse or keyboard * .config/systemd/user/emacs.service: - added a Environment property because it is required with a recent(ish?) update of systemd * .config/systemd/user/xbindkeys.service: - added Environment property - made ExecStart more specific * .conkerorrc: - added support for magnet urls - added firebug-lite support * .emacs: - disabled tabs - enabled column-number-mode * .ghci: added ghci config file * .gnus: Many changes to make gnus more usable as a email client (multiple email support) * .mpdconf: added password for admin and control access * .ncmpcpp/config: use new mpd password * .screenrc: use weechat in place of irssi * .xbindkeysrc: - use new mpd password - pulseaudio_ctl merged with pulseaudio-ctl in AUR. Now using the new version *BROKEN* * .xinitrc: running "systemd --user" is depreciated (automatically run by logind) * .xmobarrc: use DynNetwork in place of Network * .xmonad/xmonad.hs: code clean-up * .zshrc: - added new function 'disable_unit_run' which can be used to run a program temporarily disabling a systemd user unit file - added alias' - changed PATH
This commit is contained in:
parent
e3fb51fd6e
commit
224f475a46
26
.Xdefaults
26
.Xdefaults
@ -1,24 +1,32 @@
|
||||
! General URxvt visual options
|
||||
URxvt.buffered: true
|
||||
URxvt.foreground: white
|
||||
URxvt.cursorColor: green
|
||||
URxvt.underlineColor: yellow
|
||||
URxvt.font: xft:Bitstream Vera Sans Mono:pixelsize=12:antialias=false
|
||||
URxvt.boldFont: xft:Bitstream Vera Sans Mono:bold:pixelsize=13:antialias=false
|
||||
URxvt.matcher.button: 1
|
||||
URxvt.scrollstyle: plain
|
||||
|
||||
URxvt.perl-ext-common: default,clipboard,tabbedex,url-select,keyboard-select,matcher
|
||||
|
||||
URxvt.keysym.M-u: perl:url-select:select_next
|
||||
URxvt.urlLauncher: /usr/bin/conkeror
|
||||
URxvt.depth: 32
|
||||
URxvt.background: rgba:0000/0000/0000/cccc
|
||||
urxvt.urgentOnBell: true
|
||||
URxvt.underlineURLs: true
|
||||
|
||||
! Perl-exts to use
|
||||
URxvt.perl-ext-common: default,clipboard,tabbedex,url-picker,keyboard-select,matcher
|
||||
|
||||
! Setup matcher perl-ext
|
||||
URxvt.keysym.M-u: perl:url-picker
|
||||
URxvt.urlLauncher: /usr/bin/conkeror
|
||||
URxvt.matcher.button: 1
|
||||
|
||||
URxvt.keysym.M-Escape: perl:keyboard-select:activate
|
||||
URxvt.keysym.M-s: perl:keyboard-select:search
|
||||
|
||||
URxvt.depth: 32
|
||||
URxvt.background: rgba:0000/0000/0000/cccc
|
||||
! Setup tabbedex perl-ext
|
||||
URxvt.tabbed.tabbar-bg: -1
|
||||
urxvt.urgentOnBell: true
|
||||
|
||||
! Force vncviewer to show a password dialog
|
||||
vncviewer.passwordDialog: true
|
||||
|
||||
! Set default emacs font
|
||||
Emacs.font: Terminus-12
|
||||
|
6
.bashrc
6
.bashrc
@ -8,12 +8,12 @@ alias grep='grep --color=auto'
|
||||
alias fgrep='fgrep --color-auto'
|
||||
alias egrep='egrep --color-auto'
|
||||
alias ncmpc='ncmpc -c'
|
||||
alias pacman='pacman-color'
|
||||
alias spacman='sudo pacman-color'
|
||||
alias spacman='sudo pacman'
|
||||
|
||||
# Alias' to make some commands a little less terse
|
||||
alias skreen='screen -c /dev/null'
|
||||
alias tranr='transmission-remote'
|
||||
alias ctl='systemctl'
|
||||
alias ctlu='systemctl --user'
|
||||
alias sctl='sudo systemctl'
|
||||
alias qemu='qemu-system-x86_64 -enable-kvm'
|
||||
@ -47,7 +47,7 @@ stty stop undef
|
||||
# * mathematica / tools
|
||||
# * nxclient / associated tools
|
||||
# * maven tools
|
||||
export PATH=${PATH}:/usr/local/bin:/opt/maven/bin:/opt/NX/bin:/home/collin/.cabal/bin:/home/collin/.bin
|
||||
export PATH=${PATH}:/opt/maven/bin:/opt/NX/bin:/home/collin/.cabal/bin:/home/collin/.gem/ruby/2.0.0/bin:/home/collin/.bin
|
||||
|
||||
# start keychain
|
||||
eval `keychain --eval --timeout 10 --quiet --agents ssh id_rsa`
|
||||
|
@ -21,9 +21,12 @@
|
||||
|
||||
#TODO: fix this horrible code..the obvious issues being multiple calls to amixer..have the needed data stored in VOL_DATA and then further parse the needed data from there
|
||||
|
||||
#VOL_DATA="$(amixer get Master | sed -n '5p')"
|
||||
VOLUME="$(amixer get Master | sed -n '5p' | cut -f6 -d' ' | sed 's/^.\(.*\).$/\1/')"
|
||||
VOL_STATUS="$(amixer get Master | sed -n '5p' | cut -f8 -d' ' | sed 's/^.\(.*\).$/\1/')"
|
||||
# VOL_DATA="$(amixer get Master | sed -n '6p')"
|
||||
# VOLUME="$(echo $VOL_DATA | cut -f7 -d' ' | sed 's/^.\(.*\).$/\1/')" # assumes left and right are tied together
|
||||
# VOL_STATUS="$(echo $VOL_DATA | cut -f8 -d' ' | sed 's/^.\(.*\).$/\1/')"
|
||||
|
||||
VOLUME="$(amixer get Master | sed -n '6p' | cut -f7 -d' ' | sed 's/^.\(.*\).$/\1/')"
|
||||
VOL_STATUS="$(amixer get Master | sed -n '6p' | cut -f8 -d' ' | sed 's/^.\(.*\).$/\1/')"
|
||||
|
||||
if [ "$VOL_STATUS" == "off" ]; then
|
||||
echo "Vol: Mute"
|
||||
|
@ -24,7 +24,7 @@
|
||||
# * Needs to check whether a reboot/shutdown is allowed (user must be in the group
|
||||
# 'power' and must be the only user logged in or they will be prompted for sudo's
|
||||
# password to override)
|
||||
# * Add support for the user to specify a timer
|
||||
# * Add support for the user to specify a timer *needs some work yet*
|
||||
# - Needs to provide a way to cancel the time
|
||||
# - Would be nice if there was some notification when there's n min left in the timer
|
||||
# * re-write in haskell direct into ~/.xmonad/xmonad.hs using the dmenu extension(?)
|
||||
@ -33,9 +33,8 @@
|
||||
# so that the second argument could be used as a 'logout command' and thus
|
||||
# this script could be used with any wm
|
||||
|
||||
actionNames=(cancel logout suspend hibernate hybrid-sleep shutdown restart)
|
||||
actionExecs=(""
|
||||
"xdotool key super+control+shift+End"
|
||||
actionNames=(logout suspend hibernate hybrid-sleep shutdown restart)
|
||||
actionExecs=("xdotool key super+control+shift+End"
|
||||
"xscreensaver-command -lock && systemctl suspend"
|
||||
"xscreensaver-command -lock && systemctl hibernate"
|
||||
"xscreensaver-command -lock && systemctl hybrid-sleep"
|
||||
@ -43,11 +42,20 @@ actionExecs=(""
|
||||
"reboot")
|
||||
|
||||
# Ask the user whether they want to logout, cancel, suspend, hibernate, hybrid-sleep, shutdown
|
||||
ask=`echo ${actionNames[*]} | tr ' ' '\n' | dmenu -b -i -nb '#040404' -nf '#525252' -sf '#ffa0ff' -sb '#000000'`
|
||||
ask=`echo "cancel ${actionNames[*]} timed-action" | tr ' ' '\n' | dmenu -b -i -nb '#040404' -nf '#525252' -sf '#ffa0ff' -sb '#000000'`
|
||||
|
||||
case "$ask" in
|
||||
logout|suspend|hibernate|hybrid-sleep|shutdown)
|
||||
if [[ `echo "" | dmenu -b -i -nb '#040404' -nf '#525252' -sf '#ffa0ff' -sb '#000000' -p "Are you sure you want to $ask? [yes/no] "` == 'yes' ]]; then
|
||||
logout|suspend|hibernate|hybrid-sleep|shutdown|restart|timed-action)
|
||||
if [[ "$ask" == "timed-action" ]]; then
|
||||
time=`echo "1m 3m 5m 10m 15m 20m 30m 45m 1h 1.5h 2h 3h" | tr ' ' '\n' | dmenu -b -i -nb '#040404' -nf '#525252' -sf '#ffa0ff' -sb '#000000' -p "How long?"`
|
||||
# TODO: validate input to ensure form: <digit>+(s|m|h|d)?
|
||||
for ((i=0; i < ${#actionNames[*]}; i++)); do
|
||||
actionExecs[$i]="sleep $time && notify-send 'WARNING! Computer set to ${actionNames[$i]} in 15 seconds!' -u critical && sleep 15s && ${actionExecs[$i]}"
|
||||
done
|
||||
ask=`echo "cancel ${actionNames[*]}" | tr ' ' '\n' | dmenu -b -i -nb '#040404' -nf '#525252' -sf '#ffa0ff' -sb '#000000'`
|
||||
fi
|
||||
|
||||
if [[ "$ask" != "cancel" && `echo "" | dmenu -b -i -nb '#040404' -nf '#525252' -sf '#ffa0ff' -sb '#000000' -p "Are you sure you want to $ask? [yes/no] "` == 'yes' ]]; then
|
||||
for ((i=0; i < ${#actionNames[*]}; i++)); do
|
||||
if [[ "$ask" == "${actionNames[$i]}" ]]; then
|
||||
sh -c "${actionExecs[$i]}"
|
||||
@ -60,3 +68,6 @@ case "$ask" in
|
||||
# Do nothing; the user entered cancel or a invalid input
|
||||
;;
|
||||
esac
|
||||
|
||||
# Exit successfully
|
||||
exit 0
|
||||
|
@ -36,7 +36,6 @@
|
||||
# ignore newlines '\n' in notifications
|
||||
ignore_newline = no
|
||||
|
||||
|
||||
# the geometry of the window
|
||||
# geometry [{width}]x{height}][+/-{x}+/-{y}]
|
||||
# The geometry of the message window.
|
||||
@ -52,7 +51,7 @@
|
||||
|
||||
# The transparency of the window. range: [0; 100]
|
||||
# This option will only work if a compositing windowmanager is present (e.g. xcompmgr, compiz, etc..)
|
||||
transparency = 35
|
||||
transparency = 15
|
||||
|
||||
# Don't remove messages, if the user is idle (no mouse or keyboard input)
|
||||
# for longer than idle_threshold seconds.
|
||||
@ -72,7 +71,7 @@
|
||||
#
|
||||
# If this option is set to mouse or keyboard, the monitor option will be
|
||||
# ignored.
|
||||
follow = keyboard
|
||||
follow = none
|
||||
|
||||
# should a notification popped up from history be sticky or
|
||||
# timeout as if it would normally do.
|
||||
|
@ -1,5 +1,14 @@
|
||||
ENTRY "/home/collin" URL "/home/collin"
|
||||
ENTRY "~/" URL "/home/collin"
|
||||
ENTRY "/media" URL "/media"
|
||||
ENTRY "/media/dm" URL "/media/dm"
|
||||
GROUP "Local Network"
|
||||
ENTRY "sh:alpha/~" URL "/home/collin/#sh:alpha/~"
|
||||
ENTRY "/media/dm/Downloads" URL "/media/dm/Downloads"
|
||||
ENTRY "/home/collin/.code" URL "/home/collin/.code"
|
||||
ENTRY "/home/collin/.scratch" URL "/home/collin/.scratch"
|
||||
GROUP "Network"
|
||||
ENTRY "/sh://omicron/home/collin" URL "/sh://omicron/home/collin"
|
||||
ENTRY "/sftp://rekah742@ftp.rekahsoft.ca:22/home/rekah742" URL "/sftp://rekah742@ftp.rekahsoft.ca:22/home/rekah742"
|
||||
GROUP "Local Network"
|
||||
ENTRY "sh:alpha/~" URL "/home/collin/#sh:alpha/~"
|
||||
ENTRY "/ftp://rekah742@ftp.rekahsoft.ca/" URL "/ftp://rekah742@ftp.rekahsoft.ca/"
|
||||
ENDGROUP
|
||||
ENDGROUP
|
||||
|
@ -99,6 +99,10 @@ preallocate_space=0
|
||||
editor_cursor_after_inserted_block=0
|
||||
editor_group_undo=0
|
||||
|
||||
editor_ask_filename_before_edit=0
|
||||
|
||||
editor_filesize_threshold=64M
|
||||
|
||||
[Layout]
|
||||
message_visible=1
|
||||
keybar_visible=1
|
||||
@ -111,9 +115,9 @@ free_space=1
|
||||
|
||||
horizontal_split=0
|
||||
vertical_equal=1
|
||||
left_panel_size=122
|
||||
left_panel_size=81
|
||||
horizontal_equal=1
|
||||
top_panel_size=113
|
||||
top_panel_size=20
|
||||
|
||||
[Misc]
|
||||
timeformat_recent=%b %e %H:%M
|
||||
|
@ -5,6 +5,7 @@ Description = Emacs: the extensible, self-documenting text editor
|
||||
Type = forking
|
||||
ExecStart = /usr/bin/emacs --daemon
|
||||
ExecStop = /usr/bin/emacsclient --eval "(progn (setq kill-emacs-hook 'nil) (kill-emacs))"
|
||||
Environment = PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/android-sdk/platform-tools:/opt/android-sdk/tools:/usr/bin/vendor_perl:/usr/bin/core_perl:/usr/lib/smlnj/bin:/opt/maven/bin:/opt/NX/bin:/home/collin/.cabal/bin:/home/collin/.bin
|
||||
Restart = always
|
||||
|
||||
[Install]
|
||||
|
@ -2,7 +2,8 @@
|
||||
Description = A grabbing keys program for X
|
||||
|
||||
[Service]
|
||||
ExecStart = /usr/bin/xbindkeys -n
|
||||
ExecStart = /usr/bin/xbindkeys -n -f %h/.xbindkeysrc
|
||||
Environment=DISPLAY=:0
|
||||
Restart = always
|
||||
|
||||
[Install]
|
||||
|
22
.conkerorrc
22
.conkerorrc
@ -47,6 +47,8 @@ external_content_handlers.set("application/pdf", "zathura");
|
||||
external_content_handlers.set("video/*", "urxvtc -e mplayer");
|
||||
external_content_handlers.set("application/x-bittorrent", "transmission-remote -a");
|
||||
|
||||
set_protocol_handler("magnet", find_file_in_path("transmission-remote -a"));
|
||||
|
||||
// use emacsclient as external editor.
|
||||
editor_shell_command = "emacsclient";
|
||||
|
||||
@ -158,6 +160,11 @@ define_key(content_buffer_normal_keymap, "k", "cmd_scrollLineUp");
|
||||
define_key(content_buffer_normal_keymap, "J", "follow-new-buffer-background");
|
||||
define_key(default_global_keymap, "C-x C-b", "switch-to-buffer");
|
||||
|
||||
// TODO: fix a bug in conkeror-git 120527.1.100.g7994dfa-1 where M-< is bound to scroll-top-left which is either
|
||||
// broken or is being depreciated? M-> uses cmd_scrollBottom and internally scroll-top-left uses cmd_scrollTop (then scrolls left).
|
||||
// Until this issue is fixed just use cmd_scrollTop for M-<
|
||||
define_key(content_buffer_normal_keymap, "M-<", "cmd_scrollTop");
|
||||
|
||||
// Some code thanks to retroj on #conkeror@irc.freenode.net
|
||||
define_browser_object_class(
|
||||
"history-url", null,
|
||||
@ -188,5 +195,18 @@ interactive("history-clear",
|
||||
"Clear the history.",
|
||||
history_clear);
|
||||
|
||||
define_variable("firebug_url",
|
||||
"http://getfirebug.com/releases/lite/1.2/firebug-lite-compressed.js");
|
||||
|
||||
function firebug (I) {
|
||||
var doc = I.buffer.document;
|
||||
var script = doc.createElement('script');
|
||||
script.setAttribute('type', 'text/javascript');
|
||||
script.setAttribute('src', firebug_url);
|
||||
script.setAttribute('onload', 'firebug.init();');
|
||||
doc.body.appendChild(script);
|
||||
}
|
||||
interactive("firebug", "open firebug lite", firebug);
|
||||
|
||||
// Disable whitelist (Causes extensions from unknown/unsigned sites to silently fail if not enabled!)
|
||||
session_pref("xpinstall.whitelist.required", false);
|
||||
//session_pref("xpinstall.whitelist.required", false);
|
||||
|
376
.emacs
376
.emacs
@ -12,6 +12,7 @@
|
||||
;; the package
|
||||
|
||||
;; ELPA packages that do not require modification of this file other then Customize
|
||||
;; * psgml
|
||||
;; * caml (required by tuareg)
|
||||
;; * tuareg
|
||||
;; * project-mode
|
||||
@ -51,6 +52,12 @@
|
||||
;; stop renaming of saved files to filename~ which ends up breaking hardlinks
|
||||
(setq backup-by-copying-when-linked t)
|
||||
|
||||
;; Turn off indentation (use spaces instead)
|
||||
(setq-default indent-tabs-mode nil)
|
||||
|
||||
;; Show column number in status bar
|
||||
(column-number-mode)
|
||||
|
||||
;; fixes color output issues; see: http://wiki.archlinux.org/index.php/Emacs#Colored_output_issues
|
||||
(add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on)
|
||||
|
||||
@ -58,10 +65,14 @@
|
||||
;; Note: regexp's used to match buffer filenames are intentionally left
|
||||
;; unbounded (without '$') to catch cases where the filename may
|
||||
;; take the format: filename~
|
||||
(add-to-list 'auto-mode-alist '("\\.conkerorrc" . javascript-mode))
|
||||
(add-to-list 'auto-mode-alist '("\\.conkerorrc" . js-mode))
|
||||
(add-to-list 'auto-mode-alist '("\\.xmobarrc" . haskell-mode))
|
||||
(add-to-list 'auto-mode-alist '("\\.screenrc" . conf-mode))
|
||||
(add-to-list 'auto-mode-alist '("\\.stumpwmrc" . lisp-mode))
|
||||
(add-to-list 'auto-mode-alist '("\w*\\.service" . conf-mode))
|
||||
(add-to-list 'auto-mode-alist '("\w*\\.socket" . conf-mode))
|
||||
(add-to-list 'auto-mode-alist '("\\.mpdconf" . conf-mode))
|
||||
(add-to-list 'auto-mode-alist '("dunstrc" . conf-mode))
|
||||
|
||||
;; bind M-g to M-x goto-line
|
||||
(global-set-key "\M-g" 'goto-line)
|
||||
@ -71,6 +82,10 @@
|
||||
(interactive)
|
||||
(other-window -1)))
|
||||
|
||||
;; Setup browse-key-ring
|
||||
(require 'browse-kill-ring) ;; ELPA
|
||||
(global-set-key "\C-cy" 'browse-kill-ring)
|
||||
|
||||
;; adds the given function mode to each element of the given-hooks
|
||||
(defun activate-mode-with-hooks (mode given-hooks)
|
||||
(while given-hooks
|
||||
@ -92,7 +107,7 @@
|
||||
'face 'linum)))
|
||||
|
||||
;; code-modes is a list of mode hooks (for programming langs only)
|
||||
(defvar code-modes '(sml-mode-hook scheme-mode-hook emacs-lisp-mode-hook c-mode-hook c++-mode-hook python-mode-hook lua-mode-hook python-mode-hook haskell-mode-hook php-mode-hook perl-mode-hook lisp-mode-hook clojure-mode-hook ruby-mode-hook erlang-mode-hook sh-mode-hook))
|
||||
(defvar code-modes '(sml-mode-hook scheme-mode-hook emacs-lisp-mode-hook c-mode-hook c++-mode-hook python-mode-hook lua-mode-hook python-mode-hook haskell-mode-hook php-mode-hook perl-mode-hook lisp-mode-hook clojure-mode-hook ruby-mode-hook erlang-mode-hook sh-mode-hook java-mode-hook scala-mode-hook js-mode-hook))
|
||||
|
||||
;; activate linum-mode in all buffers used for programming
|
||||
(activate-mode-with-hooks (lambda () (linum-mode 1)) code-modes)
|
||||
@ -127,6 +142,9 @@
|
||||
;; Set default tramp method to ssh (for security purposes)
|
||||
(setq tramp-default-method "ssh")
|
||||
|
||||
;; Set the prompt pattern tramp searches for in order to send commands to the remote shell
|
||||
(setq tramp-shell-prompt-pattern "^[^$>\n]*[#$%>] *\\(\[[0-9;]*[a-zA-Z] *\\)*")
|
||||
|
||||
;; Setup ibuffer (interactive buffer)
|
||||
(global-set-key "\C-x\C-b" 'ibuffer)
|
||||
(autoload 'ibuffer "ibuffer" "List buffers." t)
|
||||
@ -137,77 +155,100 @@
|
||||
(add-to-list 'ibuffer-never-show-predicates "^\\*Completions\\*$")
|
||||
(add-to-list 'ibuffer-never-show-predicates "^\\*tramp/.*\\*$")
|
||||
|
||||
;; Enable ibuffer-vc extension
|
||||
;; TODO: enable along side my pre existing filter groups using (ibuffer-vc-generate-filter-groups-by-vc-root).
|
||||
;; This cannot be done in the ibuffer-saved-filters because ibuffer-vc-generate... returns a list of cons
|
||||
;; cells but we need this to be dynamic (use a hook like ibuffer-load-hook)
|
||||
(require 'ibuffer-vc)
|
||||
|
||||
;; Filter ibuffers (similar to gnus)
|
||||
(setq ibuffer-saved-filter-groups
|
||||
(quote (("default"
|
||||
("dired" (mode . dired-mode))
|
||||
("config" (or
|
||||
(name . "^\\.xinitrc$")
|
||||
(name . "^\\.bashrc$")
|
||||
(name . "^\\.bash_profile$")
|
||||
(name . "^\\.zshrc$")
|
||||
(name . "^xmonad\\.hs$")
|
||||
(name . "^\\.emacs$")
|
||||
(name . "^\\.gnus$")
|
||||
(name . "^\\.xmobarrc")
|
||||
(name . "^\\.Xdefaults$")
|
||||
(name . "^\\.screenrc$")
|
||||
(name . "^\\.xbindkeysrc$")
|
||||
(name . "^\\.racketrc$")
|
||||
(name . "^\\.ghci")))
|
||||
("code" (or
|
||||
(mode . c-mode)
|
||||
(mode . c++-mode)
|
||||
(mode . perl-mode)
|
||||
(mode . lua-mode)
|
||||
(mode . clojure-mode)
|
||||
(mode . java-mode)
|
||||
(mode . python-mode)
|
||||
(mode . ruby-mode)
|
||||
(mode . emacs-lisp-mode)
|
||||
(mode . lisp-mode)
|
||||
(mode . sh-mode)
|
||||
(mode . scheme-mode)
|
||||
(mode . haskell-mode)
|
||||
(mode . php-mode)
|
||||
(mode . xml-mode)))
|
||||
("REPL" (or
|
||||
(mode . geiser-mode)
|
||||
(mode . slime-repl-mode)
|
||||
(mode . inferior-python-mode)
|
||||
(mode . ipython-mode)
|
||||
(mode . inferior-haskell-mode)
|
||||
(mode . inferior-lisp-mode)
|
||||
(mode . eshell-mode)
|
||||
(mode . inferior-scheme-mode)
|
||||
(mode . inferior-tcl)
|
||||
(mode . erlang-shell-mode)
|
||||
(name . "^\\*inferior-lisp\\*$")
|
||||
(name . "^\\* Racket REPL \\*$")))
|
||||
("git" (or
|
||||
(name . "^\\*magit: ") ;; this regxp could be better
|
||||
(mode . magit-mode)
|
||||
(mode . magit-log-mode)))
|
||||
("planner" (or
|
||||
(name . "^\\*Calendar\\*$")
|
||||
(name . "^diary$")
|
||||
(mode . muse-mode)))
|
||||
("emacs" (or
|
||||
(name . "^\\*scratch\\*$")
|
||||
(name . "^\\*Messages\\*$")))
|
||||
("org" (or
|
||||
(mode . org-mode)
|
||||
(name . "^\\.org$")
|
||||
(name . "^\\.org.gpg$")))
|
||||
("gnus" (or
|
||||
(mode . message-mode)
|
||||
(mode . bbdb-mode)
|
||||
(mode . mail-mode)
|
||||
(mode . gnus-group-mode)
|
||||
(mode . gnus-summary-mode)
|
||||
(mode . gnus-article-mode)
|
||||
(name . "^\\.bbdb$")
|
||||
(name . "^\\.newsrc-dribble")))))))
|
||||
'(("default"
|
||||
("dired" (mode . dired-mode))
|
||||
("config" (or
|
||||
(name . "^\\.xinitrc")
|
||||
(name . "^\\.bashrc")
|
||||
(name . "^\\.bash_profile")
|
||||
(name . "^\\.zshrc")
|
||||
(name . "^xmonad\\.hs")
|
||||
(name . "^\\.emacs")
|
||||
(name . "^\\.gnus")
|
||||
(name . "^\\.xmobarrc")
|
||||
(name . "^\\.Xdefaults")
|
||||
(name . "^\\.screenrc")
|
||||
(name . "^\\.xbindkeysrc")
|
||||
(name . "^\\.racketrc")
|
||||
(name . "^\\.ghci")
|
||||
(name . "\w*\\.service")
|
||||
(name . "\w*\\.socket")
|
||||
(name . "^dunstrc")
|
||||
(name . "^\\.mpdconf")
|
||||
(name . "^\\.conkerorrc")))
|
||||
("code" (or
|
||||
(mode . c-mode)
|
||||
(mode . c++-mode)
|
||||
(mode . perl-mode)
|
||||
(mode . lua-mode)
|
||||
(mode . clojure-mode)
|
||||
(mode . java-mode)
|
||||
(mode . python-mode)
|
||||
(mode . ruby-mode)
|
||||
(mode . emacs-lisp-mode)
|
||||
(mode . lisp-mode)
|
||||
(mode . sh-mode)
|
||||
(mode . scheme-mode)
|
||||
(mode . haskell-mode)
|
||||
(mode . scala-mode)
|
||||
(mode . php-mode)
|
||||
(mode . xml-mode)
|
||||
(mode . html-mode)
|
||||
(mode . js-mode)))
|
||||
("REPL" (or
|
||||
(mode . geiser-mode)
|
||||
(mode . slime-repl-mode)
|
||||
(mode . inferior-python-mode)
|
||||
(mode . ipython-mode)
|
||||
(mode . inferior-haskell-mode)
|
||||
(mode . inferior-lisp-mode)
|
||||
(mode . eshell-mode)
|
||||
(mode . inferior-scheme-mode)
|
||||
(mode . inferior-tcl)
|
||||
(mode . erlang-shell-mode)
|
||||
(name . "^\\*inferior-lisp\\*$")
|
||||
(name . "^\\* Racket REPL \\*$")))
|
||||
("git" (or
|
||||
(name . "^\\*magit: ") ;; this regxp could be better
|
||||
(mode . magit-mode)
|
||||
(mode . magit-diff-mode)
|
||||
(mode . magit-log-mode)
|
||||
(mode . magit-commit-mode)
|
||||
(mode . magit-log-mode)))
|
||||
("planner" (or
|
||||
(name . "^\\*Calendar\\*$")
|
||||
(name . "^diary$")
|
||||
(mode . muse-mode)))
|
||||
("emacs" (or
|
||||
(name . "^\\*scratch\\*$")
|
||||
(name . "^\\*Messages\\*$")
|
||||
(name . "^\\*Backtrace\\*$")
|
||||
(mode . package-menu-mode)
|
||||
(mode . compilation-mode)))
|
||||
("weechat" (or
|
||||
(name . "^\\*weechat.*\\*$")
|
||||
(mode . weechat-mode)))
|
||||
("org" (or
|
||||
(mode . org-mode)
|
||||
(name . "^\\.org$")
|
||||
(name . "^\\.org.gpg$")))
|
||||
("gnus" (or
|
||||
(mode . message-mode)
|
||||
(mode . bbdb-mode)
|
||||
(mode . mail-mode)
|
||||
(mode . gnus-group-mode)
|
||||
(mode . gnus-summary-mode)
|
||||
(mode . gnus-article-mode)
|
||||
(name . "^\\.bbdb$")
|
||||
(name . "^\\.newsrc-dribble"))))))
|
||||
|
||||
(add-hook 'ibuffer-mode-hook
|
||||
(lambda ()
|
||||
@ -220,6 +261,11 @@
|
||||
(require 'google-contacts) ;; AUR: emacs-google-contacts
|
||||
(require 'google-contacts-gnus) ;; AUR: emacs-google-contacts
|
||||
|
||||
;; Setup nav
|
||||
(require 'nav) ;; ELPA
|
||||
(nav-disable-overeager-window-splitting)
|
||||
(global-set-key "\C-cn" 'nav-toggle)
|
||||
|
||||
;; setup html renderer w3m and external browser conkeror
|
||||
(require 'w3m-load) ;; AUR: emacs-w3m-cvs
|
||||
(setq browse-url-browser-function 'w3m-browse-url
|
||||
@ -230,8 +276,14 @@
|
||||
;; setup magit for git (being used though elpa [auto-loaded])
|
||||
;;(require 'magit) ;; ELPA
|
||||
(global-set-key "\C-xS" 'magit-status)
|
||||
(setq magit-commit-signoff t)
|
||||
|
||||
;; Setup PKGBUILD mode
|
||||
;;setup vc-darcs ;; ELPA
|
||||
(add-to-list 'vc-handled-backends 'DARCS)
|
||||
(autoload 'vc-darcs-find-file-hook "vc-darcs")
|
||||
(add-hook 'find-file-hooks 'vc-darcs-find-file-hook)
|
||||
|
||||
;; Setup PKGBUILD mode ;; Community (archlinux)
|
||||
(autoload 'pkgbuild-mode "pkgbuild-mode.el" "PKGBUILD mode." t)
|
||||
(setq auto-mode-alist (append '(("/PKGBUILD$" . pkgbuild-mode)) auto-mode-alist))
|
||||
|
||||
@ -239,6 +291,22 @@
|
||||
(autoload 'php-mode "php-mode.el" "Php mode." t) ;; ELPA
|
||||
(setq auto-mode-alist (append '(("/*.\.php[345]?$" . php-mode)) auto-mode-alist))
|
||||
|
||||
;; Setup zencoding-mode
|
||||
(require 'emmet-mode)
|
||||
|
||||
;; Disable C-j keybinding set by zencoding-mode and replace it with 'C-c j'
|
||||
(define-key emmet-mode-keymap "\C-j" nil)
|
||||
(define-key emmet-mode-keymap "\C-cj" 'emmet-expand-line)
|
||||
|
||||
;; Add appropriate hooks to sgml-mode
|
||||
(add-hook 'sgml-mode-hook 'emmet-mode) ;; Auto-start on any markup modes
|
||||
(add-hook 'css-mode-hook 'emmet-mode) ;; enable Emmet's css abbreviation.
|
||||
(add-hook 'emmet-mode-hook (lambda () (setq emmet-indentation 2))) ;; indent 2 spaces.
|
||||
|
||||
;; Setup mmm-mode for multiple mode regions in the same buffer
|
||||
;;(require 'mmm-mode)
|
||||
;;(setq mmm-global-mode 'maybe)
|
||||
|
||||
;; Set default lisp program
|
||||
(setq inferior-lisp-program "/usr/bin/sbcl")
|
||||
|
||||
@ -276,21 +344,24 @@
|
||||
(define-key clojure-mode-map "\C-c\C-e" 'lisp-eval-last-sexp)
|
||||
(define-key clojure-mode-map "\C-x\C-e" 'lisp-eval-last-sexp)))
|
||||
|
||||
(eval-after-load "slime"
|
||||
`(progn
|
||||
(require 'assoc) ;; Built-in
|
||||
(setq swank-clojure-classpath
|
||||
(list "/usr/share/clojure/clojure.jar"
|
||||
"/usr/share/clojure/clojure-contrib.jar"
|
||||
"/usr/share/emacs/site-lisp/swank-clojure/src"))
|
||||
(aput 'slime-lisp-implementations 'clojure
|
||||
(list (swank-clojure-cmd) :init 'swank-clojure-init))))
|
||||
;; TODO: functionality needs to be re-written; assoc library obsolete
|
||||
;; (eval-after-load "slime"
|
||||
;; `(progn
|
||||
;; (require 'assoc) ;; Built-in (OBSOLETE)
|
||||
;; (setq swank-clojure-classpath
|
||||
;; (list "/usr/share/clojure/clojure.jar"
|
||||
;; "/usr/share/clojure/clojure-contrib.jar"
|
||||
;; "/usr/share/emacs/site-lisp/swank-clojure/src"))
|
||||
;; (aput 'slime-lisp-implementations 'clojure
|
||||
;; (list (swank-clojure-cmd) :init 'swank-clojure-init))))
|
||||
|
||||
;; Setup emacs-org-mode
|
||||
(add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode))
|
||||
(add-hook 'org-mode-hook 'turn-on-font-lock) ; not needed when global-font-lock-mode is on
|
||||
(setq org-return-follows-link t)
|
||||
(setq org-log-done 'time)
|
||||
(setq org-return-follows-link t
|
||||
org-log-done 'time
|
||||
org-src-fontify-natively t
|
||||
org-enforce-todo-dependencies t)
|
||||
|
||||
;; Add additional languages for org-babel (now part of org-mode)
|
||||
(org-babel-do-load-languages
|
||||
@ -302,6 +373,9 @@
|
||||
(global-set-key "\C-ca" 'org-agenda)
|
||||
(global-set-key "\C-cb" 'org-iswitchb)
|
||||
|
||||
;; Setup coq-mode ;; AUR: coq
|
||||
(require 'coq)
|
||||
|
||||
;; Setup haskell-mode ;; ELPA
|
||||
(add-hook 'haskell-mode-hook 'turn-on-haskell-doc-mode)
|
||||
(add-hook 'haskell-mode-hook 'turn-on-haskell-indentation)
|
||||
@ -311,6 +385,20 @@
|
||||
;; Set inferior haskell default executable
|
||||
(setq haskell-program-name "/usr/bin/ghci")
|
||||
|
||||
;; Setup hlint ;; ELPA
|
||||
;; (require 'flymake-hlint)
|
||||
;; (add-hook 'haskell-mode-hook 'flymake-hlint-load)
|
||||
|
||||
;; Setup ghc (requires ghc-mod from cabal) ;; ELPA
|
||||
(autoload 'ghc-init "ghc" nil t)
|
||||
(add-hook 'haskell-mode-hook (lambda () (ghc-init)))
|
||||
|
||||
;; Setup ensime ;; AUR
|
||||
(add-to-list 'load-path "/usr/share/ensime/elisp")
|
||||
(add-to-list 'exec-path "/usr/share/ensime")
|
||||
(require 'ensime)
|
||||
(add-hook 'scala-mode-hook 'ensime-scala-mode-hook)
|
||||
|
||||
;; Setup python-mode auto-required by package.el (ELPA)
|
||||
(setq auto-mode-alist (append '(("/*.\.py$" . python-mode)) auto-mode-alist))
|
||||
|
||||
@ -334,15 +422,22 @@
|
||||
;; Setup geiser
|
||||
(require 'geiser) ;; ELPA
|
||||
|
||||
;; Setup quack
|
||||
;; Setup auto-completion for geiser (ELPA)
|
||||
(require 'ac-geiser)
|
||||
(add-hook 'geiser-mode-hook 'ac-geiser-setup)
|
||||
(add-hook 'geiser-repl-mode-hook 'ac-geiser-setup)
|
||||
(eval-after-load "auto-complete"
|
||||
'(add-to-list 'ac-modes 'geiser-repl-mode))
|
||||
|
||||
;; Setup quack
|
||||
(require 'quack) ;; ELPA
|
||||
|
||||
;; Setup paredit
|
||||
(require 'paredit) ;; ELPA
|
||||
(defvar paredit-hooks '(lisp-mode-hook lisp-interaction-mode-hook emacs-lisp-mode-hook scheme-mode-hook c-mode-hook c++-mode-hook python-mode-hook))
|
||||
(defvar lispy-langs-hooks '(lisp-mode-hook lisp-interaction-mode-hook emacs-lisp-mode-hook scheme-mode-hook c-mode-hook c++-mode-hook python-mode-hook))
|
||||
|
||||
;; Apply paredit-mode to modes listed in paredit-hooks
|
||||
(activate-mode-with-hooks (lambda () (paredit-mode 1)) paredit-hooks)
|
||||
;; Apply paredit-mode to modes listed in lispy-langs-hooks
|
||||
(activate-mode-with-hooks (lambda () (paredit-mode 1)) lispy-langs-hooks)
|
||||
|
||||
;; Paredit binds to C-j globally and thus disables the binding to
|
||||
;; eval-print-last-sexp in emacs-lisp-mode (e.g *scratch*, etc..)
|
||||
@ -351,7 +446,15 @@
|
||||
(define-key emacs-lisp-mode-map "\C-xj" 'eval-print-last-sexp)))
|
||||
|
||||
;; Highlight paren's in given modes [to apply globally do (show-paren-mode 1)]
|
||||
(activate-mode-with-hooks (lambda () (show-paren-mode 1)) paredit-hooks)
|
||||
(activate-mode-with-hooks (lambda () (show-paren-mode)) lispy-langs-hooks)
|
||||
|
||||
;; Setup rainbow-delimiters *BROKEN*
|
||||
(require 'rainbow-delimiters) ;; ELPA
|
||||
;;(activate-mode-with-hooks (lambda () (with-current-buffer buf (rainbow-delimiters-mode))) lispy-langs-hooks)
|
||||
|
||||
;; Setup rainbow-mode ;; ELPA
|
||||
(require 'rainbow-mode)
|
||||
(add-hook 'css-mode-hook 'rainbow-mode)
|
||||
|
||||
;; upcomming functionallity: toggle paredit-mode due to annoying things like wrapping parens when a mistake is made
|
||||
;; known issue..if paredit-mode is turned on when there are unbalanced parens an error is reported
|
||||
@ -388,6 +491,28 @@
|
||||
;; (add-hook 'python-mode-hook 'hs-org/minor-mode)
|
||||
;; (add-hook 'scheme-mode-hook 'hs-org/minor-mode)
|
||||
|
||||
;; Setup isearch+
|
||||
(require 'isearch+)
|
||||
|
||||
;; Setup ace-jump-mode
|
||||
(autoload
|
||||
'ace-jump-mode
|
||||
"ace-jump-mode"
|
||||
"Emacs quick move minor mode"
|
||||
t)
|
||||
(define-key global-map (kbd "C-c SPC") 'ace-jump-mode)
|
||||
|
||||
;; Setup expand-region ;; ELPA
|
||||
(require 'expand-region)
|
||||
(global-set-key (kbd "C-=") 'er/expand-region)
|
||||
|
||||
;; Setup multiple-cursons ;; ELPA
|
||||
(require 'multiple-cursors)
|
||||
(global-set-key (kbd "C-S-c C-S-c") 'mc/edit-lines)
|
||||
(global-set-key (kbd "C->") 'mc/mark-next-like-this)
|
||||
(global-set-key (kbd "C-<") 'mc/mark-previous-like-this)
|
||||
(global-set-key (kbd "C-c C-<") 'mc/mark-all-like-this)
|
||||
|
||||
;; Setup fancy auto-complete
|
||||
(require 'auto-complete-config) ;; ELPA
|
||||
;;(add-to-list 'ac-dictionary-directories "/usr/share/emacs/site-lisp/auto-complete/ac-dict")
|
||||
@ -396,7 +521,7 @@
|
||||
;; Setup yasnippet-mode (not yasnippet-bundle)
|
||||
(require 'yasnippet) ;; ELPA
|
||||
;;(yas/initialize)
|
||||
(yas/load-directory "~/.emacs.d/elpa/yasnippet-20120718/snippets")
|
||||
(yas/load-directory "~/.emacs.d/elpa/yasnippet-20131026.1440/snippets")
|
||||
|
||||
;; Enable flyspell-mode
|
||||
(ac-flyspell-workaround)
|
||||
@ -414,7 +539,7 @@
|
||||
(setq auto-insert-directory (concat (getenv "HOME") "/.emacs.d/templates/"))
|
||||
(setq auto-insert-alist
|
||||
'(("\\.c$" . ["c-template.c" auto-update-generic-template])
|
||||
("\\.\(cc\|cpp\)$" . ["cpp-template.c" auto-update-generic-template])
|
||||
("\\.cc\\|cpp$" . ["cpp-template.c" auto-update-generic-template])
|
||||
("\\.php$" . ["php-template.php" auto-update-generic-template])
|
||||
("\\.rb$" . ["ruby-template.rb" auto-update-generic-template])
|
||||
("\\.lua$" . ["lua-template.lua" auto-update-generic-template])
|
||||
@ -428,7 +553,12 @@
|
||||
("\\.hs$" . ["haskell-template.hs" auto-update-generic-template])
|
||||
("\\.ml$" . ["ocaml-template.ml" auto-update-generic-template])
|
||||
("\\.sml$" . ["sml-template.sml" auto-update-generic-template])
|
||||
("\\.py$" . ["python-template.py" auto-update-generic-template])))
|
||||
("\\.py$" . ["python-template.py" auto-update-generic-template])
|
||||
("\\.java$" . ["java-template.java" auto-update-generic-template])
|
||||
("\\.scala$" . ["scala-template.scala" auto-update-generic-template])
|
||||
("\\.htm\\|html$" . ["html-template.html" auto-update-generic-template])
|
||||
("\\.js$" . ["java-script-template.js" auto-update-generic-template])
|
||||
("\\.css$" . ["css-template.css" auto-update-generic-template])))
|
||||
(setq auto-insert 'other)
|
||||
|
||||
(defun auto-update-generic-template ()
|
||||
@ -464,20 +594,45 @@
|
||||
(interactive)
|
||||
(insert (format-time-string "%b %e, %Y" (current-time))))
|
||||
|
||||
(defun open-scratch-buffer ()
|
||||
"Opens the scratch buffer; if none exists creates one."
|
||||
(interactive)
|
||||
(let ((scratch-buffer (get-buffer "*scratch*")))
|
||||
(if (null scratch-buffer) (progn (get-buffer-create "*scratch*")
|
||||
(insert initial-scratch-message)
|
||||
(lisp-interaction-mode)))
|
||||
(switch-to-buffer "*scratch*")))
|
||||
;; (defun open-scratch-buffer ()
|
||||
;; "Opens the scratch buffer; if none exists creates one."
|
||||
;; (interactive)
|
||||
;; (let ((scratch-buffer (get-buffer "*scratch*")))
|
||||
;; (if (null scratch-buffer) (with-current-buffer (get-buffer-create "*scratch*")
|
||||
;; (insert initial-scratch-message)
|
||||
;; (lisp-interaction-mode)))
|
||||
;; (switch-to-buffer "*scratch*")))
|
||||
|
||||
(defvar scratch-buffer-alist '((python-mode . "# This buffer is for notes you don't want to save, and for Lisp evaluation.\n# If you want to create a file, visit that file with C-x C-f,\n# then enter the text in that file's own buffer.")))
|
||||
|
||||
(defun open-scratch-buffer (&optional buf-mode buf-name msg)
|
||||
"Opens a scratch buffer; if none exists creates one. When called with the universal argument (C-u) will ask what mode to use for the scratch buffer."
|
||||
(interactive
|
||||
(cond ((equal current-prefix-arg nil) ;; universal argument not called
|
||||
(list initial-major-mode "*scratch*" initial-scratch-message))
|
||||
((equal current-prefix-arg '(4)) ;; Universal argument called (C-u)
|
||||
(let* ((buf-mode (read-command "Mode: " initial-major-mode))
|
||||
(buf-name (if (equal buf-mode initial-major-mode)
|
||||
"*scratch*"
|
||||
(concat "*scratch:" (symbol-name buf-mode) "*")))
|
||||
(msg ""))
|
||||
(list buf-mode buf-name msg)))))
|
||||
(let* ((scratch-buffer (get-buffer buf-name)))
|
||||
;; check if the scratchpad is open. If not create it, change its mode and insert message text at the top of the buffer
|
||||
(if (null scratch-buffer)
|
||||
(with-current-buffer (get-buffer-create buf-name)
|
||||
(funcall buf-mode)
|
||||
(insert msg)))
|
||||
(switch-to-buffer buf-name)))
|
||||
|
||||
;; Bind a key to grab a scratchpad
|
||||
(global-set-key "\C-x4s" 'open-scratch-buffer)
|
||||
(define-key ctl-x-4-map "s" 'open-scratch-buffer)
|
||||
|
||||
;; TODO: make a function to toggle the eshell; given a the universal argument the following can occur:
|
||||
;; - if numerical then opens the nth scratch buffer "*eshell*<n>"
|
||||
;; - if no args then open a new eshell
|
||||
;; Bind a key to switch to eshell
|
||||
(global-set-key "\C-x4e" 'eshell)
|
||||
(define-key ctl-x-4-map "e" 'eshell)
|
||||
|
||||
;; Toggles windows split orientation of 2 adjecent windows
|
||||
;; Thanks to http://www.emacswiki.org/cgi-bin/wiki?ToggleWindowSplit
|
||||
@ -532,9 +687,17 @@
|
||||
;; Commands that require a little more then a dumb-term
|
||||
(setq eshell-visual-commands '("vi" "screen" "top" "less" "more" "lynx" "ncftp" "vim" "ncmpcpp" "irssi" "mc" "alsamixer" "/usr/bin/sudo"))
|
||||
|
||||
(defun eshell/catbuf (buffer-name)
|
||||
"Given a buffer-name returns the contents of said buffer"
|
||||
(interactive "bBuffer: ")
|
||||
(save-excursion
|
||||
(let ((code-buf (get-buffer buffer-name)))
|
||||
(if (null code-buf) (concat "The buffer given \"" buffer-name "\" does not exist")
|
||||
(set-buffer code-buf)
|
||||
(buffer-string)))))
|
||||
|
||||
(defun eshell/find-file-ext (fp)
|
||||
"Finds a single file or a list of files and returns a list of their respective buffers"
|
||||
"Finds a single file or a list of files matching a regxp and returns a list of their respective buffers"
|
||||
(interactive)
|
||||
(if (listp fp) (mapcar #'find-file fp)
|
||||
(list (find-file fp))))
|
||||
@ -555,6 +718,12 @@ consisting of lists of buffers opened by each respective FP argument."
|
||||
|
||||
;; (add-to-list 'load-path "~/.emacs.d/el-get/el-get")
|
||||
|
||||
;; *TODO*: PLAIN TEXT PASSWORD === BAD
|
||||
;; Setup weechat client (note requires weechat relay (port 9000)
|
||||
(require 'weechat)
|
||||
(if (daemonp)
|
||||
(weechat-connect "localhost" 9000 "linux:netbeans" nil))
|
||||
|
||||
;; *BROKEN*..can't connect to dbus for some reason?
|
||||
;; ;; Setup el-get
|
||||
;; (unless (require 'el-get nil t)
|
||||
@ -574,9 +743,10 @@ consisting of lists of buffers opened by each respective FP argument."
|
||||
;; If there is more than one, they won't work right.
|
||||
'(ansi-color-names-vector ["#2d3743" "#ff4242" "#74af68" "#dbdb95" "#34cae2" "#008b8b" "#00ede1" "#e1e1e0"])
|
||||
'(custom-safe-themes (quote ("36a309985a0f9ed1a0c3a69625802f87dee940767c9e200b89cdebdb737e5b29" "dc8693659115ea453f849f47509b903da3801b5f1521a73fa31556a9a3558517" default)))
|
||||
'(fill-column 95)
|
||||
'(highlight-current-line-globally t nil (highlight-current-line))
|
||||
'(highlight-current-line-ignore-regexp "Faces\\|Colors\\| \\*Mini\\|\\**\\*")
|
||||
'(magit-commit-signoff t)
|
||||
'(magit-commit-signoff t t)
|
||||
'(org-agenda-files (quote ("~/.org/tech/notes.org" "~/.org/todo/rekahsoft-mini-todo.org" "~/.org/todo/rekahsoft-todo.org" "~/.org/todo/general.org" "~/.org/todo/work.org")))
|
||||
'(quack-default-program "racket")
|
||||
'(quack-fontify-style (quote plt))
|
||||
|
@ -1,3 +1,5 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* (C) Copyright Collin Doering @!@YEAR@!@
|
||||
*
|
||||
@ -21,3 +23,6 @@
|
||||
* Date: @!@DATE@!@
|
||||
*/
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
@ -1,5 +1,5 @@
|
||||
alias ms magit-status $1
|
||||
alias mss magit-status .
|
||||
alias ssudo /usr/bin/sudo
|
||||
alias d dired $1
|
||||
alias ffo find-file-other-window $1
|
||||
alias d dired $1
|
||||
alias ssudo /usr/bin/sudo
|
||||
alias mss magit-status .
|
||||
alias ms magit-status $1
|
||||
|
10
.ghci
10
.ghci
@ -1 +1,11 @@
|
||||
-- Setup prompt
|
||||
:set prompt "ghci> "
|
||||
|
||||
-- Setup use of hoogle through ghci
|
||||
:def hoogle \str -> return $ ":! hoogle --count=15 \"" ++ str ++ "\""
|
||||
|
||||
-- Enable almost all warnings by default
|
||||
:set -Wall
|
||||
|
||||
-- Enable multi-line mode; shortform for -{ ... }-
|
||||
:set +m
|
||||
|
31
.gnus
31
.gnus
@ -18,7 +18,7 @@
|
||||
|
||||
(setq smtpmail-debug-info t)
|
||||
|
||||
(setq smtpmail-stream-type nil) ;; If using TLS/SSL. Use C-h v smtpmail-stream-type RET to see possible values
|
||||
(setq smtpmail-stream-type 'starttls) ;; If using TLS/SSL. Use C-h v smtpmail-stream-type RET to see possible values
|
||||
(setq smtp-accounts
|
||||
'(("collin.doering@gmail.com" "Collin J. Doering" "smtp.gmail.com")
|
||||
("rekahsoft@gmail.com" "rekahsoft" "smtp.gmail.com")))
|
||||
@ -32,10 +32,11 @@
|
||||
when (string-match addr from)
|
||||
do (setq user-mail-address addr
|
||||
user-full-name fname
|
||||
smtpmail-smtp-server server))))
|
||||
smtpmail-smtp-server server
|
||||
smtpmail-smtp-user addr))))
|
||||
|
||||
(defadvice smtpmail-via-smtp
|
||||
(before change-smtp-by-message-from-field (recipient buffer))
|
||||
(before change-smtp-by-message-from-field (recipient buffer &optional ask) activate)
|
||||
(with-current-buffer buffer (my-change-smtp)))
|
||||
|
||||
(ad-activate 'smtpmail-via-smtp)
|
||||
@ -51,6 +52,15 @@
|
||||
("rekahsoft.mail@gmail.com"
|
||||
(address "rekahsoft.mail@gmail.com")
|
||||
(name "RekahSoft"))
|
||||
("collin.doering@rekahsoft.ca"
|
||||
(address "collin.doering@rekahsoft.ca")
|
||||
(name "Collin J. Doering"))
|
||||
("support@rekahsoft.ca"
|
||||
(address "support@rekahsoft.ca")
|
||||
(name "Rekahsoft Support"))
|
||||
("info@rekahsoft.ca"
|
||||
(address "info@rekahsoft.ca")
|
||||
(name "RekahSoft Info"))
|
||||
))
|
||||
|
||||
;; set primary select method..
|
||||
@ -68,6 +78,21 @@
|
||||
(nnimap-address "imap.gmail.com")
|
||||
(nnimap-server-port 993)
|
||||
(nnimap-stream ssl)
|
||||
(nnimap-authinfo-file "~/.authinfo.gpg"))
|
||||
(nnimap "collin.doering"
|
||||
(nnimap-address "hp131.hostpapa.com")
|
||||
(nnimap-server-port 993)
|
||||
(nnimap-stream ssl)
|
||||
(nnimap-authinfo-file "~/.authinfo.gpg"))
|
||||
(nnimap "info"
|
||||
(nnimap-address "hp131.hostpapa.com")
|
||||
(nnimap-server-port 993)
|
||||
(nnimap-stream ssl)
|
||||
(nnimap-authinfo-file "~/.authinfo.gpg"))
|
||||
(nnimap "support"
|
||||
(nnimap-address "hp131.hostpapa.com")
|
||||
(nnimap-server-port 993)
|
||||
(nnimap-stream ssl)
|
||||
(nnimap-authinfo-file "~/.authinfo.gpg"))))
|
||||
|
||||
;; (nnimap "rekahsoft.mail"
|
||||
|
70
.mpdconf
70
.mpdconf
@ -169,11 +169,11 @@ auto_update "yes"
|
||||
# If this setting is set, MPD will require password authorization. The password
|
||||
# can setting can be specified multiple times for different password profiles.
|
||||
#
|
||||
#password "password@read,add,control,admin"
|
||||
password "patchMeIn@read,add,control,admin"
|
||||
#
|
||||
# This setting specifies the permissions a user has who has not yet logged in.
|
||||
#
|
||||
#default_permissions "read"
|
||||
default_permissions "read,add"
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
@ -225,29 +225,31 @@ input {
|
||||
## mixer_device "/dev/mixer" # optional
|
||||
## mixer_control "PCM" # optional
|
||||
#}
|
||||
|
||||
#
|
||||
# An example of a shout output (for streaming to Icecast):
|
||||
#
|
||||
#audio_output {
|
||||
# type "shout"
|
||||
# encoding "ogg" # optional
|
||||
# name "My Shout Stream"
|
||||
# host "localhost"
|
||||
# port "8000"
|
||||
# mount "/mpd.ogg"
|
||||
# password "hackme"
|
||||
# quality "5.0"
|
||||
# bitrate "128"
|
||||
# format "44100:16:1"
|
||||
## protocol "icecast2" # optional
|
||||
## user "source" # optional
|
||||
## description "My Stream Description" # optional
|
||||
## url "http://example.com" # optional
|
||||
## genre "jazz" # optional
|
||||
## public "no" # optional
|
||||
## timeout "2" # optional
|
||||
## mixer_type "software" # optional
|
||||
#}
|
||||
# audio_output {
|
||||
# type "shout"
|
||||
# # encoding "ogg" # optional
|
||||
# name "RekahSoft Shout Stream"
|
||||
# host "localhost"
|
||||
# port "8000"
|
||||
# mount "/mpd.ogg"
|
||||
# password ""
|
||||
# quality "5.0"
|
||||
# # bitrate "128"
|
||||
# format "44100:16:1"
|
||||
# # protocol "icecast2" # optional
|
||||
# # user "source" # optional
|
||||
# # description "My Stream Description" # optional
|
||||
# # url "http://example.com" # optional
|
||||
# # genre "jazz" # optional
|
||||
# # public "no" # optional
|
||||
# # timeout "2" # optional
|
||||
# # mixer_type "software" # optional
|
||||
# }
|
||||
|
||||
#
|
||||
# An example of a recorder output:
|
||||
#
|
||||
@ -260,20 +262,22 @@ input {
|
||||
# bitrate "128" # do not define if quality is defined
|
||||
# format "44100:16:1"
|
||||
#}
|
||||
|
||||
#
|
||||
# An example of a httpd output (built-in HTTP streaming server):
|
||||
#
|
||||
#audio_output {
|
||||
# type "httpd"
|
||||
# name "My HTTP Stream"
|
||||
# encoder "vorbis" # optional, vorbis or lame
|
||||
# port "8000"
|
||||
# bind_to_address "0.0.0.0" # optional, IPv4 or IPv6
|
||||
## quality "5.0" # do not define if bitrate is defined
|
||||
# bitrate "128" # do not define if quality is defined
|
||||
# format "44100:16:1"
|
||||
# max_clients "0" # optional 0=no limit
|
||||
#}
|
||||
audio_output {
|
||||
type "httpd"
|
||||
name "RekahSoft HTTP Stream"
|
||||
encoder "vorbis" # optional, vorbis or lame
|
||||
port "8000"
|
||||
bind_to_address "0.0.0.0" # optional, IPv4 or IPv6
|
||||
# quality "5.0" # do not define if bitrate is defined
|
||||
bitrate "128" # do not define if quality is defined
|
||||
format "44100:16:1"
|
||||
max_clients "5" # optional 0=no limit
|
||||
}
|
||||
|
||||
#
|
||||
# An example of a pulseaudio output (streaming to a remote pulseaudio server)
|
||||
#
|
||||
|
@ -7,21 +7,22 @@
|
||||
#
|
||||
## set it in order to make tag editor and renaming files work properly
|
||||
#
|
||||
mpd_host = "localhost"
|
||||
mpd_host = "patchMeIn@localhost"
|
||||
#
|
||||
mpd_port = "6600"
|
||||
#
|
||||
mpd_music_dir = "/media/md-isk/Music"
|
||||
mpd_music_dir = "/media/dm/Music"
|
||||
#
|
||||
#mpd_connection_timeout = "5"
|
||||
|
||||
execute_on_song_change = "notify-send -t 3000 -i \"/usr/share/icons/gnome/scalable/mimetypes/audio-x-generic-symbolic.svg\" \"$(ncmpcpp --now-playing %t)\" \"$(ncmpcpp --now-playing '%b - %a')\""
|
||||
execute_on_song_change = "notify-send -t 3000 -i \"/usr/share/icons/gnome/scalable/mimetypes/audio-x-generic-symbolic.svg\" \"$(ncmpcpp --now-playing '{%t\n%b - %a}|{%f}')\""
|
||||
playlist_display_mode = "columns"
|
||||
browser_display_mode = "columns"
|
||||
search_engine_display_mode = "columns"
|
||||
fancy_scrolling = "yes"
|
||||
user_interface = "alternative"
|
||||
|
||||
visualizer_fifo_path = "/tmp/mpd.fifo"
|
||||
visualizer_fifo_path = "/home/collin/.mpd/mpd.fifo"
|
||||
visualizer_output_name = "RekahSoft FIFO"
|
||||
visualizer_sync_interval = "30"
|
||||
visualizer_type = "spectrum" (spectrum/wave)
|
||||
visualizer_type = "wave" # (spectrum/wave)
|
||||
|
@ -1,8 +1,9 @@
|
||||
# Open several named screens at startup and run different commands in each
|
||||
screen -t zsh 0 zsh
|
||||
screen -t irssi 1 irssi
|
||||
screen -t ncmpcpp 2 ncmpcpp
|
||||
screen -t alsamixer 3 alsamixer
|
||||
screen -t weechat 1 weechat-curses
|
||||
|
||||
#screen -t ncmpcpp 2 ncmpcpp
|
||||
#screen -t alsamixer 3 alsamixer
|
||||
#screen -t mc 4 mc
|
||||
#screen -t cmus 5 cmus
|
||||
#screen -t nvlc 5 nvlc
|
||||
|
30
.xbindkeysrc
30
.xbindkeysrc
@ -15,55 +15,61 @@
|
||||
# play/pause key = toggle play pause
|
||||
#"~/.bin/toggle-pp.py"
|
||||
#"cmus-remote --pause"
|
||||
"mpc toggle"
|
||||
"mpc -h patchMeIn@localhost toggle"
|
||||
m:0x10 + c:172
|
||||
XF86AudioPlay
|
||||
#"cmus-remote --pause"
|
||||
"mpc toggle"
|
||||
"mpc -h patchMeIn@localhost toggle"
|
||||
m:0x58 + c:33
|
||||
Alt+Mod2+Mod4 + p
|
||||
|
||||
# next key = next song
|
||||
#"cmus-remote --next"
|
||||
"mpc next"
|
||||
"mpc -h patchMeIn@localhost next"
|
||||
m:0x10 + c:171
|
||||
XF86AudioNext
|
||||
#"cmus-remote --next"
|
||||
"mpc next"
|
||||
"mpc -h patchMeIn@localhost next"
|
||||
m:0x58 + c:60
|
||||
Alt+Mod2+Mod4 + period
|
||||
|
||||
# prev key = previous song
|
||||
#"cmus-remote --prev"
|
||||
"mpc prev"
|
||||
"mpc -h patchMeIn@localhost prev"
|
||||
m:0x10 + c:173
|
||||
XF86AudioPrev
|
||||
#"cmus-remote --prev"
|
||||
"mpc prev"
|
||||
"mpc -h patchMeIn@localhost prev"
|
||||
m:0x58 + c:59
|
||||
Alt+Mod2+Mod4 + comma
|
||||
|
||||
# volume up key = Master volume up 1
|
||||
"amixer set Master 1+"
|
||||
#"amixer set Master 1+"
|
||||
"pulseaudio-ctl up"
|
||||
m:0x10 + c:123
|
||||
XF86AudioRaiseVolume
|
||||
"amixer set Master 1+"
|
||||
#"amixer set Master 1+"
|
||||
"pulseaudio-ctl up"
|
||||
m:0x58 + c:30
|
||||
Alt+Mod2+Mod4 + u
|
||||
|
||||
# volume down key = Master volume down 1
|
||||
"amixer set Master 1-"
|
||||
#"amixer set Master 1-"
|
||||
"pulseaudio-ctl down"
|
||||
m:0x10 + c:122
|
||||
XF86AudioLowerVolume
|
||||
"amixer set Master 1-"
|
||||
#"amixer set Master 1-"
|
||||
"pulseaudio-ctl down"
|
||||
m:0x58 + c:40
|
||||
Alt+Mod2+Mod4 + d
|
||||
|
||||
# mute volume key = mute alsa Master channel
|
||||
"amixer set Master toggle"
|
||||
#"amixer set Master toggle"
|
||||
"pulseaudio-ctl mute"
|
||||
m:0x10 + c:121
|
||||
XF86AudioMute
|
||||
"amixer set Master toggle"
|
||||
#"amixer set Master toggle"
|
||||
"mute_toggle"
|
||||
m:0x58 + c:58
|
||||
Alt+Mod2+Mod4 + m
|
||||
|
||||
|
2
.xinitrc
2
.xinitrc
@ -32,7 +32,7 @@ function init_local_session() {
|
||||
# * emacsd
|
||||
# * trayer *disabled* ..
|
||||
# * udiskie
|
||||
systemd --user &
|
||||
#systemd --user & #DEPRECIATED..logind calls systemd --user automatically
|
||||
|
||||
# Set a desktop background
|
||||
nitrogen --restore &
|
||||
|
@ -22,8 +22,8 @@ Config { font = "-*-terminus-*-*-*-*-35-*-*-*-*-*-*-u"
|
||||
, fgColor = "#00FFFF"
|
||||
, position = TopW L 100
|
||||
, lowerOnStart = True
|
||||
, commands = [ Run Network "eno1" ["-L","0","-H","32","-l","green","--normal","orange","--high","red"] 40
|
||||
-- , Run Com "/home/collin/.bin/vol.sh" [] "vol" 15
|
||||
, commands = [ Run DynNetwork ["-L","0","-H","32","-l","green","--normal","orange","--high","red"] 40
|
||||
, Run Com "/home/collin/.bin/vol.sh" [] "vol" 10
|
||||
, Run MultiCpu ["-t","Cpu <total> | cpu0: <total0> | cpu1: <total1> | cpu2: <total2> | cpu3: <total3>","-L","3","-H","50","--high","#f0c040"] 10
|
||||
, Run Memory ["-t","Mem: <usedratio>%","-l","green","--normal","orange","--high","red"] 40
|
||||
, Run Swap ["-t","Swap: <usedratio>%","-l","green","--normal","orange","--high","red"] 60
|
||||
@ -35,5 +35,5 @@ Config { font = "-*-terminus-*-*-*-*-35-*-*-*-*-*-*-u"
|
||||
]
|
||||
, sepChar = "%"
|
||||
, alignSep = "}{"
|
||||
, template = " %StdinReader% }{ %multicpu% %memory% <fc=#0033FF>|</fc> %swap% <fc=#0033FF>|</fc> %eno1% <fc=#0033FF>|</fc> %uptime% <fc=#0033FF>|</fc> %CYKF% <fc=#0033FF>|</fc> %date% <fc=#0033FF>|</fc> "
|
||||
, template = " %StdinReader% }{ %multicpu% %memory% <fc=#0033FF>|</fc> %swap% <fc=#0033FF>|</fc> %dynnetwork% <fc=#0033FF>|</fc> %vol% <fc=#0033FF>|</fc> %uptime% <fc=#0033FF>|</fc> %CYKF% <fc=#0033FF>|</fc> %date% <fc=#0033FF>|</fc> "
|
||||
}
|
||||
|
@ -22,12 +22,22 @@
|
||||
-- http://www.haskell.org/haskellwiki/Xmonad/Notable_changes_since_0.8
|
||||
--
|
||||
|
||||
|
||||
import System.IO
|
||||
import System.Exit
|
||||
import Data.Monoid
|
||||
import qualified Data.Map as M
|
||||
|
||||
import XMonad
|
||||
import XMonad.Actions.UpdatePointer
|
||||
import XMonad.Actions.WindowBringer
|
||||
import Data.Monoid
|
||||
import System.Exit
|
||||
import XMonad.Actions.GridSelect
|
||||
import XMonad.Actions.FloatKeys
|
||||
|
||||
import XMonad.Util.Run(spawnPipe)
|
||||
import XMonad.Util.Dmenu
|
||||
import XMonad.Util.NamedScratchpad
|
||||
|
||||
import XMonad.Layout.NoBorders(noBorders,smartBorders)
|
||||
import XMonad.Layout.ResizableTile
|
||||
import XMonad.Layout.Grid
|
||||
@ -35,20 +45,16 @@ import XMonad.Layout.ToggleLayouts
|
||||
import XMonad.Layout.SubLayouts
|
||||
import XMonad.Layout.WindowNavigation
|
||||
import XMonad.Layout.BoringWindows
|
||||
import XMonad.Util.NamedScratchpad
|
||||
import XMonad.Actions.GridSelect
|
||||
import XMonad.Actions.FloatKeys
|
||||
import XMonad.Util.Dmenu
|
||||
import XMonad.Layout.Tabbed
|
||||
|
||||
import XMonad.Hooks.ManageDocks
|
||||
import XMonad.Hooks.DynamicLog
|
||||
import XMonad.Hooks.UrgencyHook
|
||||
import XMonad.Hooks.ManageHelpers
|
||||
import XMonad.Hooks.FadeInactive (setOpacity)
|
||||
import System.IO
|
||||
|
||||
import qualified XMonad.StackSet as W
|
||||
import qualified Data.Map as M
|
||||
|
||||
|
||||
-- The preferred terminal program, which is used in a binding below and by
|
||||
-- certain contrib modules.
|
||||
@ -172,7 +178,7 @@ myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $
|
||||
-- Use this binding with avoidStruts from Hooks.ManageDocks.
|
||||
-- See also the statusBar function from Hooks.DynamicLog.
|
||||
--
|
||||
-- , ((modm , xK_b ), sendMessage ToggleStruts)
|
||||
, ((modm , xK_b ), sendMessage ToggleStruts)
|
||||
|
||||
-- Quit xmonad (no questions)
|
||||
, ((modm .|. shiftMask .|. controlMask, xK_End), io (exitWith ExitSuccess))
|
||||
@ -181,7 +187,7 @@ myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $
|
||||
, ((modm .|. shiftMask, xK_q), spawn "~/.bin/xmonadClose.sh")
|
||||
|
||||
-- Unmount automounted disks by udiskie
|
||||
, ((modm .|. shiftMask .|. controlMask, xK_u), spawn "udiskie-umount -as")
|
||||
, ((modm .|. shiftMask .|. controlMask, xK_u), spawn "udiskie-umount -as && notify-send 'External media safely disconnected!'")
|
||||
|
||||
--, ((modm .|. shiftMask, xK_w ), if (dmenu "-b -i -nb '#040404' -nf '#525252' -sf '#ffa0ff' -sb '#000000' -p \"Do you really want to close XMonad? [yes/no]: \"") == "yes" then (sendMessage Expand) else (sendMessage Shrink))
|
||||
|
||||
@ -214,9 +220,6 @@ myGenericKeys =
|
||||
|
||||
-- Lock the screen using xscreensaver
|
||||
[ ((modm .|. shiftMask, xK_v), spawn "xscreensaver-command -lock")
|
||||
|
||||
-- Key binding to toggle the gap for the bar.
|
||||
, ((modm, xK_b), sendMessage ToggleStruts)
|
||||
|
||||
-- Toggle full-screen mode
|
||||
, ((modm .|. controlMask, xK_space), sendMessage (Toggle "Full"))
|
||||
@ -257,8 +260,8 @@ myGenericKeys =
|
||||
-- Launch MC scratchpad
|
||||
, ((modm .|. controlMask, xK_3), namedScratchpadAction scratchpads "mc-scratch")
|
||||
|
||||
-- Launch MC scratchpad
|
||||
, ((modm .|. controlMask, xK_4), namedScratchpadAction scratchpads "pavucontrol-scratch")
|
||||
-- Launch ncmpcpp scratchpad
|
||||
, ((modm .|. controlMask, xK_4), namedScratchpadAction scratchpads "ncmpcpp-scratch")
|
||||
|
||||
-- Select window from dmenu and go to the workspace its on
|
||||
, ((modm .|. shiftMask, xK_g), gotoMenuArgs ["-i","-nb", "#040404","-nf","#00FFFF","-sf","#ffa0ff","-sb","#000000"])
|
||||
@ -393,63 +396,45 @@ myManageHook = composeAll
|
||||
, resource =? "Steam" --> doCenterFloat
|
||||
, title =? "Xnest" --> doCenterFloat
|
||||
, resource =? "pavucontrol" --> doMaxFloat
|
||||
, resource =? "emacs-scratch" --> doMaxFloat
|
||||
, resource =? "mc-scratch" --> doMaxFloat
|
||||
, resource =? "qemu-system-x86_64" --> doFullFloat
|
||||
, resource =? "hl2_linux" --> doFullFloat
|
||||
, resource =? "Halo.exe" --> doCenterFloat
|
||||
-- , resource =? "UnrealTournament.exe" --> doCenterFloat
|
||||
-- , resource =? "hl2_linux" --> doFullFloat
|
||||
, isFullscreen --> (doF W.focusDown <+> doFullFloat)
|
||||
, resourceIsOneOf ["emacs","gvim"] --> ask >>= (liftX . flip setOpacity (13/16)) >> idHook
|
||||
, resource =? "desktop_window" --> doIgnore ] <+> namedScratchpadManageHook scratchpads <+> manageDocks
|
||||
|
||||
-- NamedScratchPad Hook
|
||||
scratchpads = [ NS "emacs-scratch" spawnEmacsScratch findEmacsScratch manageEmacsScratch
|
||||
, NS "maintenance-terminal" spawnMaintenanceTerminal findMaintenanceTerminal manageMaintenanceTerminal
|
||||
, NS "screen-terminal" spawnScreenTerminal findScreenTerminal manageScreenTerminal
|
||||
, NS "mc-scratch" spawnMcScratch findMcScratch manageMcScratch
|
||||
, NS "pavucontrol-scratch" spawnPavucontrolScratch findPavucontrolScratch managePavucontrolScratch]
|
||||
where
|
||||
findEmacsScratch = resource =? "emacs-scratch"
|
||||
findMaintenanceTerminal = resource =? "scratchpad"
|
||||
findScreenTerminal = resource =? "screen-scratch"
|
||||
findMcScratch = resource =? "mc-scratch"
|
||||
findPavucontrolScratch = resource =? "pavucontrol"
|
||||
, NS "maintenance-terminal" spawnMaintenanceTerminal findMaintenanceTerminal manageMaintenanceTerminal
|
||||
, NS "screen-terminal" spawnScreenTerminal findScreenTerminal manageScreenTerminal
|
||||
, NS "mc-scratch" spawnMcScratch findMcScratch manageMcScratch
|
||||
, NS "ncmpcpp-scratch" spawnNcmpcppScratch findNcmpcppScratch manageNcmpcppScratch]
|
||||
where
|
||||
findEmacsScratch = resource =? "emacs-scratch"
|
||||
findMaintenanceTerminal = resource =? "scratchpad"
|
||||
findScreenTerminal = resource =? "screen-scratch"
|
||||
findMcScratch = resource =? "mc-scratch"
|
||||
findNcmpcppScratch = resource =? "ncmpcpp-scratch"
|
||||
|
||||
spawnEmacsScratch = myTerminal ++ " -name emacs-scratch +tr -pe -tabbedex -e emacsclient -nw"
|
||||
spawnMaintenanceTerminal = myTerminal ++ " -name scratchpad"
|
||||
spawnScreenTerminal = myTerminal ++ " -name screen-scratch -bg black"
|
||||
spawnMcScratch = myTerminal ++ " -name mc-scratch +tr -pe -tabbedex -e mc"
|
||||
spawnPavucontrolScratch = "pavucontrol"
|
||||
spawnEmacsScratch = myTerminal ++ " -name emacs-scratch +tr -pe -tabbedex -e emacsclient -nw"
|
||||
spawnMaintenanceTerminal = myTerminal ++ " -name scratchpad"
|
||||
spawnScreenTerminal = myTerminal ++ " -name screen-scratch -bg black"
|
||||
spawnMcScratch = myTerminal ++ " -name mc-scratch +tr -pe -tabbedex -e mc"
|
||||
spawnNcmpcppScratch = myTerminal ++ " -name ncmpcpp-scratch +tr -pe -tabbedex -e ncmpcpp"
|
||||
|
||||
manageEmacsScratch = customFloating $ W.RationalRect l t w h
|
||||
where
|
||||
h = 0.65 -- terminal height (%)
|
||||
w = 0.55 -- terminal width (%)
|
||||
t = 1 - h -- distance from top edge (%)
|
||||
l = 1 - w -- distance from left edge (%)
|
||||
manageMaintenanceTerminal = customFloating $ W.RationalRect l t w h
|
||||
where
|
||||
h = 0.33 -- terminal height (%)
|
||||
w = 1 -- terminal width (%)
|
||||
t = 1 - h -- distance from top edge (%)
|
||||
l = 1 - w -- distance from left edge (%)
|
||||
manageScreenTerminal = customFloating $ W.RationalRect l t w h
|
||||
where
|
||||
h = 0.98 -- terminal height (%)
|
||||
w = 1 -- terminal width (%)
|
||||
t = 1 - h -- distance from top edge (%)
|
||||
l = 1 - w -- distance from left edge (%)
|
||||
manageMcScratch = customFloating $ W.RationalRect l t w h
|
||||
where
|
||||
h = 0.65 -- terminal height (%)
|
||||
w = 0.55 -- terminal width (%)
|
||||
t = 1 - h -- distance from top edge (%)
|
||||
l = 1 - w -- distance from left edge (%)
|
||||
managePavucontrolScratch = customFloating $ W.RationalRect l t w h
|
||||
where
|
||||
h = 0.80 -- terminal height (%)
|
||||
w = 0.55 -- terminal width (%)
|
||||
t = 1 - h -- distance from top edge (%)
|
||||
l = 1 - w -- distance from left edge (%)
|
||||
manageEmacsScratch = customFloating $ W.RationalRect 0.10 0.10 0.80 0.80
|
||||
manageMaintenanceTerminal = customFloating $ W.RationalRect 0 0.66 1 0.34
|
||||
manageScreenTerminal = customFloating $ W.RationalRect 0 0.015 1 0.985
|
||||
manageMcScratch = customFloating $ W.RationalRect 0.20 0.15 0.60 0.70
|
||||
manageNcmpcppScratch = customFloating $ W.RationalRect 0.225 0.10 0.55 0.80
|
||||
|
||||
-- manageScreenTerminal = customFloating $ W.RationalRect l t w h
|
||||
-- where
|
||||
-- h = 1 -- terminal height (%)
|
||||
-- w = 1 -- terminal width (%)
|
||||
-- t = 1 - h -- distance from top edge (%)
|
||||
-- l = 1 - w -- distance from left edge (%)
|
||||
|
||||
------------------------------------------------------------------------
|
||||
-- Event handling
|
||||
|
24
.zshrc
24
.zshrc
@ -20,11 +20,17 @@ bindkey -e
|
||||
# Check for an interactive session
|
||||
[ -z "$PS1" ] && return
|
||||
|
||||
# A small helper function to disable unclutter before running a command
|
||||
function disable_unclutter_run() {
|
||||
systemctl --user stop unclutter
|
||||
eval "$*"
|
||||
systemctl --user start unclutter
|
||||
# A function that given a unit (run under the systemd user instance) and a command runs the command while temporarily suspending the given unit (service)
|
||||
function disable_unit_run() {
|
||||
unit="$1"
|
||||
shift
|
||||
if [ "$(systemctl --user is-enabled $unit)" = "enabled" ]; then
|
||||
systemctl --user disable "$unit" >> /dev/null
|
||||
eval "$*"
|
||||
systemctl --user enable "$unit" >> /dev/null
|
||||
else
|
||||
eval "$*"
|
||||
fi
|
||||
}
|
||||
|
||||
# Alias' to make command output prettier (use color with some commands by default)
|
||||
@ -33,15 +39,15 @@ alias grep='grep --color=auto'
|
||||
alias fgrep='fgrep --color-auto'
|
||||
alias egrep='egrep --color-auto'
|
||||
alias ncmpc='ncmpc -c'
|
||||
alias pacman='pacman-color'
|
||||
alias spacman='sudo pacman-color'
|
||||
alias spacman='sudo pacman'
|
||||
|
||||
# Alias' to make some commands a little less terse
|
||||
alias skreen='screen -c /dev/null'
|
||||
alias tranr='transmission-remote'
|
||||
alias ctl='systemctl'
|
||||
alias ctlu='systemctl --user'
|
||||
alias sctl='sudo systemctl'
|
||||
alias qemu='disable_unclutter_run qemu-system-x86_64 -enable-kvm'
|
||||
alias qemu='disable_unit_run unclutter qemu-system-x86_64 -enable-kvm'
|
||||
alias s='sudo'
|
||||
|
||||
# Shortcuts for port-knocking on rekahsoft-mini *DEPRECIATED*
|
||||
@ -74,7 +80,7 @@ stty stop undef
|
||||
# * mathematica / tools
|
||||
# * nxclient / associated tools
|
||||
# * maven tools
|
||||
export PATH=${PATH}:/usr/local/bin:/opt/maven/bin:/opt/NX/bin:/home/collin/.cabal/bin:/home/collin/.bin
|
||||
export PATH=${PATH}:/opt/maven/bin:/opt/NX/bin:$HOME/.cabal/bin:$HOME/.gem/ruby/2.0.0/bin:$HOME/.bin
|
||||
|
||||
# start keychain
|
||||
eval `keychain --eval --timeout 10 --quiet --agents ssh id_rsa`
|
||||
|
Reference in New Issue
Block a user