Skip to content
Permalink
Browse files

emacs shells as terminals

  • Loading branch information...
neeasade committed Jul 9, 2018
1 parent ada2305 commit caf11cc231019e33dbf7ab1bba5e3b0ce1faa717
Showing with 73 additions and 11 deletions.
  1. +13 −0 bin/bin/epager
  2. +20 −0 bin/bin/fzf
  3. +6 −6 shell/.sh.d/environment
  4. +4 −1 shell/.sh.d/functions
  5. +30 −2 sxhkd/.config/sxhkd/sxhkdrc
  6. +0 −2 tools/.gitconfig
@@ -0,0 +1,13 @@
#!/bin/sh

target="$(mktemp)"

(
while IFS= read -r line; do
printf '%s\n' "$line"
done <&0
) > "$target"

mode="${1:-text-mode}"
elisp "(neeasade/find-or-open \"${target}\") (${mode})"
rm "$target"
@@ -0,0 +1,20 @@
#!/bin/sh

ESHELL=${ESHELL:-false}

if $ESHELL; then
candidates=""
while read -u 0 -r line; do
candidates="$candidates \"$(echo $line | sed 's/\"/\\\"/g')\""
done

if result="$(elisp "(ivy-read \"\" (list ${candidates}) :action (lambda(option) option))")"
then
echo "$result" | sed -e 's/^"//' -e 's/"$//'
else
exit 1
fi
else
fzf="$(type -a fzf | awk 'END{print $3}')"
$fzf
fi
@@ -9,8 +9,6 @@ has() {
silent type "$@"
}

PAGER="less"

# less status line
LESS='-R -f -X -i -P ?f%f:(stdin). ?lb%lb?L/%L.. [?eEOF:?pb%pb\%..]'
LESSCHARSET='utf-8'
@@ -49,14 +47,14 @@ if has npm; then
fi
fi

NODE_PATH="$HOME/.npm-packages/lib/node_modules"
PATH="$PATH:$HOME/.npm-packages/bin"

GEM_HOME="$HOME/.gem"
BUNDLE_PATH="$HOME/.gem"
GOPATH="$HOME/.go"

WINEPREFIX=$HOME/.config/wine/


if [ -e $HOME/.nix-profile/etc/profile.d/nix.sh ]; then
if [ -e $HOME/.nix-profile/etc/profile.d/nix.sh ]; then
. $HOME/.nix-profile/etc/profile.d/nix.sh;
fi

@@ -76,4 +74,6 @@ else
ESHELL=false
fi

$ESHELL && PAGER="epager" || PAGER="less"

set +a
@@ -181,12 +181,15 @@ page() {
}

dotadd() {
file="$@"
file="$(find ~/bin | fzf)" || return
file="$(basename "$file")"
echo mv "$HOME/bin/$file" "$HOME/.dotfiles/bin/bin/$file"
mv "$HOME/bin/$file" "$HOME/.dotfiles/bin/bin/$file"
cd "$HOME/.dotfiles"
stow bin
}

book() {
player.sh pause
google-chrome-stable "$(cat ~/.book_url)" &
}
@@ -68,8 +68,11 @@ super + {_,shift} + slash
#super + p
# ~/.wm/scripts/i3blur.sh

super + {o,e,Return}
${BROWSER,FILEBROWSER,TERMINAL}
super + Return
elisp t && elisp '(neeasade/spawn-terminal)' || $TERMINAL

super + {o,e}
${BROWSER,FILEBROWSER}

# launch a program, ensure GTK3 theme.
super + {_,shift,alt} + space
@@ -88,4 +91,29 @@ XF86Audio{LowerVolume,RaiseVolume,Mute}
super + Escape
pkill -USR1 -x sxhkd

# from here down are keys that I'm treating like macro keys
Print
music bl

Scroll_Lock
mpc toggle

Pause
ponymix toggle

Insert
ponymix increase 5

Delete
ponymix decrease 5

Home
mpc next

End
utf8

# you also have F1 - F12
F6
utf8
# }}}
@@ -1,7 +1,5 @@
[user]
email = nathanisom27@gmail.com
name = neeasade
[core]
pager = less -+F
[url "git@github.com:"]
pushInsteadOf = "https://github.com/"

0 comments on commit caf11cc

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.