Skip to content

Emacs, StumpWM, bashrc, misc scripts, mail, and basically the functionality of a DE

License

Notifications You must be signed in to change notification settings

benjamin-james/dotfiles

Repository files navigation

dotfiles

Emacs, StumpWM, bashrc, misc scripts, mail, and basically the functionality of a DE

https://raw.githubusercontent.com/benjamin-james/dotfiles/master/scrot.png

This is pretty much every configuration file for me.

Here are the programs that use the config files here: (Note: if a config file loads more config files, I won’t list them all)

ProgramConfig file(s)For
bash.bashrc, .bash_profileshell
comptoncompton.confX compositor (transparency)
dunstdunstrcdesktop notification daemon
git.gitconfigversion control
GNU Emacsinit.eltext editor
GNU Screen.screenrcterminal multiplexer
mutt.muttrcemail client
ncmpcppconfigMPD client
SBCL.sbclrcCommon Lisp interpreter
StumpWM.stumpwmrcX Window Manager
XTerm, URxvtXresourcesterminal emulator
X.xinitrc, Xresources, XmodmapX Window System

Install

Basically use the Makefile (i.e. make)

After the Makefile installs pretty much everything, you have to start up Emacs and wait a while for it to download all my packages. (See “emacs” section)

Note: If you are not Benjamin James, you might want to change some things in .gitconfig.

emacs

If you just want an Emacs config, instead of typing make, type make emacs to just install the Emacs files. Note that if you already had a .emacs in your home directory, it will load that first instead of loading this config.

Once you start up Emacs, wait a while for it to download all my packages.

Then, in Emacs, type M-x irony-install-server and wait for it to compile to complete the installation. Note that irony-mode requires llvm and cmake to be installed on the system.

Keyboard

I have remapped my keyboard in X with xmodmap to be similar with the Space-cadet keyboard with which Emacs was originally designed. So, it transforms the bottom row of the keyboard from

FnControlSuperAltSpacebarAltPrintControl

to

FnSuperAltControlSpacebarControlAltSuper

which has been easier to type on for me.

The implementation is in Xmodmap.

To disable this, comment out this line in .xinitrc

[[ -f $usermodmap ]] && xrdb -merge $userresources

before starting X.

If you want to unset this live (in an X session), type

setxkbmap -layout us

into a terminal.

Crontab

My crontab is

DISPLAY=:0.0
XAUTHORITY=/home/ben/.Xauthority
*/3 * * * * /usr/bin/fetchmail
* * * * * /home/ben/bin/fortune-teller.sh
* * * * * /home/ben/bin/wallpaper.sh

Mail

Mail is done through a fetchmail/procmail/msmtp process so reading is all done through mail. Fetchmail is called by cron every couple of minutes.

fetchmail

Here’s a sample .fetchmailrc skeleton:

set logfile @HOME@/.local/share/fetchmail.log
set no bouncemail

poll @EMAIL_SERVER@ with proto POP3 port 995 dns auth password
user "@EMAIL@" pass "@PASSWORD@" is @USERNAME@
ssl
sslproto TLS1
mda "/usr/bin/procmail -f %F -d %T"

msmtp

And a sample .msmtprc skeleton:

# Set default values for the following accounts
defaults
tls on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
logfile .local/share/msmtp.log

account primary
host @EMAIL_SERVER@
from @EMAIL@
tls_starttls on
port 587
auth on
user @EMAIL@
password "@PASSWORD@"
account default : primary

Dependencies

Since I am listing these dependencies, you have to externally download them, or you could remove their parts in the files provided.

Package nameDescriptionDependency forIn file
ALSAVolume controlStumpWM configcommands.lisp
comptonX compositor (transparency)X config.xinitrc
conkerorWeb browserStumpWM config.stumpwmrc
cmakebuild systembuilding irony-mode (Emacs)init.el
DejaVu fontssystem wide fontsURxvt, GTK3 theme, dunst fontsXresources, settings.ini, dunstrc
devmon/udevilauto-mounting devicesX config.xinitrc
dmenuautocompleting application launcherStumpWM configcommands.lisp
dunstdesktop notification daemonX config.xinitrc
fehsetting background, image viewerX config.xinitrc
git-dudegit notificationsX config.xinitrc
humansSo you can killall humansX config.xinitrc
libclangbackend for company-modeEmacs company.elinit.el
MPDvideo playerStumpWM config.stumpwmrc
mpdcronmpd hook managerX config.xinitrc
NetworkManagernetwork managerX config.xinitrc
sbclCommon Lisp implementationStumpWM (X config), SLIME.xinitrc
scrotscreenshot commandStumpWM configcommands.lisp
URxvtterminal emulatorStumpWM config, X config.stumpwmrc, .xinitrc
xbacklightbrightness scriptStumpWM configcommands.lisp
xmodmapsetting keyboard layoutX config (Keyboard mappings).xinitrc
xsetrootsetting mouse cursorX config.xinitrc

Wishlist

urxvt scripts

  1. tabbing
  2. GNU screen support
  3. font resizing

documentation of everything

-*- Org -*-

Bindings

Emacs

hydras

