As far as I know the dropdown menus are program-specific, so to add a system-wide dropdown menu item you would need to adjust nearly every single program's menu accordingly, and there may very well be programs where the menu is hard-coded and not easily modifiable.
I suggest you define a global keyboard shortcut instead, there are several question on this topic here, e.g. GNOME 3 Shell keyboard/mouse shortcuts for GNOME Shell. To capture the currently selected text I recommend xclip
, the command is:
xclip -o >>~/notes/notepad.txt
Note that this does not append the content of the clipboard buffer (which is filled e.g. with Ctrl+C) to the file, but the content of the primary buffer instead, which always contains the text you mark(ed). More about this important difference can be found on Unix.SE: What's the difference between Primary Selection and Clipboard Buffer?,
wiki.archlinux.org and in this excellent article.
If you want to append the content of the clipboard buffer, use:
xclip -se c -o >>~/notes/notepad.txt
Explanations
-se c
– short for -selection clipboard
, uses the clipboard buffer instead of the (default) primary one
-o
– output from the selected buffer instead of writing to it (default)
>>~/notes/notepad.txt
– redirect the output to the file ~/notes/notepad.txt
appending to its content
See man xclip
for more information.