1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
One of the best things about computers is that they can automate repetitive tasks. One of my favorite ways to automate my least favorite repetitive tasks -- typing the same thing over the over -- is with saved text snippets.
For example, when I cold email a company for work I have some boilerplate text that says something like hey, my name is Scott, I work for WIRED, I'm contacting you because... and so on. Similarly, when I write a bit of Python to build something for this site, I'm probably going to write something to the effect of this several times:
~~~python
class MyClass():
"""
Docstring describing class
"""
def myfunc(self):
"""
Docstring describing function
"""
~~~
To save some time I have built up a lot of little text snippets over time. When I was X11 I used [Autokey](https://github.com/autokey/autokey). It's pretty simple, you define a shortcut for your longer chunk of text, and then whenever you type that shortcut Autokey "expands" it to your longer text.
It's a nice little app and I wish it worked under Wayland, or even XWayland, but currently it doesn't, and it's unclear to me whether it's possible to do this at all with Wayland's security model. Even if it is possible, no one seems to have written anything like Autokey for Wayland yet.
That kinda sucks. But really what I need is a fast way to get these saved chunks of text into documents I'm creating. If I'm in vim, then it's no problem, I just dropped all my old Autokey snippets into my vimrc and added some keybindings. But alas I am not always writing in Vim. My current job requires me to use Gmail, which is the bane of my existence
***
Tangential rant: it blows my mind that people don't just put up with Gmail, they love it. I don't get it. Forget the privacy-invasion of reading your email, forget the tracking, forget the data harvesting, the UI is awful. The fonts are illegible. HTML email constantly renders strangely and Gmail will never fall back to plain text. The search is no better than notmuch, and the keybinding support is a joke. I can navigate, search, and act on email using mutt 10x faster than Gmail. I waste hours a week using Gmail. But, no choice.
***
To get those dozen or so snippets I use regularly for work I discovered
|