windows-w
zoom<f2>
yank/popC-y / M-y
moveC-n
pageC-x [
goto-lineM-g g
transposeH-C-t
info?
next-errorC-x `
rectangleH-r
projectileH-p
smartparensH-s

helm - C-c h

helm-aproposC-c h a
helm-resumeC-c h b
helm-info-emacsC-c h e
helm-findC-c h f
helm-info-gnusC-c h g
helm-info-at-pointC-c h i
helm-locateC-c h l
helm-man-womanC-c h m
helm-occurC-c h o
helm-regexpC-c h r
helm-topC-c h t
helm-lisp-completion-at-pointC-c h <tab>
helm-all-mark-ringsC-h SPC
helm-miniC-x b
helm-find-filesC-x C-f
helm-M-xM-x

gtags - (M-. M-,)

helm-gtags-tags-in-this-functionC-c g a
helm-gtags-selectC-j
helm-gtags-dwimM-.
helm-gtags-pop-stackM-,
helm-gtags-previous-historyC-c <
helm-gtags-next-historyC-c >

folding - C-c @

hs-toggle-hidingC-c @ C-c
hs-hide-blockC-c @ C-h
hs-hide-levelC-c @ C-l
hs-show-blockC-c @ C-s
hs-hide-allC-c @ C-M-h
hs-show-allC-c @ C-M-s

narrowing - C-x n

narrow-to-defunC-x n d
narrow-to-regionC-x n r or C-x n n
widenC-x n w

ace-window - M-s-w

delete windowx
swap (move) windowm
split window verticallyv
split window horizontallyb
select the previous windown
maximize window (select)i
maximize current windowo
swap windowsC-u M-p
delete selected windowC-u C-u M-p

Projectile - C-c p

List projectile bindingsC-c p C-h
Jump to fileC-c p f
Jump to dirC-c p d
List buffersC-c p b
Jump to recentC-c p e
Grep in projC-c p g s
Multi-occurC-c p o
text refactorC-c p r
Switch projC-c p p
Compile @ rootC-c p c
Switch between .h & .cC-c p a

motion

entitybackwardforward
characterC-bC-f
wordM-bM-f
lineC-pC-n
go to line begin/endC-aC-e
sentenceM-aM-e
paragraphM-{M-}
pageC-x [C-x ]
sexpC-M-bC-M-f
functionC-M-aC-M-e
go to buffer begin/endM-<M->
screenM-vC-v
scrollC-x <C-x >

formatting

indent current lineTAB
indent regionC-M-\
indent sexpC-M-q
indent region arg columnsC-x TAB
insert newline after pointC-o
move rest of line vertically downC-M-o
delete blank lines around pointC-x C-o
join line with previous (next w/ arg)M-^
delete all whitespace around pointM-\
put exactly one space at pointM-SPC
fill paragraphM-q
set fill column to argC-x f
set prefix each line starts withC-x .
set faceM-o

rectangles

copy rectangle to registerC-x r r
kill rectangleC-x r k
yank rectangleC-x r y
open rectangle, shifting text rightC-x r o
blank out rectangleC-x r c
preface each line with a stringC-x r t

registers

save region in registerC-x r s
insert register contents into bufferC-x r i
save value of point in registerC-x r SPC
jump to point saved in registerC-x r j

keyboard macros

start defining a keyboard macroC-x (
end keyboard macro definitionC-x )
execute last defined keyboard macroC-x e
append to last keyboard macroC-u C-x (
name last keyboard macroM-x name-last-kbd-macro
insert Lisp definition in bufferM-x insert-kbd-macro

abbrevs

add global abbrevC-x a g
add mode-local abbrevC-x a l
add global expansion for this abbrevC-x a i g
add mode-local expansion for this abbrevC-x a i l
explicitly expand abbrevC-x a e
expand previous word dynamicallyM-/

marking

set mark hereC-@ or C-SPC
exchange point and markC-x C-x
set mark arg words awayM-@
mark paragraphM-h
mark pageC-x C-p
mark sexpC-M-@
mark functionC-M-h
mark entire bufferC-x h

corral

entitybackwardforward
parenthesess-9s-0
bracketss-[s-]
bracess-{s-}
double quotess-”
backquotes-`
single quotes-’

avy

entityinfo insertedcommand
char1 charC-:
char2 charC-’
linechar(s)M-g f
word1 wordM-g w
wordnothingM-g e

helm-swoop

swoopM-i
swoop back to last pointM-I
multi swoopC-c M-i
multi swoop allC-x M-i

isearch

swoop from isearchM-i

Inside swoop

multi swoop all from swoopM-i
multi swoop current from swoopM-m
previous lineC-r
next lineC-s

goto-chg

goto last changes-.
goto last change reverses-,

move-text

move text upM-<up>
move text downM-<down>

regexp

regexp replaceC-c r
query regexp replaceC-c q
multiple cursor markC-c m
regexp isearch forwardC-M-s
regexp isearch backwardC-M-r

StumpWM

defprogram

S-(key)Launch/focus
S-(upcase key)Launch new session
C-t C-(upcase key)Pull

programs

cconkeror
eemacs
ffirefox
mmpv `xclip -o`
xxterm
zurxvt

Movement

s-nnext
s-pprev
s-rrotate windows
s-sswap window
s-onext group
s-iprev group
s-hfocus left
s-jfocus down
s-kfocus up
s-lfocus right
s-Hmove window left
s-Jmove window down
s-Kmove window up
s-Lmove window right

Misc

C-t C-ddmenu
C-t C-sswank
C-t DELlogout
C-t C-DELsuspend
C-t Crun compton

Screen

C-j C-dDetatch current session
C-j C-cCreate new session
C-j C-aSwitch to previous window
C-j 0
C-j 9Switch to window # 0 - 9
C-j ”List all windows
C-j ’Prompt to switch window
C-j ?List all keybindings

About

Emacs, StumpWM, bashrc, misc scripts, mail, and basically the functionality of a DE

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published