Skip to content

Commit

Permalink
[rofi] Add rofi snippet script
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcelRobitaille committed Nov 30, 2021
1 parent 7ad3faf commit b443259
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
15 changes: 15 additions & 0 deletions bin/snippy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/sh

# Stolen from https://github.com/CalinLeafshade/dots/blob/master/bin/bin/snippy.sh
# https://www.youtube.com/watch?v=PRgIxRl67bk

SNIPS=${HOME}/.dotfiles/snippets

FILE=`ls ${SNIPS} | /usr/bin/rofi -dmenu`

if [ -f ${SNIPS}/${FILE} ]; then
DATA=$([ -x "${SNIPS}/${FILE}" ] && bash "${SNIPS}/${FILE}" || head --bytes=-1 ${SNIPS}/${FILE})
printf "$DATA" | xsel -p -i
printf "$DATA" | xsel -b -i
xdotool key shift+Insert
fi
1 change: 1 addition & 0 deletions snippets/pubkey
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
command cat /home/marcel/.ssh/id_rsa.pub
3 changes: 3 additions & 0 deletions xbindkeys/.xbindkeysrc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
"rofimoji"
Mod2+Mod4 + e

"/home/marcel/.local/bin/snippy.sh"
Mod2+Mod4 + s

"nohup alacritty > /dev/null 2>&1"
Mod2+Mod4 + Return

Expand Down

0 comments on commit b443259

Please sign in to comment.