reducing those small frictions result in much more notes and less disruption of the current task, you think of something, a note is added in a few seconds and you can continue working on.
I upvoted for this snippet because it’s an important aspect of the situation that I forgot to call out in the main post.
Would you mind sharing your code?
Sure! This one is actually a one-liner: it’s simply “gedit ~/Documents/lists/$1”, which you put in a file called “l” in your ~/bin/ directory. If you prefer a different editor, you can swap out “gedit” for “emacs” or the command used to launch whatever editor you like. (This advice is directed at others reading this comment chain, you probably already know how to do that.)
I found that using some keybindings to rely solely on the keyboard also made a good improvement.
That’s a good idea. I currently have a piece of software that I use to type diacritics (for Toaq) but I’m not super happy with it — it kind of bugs out on occasion and can be slow to insert the characters I want. The software I’m using is AutoKey. What do you use? Are you happy with it?
I recommend also implementing some scripts to search on the web [...]
This is also a good idea. I’m pretty fast at typing and pretty slow with the mouse, so I’d probably instead make a macro for “prompt me for a search key, open a new tab, search that thing, then take me back to the tab I was in before”.
The software I’m using is AutoKey. What do you use? Are you happy with it?
I’m using LXDE as a desktop environment and it allows you to set the shortcuts in its config file.
If I’m not mistaken, other flavors, like GNOME and KDE, had a GUI to bind a certain key sequence to a script.
It seems that it catches the keybindings instantaneously and any lag is due starting a program called by the script, but it is usually around 1 second, which is similar to launch the program independently.
Autokey sounded very promising, but it is too slow.
I wanted to port my emacs keybindings to use system wide, but it was impossible to use due to its lags.
This is also a good idea. I’m pretty fast at typing and pretty slow with the mouse, so I’d probably instead make a macro for “prompt me for a search key, open a new tab, search that thing, then take me back to the tab I was in before”.
My (shell) scripts are pretty simple, the one that prompt me for a search query is:
xclip -o -selection p > query.temp
leafpad query.temp
query=$(<query.temp)
key=${query%%[ .:]*} # get only the first word or 'www' or 'http*'
case $key in
"wiki") # search on wikipedia
term=${query#* } # get from second word to end
url="https://www.wikipedia.org/search-redirect.php?family=wikipedia&language=en&go=Go&search=″
;;
## Other cases omitted
*) # didn’t matched anything → search on web
# there is a command—search, but it opens a new window
url=”https://duckduckgo.com/?q=″
term=$query
;;
esac
/opt/firefox/firefox—new-tab “$url$term”
rm query.temp # remove the temp fifo
And a fast search of the current selected text:
query=$(xclip -o -selection p)
if [[ $query =~ ^(http|www).*$ ]]; then
url=$query
elif [[ $query =~ ^.*\..{2,3}(/[^ ]*)?$ ]]; then
url=$query
else
url="https://duckduckgo.com/?q=“$query
fi
/opt/firefox/firefox—new-tab “$url”
I started with the first one, which offers more flexibility, but most of time I use the fast one and I edit the query if it doesn’t return the desired results.
I upvoted for this snippet because it’s an important aspect of the situation that I forgot to call out in the main post.
Sure! This one is actually a one-liner: it’s simply “gedit ~/Documents/lists/$1”, which you put in a file called “l” in your ~/bin/ directory. If you prefer a different editor, you can swap out “gedit” for “emacs” or the command used to launch whatever editor you like. (This advice is directed at others reading this comment chain, you probably already know how to do that.)
That’s a good idea. I currently have a piece of software that I use to type diacritics (for Toaq) but I’m not super happy with it — it kind of bugs out on occasion and can be slow to insert the characters I want. The software I’m using is AutoKey. What do you use? Are you happy with it?
This is also a good idea. I’m pretty fast at typing and pretty slow with the mouse, so I’d probably instead make a macro for “prompt me for a search key, open a new tab, search that thing, then take me back to the tab I was in before”.
I’m using LXDE as a desktop environment and it allows you to set the shortcuts in its config file. If I’m not mistaken, other flavors, like GNOME and KDE, had a GUI to bind a certain key sequence to a script.
It seems that it catches the keybindings instantaneously and any lag is due starting a program called by the script, but it is usually around 1 second, which is similar to launch the program independently.
Autokey sounded very promising, but it is too slow. I wanted to port my emacs keybindings to use system wide, but it was impossible to use due to its lags.
My (shell) scripts are pretty simple, the one that prompt me for a search query is:
And a fast search of the current selected text:
I started with the first one, which offers more flexibility, but most of time I use the fast one and I edit the query if it doesn’t return the desired results.