Created
October 14, 2018 00:54
-
-
Save AdrienLemaire/e4d4e4280a87ad3d44bbfb946c0159a0 to your computer and use it in GitHub Desktop.
multi application text expander for linux
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ~/.textexpandrc | |
→よろしく← よろしくお願いします。 | |
→お疲れ← お疲れさまでします。 | |
→提案← 提案があります。 | |
して下さい。 | |
なぜならば、 | |
→リクエスト← リクエストがあります。 | |
して下さい。 | |
なぜならば、 | |
→質問← 質問があります | |
ですか? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ~/.config/i3/config | |
bindsym $mod+c exec --no-startup-id textexpand |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ~/.textexpand/lgtm | |
[toall] | |
おはようございます | |
朝の日課リマインダです。 | |
https://github.com/path/to/project/doc | |
6ステップを完了して下さい | |
1. ローカルリポを更新すること | |
2. 環境を開始すること | |
3. Chatworkとgithubの通知を確認すること | |
4. 自分のイシューをPRsを確認すること | |
5. 日課をスプリントロッグと確認すること | |
6. 10時までchatworkで日課を共有すること | |
よろしくお願いします |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# ~/bin/textexpand | |
# Requirements: | |
# - https://github.com/DaveDavenport/rofi | |
# - http://www.vergenet.net/~conrad/software/xsel/ | |
# Optional: i3-wm | |
# Single file configuration | |
########################### | |
#CONFIG=${HOME}/.textexpandrc | |
#ALL_KEYS=$(sed 's/←.*//' ${CONFIG} | grep '→' | tr -d '→') | |
#KEY=$(echo $ALL_KEYS | rofi -sep ' ' -dmenu -p "autocomplete") | |
#awk 'BEGIN{ RS="→"; FS="←" }; $1 ~ key { print $2 }' key=$KEY $CONFIG |xsel -ib | |
# Multiple files configuration | |
############################## | |
CONFIG=${HOME}/.textexpand/ | |
ALL_KEYS=$(ls $CONFIG) | |
KEY=$(echo $ALL_KEYS | rofi -sep ' ' -dmenu -p "autocomplete") | |
cat $CONFIG/$KEY | xsel -ib | |
[ -z $KEY ] && exit 0; | |
xdotool key ctrl+shift+v |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment