From 7298248994e12e2dcd53c540e1f5676ea4a25b21 Mon Sep 17 00:00:00 2001 From: Thomas Dehaeze Date: Thu, 2 Apr 2020 22:05:54 +0200 Subject: [PATCH] Move two scripts to bin instead of scripts --- dotfiles/binaries.org | 51 +++++++++++++++++++++++++++++++++++++++++++ dotfiles/scripts.org | 46 -------------------------------------- 2 files changed, 51 insertions(+), 46 deletions(-) diff --git a/dotfiles/binaries.org b/dotfiles/binaries.org index 38a42a8..6df852b 100644 --- a/dotfiles/binaries.org +++ b/dotfiles/binaries.org @@ -800,6 +800,8 @@ fi * =setbg= - Set Background :PROPERTIES: :header-args: :tangle ~/bin/setbg +:header-args+: :comments both :mkdirp yes +:header-args+: :shebang "#!/usr/bin/env bash" :END: #+begin_src bash @@ -811,3 +813,52 @@ fi xwallpaper --zoom "$bgloc" #+end_src +* Insert Unicode Icon +:PROPERTIES: +:header-args: :tangle ~/bin/insert-unicode +:header-args+: :comments both :mkdirp yes +:header-args+: :shebang "#!/usr/bin/env bash" +:END: + +#+begin_src bash + # The famous "get a menu of emojis to copy" script. + + # Must have xclip installed to even show menu. + xclip -h 2>/dev/null || exit 1 + + chosen=$(cut -d ';' -f1 ~/.local/share/emoji | rofi -dmenu -i -l 20 | sed "s/ .*//") + + [ "$chosen" != "" ] || exit + + # If you run this command with an argument, it will automatically insert the character. + if [ -n "$1" ]; then + xdotool key Shift+Insert + else + echo "$chosen" | tr -d '\n' | xsel -ib + dunstify "'$chosen' copied to clipboard." & + fi +#+end_src + +* Insert Nerd Font Icon +:PROPERTIES: +:header-args: :tangle ~/bin/insert-nerd-fonts +:header-args+: :comments both :mkdirp yes +:header-args+: :shebang "#!/usr/bin/env bash" +:END: + +#+begin_src bash + # Must have xsel installed to even show menu. + xsel -h 2>/dev/null || exit 1 + + chosen=$(cat ~/.local/share/nerd-fonts | rofi -dmenu -i -l 20 | sed "s/ .*//") + + [ "$chosen" != "" ] || exit + + # If you run this command with an argument, it will automatically insert the character. + if [ -n "$1" ]; then + xdotool key Shift+Insert + else + echo "$chosen" | tr -d '\n' | xsel -ib + dunstify "'$chosen' copied to clipboard." & + fi +#+end_src diff --git a/dotfiles/scripts.org b/dotfiles/scripts.org index a2c75a0..853a2f0 100644 --- a/dotfiles/scripts.org +++ b/dotfiles/scripts.org @@ -153,52 +153,6 @@ As an alternative, =sshfs= can be used: #+end_src -* Icons Unicode -:PROPERTIES: -:header-args: :tangle ~/scripts/icons.sh -:END: - -#+begin_src bash - # The famous "get a menu of emojis to copy" script. - - # Must have xclip installed to even show menu. - xclip -h 2>/dev/null || exit 1 - - chosen=$(cut -d ';' -f1 ~/.local/share/emoji | rofi -dmenu -i -l 20 | sed "s/ .*//") - - [ "$chosen" != "" ] || exit - - # If you run this command with an argument, it will automatically insert the character. - if [ -n "$1" ]; then - xdotool key Shift+Insert - else - echo "$chosen" | tr -d '\n' | xsel -ib - dunstify "'$chosen' copied to clipboard." & - fi -#+end_src - -* Icons Nerd Font -:PROPERTIES: -:header-args: :tangle ~/scripts/nerd-fonts.sh -:END: - -#+begin_src bash - # Must have xsel installed to even show menu. - xsel -h 2>/dev/null || exit 1 - - chosen=$(cat ~/.local/share/nerd-fonts | rofi -dmenu -i -l 20 | sed "s/ .*//") - - [ "$chosen" != "" ] || exit - - # If you run this command with an argument, it will automatically insert the character. - if [ -n "$1" ]; then - xdotool key Shift+Insert - else - echo "$chosen" | tr -d '\n' | xsel -ib - dunstify "'$chosen' copied to clipboard." & - fi -#+end_src - * Org-Protocol-Capture-HTML :PROPERTIES: :header-args: :tangle ~/scripts/org-protocol-capture-html.sh