From 0d113f5ada1508cebe1348f9ed82d7d7b604cf48 Mon Sep 17 00:00:00 2001 From: kkard2 Date: Mon, 10 Jul 2023 18:46:49 +0200 Subject: caps for jp, move espanso here --- README.md | 2 ++ _windows/ahk/capslock.ahk | 12 ++++++------ espanso/.gitignore | 1 + espanso/config/default.yml | 1 + espanso/match/base.yml | 1 + espanso/match/emoji.yml | 39 +++++++++++++++++++++++++++++++++++++++ espanso/match/img.yml | 19 +++++++++++++++++++ espanso/match/meth.yml | 13 +++++++++++++ espanso/match/spelling.yml | 5 +++++ espanso/match/sub.yml | 21 +++++++++++++++++++++ espanso/match/sup.yml | 21 +++++++++++++++++++++ espanso/match/utils.yml | 20 ++++++++++++++++++++ 12 files changed, 149 insertions(+), 6 deletions(-) create mode 100644 espanso/.gitignore create mode 100644 espanso/config/default.yml create mode 100644 espanso/match/base.yml create mode 100644 espanso/match/emoji.yml create mode 100644 espanso/match/img.yml create mode 100644 espanso/match/meth.yml create mode 100644 espanso/match/spelling.yml create mode 100644 espanso/match/sub.yml create mode 100644 espanso/match/sup.yml create mode 100644 espanso/match/utils.yml diff --git a/README.md b/README.md index ddc5497..a4368cd 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,8 @@ config stuff (i need to move everything into one place) # links for this to work * `~/.ideavimrc` -> `./idea/.ideavimrc` +* `$XDG_CONFIG_HOME/espanso` -> `./espanso` +* `./espanso/assets` -> `` (asset dir is sth that syncs media) # windows * run `./_windows/startup.ps1` on startup (`PowerShell.exe -WindowStyle Hidden -ExecutionPolicy Bypass -File `) diff --git a/_windows/ahk/capslock.ahk b/_windows/ahk/capslock.ahk index 0fb67bb..447890c 100644 --- a/_windows/ahk/capslock.ahk +++ b/_windows/ahk/capslock.ahk @@ -97,12 +97,12 @@ CapsLock::{ } } -!CapsLock::{ - return -} -^CapsLock::{ - return -} +; !CapsLock::{ +; return +; } +; ^CapsLock::{ +; return +; } ^!CapsLock::{ return } diff --git a/espanso/.gitignore b/espanso/.gitignore new file mode 100644 index 0000000..d93aea1 --- /dev/null +++ b/espanso/.gitignore @@ -0,0 +1 @@ +/assets diff --git a/espanso/config/default.yml b/espanso/config/default.yml new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/espanso/config/default.yml @@ -0,0 +1 @@ +{} diff --git a/espanso/match/base.yml b/espanso/match/base.yml new file mode 100644 index 0000000..eb516ef --- /dev/null +++ b/espanso/match/base.yml @@ -0,0 +1 @@ +matches: diff --git a/espanso/match/emoji.yml b/espanso/match/emoji.yml new file mode 100644 index 0000000..9485971 --- /dev/null +++ b/espanso/match/emoji.yml @@ -0,0 +1,39 @@ +matches: + - trigger: ;;slightsm + replace: πŸ™‚ + - trigger: ;;slightfr + replace: πŸ™ + - trigger: ;;moyai + replace: πŸ—Ώ + - trigger: ;;thup + replace: πŸ‘ + - trigger: ;;thdown + replace: πŸ‘Ž + - trigger: ;;skull + replace: πŸ’€ + - trigger: ;;weary + replace: 😩 + - trigger: ;;nerd + replace: πŸ€“ + - trigger: ;;sung + replace: 😎 + - trigger: ;;fire + replace: πŸ”₯ + - trigger: ;;eyes + replace: πŸ‘€ + - trigger: ;;fax + replace: πŸ“  + - trigger: ;;whcheck + replace: βœ… + - trigger: ;;cross + replace: ❌ + - trigger: ;;pensive + replace: πŸ˜” + - trigger: ;;raisedeye + replace: 🀨 + - trigger: ;;plead + replace: πŸ₯Ί + - trigger: ;;pointup + replace: ☝️ + - trigger: ;;shock + replace: 😱 diff --git a/espanso/match/img.yml b/espanso/match/img.yml new file mode 100644 index 0000000..47da2a8 --- /dev/null +++ b/espanso/match/img.yml @@ -0,0 +1,19 @@ +matches: + - trigger: ;;ipipe + image_path: "$CONFIG\\assets\\pipe.png" + - trigger: ;;ialert + image_path: "$CONFIG\\assets\\alert.png" + - trigger: ;;imiska + image_path: "$CONFIG\\assets\\kot_w_misce.png" + - trigger: ;;ikot + image_path: "$CONFIG\\assets\\kot.png" + - trigger: ;;iwifereaction + image_path: "$CONFIG\\assets\\my_wife_reaction_to_that_information.png" + - trigger: ;;iahh + image_path: "$CONFIG\\assets\\ahh.png" + - trigger: ;;ihuh + image_path: "$CONFIG\\assets\\huh.png" + - trigger: ;;irozpacz + image_path: "$CONFIG\\assets\\rozpacz.png" + - trigger: ;;iangry + image_path: "$CONFIG\\assets\\angry.png" diff --git a/espanso/match/meth.yml b/espanso/match/meth.yml new file mode 100644 index 0000000..0beb698 --- /dev/null +++ b/espanso/match/meth.yml @@ -0,0 +1,13 @@ +matches: + - trigger: ;;\cdot + replace: β‹… + - trigger: ;;\degree + replace: Β° + - trigger: ;;\beta + replace: Ξ² + - trigger: ;;\Delta + replace: Ξ” + - trigger: ;;\lambda + replace: Ξ» + - trigger: ;;\Omega + replace: Ξ© diff --git a/espanso/match/spelling.yml b/espanso/match/spelling.yml new file mode 100644 index 0000000..655b156 --- /dev/null +++ b/espanso/match/spelling.yml @@ -0,0 +1,5 @@ +matches: + - trigger: "nei" + replace: "nie" + word: true + propagate_case: true diff --git a/espanso/match/sub.yml b/espanso/match/sub.yml new file mode 100644 index 0000000..8c4d11f --- /dev/null +++ b/espanso/match/sub.yml @@ -0,0 +1,21 @@ +matches: + - trigger: ;;_0 + replace: β‚€ + - trigger: ;;_1 + replace: ₁ + - trigger: ;;_2 + replace: β‚‚ + - trigger: ;;_3 + replace: ₃ + - trigger: ;;_4 + replace: β‚„ + - trigger: ;;_5 + replace: β‚… + - trigger: ;;_6 + replace: ₆ + - trigger: ;;_7 + replace: ₇ + - trigger: ;;_8 + replace: β‚ˆ + - trigger: ;;_9 + replace: ₉ diff --git a/espanso/match/sup.yml b/espanso/match/sup.yml new file mode 100644 index 0000000..b67dfb7 --- /dev/null +++ b/espanso/match/sup.yml @@ -0,0 +1,21 @@ +matches: + - trigger: ;;^0 + replace: ⁰ + - trigger: ;;^1 + replace: ΒΉ + - trigger: ;;^2 + replace: Β² + - trigger: ;;^3 + replace: Β³ + - trigger: ;;^4 + replace: ⁴ + - trigger: ;;^5 + replace: ⁡ + - trigger: ;;^6 + replace: ⁢ + - trigger: ;;^7 + replace: ⁷ + - trigger: ;;^8 + replace: ⁸ + - trigger: ;;^9 + replace: ⁹ diff --git a/espanso/match/utils.yml b/espanso/match/utils.yml new file mode 100644 index 0000000..e43b7e6 --- /dev/null +++ b/espanso/match/utils.yml @@ -0,0 +1,20 @@ +matches: + - trigger: ;;now + replace: "{{time}}" + vars: + - name: time + type: date + params: + format: "%Y-%m-%d %H:%M:%S" + - trigger: ;;shrug + replace: Β―\_(ツ)_/Β― + - trigger: ;;bshrug + replace: Β―\\\_(ツ)_/Β― + - trigger: ;;lenny + replace: ( Ν‘Β° ΝœΚ– Ν‘Β°) + - trigger: ;;flip + replace: (β•―Β°β–‘Β°)β•―οΈ΅ ┻━┻ + - trigger: ;;unflip + replace: β”¬β”€β”¬γƒŽ( ΒΊ _ ΒΊγƒŽ) + - trigger: ;;tm + replace: β„’ -- cgit v1.3.1 From 9abff5717944b660dd8aa4dd73f566d02d6fbe08 Mon Sep 17 00:00:00 2001 From: kkard2 Date: Mon, 10 Jul 2023 18:53:28 +0200 Subject: ok this is too inconvenient --- _windows/ahk/capslock.ahk | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/_windows/ahk/capslock.ahk b/_windows/ahk/capslock.ahk index 447890c..0fb67bb 100644 --- a/_windows/ahk/capslock.ahk +++ b/_windows/ahk/capslock.ahk @@ -97,12 +97,12 @@ CapsLock::{ } } -; !CapsLock::{ -; return -; } -; ^CapsLock::{ -; return -; } +!CapsLock::{ + return +} +^CapsLock::{ + return +} ^!CapsLock::{ return } -- cgit v1.3.1 From c4f199cdb0ece409553f169346bdbc19e5fdf1f0 Mon Sep 17 00:00:00 2001 From: kkard2 Date: Mon, 10 Jul 2023 19:16:04 +0200 Subject: update_from_assets.py --- espanso/match/img.yml | 30 +++++++++++++++--------------- espanso/update_from_assets.py | 20 ++++++++++++++++++++ 2 files changed, 35 insertions(+), 15 deletions(-) create mode 100644 espanso/update_from_assets.py diff --git a/espanso/match/img.yml b/espanso/match/img.yml index 47da2a8..45ffcdf 100644 --- a/espanso/match/img.yml +++ b/espanso/match/img.yml @@ -1,19 +1,19 @@ matches: - - trigger: ;;ipipe - image_path: "$CONFIG\\assets\\pipe.png" - - trigger: ;;ialert - image_path: "$CONFIG\\assets\\alert.png" - - trigger: ;;imiska - image_path: "$CONFIG\\assets\\kot_w_misce.png" - - trigger: ;;ikot - image_path: "$CONFIG\\assets\\kot.png" - - trigger: ;;iwifereaction - image_path: "$CONFIG\\assets\\my_wife_reaction_to_that_information.png" - trigger: ;;iahh - image_path: "$CONFIG\\assets\\ahh.png" + image_path: $CONFIG/assets/img/ahh.png + - trigger: ;;ialert + image_path: $CONFIG/assets/img/alert.png + - trigger: ;;iangry + image_path: $CONFIG/assets/img/angry.png - trigger: ;;ihuh - image_path: "$CONFIG\\assets\\huh.png" + image_path: $CONFIG/assets/img/huh.png + - trigger: ;;ikot + image_path: $CONFIG/assets/img/kot.png + - trigger: ;;ikot_w_misce + image_path: $CONFIG/assets/img/kot_w_misce.png + - trigger: ;;imy_wife_reaction_to_that_information + image_path: $CONFIG/assets/img/my_wife_reaction_to_that_information.png + - trigger: ;;ipipe + image_path: $CONFIG/assets/img/pipe.png - trigger: ;;irozpacz - image_path: "$CONFIG\\assets\\rozpacz.png" - - trigger: ;;iangry - image_path: "$CONFIG\\assets\\angry.png" + image_path: $CONFIG/assets/img/rozpacz.png diff --git a/espanso/update_from_assets.py b/espanso/update_from_assets.py new file mode 100644 index 0000000..e2b76d5 --- /dev/null +++ b/espanso/update_from_assets.py @@ -0,0 +1,20 @@ +import os + + +def generate(path, output_file, prefix): + files = [ + f for f in os.listdir(path) if os.path.isfile(os.path.join(path, f)) + ] + + with open(output_file, 'w') as f: + f.write('matches:\n') + + for file in files: + path_wo_ext = os.path.splitext(file)[0] + f.write(' - trigger: ;;' + prefix + path_wo_ext + '\n') + f.write( + ' image_path: $CONFIG/' + path + '/' + file + '\n') + + +if __name__ == '__main__': + generate('assets/img', 'match/img.yml', 'i') -- cgit v1.3.1 From d5c3502ba0a706122a4e9fdf22af55b56a721649 Mon Sep 17 00:00:00 2001 From: kkard2 Date: Mon, 10 Jul 2023 19:34:23 +0200 Subject: don't store auto-generated things --- README.md | 3 +++ espanso/match/.gitignore | 2 ++ espanso/match/img.yml | 19 ------------------- 3 files changed, 5 insertions(+), 19 deletions(-) create mode 100644 espanso/match/.gitignore delete mode 100644 espanso/match/img.yml diff --git a/README.md b/README.md index a4368cd..4e7a206 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,9 @@ # .dotfiles config stuff (i need to move everything into one place) +# running +* run `./espanso/update_from_assets.py` + # links for this to work * `~/.ideavimrc` -> `./idea/.ideavimrc` * `$XDG_CONFIG_HOME/espanso` -> `./espanso` diff --git a/espanso/match/.gitignore b/espanso/match/.gitignore new file mode 100644 index 0000000..42cb622 --- /dev/null +++ b/espanso/match/.gitignore @@ -0,0 +1,2 @@ +img.yml +gif.yml diff --git a/espanso/match/img.yml b/espanso/match/img.yml deleted file mode 100644 index 45ffcdf..0000000 --- a/espanso/match/img.yml +++ /dev/null @@ -1,19 +0,0 @@ -matches: - - trigger: ;;iahh - image_path: $CONFIG/assets/img/ahh.png - - trigger: ;;ialert - image_path: $CONFIG/assets/img/alert.png - - trigger: ;;iangry - image_path: $CONFIG/assets/img/angry.png - - trigger: ;;ihuh - image_path: $CONFIG/assets/img/huh.png - - trigger: ;;ikot - image_path: $CONFIG/assets/img/kot.png - - trigger: ;;ikot_w_misce - image_path: $CONFIG/assets/img/kot_w_misce.png - - trigger: ;;imy_wife_reaction_to_that_information - image_path: $CONFIG/assets/img/my_wife_reaction_to_that_information.png - - trigger: ;;ipipe - image_path: $CONFIG/assets/img/pipe.png - - trigger: ;;irozpacz - image_path: $CONFIG/assets/img/rozpacz.png -- cgit v1.3.1 From 8e0612846261c0353f705ef8ffebaf03c5d466cb Mon Sep 17 00:00:00 2001 From: kkard2 Date: Mon, 10 Jul 2023 19:37:23 +0200 Subject: add autogeneration --- espanso/update_from_assets.py | 1 + 1 file changed, 1 insertion(+) diff --git a/espanso/update_from_assets.py b/espanso/update_from_assets.py index e2b76d5..d62b878 100644 --- a/espanso/update_from_assets.py +++ b/espanso/update_from_assets.py @@ -18,3 +18,4 @@ def generate(path, output_file, prefix): if __name__ == '__main__': generate('assets/img', 'match/img.yml', 'i') + generate('assets/gif', 'match/gif.yml', 'g') -- cgit v1.3.1 From f8d9727953637e992e220c91f0bba3ae78d9a567 Mon Sep 17 00:00:00 2001 From: kkard2 Date: Mon, 10 Jul 2023 20:10:09 +0200 Subject: gifs don't work xdd --- espanso/match/.gitignore | 1 - espanso/match/gif.yml | 15 +++++++++++++++ espanso/update_from_assets.py | 1 - 3 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 espanso/match/gif.yml diff --git a/espanso/match/.gitignore b/espanso/match/.gitignore index 42cb622..845e553 100644 --- a/espanso/match/.gitignore +++ b/espanso/match/.gitignore @@ -1,2 +1 @@ img.yml -gif.yml diff --git a/espanso/match/gif.yml b/espanso/match/gif.yml new file mode 100644 index 0000000..21fb932 --- /dev/null +++ b/espanso/match/gif.yml @@ -0,0 +1,15 @@ +matches: + - trigger: ;;gblack + image_path: $CONFIG/assets/gif/black.gif + - trigger: ;;gfirewrite + image_path: $CONFIG/assets/gif/firewrite.gif + - trigger: ;;ghilarious + image_path: $CONFIG/assets/gif/hilarious.gif + - trigger: ;;gofc + image_path: $CONFIG/assets/gif/ofc.gif + - trigger: ;;gpipe + image_path: $CONFIG/assets/gif/pipe.gif + - trigger: ;;gwhar + image_path: $CONFIG/assets/gif/whar.gif + - trigger: ;;gwhite + image_path: $CONFIG/assets/gif/white.gif diff --git a/espanso/update_from_assets.py b/espanso/update_from_assets.py index d62b878..e2b76d5 100644 --- a/espanso/update_from_assets.py +++ b/espanso/update_from_assets.py @@ -18,4 +18,3 @@ def generate(path, output_file, prefix): if __name__ == '__main__': generate('assets/img', 'match/img.yml', 'i') - generate('assets/gif', 'match/gif.yml', 'g') -- cgit v1.3.1