Skip to content
Permalink
Browse files

cgrep, elisp

  • Loading branch information...
neeasade committed May 24, 2019
1 parent 1594db5 commit cb4199da210b9674d8cb046366c0d546cf010ead
Showing with 33 additions and 12 deletions.
  1. +2 −3 bin/bin/bgroups
  2. +3 −0 bin/bin/cgrep
  3. +8 −1 bin/bin/elisp
  4. +1 −1 shell/.sh.d/history
  5. +19 −7 sxhkd/.config/sxhkd/sxhkdrc
@@ -101,7 +101,8 @@
(map (fn [key]
(let [char (if (empty? (key (:groups state))) "f" "o")]
(str (if ((:active state) key) (str/upper-case char) char) (name key))))
(keys (:groups state)))))
(sort (keys (:groups state)))
)))
":LT:TT:G"))

;; (prn (:groups state))
@@ -121,8 +122,6 @@
"show" (prn state)
(println (core/format "unrecognized command: %s" command)))



;; (prn command)
;; (prn (:groups state))
;; (prn (:active state))
@@ -0,0 +1,3 @@
#!/bin/sh
# clojure (inlein) grep
pgrep -f "java.*${1}$"
@@ -1,5 +1,7 @@
#!/bin/sh

pgrep emacs >/dev/null || exit 1

trim=false
[ "$1" = "-r" ] && trim=true && shift

@@ -10,7 +12,12 @@ if [ ! -z "$(uname | awk '$1 ~ /MINGW|MSYS/ {print $1}')" ]; then
eclient="${eclient}w --server-file $HOME/.emacs.d/server/${EMACS_SERVER_FILE:-emacs-server-file}"
fi

result="$($eclient --eval "(progn $@)")"
emacs_timeout=
if type timeout >/dev/null; then
emacs_timeout="timeout 1"
fi

result="$($emacs_timeout $eclient --eval "(progn $@)")"
if [ $? -eq 1 ]; then
# we could not reach emacs.
exit 1
@@ -1,6 +1,6 @@
# -*- mode: sh -*-

cur_shell=$(ps | grep $$ | sed 's/^.* //')
cur_shell=$(ps | grep $$ | sed 's/^.* //')
cur_shell="${cur_shell##*/}"

history_length=10000
@@ -35,8 +35,21 @@ super + ctrl + space
bspc node -p cancel

# send node to desktop on current monitor index
super + {_,shift} + {1-9}
bspc {desktop -f,node -d} focused:^{1-9}
# super + {_,shift} + {1-9}
# bspc {desktop -f,node -d} focused:^{1-9}

# super + {_,shift} + {1-9}
# echo {tgroup,twid $(bspc query -N -n)} {1-9} >/tmp/bspgroups

super + {1-9}
num={1-9}; cgrep bgroups && \
echo tgroup $num >/tmp/bspgroups || \
bspc desktop -f focused:^$num

super + shift + {1-9}
num={1-9}; cgrep bgroups && \
echo twid $(bspc query -N -n) $num >/tmp/bspgroups || \
bspc node -d focused:^$num

# insert receptacle, or clear receptacles on current desktop
super + {_,shift} + r
@@ -73,16 +86,15 @@ super + {_,shift} + slash
# ~/.wm/scripts/i3blur.sh

super + Return
elisp '(ns/spawn-terminal)' || $TERMINAL
elisp '(ns/spawn-terminal)' || $TERMINAL

super + o
$BROWSER

# dmenu
super + {_,shift,alt} + space
action={run,pass,switcher}; \
eval "$(theme get | head -n 1)"; \
export GTK_THEME="$THEME_NAME"; \
export GTK_THEME="$(theme getval GTK_THEME)"; \
dmenu_$action $(dmenu_options $action)

XF86Audio{Prev,Next,Play}
@@ -102,7 +114,7 @@ Pause

# pretend +
super + {minus,equal}
ponymix {decrease,increase} 5; notify-send "Volume: $(ponymix get-volume)"
ponymix {decrease,increase} 5; notify-send --urgency=low "Volume: $(ponymix get-volume)"

# < > `
super + {comma,period,grave}
@@ -112,7 +124,7 @@ F10
music bl

F9
$(. ~/.profile; shot)
sh -c "$(. $HOME/.profile && shot)"

F8
utf8

0 comments on commit cb4199d

Please sign in to comment.
You can’t perform that action at this time.